metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/graph_vectorstores/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@graph_vectorstores@__init__.py@.PATH_END.py
{ "filename": "dispatch.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/dedalus/tools/dispatch.py", "type": "Python" }
""" Tools for emulating multiple dispatch. """ from .cache import CachedClass from .exceptions import SkipDispatchException class MultiClass(type): """Metaclass for dispatching instantiation to subclasses.""" def __call__(cls, *args, **kw): """Dispatch instantiation based on the supplied arguments....
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@dedalus@tools@dispatch.py@.PATH_END.py
{ "filename": "shell_convection.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/examples/ivp_shell_convection/shell_convection.py", "type": "Python" }
""" Dedalus script simulating Boussinesq convection in a spherical shell. This script demonstrates solving an initial value problem in the shell. It can be ran serially or in parallel, and uses the built-in analysis framework to save data snapshots to HDF5 files. The `plot_shell.py` script can be used to produce plots ...
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@examples@ivp_shell_convection@shell_convection.py@.PATH_END.py
{ "filename": "toy.py", "repo_name": "andersdot/photoParallax", "repo_path": "photoParallax_extracted/photoParallax-master/toy/toy.py", "type": "Python" }
import numpy as np import scipy.optimize as op import sys import matplotlib as mpl import matplotlib.pyplot as plt def make_fake_data(parsTrue, N=512): np.random.seed(42) mtrue, btrue, ttrue = parsTrue xns = np.random.uniform(size=N) * 2. - 1. tns = np.random.normal(scale=ttrue, size=N) #tns = np.r...
andersdotREPO_NAMEphotoParallaxPATH_START.@photoParallax_extracted@photoParallax-master@toy@toy.py@.PATH_END.py
{ "filename": "maximum.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/merging/maximum.py", "type": "Python" }
from keras.src import ops from keras.src.api_export import keras_export from keras.src.layers.merging.base_merge import Merge @keras_export("keras.layers.Maximum") class Maximum(Merge): """Computes element-wise maximum on a list of inputs. It takes as input a list of tensors, all of the same shape, and r...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@merging@maximum.py@.PATH_END.py
{ "filename": "coreml.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/integrations/coreml.md", "type": "Markdown" }
--- comments: true description: Learn how to export YOLO11 models to CoreML for optimized, on-device machine learning on iOS and macOS. Follow step-by-step instructions. keywords: CoreML export, YOLO11 models, CoreML conversion, Ultralytics, iOS object detection, macOS machine learning, AI deployment, machine learning ...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@integrations@coreml.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "mwilensky768/SSINS", "repo_path": "SSINS_extracted/SSINS-master/README.md", "type": "Markdown" }
# SSINS Readme SSINS is a python package intended for radio frequency interference flagging in radio astronomy datasets. It stands for Sky-Subtracted Incoherent Noise Spectra. If you use this software for published work, please cite this paper that describes the SSINS method: (doi:10.1088/1538-3873/ab3cad) (arxiv vers...
mwilensky768REPO_NAMESSINSPATH_START.@SSINS_extracted@SSINS-master@README.md@.PATH_END.py
{ "filename": "utils.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/ainetwork/utils.py", "type": "Python" }
"""AINetwork Blockchain tool utils.""" from __future__ import annotations import os from typing import TYPE_CHECKING, Literal, Optional if TYPE_CHECKING: from ain.ain import Ain def authenticate(network: Optional[Literal["mainnet", "testnet"]] = "testnet") -> Ain: """Authenticate using the AIN Blockchain""...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@ainetwork@utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/gcp/python/__init__.py", "type": "Python" }
from .._libgcp import * from .ARCExtractor import UnpackACUData, UnpackTrackerData, DecryptFeatureBit, ARCExtract, ARCExtractMinimal from .ARCHKExtractor import UnpackSPTpolHKData from .GCPDataTee import GCPHousekeepingTee, GCPSignalledHousekeeping, GCPBoloDataTee, PagerWatchdog, DAQWatchdog from .InfluxDB import Upda...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@gcp@python@__init__.py@.PATH_END.py
{ "filename": "reduce_lr_on_plateau_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/callbacks/reduce_lr_on_plateau_test.py", "type": "Python" }
import pytest from keras.src import callbacks from keras.src import layers from keras.src import optimizers from keras.src import testing from keras.src.models import Sequential from keras.src.testing import test_utils from keras.src.utils import io_utils from keras.src.utils import numerical_utils class ReduceLROnP...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@callbacks@reduce_lr_on_plateau_test.py@.PATH_END.py
{ "filename": "dates.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/matplotlib/dates.py", "type": "Python" }
""" Matplotlib provides sophisticated date plotting capabilities, standing on the shoulders of python :mod:`datetime`, the add-on modules :mod:`pytz` and :mod:`dateutil`. :class:`datetime` objects are converted to floating point numbers which represent time in days since 0001-01-01 UTC, plus 1. For example, 0001-01-0...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@dates.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@colorbar@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/bar/_legendgrouptitle.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar" _path_str = "bar.legendgrouptitle" _valid_props = {"font", "text"} # fon...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@bar@_legendgrouptitle.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="funnel.marker.colorbar", **kwargs ): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@colorbar@_tick0.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-k8s/helm/README.md", "type": "Markdown" }
NOTE: there are two deployment versions, one for minikube and one for a cluster, copy the correct file into templates. The DALiuGE root directory needs to be visible inside the cluster. In the case of minikube this means you may need to run minikube mount <local path>/dlg:/dlg Finally, on minikube you may need to r...
icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-k8s@helm@README.md@.PATH_END.py
{ "filename": "photon_vs_fft_plots.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/external/test_photon_vs_fft/photon_vs_fft_plots.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@external@test_photon_vs_fft@photon_vs_fft_plots.py@.PATH_END.py
{ "filename": "six.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/extern/bundled/six.py", "type": "Python" }
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@extern@bundled@six.py@.PATH_END.py
{ "filename": "multipart.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/common/twisted/test/multipart.py", "type": "Python" }
##################################################################################### # # Copyright (c) typedef int GmbH # SPDX-License-Identifier: EUPL-1.2 # ##################################################################################### """ Tools for generating multipart requests. """ from uuid import uuid4 ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@common@twisted@test@multipart.py@.PATH_END.py
{ "filename": "_nticks.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/_nticks.py", "type": "Python" }
import _plotly_utils.basevalidators class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.scene.yaxis", **kwargs ): super(NticksValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@_nticks.py@.PATH_END.py
{ "filename": "_ticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/angularaxis/_ticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.polar.angularaxis", **kwargs ): super(TicksuffixValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@angularaxis@_ticksuffix.py@.PATH_END.py
{ "filename": "events.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/events.py", "type": "Python" }
import traceback import logging logger = logging.getLogger("vaex.events") class Signal(object): def __init__(self, name=None): """ :type name: str :return: """ self.name = name or repr(self) self.callbacks = [] self.extra_args = {} def connect(self, ca...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@events.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "simonsobs/ocs", "repo_path": "ocs_extracted/ocs-main/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
simonsobsREPO_NAMEocsPATH_START.@ocs_extracted@ocs-main@docs@conf.py@.PATH_END.py
{ "filename": "plot_function_registry.py", "repo_name": "NuSpaceSim/nuSpaceSim", "repo_path": "nuSpaceSim_extracted/nuSpaceSim-main/src/nuspacesim/utils/plot_function_registry.py", "type": "Python" }
__all__ = ["registry"] registry = set()
NuSpaceSimREPO_NAMEnuSpaceSimPATH_START.@nuSpaceSim_extracted@nuSpaceSim-main@src@nuspacesim@utils@plot_function_registry.py@.PATH_END.py
{ "filename": "test_priors_simple.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/tests/test_priors_simple.py", "type": "Python" }
import numpy as np import pytest from ..defaults import LOWVAL from ..priors import ( FlatPrior, TwoSidedErf, Normal, LMBounds, Bounded1D, LimitPDF, LogNormal, Sinh, TruncatedGaussian, ) from ..gexceptions import GMixRangeError @pytest.mark.parametrize('klass', [Bounded1D, LimitP...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@tests@test_priors_simple.py@.PATH_END.py
{ "filename": "_cmp.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/attrs/py3/attr/_cmp.py", "type": "Python" }
# SPDX-License-Identifier: MIT import functools import types from ._make import _make_ne _operation_names = {"eq": "==", "lt": "<", "le": "<=", "gt": ">", "ge": ">="} def cmp_using( eq=None, lt=None, le=None, gt=None, ge=None, require_same_type=True, class_name="Comparable", ): ""...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@attrs@py3@attr@_cmp.py@.PATH_END.py
{ "filename": "test_categorical.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/distributions/test_categorical.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase import numpy as np import pytest import scipy.stats as sp import torch import pyro.distributions as dist from tests.common import assert_equal class TestCategorical(TestCase): """ Tests met...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@distributions@test_categorical.py@.PATH_END.py
{ "filename": "_optical_flow_utils.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/registration/_optical_flow_utils.py", "type": "Python" }
"""Common tools to optical flow algorithms.""" import numpy as np from scipy import ndimage as ndi from ..transform import pyramid_reduce from ..util.dtype import _convert def _get_warp_points(grid, flow): """Compute warp point coordinates. Parameters ---------- grid : iterable The sparse g...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@registration@_optical_flow_utils.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "KenethGarcia/ClassiPyGRB", "repo_path": "ClassiPyGRB_extracted/ClassiPyGRB-master/JOSS_Docs/paper.md", "type": "Markdown" }
--- title: 'ClassiPyGRB: Machine Learning-Based Classification and Visualization of Gamma Ray Bursts using t-SNE' tags: - Python - astronomy - transient astronomy - gamma ray bursts - extragalactic astronomy authors: - name: Keneth Garcia-Cifuentes orcid: 0009-0001-2607-6359 equal-contrib: true ...
KenethGarciaREPO_NAMEClassiPyGRBPATH_START.@ClassiPyGRB_extracted@ClassiPyGRB-master@JOSS_Docs@paper.md@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/table/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="table", **kwargs): super(UirevisionValidator, 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@table@_uirevision.py@.PATH_END.py
{ "filename": "bintores.py", "repo_name": "MazinLab/MKIDGen3", "repo_path": "MKIDGen3_extracted/MKIDGen3-main/mkidgen3/drivers/bintores.py", "type": "Python" }
from pynq import DefaultIP from logging import getLogger from mkidgen3.opfb import opfb_bin_number class BinToResIP(DefaultIP): resmap_addr = 0x1000 bindto = ['MazinLab:mkidgen3:bin_to_res:0.6', 'mazinlab:mkidgen3:bin_to_res:1.33'] def __init__(self, description): """ The core uses an arr...
MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@mkidgen3@drivers@bintores.py@.PATH_END.py
{ "filename": "Scalar_Diffusion.ipynb", "repo_name": "geodynamics/Rayleigh", "repo_path": "Rayleigh_extracted/Rayleigh-main/examples/ultraspherical_polynomials/Scalar_Diffusion.ipynb", "type": "Jupyter Notebook" }
Let's solve the scalar diffusion equation on $(t,x)\in[0,\infty)\times[-1,1]$, $$\partial_t q(t,x) - \nu \partial_{xx} q(t,x) = 0.$$ Starting with a constant $\nu$, using a Chebyshev polynomial basis of the first kind ($T_n(x)$) and a test basis of Ultraspherical polynomials of the second kind ($C^2_n(x)$). Thus, th...
geodynamicsREPO_NAMERayleighPATH_START.@Rayleigh_extracted@Rayleigh-main@examples@ultraspherical_polynomials@Scalar_Diffusion.ipynb@.PATH_END.py
{ "filename": "api.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/miscmodels/api.py", "type": "Python" }
__all__ = ["TLinearModel", "PoissonGMLE", "PoissonOffsetGMLE", "PoissonZiGMLE"] from .tmodel import TLinearModel from .count import (PoissonGMLE, PoissonOffsetGMLE, PoissonZiGMLE, #NonlinearDeltaCov )
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@miscmodels@api.py@.PATH_END.py
{ "filename": "Tutorial-Start_to_Finish_UnitTest-GiRaFFEfood_NRPy-Curved_Spacetime_Tests.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/in_progress-GiRaFFE_NRPy/Tutorial-Start_to_Finish_UnitTest-GiRaFFEfood_NRPy-Curved_Spacetime_Tests.ipynb", "type": "J...
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Start-to-Finish Example: Validating `GiRaFFEfood_NRPy` ag...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@in_progress-GiRaFFE_NRPy@Tutorial-Start_to_Finish_UnitTest-GiRaFFEfood_NRPy-Curved_Spacetime_Tests.ipynb@.PATH_END.py
{ "filename": "4_SlicePlot Animations.ipynb", "repo_name": "Ensor-code/plons", "repo_path": "plons_extracted/plons-main/docs/src/1_examples/0_creating_sliceFigures/4_SlicePlot Animations.ipynb", "type": "Jupyter Notebook" }
# Making 2d plot animation ### Import packages ```python import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as ani import IPython %matplotlib agg # import plons scripts import plons import plons.SmoothingKernelScript as sk import plons.P...
Ensor-codeREPO_NAMEplonsPATH_START.@plons_extracted@plons-main@docs@src@1_examples@0_creating_sliceFigures@4_SlicePlot Animations.ipynb@.PATH_END.py
{ "filename": "control_flow_duplicate_v1.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/control_flow_duplicate_v1.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@tensorflow@tests@tf_saved_model@control_flow_duplicate_v1.py@.PATH_END.py
{ "filename": "_ypad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/colorbar/_ypad.py", "type": "Python" }
import _plotly_utils.basevalidators class YpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="contour.colorbar", **kwargs): super(YpadValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@colorbar@_ypad.py@.PATH_END.py
{ "filename": "listGrid.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/python/listGrid.py", "type": "Python" }
from __future__ import absolute_import from __future__ import print_function from paramgrid import batchjob_args Opts = batchjob_args.batchArgs('List items in a grid', importance=True, converge=True, notExist=True) Opts.parser.add_argument('--exists', action='store_true', help='chain must exist') Opts.parser.add_argu...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@python@listGrid.py@.PATH_END.py
{ "filename": "_textsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pointcloud/_textsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="pointcloud", **kwargs): super(TextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pointcloud@_textsrc.py@.PATH_END.py
{ "filename": "demo.py", "repo_name": "AstroJacobLi/smplotlib", "repo_path": "smplotlib_extracted/smplotlib-main/src/smplotlib/demo.py", "type": "Python" }
import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import smplotlib def demo_plot(): pkg_path = smplotlib.__path__[0] data = np.load(os.path.join(pkg_path, './test_data/test_array.npy')) Pr = data[0] Teqs = data[1] fig, ax = plt.subplots(figsize=(5.5, 5.5)) ...
AstroJacobLiREPO_NAMEsmplotlibPATH_START.@smplotlib_extracted@smplotlib-main@src@smplotlib@demo.py@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@_xpad.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "DarkQuestCosmology/dark_emulator_public", "repo_path": "dark_emulator_public_extracted/dark_emulator_public-main/dark_emulator/fftlog/__init__.py", "type": "Python" }
from .fftlog import *
DarkQuestCosmologyREPO_NAMEdark_emulator_publicPATH_START.@dark_emulator_public_extracted@dark_emulator_public-main@dark_emulator@fftlog@__init__.py@.PATH_END.py
{ "filename": "sum_mass_in_sphere.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/doc/source/cookbook/sum_mass_in_sphere.py", "type": "Python" }
import yt # Load the dataset. ds = yt.load("Enzo_64/DD0029/data0029") # Create a 1 Mpc radius sphere, centered on the max density. sp = ds.sphere("max", (1.0, "Mpc")) # Use the total_quantity derived quantity to sum up the # values of the mass and particle_mass fields # within the sphere. baryon_mass, particle_mass ...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@sum_mass_in_sphere.py@.PATH_END.py
{ "filename": "cont_norm_test_obj.py", "repo_name": "annayqho/TheCannon", "repo_path": "TheCannon_extracted/TheCannon-master/code/lamost/xcalib_5labels/cont_norm_test_obj.py", "type": "Python" }
import numpy as np import pickle import glob from matplotlib import rc from lamost import load_spectra, load_labels from TheCannon import continuum_normalization from TheCannon import dataset from TheCannon import model rc('text', usetex=True) rc('font', family='serif') with np.load("test_data_raw.npz") as data: ...
annayqhoREPO_NAMETheCannonPATH_START.@TheCannon_extracted@TheCannon-master@code@lamost@xcalib_5labels@cont_norm_test_obj.py@.PATH_END.py
{ "filename": "test_system.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_system.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2016, 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@tests@test_system.py@.PATH_END.py
{ "filename": "text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/text.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.configs import ApacheConfLexer, NginxConfLexer, \ Sq...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@text.py@.PATH_END.py
{ "filename": "spotrod-setup.py", "repo_name": "bencebeky/spotrod", "repo_path": "spotrod_extracted/spotrod-master/spotrod-setup.py", "type": "Python" }
#!/usr/bin/env python # coding=utf8 # # Copyright 2013, 2014 Bence Béky # # This file is part of Spotrod. # # Spotrod 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...
bencebekyREPO_NAMEspotrodPATH_START.@spotrod_extracted@spotrod-master@spotrod-setup.py@.PATH_END.py
{ "filename": "model_serialization.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/keras/saving/saved_model/model_serialization.py", "type": "Python" }
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@keras@saving@saved_model@model_serialization.py@.PATH_END.py
{ "filename": "databricks.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/llms/databricks.ipynb", "type": "Jupyter Notebook" }
# Databricks > [Databricks](https://www.databricks.com/) Lakehouse Platform unifies data, analytics, and AI on one platform. This notebook provides a quick overview for getting started with Databricks [LLM models](https://python.langchain.com/docs/concepts/text_llms). For detailed documentation of all features and c...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@llms@databricks.ipynb@.PATH_END.py
{ "filename": "test_array_utils.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/lib/tests/test_array_utils.py", "type": "Python" }
import numpy as np from numpy.lib import array_utils from numpy.testing import assert_equal class TestByteBounds: def test_byte_bounds(self): # pointer difference matches size * itemsize # due to contiguity a = np.arange(12).reshape(3, 4) low, high = array_utils.byte_bounds(a) ...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@lib@tests@test_array_utils.py@.PATH_END.py
{ "filename": "setup_package.py", "repo_name": "cmccully/astroscrappy", "repo_path": "astroscrappy_extracted/astroscrappy-master/astroscrappy/utils/setup_package.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals) import os import sys import subprocess from distutils.core import Extension from distutils import log from astropy_helpers import setup_helpers UTIL_DIR = os.path.relpath(os.path.dirname(__file__)) CODELINES...
cmccullyREPO_NAMEastroscrappyPATH_START.@astroscrappy_extracted@astroscrappy-master@astroscrappy@utils@setup_package.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "clemson-cal/sailfish", "repo_path": "sailfish_extracted/sailfish-master/sailfish/setups/__init__.py", "type": "Python" }
from .simple1d import * from .simple2d import * from .envelope_shock import * from .exploding_star import * from .circumbinary_disk import * from .binary_bondi import *
clemson-calREPO_NAMEsailfishPATH_START.@sailfish_extracted@sailfish-master@sailfish@setups@__init__.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/conftest.py", "type": "Python" }
import pytest # List of files that pytest should ignore collect_ignore = [ "io/_plugins", ] @pytest.fixture(autouse=True) def handle_np2(): # TODO: remove when we require numpy >= 2 try: import numpy as np np.set_printoptions(legacy="1.21") except ImportError: pass
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@conftest.py@.PATH_END.py
{ "filename": "fa.md", "repo_name": "cajohare/AxionLimits", "repo_path": "AxionLimits_extracted/AxionLimits-master/docs/fa.md", "type": "Markdown" }
# Mass vs Peccei-Quinn scale --- [<img align="right" height="300" src="../plots/plots_png/Axion_fa.png">](https://github.com/cajohare/AxionLimits/raw/master/plots/plots_png/Axion_fa.png) ### Basic plot ### [View Notebook (.ipynb)](https://github.com/cajohare/AxionLimits/blob/master/Axion_fa.ipynb) ### [Download (.pdf)]...
cajohareREPO_NAMEAxionLimitsPATH_START.@AxionLimits_extracted@AxionLimits-master@docs@fa.md@.PATH_END.py
{ "filename": "test_config.py", "repo_name": "rmjarvis/TreeCorr", "repo_path": "TreeCorr_extracted/TreeCorr-main/tests/test_config.py", "type": "Python" }
# Copyright (c) 2003-2024 by Mike Jarvis # # TreeCorr is free software: redistribution and use in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condi...
rmjarvisREPO_NAMETreeCorrPATH_START.@TreeCorr_extracted@TreeCorr-main@tests@test_config.py@.PATH_END.py
{ "filename": "_ticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/aaxis/_ticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="carpet.aaxis", **kwargs): super(TicksuffixValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@aaxis@_ticksuffix.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="bar.marker.colorbar", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@colorbar@_thickness.py@.PATH_END.py
{ "filename": "conv3d.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/conv3d.py", "type": "Python" }
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@testing@op_tests@conv3d.py@.PATH_END.py
{ "filename": "primitives_visualize.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/primitives_visualize.py", "type": "Python" }
# # gemini_python # # primitives_visualize.py # ------------------------------------------------------------------------------ import json import numpy as np import time import inspect import urllib.r...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@primitives_visualize.py@.PATH_END.py
{ "filename": "windows_jumps.py", "repo_name": "PuMA-Coll/Timing_irregularities", "repo_path": "Timing_irregularities_extracted/Timing_irregularities-main/windows_jumps.py", "type": "Python" }
#!/usr/bin/env python import argparse import os import astropy.units as u import matplotlib.pyplot as plt import pint.fitter import pint.residuals import pint.toa from pint.models import get_model, get_model_and_toas import pint.logging import pint.config import numpy as np import pint.residuals as res import copy from...
PuMA-CollREPO_NAMETiming_irregularitiesPATH_START.@Timing_irregularities_extracted@Timing_irregularities-main@windows_jumps.py@.PATH_END.py
{ "filename": "pos1.py", "repo_name": "lgrcia/prose", "repo_path": "prose_extracted/prose-main/prose/archive/pos1.py", "type": "Python" }
from io import StringIO import astropy.units as u import numpy as np import requests from astropy.io import fits from astropy.table import Table from prose import FITSImage, blocks, utils from prose.console_utils import info from prose.telescope import Telescope def pos1_image(skycoord, fov, filter="z"): """ ...
lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@prose@archive@pos1.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/openai/tests/integration_tests/llms/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@openai@tests@integration_tests@llms@__init__.py@.PATH_END.py
{ "filename": "version.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/version.py", "type": "Python" }
from ._version import get_versions __version__ = get_versions()["version"] del get_versions from ._widget_version import __frontend_version__ def stable_semver(): """ Get the stable portion of the semantic version string (the first three numbers), without any of the trailing labels '3.0.0rc11' -> '...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@version.py@.PATH_END.py
{ "filename": "ReadMe.md", "repo_name": "basp-group/faceted-hypersara", "repo_path": "faceted-hypersara_extracted/faceted-hypersara-master/pyxisMs2mat/ReadMe.md", "type": "Markdown" }
# Requirements 1. Casacore https://github.com/casacore/casacore 2. Meqtrees https://github.com/ratt-ru/meqtrees/wiki/Installation # General notes 1. Data extraction is performed using `pyxis`. The task should be performed in `./Faceted-HyperSARA/pyxisMs2mat` which contains the python script `pyxis4DataExtraction.py`....
basp-groupREPO_NAMEfaceted-hypersaraPATH_START.@faceted-hypersara_extracted@faceted-hypersara-master@pyxisMs2mat@ReadMe.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/README.md", "type": "Markdown" }
# SciPy Documentation ## How work with the docs Have a look at https://scipy.github.io/devdocs/dev/contributor/rendering_documentation.html ## Building documentation for a release For building all the documentation artifacts for a release, run: ``` make dist ``` This will build SciPy in-place (to ensure the versio...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@README.md@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattergeo/unselected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo.unselected" _path_str = "scattergeo.unselected.marker" _valid_props = {"color", "...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattergeo@unselected@_marker.py@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/textfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="variantsrc", parent_name="bar.textfont", **kwargs): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@textfont@_variantsrc.py@.PATH_END.py
{ "filename": "rename_test.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/tests/rename_test.py", "type": "Python" }
from common import * def test_rename(ds_filtered): ds = ds_filtered ds['r'] = ds.x ds['q'] = np.exp(ds.x) qvalues = ds.q.values.tolist() xvalues = ds.x.tolist() qexpr = ds.q.expand().expression ds['x'] = ds.y # now r should still point to x assert ds.r.values.tolist() == xvalues ass...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@rename_test.py@.PATH_END.py
{ "filename": "boosted_box.py", "repo_name": "pec27/lizard", "repo_path": "lizard_extracted/lizard-master/example_scripts/boosted_box.py", "type": "Python" }
""" Example script showing how to add the boosted modes. This is still a bit rough (and uses multiple pspec drawing that is not included in the committed repo). """ from lizard import * import lizard as liz from lizard.log import VerboseTimingLog from numpy import load, save, loadtxt from lizard.uniform import make_...
pec27REPO_NAMElizardPATH_START.@lizard_extracted@lizard-master@example_scripts@boosted_box.py@.PATH_END.py
{ "filename": "dispatch.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/util/dispatch.py", "type": "Python" }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@util@dispatch.py@.PATH_END.py
{ "filename": "MBASC.py", "repo_name": "Jesper-Karsten/MBASC", "repo_path": "MBASC_extracted/MBASC-main/MBASC.py", "type": "Python" }
import pandas as pd import lightgbm as lgb from sklearn.model_selection import train_test_split import argparse import os, contextlib, warnings import numpy as np if __name__ == "__main__": # Parsing the argument parser = argparse.ArgumentParser(description='Provide AGN-SFG classification given multi-wavelengt...
Jesper-KarstenREPO_NAMEMBASCPATH_START.@MBASC_extracted@MBASC-main@MBASC.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/core/ops/__init__.py", "type": "Python" }
""" Arithmetic operations for PandasObjects This is not a public API. """ from __future__ import annotations from pandas.core.ops.array_ops import ( arithmetic_op, comp_method_OBJECT_ARRAY, comparison_op, fill_binop, get_array_op, logical_op, maybe_prepare_scalar_for_op, ) from pandas.cor...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@core@ops@__init__.py@.PATH_END.py
{ "filename": "test_angular.py", "repo_name": "bccp/nbodykit", "repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/algorithms/paircount_tpcf/tests/test_angular.py", "type": "Python" }
from runtests.mpi import MPITest from nbodykit.lab import * from nbodykit import setup_logging from numpy.testing import assert_array_equal, assert_allclose import kdcount.correlate as correlate import os import pytest setup_logging() def get_spherical_volume(source): pos = gather_data(source, "Position") ra...
bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@algorithms@paircount_tpcf@tests@test_angular.py@.PATH_END.py
{ "filename": "test_nnls.py", "repo_name": "dynamics-of-stellar-systems/dynamite", "repo_path": "dynamite_extracted/dynamite-master/dev_tests/test_nnls.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time # Set matplotlib backend to 'Agg' (compatible when X11 is not running # e.g., on a cluster). Note that the backend can only be set BEFORE # matplotlib is used or even submodules are imported! import matplotlib matplotlib.use('Agg') import matplotli...
dynamics-of-stellar-systemsREPO_NAMEdynamitePATH_START.@dynamite_extracted@dynamite-master@dev_tests@test_nnls.py@.PATH_END.py
{ "filename": "tpu_function.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tpu_function.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@tpu@tpu_function.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/inference/posteriors/__init__.py", "type": "Python" }
from sbi.inference.posteriors.direct_posterior import DirectPosterior from sbi.inference.posteriors.ensemble_posterior import EnsemblePosterior from sbi.inference.posteriors.importance_posterior import ImportanceSamplingPosterior from sbi.inference.posteriors.mcmc_posterior import MCMCPosterior from sbi.inference.poste...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@posteriors@__init__.py@.PATH_END.py
{ "filename": "_hoverinfo.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/_hoverinfo.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="histogram", **kwargs): super(HoverinfoValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@_hoverinfo.py@.PATH_END.py
{ "filename": "test_slice.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/tests/test_slice.py", "type": "Python" }
import os import tempfile from unittest import mock import numpy as np from numpy.testing import assert_equal from yt.testing import fake_random_ds from yt.units.unit_object import Unit def setup(): from yt.config import ytcfg ytcfg["yt", "internals", "within_testing"] = True def teardown_func(fns): ...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@tests@test_slice.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "C-Briddon/SELCIE", "repo_path": "SELCIE_extracted/SELCIE-main/SELCIE/__init__.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 1 14:52:49 2021 @author: chad Briddon """ from .DensityProfiles import DensityProfile from .InitialiseField import InitialiseField from .MeshingTools import MeshingTools from .SolverChameleon import FieldSolver
C-BriddonREPO_NAMESELCIEPATH_START.@SELCIE_extracted@SELCIE-main@SELCIE@__init__.py@.PATH_END.py
{ "filename": "kp_utilities.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/maven/kp_utilities.py", "type": "Python" }
import logging import re import numpy as np def param_list(kp): """ Return a listing of all parameters present in the given insitu data dictionary/structure. Parameters: kp: insitu kp data structure/dictionary read from file(s) Output: ParamList: a list of all contained items and...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@maven@kp_utilities.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/scattermap/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.textfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@textfont@_color.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/contour/colorbar/_ticktext.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="contour.colorbar", **kwargs ): super(TicktextValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@colorbar@_ticktext.py@.PATH_END.py
{ "filename": "_autoshift.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/_autoshift.py", "type": "Python" }
import _plotly_utils.basevalidators class AutoshiftValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="autoshift", parent_name="layout.yaxis", **kwargs): super(AutoshiftValidator, 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@yaxis@_autoshift.py@.PATH_END.py
{ "filename": "openglhelper.py", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/grale/editor/openglhelper.py", "type": "Python" }
from PyQt5 import QtWidgets, QtOpenGL, QtGui, QtCore import numpy as np import sys import OpenGL.GL def needcontext(f): def wrapper(*args, **kwargs): isOpenGLObject = False if len(args) > 0: if issubclass(type(args[0]), OpenGLObject): isOpenGLObject = True ...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@grale@editor@openglhelper.py@.PATH_END.py
{ "filename": "libpath.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/python-package/xgboost/libpath.py", "type": "Python" }
# coding: utf-8 """Find the path to xgboost dynamic library files.""" import os import platform import sys from typing import List class XGBoostLibraryNotFound(Exception): """Error thrown by when xgboost is not found""" def find_lib_path() -> List[str]: """Find the path to xgboost dynamic library files. ...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@python-package@xgboost@libpath.py@.PATH_END.py
{ "filename": "2-Normalizing_Tutorial.md", "repo_name": "folsomcp/specpolFlow", "repo_path": "specpolFlow_extracted/specpolFlow-main/docs-jb/Tutorials/2-Normalizing_Tutorial.md", "type": "Markdown" }
# How to Normalize Echelle Spectra with normPlot ## Introduction This tutorial introduces the procedure of normalizing echelle spectra with normPlot. The interactive normalization GUI is a part of the SpecpolFlow pipeline, as a step that proceeds the spectroscopic or polarimetric analysis. In this introduction to spe...
folsomcpREPO_NAMEspecpolFlowPATH_START.@specpolFlow_extracted@specpolFlow-main@docs-jb@Tutorials@2-Normalizing_Tutorial.md@.PATH_END.py
{ "filename": "iter.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/utils/iter.py", "type": "Python" }
from langchain_core.utils.iter import NoLock, Tee, batch_iterate, tee_peer __all__ = ["NoLock", "tee_peer", "Tee", "batch_iterate"]
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@utils@iter.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/histogram/ybins/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram.ybins", **kwargs): super(SizeValidator, 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@histogram@ybins@_size.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "yymao/adstex", "repo_path": "adstex_extracted/adstex-main/setup.py", "type": "Python" }
#!/usr/bin/env python """ adstex: Automated generation of NASA ADS bibtex entries from citation keys (identifiers, author+year) in your TeX source files. Project website: https://github.com/yymao/adstex The MIT License (MIT) Copyright (c) 2015-2024 Yao-Yuan Mao (yymao) http://opensource.org/licenses/MIT """ from __fu...
yymaoREPO_NAMEadstexPATH_START.@adstex_extracted@adstex-main@setup.py@.PATH_END.py
{ "filename": "voc.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/prototype/datasets/_builtin/voc.py", "type": "Python" }
import enum import functools import pathlib from typing import Any, BinaryIO, cast, Dict, List, Optional, Tuple, Union from xml.etree import ElementTree from torchdata.datapipes.iter import Demultiplexer, Filter, IterDataPipe, IterKeyZipper, LineReader, Mapper from torchvision.datasets import VOCDetection from torchvi...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@prototype@datasets@_builtin@voc.py@.PATH_END.py
{ "filename": "eos.py", "repo_name": "nombac/optab", "repo_path": "optab_extracted/optab-main/eos/python/eos.py", "type": "Python" }
import h5py import numpy as np import matplotlib.pyplot as plt import os import subprocess import matplotlib.colors as mcolors from scipy.constants import physical_constants import argparse # Define the atomic mass unit in grams using scipy's physical constants amu = physical_constants['atomic mass constant'][0] * 100...
nombacREPO_NAMEoptabPATH_START.@optab_extracted@optab-main@eos@python@eos.py@.PATH_END.py
{ "filename": "test_first.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/image_cutouts/first/tests/test_first.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import numpy.testing as npt import pytest import astropy.units as u from astropy.coordinates import SkyCoord from ....utils import commons from astroquery.utils.mocks import MockResponse from ... import first DATA_FILES = {'image': 'image.fits...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@image_cutouts@first@tests@test_first.py@.PATH_END.py
{ "filename": "_steps.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/slider/_steps.py", "type": "Python" }
import _plotly_utils.basevalidators class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="steps", parent_name="layout.slider", **kwargs): super(StepsValidator, 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@slider@_steps.py@.PATH_END.py
{ "filename": "_xref.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_xref.py", "type": "Python" }
import _plotly_utils.basevalidators class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="sunburst.marker.colorbar", **kwargs ): super(XrefValidator, self).__init__( plotly_name=plotly_name, parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@marker@colorbar@_xref.py@.PATH_END.py
{ "filename": "Fig.1&2.ipynb", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/markov_chain_monte_carlo/Fig.1&2.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import re import pandas as pd import matplotlib.pyplot as plt from frbpoppy.tns import TNS, get_chimefrb_catalog1 import warnings warnings.filterwarnings('ignore') ``` ## Loading catalog ```python tns = TNS(tns_name="YOUR_NAME", tns_id=YOUR_ID, repeaters=False, mute=True, update=False)....
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@markov_chain_monte_carlo@Fig.1&2.ipynb@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/tests/helpers.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@helpers.py@.PATH_END.py
{ "filename": "DMUtils.py", "repo_name": "bradkav/WIMpy_NREFT", "repo_path": "WIMpy_NREFT_extracted/WIMpy_NREFT-main/WIMpy/DMUtils.py", "type": "Python" }
# coding: utf-8 # DMUtils.py # Dark Matter rate calculator as part of WIMpy_NREFT # # Author: Bradley J Kavanagh # Email: bradkav@gmail.com # Last updated: 30/10/2024 import numpy as np from numpy import pi, cos, sin from scipy.integrate import trapz, cumtrapz, quad from scipy.interpolate import interp1d,Interpolate...
bradkavREPO_NAMEWIMpy_NREFTPATH_START.@WIMpy_NREFT_extracted@WIMpy_NREFT-main@WIMpy@DMUtils.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="bar.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "test_smd.py", "repo_name": "BRML/climin", "repo_path": "climin_extracted/climin-master/test/test_smd.py", "type": "Python" }
from __future__ import absolute_import, print_function import itertools from climin import Smd from .losses import Quadratic, LogisticRegression, Rosenbrock def test_smd_quadratic(): obj = Quadratic() # TODO: I don't know why these parameters work, but they do. opt = Smd(obj.pars, obj.f, obj.fprime, ob...
BRMLREPO_NAMEcliminPATH_START.@climin_extracted@climin-master@test@test_smd.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/layout/title/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.title.font", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@title@font@_textcase.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/associations/config.py", "type": "Python" }
"""Global configuration parameters""" # Debug mode # In conjunction with logging, this mode changes the behavior # of functions. Common use case is where associations would be # removed, they are no longer removed. This assists in determining # why they were an issue. DEBUG = False
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@associations@config.py@.PATH_END.py