metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "problem_setup.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/examples/run_simple_1_userdef_refined/problem_setup.py", "type": "Python" }
# # Import NumPy for array handling # import numpy as np # # Import plotting libraries (start Python with ipython --matplotlib) # #from mpl_toolkits.mplot3d import axes3d #from matplotlib import pyplot as plt # # Some natural constants # au = 1.49598e13 # Astronomical Unit [cm] pc = 3.08572e18 # Parsec ...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@examples@run_simple_1_userdef_refined@problem_setup.py@.PATH_END.py
{ "filename": "test_prompt.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/prompts/test_prompt.py", "type": "Python" }
"""Test functionality related to prompts.""" from typing import Any, Union from unittest import mock import pydantic import pytest from syrupy import SnapshotAssertion from langchain_core.prompts.prompt import PromptTemplate from langchain_core.prompts.string import PromptTemplateFormat from langchain_core.tracers.r...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@prompts@test_prompt.py@.PATH_END.py
{ "filename": "_known_cmap_types.py", "repo_name": "1313e/CMasher", "repo_path": "CMasher_extracted/CMasher-master/src/cmasher/_known_cmap_types.py", "type": "Python" }
# this file is generated via scripts/generate_known_cmap_types.py, do not edit manually _CMASHER_BUILTIN_MAP_TYPES = { "amber": "sequential", "amethyst": "sequential", "apple": "sequential", "arctic": "sequential", "bubblegum": "sequential", "chroma": "sequential", "cmr.amber": "sequential"...
1313eREPO_NAMECMasherPATH_START.@CMasher_extracted@CMasher-master@src@cmasher@_known_cmap_types.py@.PATH_END.py
{ "filename": "s2_calibrate.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/src/eureka/S2_calibrations/s2_calibrate.py", "type": "Python" }
#! /usr/bin/env python # Eureka! Stage 2 calibration pipeline # Proposed Steps # -------------- # 1. Read in Stage 1 data products # 2. Change default trimming if needed # 3. Run the JWST pipeline with any requested modifications # 4. Save Stage 2 data products # 5. Produce plots import os import time as time_p...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@S2_calibrations@s2_calibrate.py@.PATH_END.py
{ "filename": "_type.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_x/_type.py", "type": "Python" }
import _plotly_utils.basevalidators class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scattergl.error_x", **kwargs): super(TypeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_x@_type.py@.PATH_END.py
{ "filename": "_scheme_builtins.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py", "type": "Python" }
""" pygments.lexers._scheme_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Scheme builtins. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Autogenerated by external/scheme-builtins-generator.scm # using Guile 3.0.5.130-5a1e7. scheme_ke...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@_scheme_builtins.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/waterfall/increasing/marker/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall.increasing.marker" _path_str = "waterfall.increasing.marker.line" _valid_props = {"c...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@waterfall@increasing@marker@_line.py@.PATH_END.py
{ "filename": "_version.py", "repo_name": "lenscat/lenscat", "repo_path": "lenscat_extracted/lenscat-main/lenscat/_version.py", "type": "Python" }
__version__ = '1.1.0'
lenscatREPO_NAMElenscatPATH_START.@lenscat_extracted@lenscat-main@lenscat@_version.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/bar/unselected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar.unselected" _path_str = "bar.unselected.marker" _valid_props = {"color", "opacity"} ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@bar@unselected@_marker.py@.PATH_END.py
{ "filename": "_rangemode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/baxis/_rangemode.py", "type": "Python" }
import _plotly_utils.basevalidators class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="carpet.baxis", **kwargs): super(RangemodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@baxis@_rangemode.py@.PATH_END.py
{ "filename": "test.py", "repo_name": "mpi4py/mpi4py", "repo_path": "mpi4py_extracted/mpi4py-master/demo/wrap-ctypes-f90/test.py", "type": "Python" }
from mpi4py import MPI import helloworld as hw null = MPI.COMM_NULL hw.sayhello(null) comm = MPI.COMM_WORLD hw.sayhello(comm) try: hw.sayhello(list()) except: pass else: assert 0, "exception not raised"
mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@demo@wrap-ctypes-f90@test.py@.PATH_END.py
{ "filename": "tesswrapper.py", "repo_name": "astrobel/spinneret", "repo_path": "spinneret_extracted/spinneret-master/tesswrapper.py", "type": "Python" }
import os os.environ['MKL_NUM_THREADS'] = '1' os.environ['OPENBLAS_NUM_THREADS'] = '1' os.environ['NUMEXPR_NUM_THREADS'] = '1' os.environ['OMP_NUM_THREADS'] = '1' import numpy as np import lightkurve as lk import matplotlib.pyplot as plt import matplotlib as mpl import pandas as pd import scipy.signal as sps import as...
astrobelREPO_NAMEspinneretPATH_START.@spinneret_extracted@spinneret-master@tesswrapper.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "nell-byler/cloudyfsps", "repo_path": "cloudyfsps_extracted/cloudyfsps-master/cloudyfsps/plotting/__init__.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib import cm as cmx mpl.rc('xtick', labelsize=12) mpl.rc('ytick', labelsize=12) mpl.rc('font', size=16, family='serif', serif=[r'cmr10'], style='normal', variant='normal', stretch='normal', weight='heavy') mpl.rc('legend', labelsp...
nell-bylerREPO_NAMEcloudyfspsPATH_START.@cloudyfsps_extracted@cloudyfsps-master@cloudyfsps@plotting@__init__.py@.PATH_END.py
{ "filename": "anyscale.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/embeddings/anyscale.py", "type": "Python" }
"""Anyscale embeddings wrapper.""" from __future__ import annotations from typing import Dict, Optional from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init from pydantic import Field, SecretStr from langchain_community.embeddings.openai import OpenAIEmbeddings from langchain_commu...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@embeddings@anyscale.py@.PATH_END.py
{ "filename": "bevelTubeEntrance.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Damage/ExpandingTube/bevelTubeEntrance.py", "type": "Python" }
from math import * from SpheralTestUtilities import * #------------------------------------------------------------------------------- # A method to adjust the node positions and masses of the cylinder to match the # beveling used in the experiments. # # A subtly here is that in 2-D we assume that the tube is aligned ...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Damage@ExpandingTube@bevelTubeEntrance.py@.PATH_END.py
{ "filename": "_ticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/marker/colorbar/_ticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="bar.marker.colorbar", **kwargs ): super(TicksuffixValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@marker@colorbar@_ticksuffix.py@.PATH_END.py
{ "filename": "spfuncs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/spfuncs.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.sparse` namespace for importing the functions # included below. import warnings from . import _spfuncs __all__ = [ # noqa: F822 'isspmatrix_csr', 'csr_matrix', 'isspmatrix_csc', 'csr_count_blocks', 'estimate_blocks...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@spfuncs.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2d/colorbar/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.colorbar.title.font", **kwargs, ): super(StyleValidator, self).__init__( plotly_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2d@colorbar@title@font@_style.py@.PATH_END.py
{ "filename": "_column.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/domain/_column.py", "type": "Python" }
import _plotly_utils.basevalidators class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="column", parent_name="treemap.domain", **kwargs): super(ColumnValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@domain@_column.py@.PATH_END.py
{ "filename": "modeling.py", "repo_name": "rongmon/musetools", "repo_path": "musetools_extracted/musetools-master/src/musetools/modeling.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from astropy.convolution import convolve, Gaussian1DKernel import musetools.utils as u from copy import deepcopy ################################################################################### # Old Models ####################################...
rongmonREPO_NAMEmusetoolsPATH_START.@musetools_extracted@musetools-master@src@musetools@modeling.py@.PATH_END.py
{ "filename": "test_jhelum.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/coordinates/tests/test_jhelum.py", "type": "Python" }
# Third-party import astropy.coordinates as coord import astropy.units as u import numpy as np # This package from ..jhelum import JhelumBonaca19 def test_simple(): c = coord.ICRS(coord.Angle(217.2141, u.degree), coord.Angle(-11.4351, u.degree)) c.transform_to(JhelumBonaca19()) c = coord.Galactic(coord....
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@coordinates@tests@test_jhelum.py@.PATH_END.py
{ "filename": "make_different_MWA_beam_model_plots.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/docs/sphinx/testing/make_different_MWA_beam_model_plots.py", "type": "Python" }
import aplpy import matplotlib.pyplot as plt ##Thanks to the legend here: https://github.com/aplpy/aplpy/issues/423 ##that solved the stupid 4 vs 2 axis issue in aplpy def fix_aplpy_fits(aplpy_obj, dropaxis=2): """This removes the degenerated dimensions in APLpy 2.X... The input must be the object returned by...
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@docs@sphinx@testing@make_different_MWA_beam_model_plots.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "ewanbarr/peasoup", "repo_path": "peasoup_extracted/peasoup-master/README.md", "type": "Markdown" }
peasoup_32 ========== C++/CUDA GPU pulsar searching library The Master branch has been incorporated as the default source code in the original GitHub repository (https://github.com/ewanbarr/peasoup/) **peasoup** has been modified for handling 32 bit dedispersed timeseries. This change was necessary to ensure that...
ewanbarrREPO_NAMEpeasoupPATH_START.@peasoup_extracted@peasoup-master@README.md@.PATH_END.py
{ "filename": "ia3.md", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/docs/source/task_guides/ia3.md", "type": "Markdown" }
<!--Copyright 2024 The HuggingFace Team. 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 applicable law or agreed...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@docs@source@task_guides@ia3.md@.PATH_END.py
{ "filename": "INSTALL.md", "repo_name": "phirling/pyc2ray", "repo_path": "pyc2ray_extracted/pyc2ray-main/INSTALL.md", "type": "Markdown" }
## Build Instructions for pyc2ray on Piz-Daint (September 2023) Since the automatic build system isn't fully working yet, the extension modules must be compiled and placed in correct directories manually. After cloning the repository, create the `/lib` directory inside `/pyc2ray/` (from the root of the repository). **...
phirlingREPO_NAMEpyc2rayPATH_START.@pyc2ray_extracted@pyc2ray-main@INSTALL.md@.PATH_END.py
{ "filename": "_gridwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/baxis/_gridwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.ternary.baxis", **kwargs ): super(GridwidthValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@baxis@_gridwidth.py@.PATH_END.py
{ "filename": "_grouptitlefont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/legend/_grouptitlefont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Grouptitlefont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.legend" _path_str = "layout.legend.grouptitlefont" _valid_props = { ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@legend@_grouptitlefont.py@.PATH_END.py
{ "filename": "parallelize.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/parallelize.py", "type": "Python" }
import time import pyqtgraph as pg import pyqtgraph.multiprocess as mp print( "\n=================\nParallelize") ## Do a simple task: ## for x in range(N): ## sum([x*i for i in range(M)]) ## ## We'll do this three times ## - once without Parallelize ## - once with Parallelize, but forced to use a single...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@parallelize.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/textfont/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterternary.textfont", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@textfont@_sizesrc.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/legendgrouptitle/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="pie.legendgrouptitle.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@legendgrouptitle@font@_color.py@.PATH_END.py
{ "filename": "desi_kp4_Y1_blinded_1d.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/config/desi_kp4/desi_kp4_Y1_blinded_1d.py", "type": "Python" }
import sys sys.path.append("..") sys.path.append("../..") from barry.samplers import NautilusSampler from barry.config import setup from barry.models import PowerBeutler2017, CorrBeutler2017 from barry.datasets.dataset_power_spectrum import PowerSpectrum_DESI_KP4 from barry.datasets.dataset_correlation_function import...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@config@desi_kp4@desi_kp4_Y1_blinded_1d.py@.PATH_END.py
{ "filename": "floats.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/hypothesis/py3/hypothesis/internal/floats.py", "type": "Python" }
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@hypothesis@py3@hypothesis@internal@floats.py@.PATH_END.py
{ "filename": "evolve_orbit_in_potential.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/simple/evolve_orbit_in_potential.py", "type": "Python" }
# -*- coding: ascii -*- """ Evolve the orbital evolution in the galactic center potential with different N-body codes. All codes use default settings and are integrated using Bridge. Since it is only a single particle being evolved, and the potential is handled by bridge (externally) there should no...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@simple@evolve_orbit_in_potential.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/surface/contours/x/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="surface.contours.x", **kwargs): super(ColorValidator, 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@surface@contours@x@_color.py@.PATH_END.py
{ "filename": "test_cython_blas.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/linalg/tests/test_cython_blas.py", "type": "Python" }
import numpy as np from numpy.testing import (assert_allclose, assert_equal) import scipy.linalg.cython_blas as blas class TestDGEMM(object): def test_transposes(self): a = np.arange(12, dtype='d').reshape((3, 4))[:2,:2] b = np.arange(1, 13, dtype='d').reshape((4, 3...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@linalg@tests@test_cython_blas.py@.PATH_END.py
{ "filename": "pi_k_k.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/vector_mediator/form_factors/pi_k_k.py", "type": "Python" }
import abc from dataclasses import KW_ONLY, InitVar, dataclass, field from typing import Tuple, Union import numpy as np from hazma.phase_space import Rambo from hazma.utils import lnorm_sqr from hazma.vector_mediator.form_factors import utils from hazma.vector_mediator.form_factors.utils import RealArray KS_MASS_GE...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@vector_mediator@form_factors@pi_k_k.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/colorbar/tickfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="cone.colorbar.tickfont", **kwargs ): super(LinepositionValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@colorbar@tickfont@_lineposition.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "AstroVPK/kali", "repo_path": "kali_extracted/kali-master/python/kali/util/__init__.py", "type": "Python" }
AstroVPKREPO_NAMEkaliPATH_START.@kali_extracted@kali-master@python@kali@util@__init__.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sunburst/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="sunburst.stream", **kwargs ): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sunburst@stream@_maxpoints.py@.PATH_END.py
{ "filename": "Geometry_PYB11.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/Geometry/Geometry_PYB11.py", "type": "Python" }
""" This module provides the fundamental Spheral Geometry types (Vector, Tensor, etc.) and associated methods such as products and eigenvalues. """ from PYB11Generator import * import types # Forcibly override the common preamble PYB11preamble = "" # Define some useful type collections we're going to be wrapping in...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Geometry@Geometry_PYB11.py@.PATH_END.py
{ "filename": "kqcorrelation.py", "repo_name": "rmjarvis/TreeCorr", "repo_path": "TreeCorr_extracted/TreeCorr-main/treecorr/kqcorrelation.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@treecorr@kqcorrelation.py@.PATH_END.py
{ "filename": "mcmc2d.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/mcmc/mcmc2d.py", "type": "Python" }
from numpy import array, arange, exp from numpy.random import uniform from .change_params import change_params from .ml2d import ml2d def mcmc2d(x, y, z, sigma_z, params, sigma_params, model, args={}, \ nsteps=1e5, change_param=None, limits=None): MLold, chisq_old = ml2d(x, y, z, sigma_z, params, model...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@mcmc@mcmc2d.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/hoverlabel/grouptitlefont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@hoverlabel@grouptitlefont@__init__.py@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "spacetelescope/acstools", "repo_path": "acstools_extracted/acstools-master/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Create a report describing unexpected or incorrect behavior in acstools. labels: 'bug' --- <!-- This comments are hidden when you submit the issue, so you do not need to remove them! --> <!-- Please be sure to check out our code of conduct, https://github.com/spacetelescope/acstools/blob/m...
spacetelescopeREPO_NAMEacstoolsPATH_START.@acstools_extracted@acstools-master@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "abscal_inspect_2458157.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458157.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Absolute Calibration Nightly Notebook **Josh Dillon**, Last Revised 9/23/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metri...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458157.ipynb@.PATH_END.py
{ "filename": "desi_kp4_SecondGen_pk_npolytest1.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/config/desi_kp4/desi_kp4_SecondGen_pk_npolytest1.py", "type": "Python" }
import sys import os sys.path.append("..") sys.path.append("../..") from barry.samplers import NautilusSampler from barry.config import setup from barry.models import PowerBeutler2017, CorrBeutler2017 from barry.datasets.dataset_power_spectrum import PowerSpectrum_DESI_KP4 from barry.datasets.dataset_correlation_funct...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@config@desi_kp4@desi_kp4_SecondGen_pk_npolytest1.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/potential/potential/util.py", "type": "Python" }
""" Utilities for Potential classes """ # Standard library from functools import wraps # Third-party import numpy as np # Project from ..common import PotentialParameter from .core import PotentialBase __all__ = ['from_equation'] __doctest_requires__ = {('from_equation', ): ['sympy']} def from_equation(expr, vars...
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@potential@potential@util.py@.PATH_END.py
{ "filename": "_decomp_ldl.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/linalg/_decomp_ldl.py", "type": "Python" }
from warnings import warn import numpy as np from numpy import (atleast_2d, ComplexWarning, arange, zeros_like, imag, diag, iscomplexobj, tril, triu, argsort, empty_like) from ._decomp import _asarray_validated from .lapack import get_lapack_funcs, _compute_lwork __all__ = ['ldl'] def ldl(A, lowe...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@linalg@_decomp_ldl.py@.PATH_END.py
{ "filename": "testing_for_den_F4den_validation_Bicycle_latent_interp.py", "repo_name": "Yash-10/modified_gravity_emulation", "repo_path": "modified_gravity_emulation_extracted/modified_gravity_emulation-main/scripts/testing_for_den_F4den_validation_Bicycle_latent_interp.py", "type": "Python" }
############################################# # Before running, do: #``` #module unload python/3.6.5 #module load python/3.8.7-C8 #``` ############################################# import os import importlib from functools import partial #os.system('pip install numpy==1.21') os.chdir("/cosma5/data/durham/dc-gond1/pix...
Yash-10REPO_NAMEmodified_gravity_emulationPATH_START.@modified_gravity_emulation_extracted@modified_gravity_emulation-main@scripts@testing_for_den_F4den_validation_Bicycle_latent_interp.py@.PATH_END.py
{ "filename": "test_sensorWavefrontError.py", "repo_name": "lsst-ts/ts_phosim", "repo_path": "ts_phosim_extracted/ts_phosim-main/tests/utils/test_sensorWavefrontError.py", "type": "Python" }
# This file is part of ts_phosim. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: y...
lsst-tsREPO_NAMEts_phosimPATH_START.@ts_phosim_extracted@ts_phosim-main@tests@utils@test_sensorWavefrontError.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/parcoords/line/colorbar/_xref.py", "type": "Python" }
import _plotly_utils.basevalidators class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="parcoords.line.colorbar", **kwargs ): super(XrefValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_xref.py@.PATH_END.py
{ "filename": "test_power.py", "repo_name": "roban/CosmoloPy", "repo_path": "CosmoloPy_extracted/CosmoloPy-master/cosmolopy/EH/tests/test_power.py", "type": "Python" }
"""Check that the power module is working.""" from __future__ import absolute_import, division, print_function import numpy.testing.utils as ntest def test_power(): """Check that the power module is working.""" import cosmolopy.EH.power as power power.TFmdm_set_cosm(0.3, 0.04, 0.0, 0, 0.7, 0.72, 0.0) ...
robanREPO_NAMECosmoloPyPATH_START.@CosmoloPy_extracted@CosmoloPy-master@cosmolopy@EH@tests@test_power.py@.PATH_END.py
{ "filename": "set_Cpreproc_flags.py", "repo_name": "RickKessler/SNANA", "repo_path": "SNANA_extracted/SNANA-main/util/set_Cpreproc_flags.py", "type": "Python" }
#!/usr/bin/env python # # April 2019, R. Kessler # Called by makeFile to set C preprocessor flags based # on the existance or absence of environment variables. # This script replaces the older defineOutputFlags.pl # # Note that all input names are hard-coded here as globals. # # Apr 29 2019: replace USE_BYOSED ENV with...
RickKesslerREPO_NAMESNANAPATH_START.@SNANA_extracted@SNANA-main@util@set_Cpreproc_flags.py@.PATH_END.py
{ "filename": "test_base_result.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/results/test_base_result.py", "type": "Python" }
import pytest from prefect.results import BaseResult class ConcreteResult(BaseResult[int]): def get(self) -> int: return 1 def test_lookup_type_fails_gracefully(): with pytest.raises(ValueError, match="Invalid type: test"): ConcreteResult(type="test")
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@results@test_base_result.py@.PATH_END.py
{ "filename": "optimizers.py", "repo_name": "gogrean/PyXel", "repo_path": "PyXel_extracted/PyXel-master/pyxel/optimizers.py", "type": "Python" }
import warnings import numpy as np from astropy.modeling.optimizers import Optimization from astropy.utils.exceptions import AstropyUserWarning DEFAULT_BOUNDS = (-1e12, 1e12) class Minimize(Optimization): """General optimization algorithm based on `scipy.optimize.minimize`. The `Minimize` optimizer allows t...
gogreanREPO_NAMEPyXelPATH_START.@PyXel_extracted@PyXel-master@pyxel@optimizers.py@.PATH_END.py
{ "filename": "zbuffer_array.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/visualization/volume_rendering/zbuffer_array.py", "type": "Python" }
import numpy as np class ZBuffer: """A container object for z-buffer arrays A zbuffer is a companion array for an image that allows the volume rendering infrastructure to determine whether one opaque source is in front of another opaque source. The z buffer encodes the distance to the opaque source ...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@volume_rendering@zbuffer_array.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/unselected/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattergeo.unselected", **kwargs ): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@unselected@_marker.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/python_models/string_identity/model.py", "type": "Python" }
# Copyright 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list o...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@python_models@string_identity@model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/eso/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ESO service. """ from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.eso`. """ row_limit = _config.ConfigItem( 50, 'Maximum number of rows returned (...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@eso@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/RadialSolver/boundaries/__init__.py", "type": "Python" }
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@RadialSolver@boundaries@__init__.py@.PATH_END.py
{ "filename": "non_linearity.py", "repo_name": "litebird/litebird_sim", "repo_path": "litebird_sim_extracted/litebird_sim-master/litebird_sim/non_linearity.py", "type": "Python" }
# -*- encoding: utf-8 -*- from typing import List, Union from numba import njit, prange from .observations import Observation @njit def apply_quadratic_nonlin_for_one_sample(data, g_one_over_k): return data + g_one_over_k * data**2 @njit(parallel=True) def apply_quadratic_nonlin_for_one_detector(tod_det, g_o...
litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@litebird_sim@non_linearity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/f2py/tests/__init__.py", "type": "Python" }
from numpy.testing import IS_WASM, IS_EDITABLE import pytest if IS_WASM: pytest.skip( "WASM/Pyodide does not use or support Fortran", allow_module_level=True ) if IS_EDITABLE: pytest.skip( "Editable install doesn't support tests with a compile step", allow_module_level=Tru...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@f2py@tests@__init__.py@.PATH_END.py
{ "filename": "most.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/ipac/irsa/most.py", "type": "Python" }
import io import re import tarfile import warnings from bs4 import BeautifulSoup from astropy.io import votable, fits from astropy.table import Table from astroquery.query import BaseQuery from astroquery.utils import class_or_instance from astroquery.exceptions import InvalidQueryError, NoResultsWarning from . imp...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ipac@irsa@most.py@.PATH_END.py
{ "filename": "test_gpu_updaters.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/tests/python-gpu/test_gpu_updaters.py", "type": "Python" }
import sys from typing import Any, Dict import numpy as np import pytest from hypothesis import assume, given, note, settings, strategies import xgboost as xgb from xgboost import testing as tm from xgboost.testing.params import ( cat_parameter_strategy, exact_parameter_strategy, hist_cache_strategy, ...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@tests@python-gpu@test_gpu_updaters.py@.PATH_END.py
{ "filename": "test_numeric.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/matrixlib/tests/test_numeric.py", "type": "Python" }
import numpy as np from numpy.testing import assert_equal class TestDot: def test_matscalar(self): b1 = np.matrix(np.ones((3, 3), dtype=complex)) assert_equal(b1*1.0, b1) def test_diagonal(): b1 = np.matrix([[1,2],[3,4]]) diag_b1 = np.matrix([[1, 4]]) array_b1 = np.array([1, 4]) ...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@matrixlib@tests@test_numeric.py@.PATH_END.py
{ "filename": "kernel.py", "repo_name": "ratt-ru/QuartiCal", "repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/leakage/kernel.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np from numba import njit from numba.extending import overload from quartical.utils.numba import coerce_literal, JIT_OPTIONS from quartical.gains.general.generics import (native_intermediaries, upsampled_itermediaries, ...
ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@leakage@kernel.py@.PATH_END.py
{ "filename": "training_NN.md", "repo_name": "alessiospuriomancini/cosmopower", "repo_path": "cosmopower_extracted/cosmopower-main/docs/tutorial/training/NN/training_NN.md", "type": "Markdown" }
This section is an excerpt from the notebook explaining how to [train a ``cosmopower_NN`` model](https://github.com/alessiospuriomancini/cosmopower/blob/main/notebooks/training_notebooks/cosmopower_NN_CMB_training.ipynb). The user is strongly encouraged to run that notebook in its entirety, [![Open In Colab](https://co...
alessiospuriomanciniREPO_NAMEcosmopowerPATH_START.@cosmopower_extracted@cosmopower-main@docs@tutorial@training@NN@training_NN.md@.PATH_END.py
{ "filename": "splitDRX.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/scripts/splitDRX.py", "type": "Python" }
#!/usr/bin/env python3 """ Example script for splitting a DRX file into smaller pieces. """ import os import sys import math import time import argparse from datetime import datetime from lsl.reader import drx, errors from lsl.common.progress import ProgressBar from lsl.misc import parser as aph from lsl.misc impor...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@scripts@splitDRX.py@.PATH_END.py
{ "filename": "initial_condition.py", "repo_name": "EigenDev/simbi", "repo_path": "simbi_extracted/simbi-main/simbi/detail/initial_condition.py", "type": "Python" }
# Module to config the initial condition for the SIMBI # hydro setup. From here on, I will fragment the code # to try and reduce the confusion between functions import numpy as np import h5py import numpy.typing as npt from ..key_types import * from .mem import release_memory from . import helpers from .slogger import...
EigenDevREPO_NAMEsimbiPATH_START.@simbi_extracted@simbi-main@simbi@detail@initial_condition.py@.PATH_END.py
{ "filename": "vacuum_study.ipynb", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/notebooks/primordial_perturbations/vacuum_study.ipynb", "type": "Jupyter Notebook" }
--- **License** VacuumStudy Mon Jun 01 09:20:00 2020 Copyright 2020 Sandro Dias Pinto Vitenti <vitenti@uel.br> --- --- VacuumStudy Copyright (C) 2020 Sandro Dias Pinto Vitenti <vitenti@uel.br> numcosmo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@notebooks@primordial_perturbations@vacuum_study.ipynb@.PATH_END.py
{ "filename": "utils.py", "repo_name": "RuiLuoAstro/BayesWeib", "repo_path": "BayesWeib_extracted/BayesWeib-master/utils.py", "type": "Python" }
import numpy as np import scipy.special as sp from scipy.interpolate import interp1d class MathFunc(): def gammainc(self, alpha, x): ''' Incomplete Gamma function including all of cases. Args: alpha: Power-law index argument x: Lower limit of integral, x must >= 0 ''...
RuiLuoAstroREPO_NAMEBayesWeibPATH_START.@BayesWeib_extracted@BayesWeib-master@utils.py@.PATH_END.py
{ "filename": "_tickwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs ): super(TickwidthValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@colorbar@_tickwidth.py@.PATH_END.py
{ "filename": "qp_subproblem.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/optimize/_trustregion_constr/qp_subproblem.py", "type": "Python" }
"""Equality-constrained quadratic programming solvers.""" from scipy.sparse import (linalg, bmat, csc_matrix) from math import copysign import numpy as np from numpy.linalg import norm __all__ = [ 'eqp_kktfact', 'sphere_intersections', 'box_intersections', 'box_sphere_intersections', 'inside_box_b...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@optimize@_trustregion_constr@qp_subproblem.py@.PATH_END.py
{ "filename": "imdata.py", "repo_name": "astrosmili/smili", "repo_path": "smili_extracted/smili-master/smili/imdata/imdata.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function ''' This is a sub-module of smili handling image fits data. ''' __author__ = "Smili Developer Team" #------------------------------------------------------------------------- # Modules #-----------------------...
astrosmiliREPO_NAMEsmiliPATH_START.@smili_extracted@smili-master@smili@imdata@imdata.py@.PATH_END.py
{ "filename": "JPL_ephemerides.py", "repo_name": "ebachelet/pyLIMA", "repo_path": "pyLIMA_extracted/pyLIMA-master/pyLIMA/parallax/JPL_ephemerides.py", "type": "Python" }
import numpy as np from astroquery.jplhorizons import Horizons TIMEOUT_JPL = 120 # seconds. The time you allow telnetlib to discuss with JPL, # see space_parallax. JPL_TYPICAL_REQUEST_TIME_PER_LINE = 0.002 # seconds. JPL_HORIZONS_ID = { 'Geocentric': '500', 'Kepler': '-227', 'Spitzer': '-79', 'HST':...
ebacheletREPO_NAMEpyLIMAPATH_START.@pyLIMA_extracted@pyLIMA-master@pyLIMA@parallax@JPL_ephemerides.py@.PATH_END.py
{ "filename": "test_jax.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/triangles/test_jax.py", "type": "Python" }
import autofit as af from autogalaxy.profiles.mass import Isothermal def test_isothermal_pytree(): model = af.Model(Isothermal) children, aux = model.instance_flatten(Isothermal()) instance = model.instance_unflatten(aux, children) assert isinstance(instance, Isothermal) assert instance.centre =...
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@triangles@test_jax.py@.PATH_END.py
{ "filename": "python_export.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/viewers/scatter/python_export.py", "type": "Python" }
from glue.viewers.common.python_export import code, serialize_options def python_export_scatter_layer(layer, *args): if len(layer.mpl_artists) == 0 or not layer.enabled or not layer.visible: return [], None script = "" imports = ["import numpy as np"] polar = layer._viewer_state.using_polar...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@viewers@scatter@python_export.py@.PATH_END.py
{ "filename": "Running-on-privileged-ports.md", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/docs-old/pages/administration/production/Running-on-privileged-ports.md", "type": "Markdown" }
title: Running on Privileged Ports toc: [Documentation, Administration, Going to Production, Running on Privileged Ports] # Running on Privileged Ports For production, you might want to: * make Crossbar.io listen on ports 80/443, which are the standard ports for both HTTP(S) and (secure) WebSocket * run Crossbar.io ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs-old@pages@administration@production@Running-on-privileged-ports.md@.PATH_END.py
{ "filename": "tests.py", "repo_name": "parkus/ffd", "repo_path": "ffd_extracted/ffd-master/tests.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from . import powerlaw from . import data_structures from matplotlib import pyplot as plt import numpy as np def simple_ffd(a_true=1., emin=1., emax=100., n_events=10, n_trials=1000): """Determine if the correct value of a_true is estimated.""" ...
parkusREPO_NAMEffdPATH_START.@ffd_extracted@ffd-master@tests.py@.PATH_END.py
{ "filename": "rv-to-gsr.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/examples/coordinates/rv-to-gsr.py", "type": "Python" }
""" ================================================================ Convert a radial velocity to the Galactic Standard of Rest (GSR) ================================================================ Radial or line-of-sight velocities of sources are often reported in a Heliocentric or Solar-system barycentric reference...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@examples@coordinates@rv-to-gsr.py@.PATH_END.py
{ "filename": "plotStands.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/scripts/plotStands.py", "type": "Python" }
#!/usr/bin/env python3 """ Example script to read in the positions of stands at LWA-1 and make a plot of the site. """ import sys import numpy as np import argparse from lsl.common import stations, metabundle import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter from lsl.misc import telemetry...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@scripts@plotStands.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/SkyModel/Sky/__init__.py", "type": "Python" }
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@SkyModel@Sky@__init__.py@.PATH_END.py
{ "filename": "corner.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/corner_ES/corner.py", "type": "Python" }
# -*- coding: utf-8 -*- __all__ = "corner" import logging import numpy as np from .core import corner_impl try: from .arviz_corner import arviz_corner except ImportError: arviz_corner = None def corner( data, bins=20, *, # Original corner parameters range=None, axes_scale="linear"...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@corner_ES@corner.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatter3d@line@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "yaojian95/ForSEplus", "repo_path": "ForSEplus_extracted/ForSEplus-main/src/ForSEplus/__init__.py", "type": "Python" }
# Version of the realpython-reader package __version__ = "1.0.0-pre"
yaojian95REPO_NAMEForSEplusPATH_START.@ForSEplus_extracted@ForSEplus-main@src@ForSEplus@__init__.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="volume", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_uirevision.py@.PATH_END.py
{ "filename": "spd_pgs_make_e_spec.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/particles/spd_part_products/spd_pgs_make_e_spec.py", "type": "Python" }
import numpy as np # use nanmean from bottleneck if it's installed, otherwise use the numpy one try: import bottleneck as bn nanmean = bn.nanmean except ImportError: nanmean = np.nanmean def spd_pgs_make_e_spec(data_in): """ Builds energy spectrogram from the particle data structure Par...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@particles@spd_part_products@spd_pgs_make_e_spec.py@.PATH_END.py
{ "filename": "exampleSanity.py", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/modelSuite/exampleSanity.py", "type": "Python" }
from __future__ import print_function, division import unittest import os class TestModSuiteSanity(unittest.TestCase): def setUp(self): pass def tearDown(self): # Clean up example output from KeplerEllipseModel example if os.path.isfile("kemExample.emcee"): os.remove("kem...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@modelSuite@exampleSanity.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/rangeselector/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.xaxis.rangeselector", **kwargs ): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@rangeselector@_y.py@.PATH_END.py
{ "filename": "ColorzKcorr.ipynb", "repo_name": "imcgreer/simqso", "repo_path": "simqso_extracted/simqso-master/examples/ColorzKcorr.ipynb", "type": "Jupyter Notebook" }
```python %pylab inline from astropy.cosmology import WMAP9 from simqso.sqrun import generate_default_binned_forest from simqso.hiforest import MeanIGMTransmissionGrid from simqso import sqmodels from simqso.sqgrids import * from simqso.sqbase import fixed_R_dispersion from simqso.sqrun import buildSpectraBulk ``` ...
imcgreerREPO_NAMEsimqsoPATH_START.@simqso_extracted@simqso-master@examples@ColorzKcorr.ipynb@.PATH_END.py
{ "filename": "cosmos_db.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/memory/chat_message_histories/cosmos_db.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.chat_message_histories import CosmosDBChatMessageHistory # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handlin...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@memory@chat_message_histories@cosmos_db.py@.PATH_END.py
{ "filename": "methodwrapper.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/methodwrapper.py", "type": "Python" }
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@methodwrapper.py@.PATH_END.py
{ "filename": "test_type_check.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/lib/tests/test_type_check.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import numpy as np from numpy.compat import long from numpy.testing import ( assert_, assert_equal, assert_array_equal, run_module_suite, assert_raises ) from numpy.lib.type_check import ( common_type, mintypecode, isreal, iscomplex, isposinf...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@lib@tests@test_type_check.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="contour.colorbar", **kwargs ): super(ShowticklabelsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "struct.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/struct.py", "type": "Python" }
__all__ = [ # Functions 'calcsize', 'pack', 'pack_into', 'unpack', 'unpack_from', 'iter_unpack', # Classes 'Struct', # Exceptions 'error' ] from _struct import * from _struct import _clearcache from _struct import __doc__
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@struct.py@.PATH_END.py
{ "filename": "function_helpers.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/uncertainty/function_helpers.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Helpers for letting numpy functions interact with distributions. The module supplies helper routines for numpy functions that propagate distributions appropriately., for use in the ``__array_function__`` implementation of `~astropy.uncertainty.core.Dis...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@uncertainty@function_helpers.py@.PATH_END.py
{ "filename": "Mb.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/base_classes/Mb.py", "type": "Python" }
r""" .. module:: Mb :Synopsis: Prototype class for local Hubble parameter measurements quantified in terms of the magnitude measurement (closer to what is measured than H0) :Author: Pablo Lemos """ from cobaya.likelihood import Likelihood class Mb(Likelihood): # Data type for aggregated chi2 (case sensitive...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@base_classes@Mb.py@.PATH_END.py
{ "filename": "nn_utils.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/utils/nn_utils.py", "type": "Python" }
# import all needed modules from typing import Optional from warnings import warn from torch import Tensor, nn def get_numel( batch_input: Tensor, embedding_net: Optional[nn.Module] = None, warn_on_1d: bool = False, ) -> int: """ Return number of elements from an embedded batch of inputs. Of...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@utils@nn_utils.py@.PATH_END.py
{ "filename": "observation.py", "repo_name": "richteague/disksurf", "repo_path": "disksurf_extracted/disksurf-master/disksurf/observation.py", "type": "Python" }
from astropy.convolution import convolve, Gaussian2DKernel from scipy.ndimage import convolve1d from scipy.signal import find_peaks import matplotlib.pyplot as plt from .surface import surface from gofish import imagecube import numpy as np class observation(imagecube): """ Wrapper of a GoFish imagecube class...
richteagueREPO_NAMEdisksurfPATH_START.@disksurf_extracted@disksurf-master@disksurf@observation.py@.PATH_END.py
{ "filename": "utilities.py", "repo_name": "e-koch/FilFinder", "repo_path": "FilFinder_extracted/FilFinder-master/fil_finder/utilities.py", "type": "Python" }
# Licensed under an MIT open source license - see LICENSE """ Utility functions for fil-finder package """ import itertools import numpy as np def find_nearest(array, value): idx = (np.abs(array - value)).argmin() return array[idx] #########################################################################...
e-kochREPO_NAMEFilFinderPATH_START.@FilFinder_extracted@FilFinder-master@fil_finder@utilities.py@.PATH_END.py