metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "lalframe.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/timeseries/io/gwf/lalframe.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@timeseries@io@gwf@lalframe.py@.PATH_END.py
{ "filename": "_hovermode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/_hovermode.py", "type": "Python" }
import _plotly_utils.basevalidators class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="hovermode", parent_name="layout.scene", **kwargs): super(HovermodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@_hovermode.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/yaxis/title/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.yaxis.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@yaxis@title@font@_color.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "zclaytor/kiauhoku", "repo_path": "kiauhoku_extracted/kiauhoku-main/docs/source/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
zclaytorREPO_NAMEkiauhokuPATH_START.@kiauhoku_extracted@kiauhoku-main@docs@source@conf.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/legendgrouptitle/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.legendgrouptitle.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@legendgrouptitle@font@_family.py@.PATH_END.py
{ "filename": "CHANGELOG.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly-geo/CHANGELOG.md", "type": "Markdown" }
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly-geo@CHANGELOG.md@.PATH_END.py
{ "filename": "G_P_K_G_.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttLib/tables/G_P_K_G_.py", "type": "Python" }
from fontTools.misc import sstruct from fontTools.misc.textTools import bytesjoin, safeEval, readHex from . import DefaultTable import sys import array GPKGFormat = """ > # big endian version: H flags: H numGMAPs: H numGlyplets: H """ # psFontName is a byte string which follows the record above. This is ze...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttLib@tables@G_P_K_G_.py@.PATH_END.py
{ "filename": "_ids.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/_ids.py", "type": "Python" }
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="sunburst", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=k...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@_ids.py@.PATH_END.py
{ "filename": "strided_slice.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/strided_slice.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@lite@testing@op_tests@strided_slice.py@.PATH_END.py
{ "filename": "lorenz.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/mayavi/mlab/lorenz.py", "type": "Python" }
""" An example displaying the trajectories for the Lorenz system of equations along with the z-nullcline. The vector field of the Lorenz system flow is integrated to display trajectories using mlab's flow function: :func:`mayavi.mlab.flow`. The z-nullcline is plotted by extracting the z component of the vector field ...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@mayavi@mlab@lorenz.py@.PATH_END.py
{ "filename": "_lowsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/_lowsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="lowsrc", parent_name="ohlc", **kwargs): super(LowsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@_lowsrc.py@.PATH_END.py
{ "filename": "mapDefault.py", "repo_name": "GBTSpectroscopy/gbtpipe", "repo_path": "gbtpipe_extracted/gbtpipe-master/gbtpipe/contrib/mapDefault.py", "type": "Python" }
import os import sys import subprocess if __name__ == '__main__': imgfile = os.path.dirname(os.path.realpath(__file__)) + '/../image.py' imgfile = os.path.normpath(imgfile) print "WARNING: mapDefault.py is being replaced by image.py" print "" print " In fact, this script is calling imag...
GBTSpectroscopyREPO_NAMEgbtpipePATH_START.@gbtpipe_extracted@gbtpipe-master@gbtpipe@contrib@mapDefault.py@.PATH_END.py
{ "filename": "test_contrib.py", "repo_name": "facebookresearch/faiss", "repo_path": "faiss_extracted/faiss-main/tests/test_contrib.py", "type": "Python" }
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import platform import shutil import tempfile import unittest from contextlib import contextmanager import faiss import numpy as ...
facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@tests@test_contrib.py@.PATH_END.py
{ "filename": "py_context_manager_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/framework/py_context_manager_test.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@python@framework@py_context_manager_test.py@.PATH_END.py
{ "filename": "test_graph_vectorstores.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/test_graph_vectorstores.py", "type": "Python" }
import pytest from langchain_core.documents import Document from langchain_community.graph_vectorstores.base import ( Node, _documents_to_nodes, _texts_to_nodes, ) from langchain_community.graph_vectorstores.links import Link def test_texts_to_nodes() -> None: assert list(_texts_to_nodes(["a", "b"], ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@test_graph_vectorstores.py@.PATH_END.py
{ "filename": "Foward_model.ipynb", "repo_name": "ivastar/clear", "repo_path": "clear_extracted/clear-master/notebooks/forward_modeling/Foward_model.ipynb", "type": "Jupyter Notebook" }
# Forward modeling tutorial using mosaic images ## Generate simulated spectra In this tutorial I'll show you how to create 1D and 2D forward modeled grism spectra ```python from grizli import model import fsps import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from scipy.inte...
ivastarREPO_NAMEclearPATH_START.@clear_extracted@clear-master@notebooks@forward_modeling@Foward_model.ipynb@.PATH_END.py
{ "filename": "_ticks.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/colorbar/_ticks.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="densitymap.colorbar", **kwargs ): super(TicksValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@colorbar@_ticks.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/apps/search/__init__.py", "type": "Python" }
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@apps@search@__init__.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="barpolar.marker.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@line@_width.py@.PATH_END.py
{ "filename": "azure_ai_search.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/retrievers/azure_ai_search.ipynb", "type": "Jupyter Notebook" }
--- sidebar_label: Azure AI Search --- # AzureAISearchRetriever [Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) (formerly known as `Azure Cognitive Search`) is a Microsoft cloud search service that gives developers infrastructure, APIs, and tools for information retrieval of vec...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@retrievers@azure_ai_search.ipynb@.PATH_END.py
{ "filename": "cpi-rma.py", "repo_name": "mpi4py/mpi4py", "repo_path": "mpi4py_extracted/mpi4py-master/demo/compute-pi/cpi-rma.py", "type": "Python" }
#!/usr/bin/env python """ Parallel PI computation using Remote Memory Access (RMA) within Python objects exposing memory buffers (requires NumPy). usage:: $ mpiexec -n <nprocs> python cpi-rma.py """ from mpi4py import MPI from math import pi as PI from numpy import array def get_n(): prompt = "Enter the n...
mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@demo@compute-pi@cpi-rma.py@.PATH_END.py
{ "filename": "subset_array.py", "repo_name": "astropy/reproject", "repo_path": "reproject_extracted/reproject-main/reproject/mosaicking/subset_array.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import operator __all__ = ["ReprojectedArraySubset"] class ReprojectedArraySubset: # The aim of this class is to represent a subset of an array and # footprint extracted (or meant to represent extracted) versions # from larger arrays and fo...
astropyREPO_NAMEreprojectPATH_START.@reproject_extracted@reproject-main@reproject@mosaicking@subset_array.py@.PATH_END.py
{ "filename": "test_stable_log_prob.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/distributions/test_stable_log_prob.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import logging import pytest import torch from scipy.stats import levy_stable import pyro import pyro.distributions import pyro.distributions.stable_log_prob from pyro.distributions import Stable, constraints from pyro.infer import S...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@distributions@test_stable_log_prob.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/cone/colorbar/tickfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="cone.colorbar.tickfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@cone@colorbar@tickfont@_family.py@.PATH_END.py
{ "filename": "test_eval_chain.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/evaluation/agents/test_eval_chain.py", "type": "Python" }
"""Test agent trajectory evaluation chain.""" from typing import Any, Dict, List, Optional, Tuple import pytest from langchain_core.agents import AgentAction, BaseMessage from langchain_core.callbacks.manager import CallbackManagerForLLMRun from langchain_core.exceptions import OutputParserException from langchain_co...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@evaluation@agents@test_eval_chain.py@.PATH_END.py
{ "filename": "radial_coverage.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/docs/papers/Overview/scripts/radial_coverage.py", "type": "Python" }
#!/usr/bin/env python3 import os import time import numpy from matplotlib import pyplot, ticker, rc from astropy.io import fits from mangdap.config import defaults from mangadap.proc.util import growth_lim from mangadap.util.bitmask import BitMask #------------------------------------------------------------------...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@docs@papers@Overview@scripts@radial_coverage.py@.PATH_END.py
{ "filename": "fileutils.py", "repo_name": "xraypy/xraylarch", "repo_path": "xraylarch_extracted/xraylarch-master/larch/io/fileutils.py", "type": "Python" }
#!/usr/bin/env python """ general purpose file utilities """ from pathlib import Path from random import Random alphanum = 'abcdefghijklmnopqrstuvwxyz0123456789' rng = Random() def random_string(n, rng_seed=None): """ random_string(n) generates a random string of length n, that will match: [a-z][a-z0...
xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@larch@io@fileutils.py@.PATH_END.py
{ "filename": "simple_auth.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/win32/Demos/security/sspi/simple_auth.py", "type": "Python" }
# A demo of basic SSPI authentication. # There is a 'client' context and a 'server' context - typically these will # be on different machines (here they are in the same process, but the same # concepts apply) import sspi import sspicon import win32api import win32security def lookup_ret_code(err): for k, v in ssp...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@Demos@security@sspi@simple_auth.py@.PATH_END.py
{ "filename": "hybrid.py", "repo_name": "cosmodesi/cosmoprimo", "repo_path": "cosmoprimo_extracted/cosmoprimo-main/cosmoprimo/emulators/hybrid.py", "type": "Python" }
import os from pathlib import Path from .emulated import EmulatedEngine, Thermodynamics, Harmonic train_dir = Path(__file__).parent / 'train' from cosmoprimo.cosmology import DefaultBackground class Background(DefaultBackground): """Background quantities.""" class CAPSEEngine(EmulatedEngine): name =...
cosmodesiREPO_NAMEcosmoprimoPATH_START.@cosmoprimo_extracted@cosmoprimo-main@cosmoprimo@emulators@hybrid.py@.PATH_END.py
{ "filename": "_zeros_py.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/optimize/_zeros_py.py", "type": "Python" }
import warnings from collections import namedtuple import operator from . import _zeros from ._optimize import OptimizeResult import numpy as np _iter = 100 _xtol = 2e-12 _rtol = 4 * np.finfo(float).eps __all__ = ['newton', 'bisect', 'ridder', 'brentq', 'brenth', 'toms748', 'RootResults'] # Must agree wi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@optimize@_zeros_py.py@.PATH_END.py
{ "filename": "_ticklabelposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="contour.colorbar", **kwargs ): super(TicklabelpositionValidator, self).__init__( plotly_name=plo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "octasphere.py", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/pytransit/utils/octasphere.py", "type": "Python" }
# PyTransit: fast and easy exoplanet transit modelling in Python. # Copyright (C) 2010-2021 Hannu Parviainen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@utils@octasphere.py@.PATH_END.py
{ "filename": "firefly-docker.md", "repo_name": "Caltech-IPAC/firefly", "repo_path": "firefly_extracted/firefly-master/docs/firefly-docker.md", "type": "Markdown" }
Firefly from Docker ----------------------- #### Docker: - Firefly is containerized and can be pulled from docker - Docker images allow users to run software from a container that has the required software stack. - Documentation about Docker can be found here: https://www.docker.com #### How to run Firefly from a ...
Caltech-IPACREPO_NAMEfireflyPATH_START.@firefly_extracted@firefly-master@docs@firefly-docker.md@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/hoverlabel/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolar.hoverlabel", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@hoverlabel@_font.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="box.marker", **kwargs): super(OpacityValidator, 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@box@marker@_opacity.py@.PATH_END.py
{ "filename": "function_library.py", "repo_name": "rae-holcomb/SpinSpotter", "repo_path": "SpinSpotter_extracted/SpinSpotter-main/spinspotter/function_library.py", "type": "Python" }
# Core SpinSpotter Library # Created: April 5, 2021 # Last updated: June 2022 # (or possibly more recently, I honestly forget to update this line often) # imports import matplotlib.pyplot as plt import numpy as np import pandas as pd import lightkurve as lk from statsmodels.tsa.stattools import acf from scipy.signal ...
rae-holcombREPO_NAMESpinSpotterPATH_START.@SpinSpotter_extracted@SpinSpotter-main@spinspotter@function_library.py@.PATH_END.py
{ "filename": "test_deprecate_nonkeyword_arguments.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/util/test_deprecate_nonkeyword_arguments.py", "type": "Python" }
""" Tests for the `deprecate_nonkeyword_arguments` decorator """ import inspect from pandas.util._decorators import deprecate_nonkeyword_arguments import pandas._testing as tm @deprecate_nonkeyword_arguments( version="1.1", allowed_args=["a", "b"], name="f_add_inputs" ) def f(a, b=0, c=0, d=0): return a + ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@util@test_deprecate_nonkeyword_arguments.py@.PATH_END.py
{ "filename": "cosmo.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/ext/cosmo.py", "type": "Python" }
# simple cosmology calc. # to be extended as needed import numpy from amuse.units import units, generic_unit_system from amuse.units.quantities import to_quantity from amuse.datamodel import Particles from amuse.support.exceptions import AmuseException def findbin(ylist,y): s=1 if ylist[0]>=ylist[-1]: s=-1 ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@ext@cosmo.py@.PATH_END.py
{ "filename": "AudioEmbedderOptions.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/task/audio/AudioEmbedderOptions.md", "type": "Markdown" }
page_type: reference description: Options for the audio embedder task. <link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.task.audio.AudioE...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@task@audio@AudioEmbedderOptions.md@.PATH_END.py
{ "filename": "test_craterstats.py", "repo_name": "ggmichael/craterstats", "repo_path": "craterstats_extracted/craterstats-main/src/craterstats/tests/test_craterstats.py", "type": "Python" }
# Copyright (c) 2021, Greg Michael # Licensed under BSD 3-Clause License. See LICENSE.txt for details. import unittest import numpy as np import craterstats as cst class TestCraterstats(unittest.TestCase): def test_bin_bias_correction(self): self.assertEqual(cst.bin_bias_correction(np.sqrt(2), 0), 1....
ggmichaelREPO_NAMEcraterstatsPATH_START.@craterstats_extracted@craterstats-main@src@craterstats@tests@test_craterstats.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "noraeisner/LATTE", "repo_path": "LATTE_extracted/LATTE-master/LATTE/tests/__init__.py", "type": "Python" }
noraeisnerREPO_NAMELATTEPATH_START.@LATTE_extracted@LATTE-master@LATTE@tests@__init__.py@.PATH_END.py
{ "filename": "deferred.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/mapper/prior/deferred.py", "type": "Python" }
from autofit import exc class DeferredInstance: def __init__(self, cls: type, constructor_arguments: {str: object}): """ An instance that has been deferred for later construction Parameters ---------- cls The class to be constructed constructor_argument...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@mapper@prior@deferred.py@.PATH_END.py
{ "filename": "flux_calibration.py", "repo_name": "RTIP/artip", "repo_path": "artip_extracted/artip-master/casa_scripts/flux_calibration.py", "type": "Python" }
import sys script_parameters_start_index = sys.argv.index('-c') + 2 parameters = sys.argv[script_parameters_start_index:] run_count = int(parameters[0]) ms_dataset = parameters[1] output_path = parameters[2] field = parameters[3] refant = parameters[4] spw = parameters[5] minsnr = float(parameters[6]) intphase_calta...
RTIPREPO_NAMEartipPATH_START.@artip_extracted@artip-master@casa_scripts@flux_calibration.py@.PATH_END.py
{ "filename": "coffee.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/styles/coffee.py", "type": "Python" }
""" pygments.styles.coffee ~~~~~~~~~~~~~~~~~~~~~~ A warm and cozy theme based off gruvbox :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import (Comment, Error, Generic, Keyword, L...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@styles@coffee.py@.PATH_END.py
{ "filename": "test_image_gui.py", "repo_name": "rongmon/rbcodes", "repo_path": "rbcodes_extracted/rbcodes-master/GUIs/zgui/test_image_gui.py", "type": "Python" }
from astropy.io import fits import matplotlib.pyplot as plt import numpy as np from copy import deepcopy import matplotlib import Spec_Inspect as S filename='/Users/bordoloi/Dropbox/COS-Pairs/Targets/J2228-0950/Data/lris_longslit/long_radd.fits' a=fits.open(filename) data = a[0].data two_d_spec=np.transpose(deepco...
rongmonREPO_NAMErbcodesPATH_START.@rbcodes_extracted@rbcodes-master@GUIs@zgui@test_image_gui.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/layout/yaxis/title/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.yaxis.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@yaxis@title@font@_color.py@.PATH_END.py
{ "filename": "runningJobs.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/python/runningJobs.py", "type": "Python" }
from __future__ import absolute_import from __future__ import print_function from paramgrid import batchjob_args, jobqueue Opts = batchjob_args.batchArgs( 'List details of running or queued jobs; gives job stats, then current R-1 and job/chain names', importance=True, batchPathOptional=True) group = Opts.pars...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@python@runningJobs.py@.PATH_END.py
{ "filename": "cutoutAndSimulate2.py", "repo_name": "oliverphilcox/HADES", "repo_path": "HADES_extracted/HADES-master/tile_creation/cutoutAndSimulate2.py", "type": "Python" }
if __name__=='__main__': reMake=True # whether to remake previously created data from flipper import * from flipperPol import * import healpy import sys sys.path.append('/data/ohep2/EngelenTools/') sys.path.append('/data/ohep2/hades/') from hades.params import BICEP a=BICEP() from hades.padded_debiased_w...
oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@tile_creation@cutoutAndSimulate2.py@.PATH_END.py
{ "filename": "dtd.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/prototype/datasets/_builtin/dtd.py", "type": "Python" }
import enum import pathlib from typing import Any, BinaryIO, Dict, List, Optional, Tuple, Union from torchdata.datapipes.iter import CSVParser, Demultiplexer, Filter, IterDataPipe, IterKeyZipper, LineReader, Mapper from torchvision.prototype.datasets.utils import Dataset, EncodedImage, HttpResource, OnlineResource fro...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@prototype@datasets@_builtin@dtd.py@.PATH_END.py
{ "filename": "test_fitting.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_fitting.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2021, 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_fitting.py@.PATH_END.py
{ "filename": "generate_python_docs.py", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/docs/generate_python_docs.py", "type": "Python" }
import rebound import inspect import docstring_to_markdown def convert_code_blocks(doc): new_doc = "" lines = doc.split("\n") first = True for line in lines: if first: if line[:3]==">>>": first = False new_doc += "```python\n" new_doc +...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@docs@generate_python_docs.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/tickfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): super(LinepositionValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@tickfont@_lineposition.py@.PATH_END.py
{ "filename": "fpfs_summary_sim.py", "repo_name": "mr-superonion/FPFS", "repo_path": "FPFS_extracted/FPFS-master/bin/fpfs_summary_sim.py", "type": "Python" }
#!/usr/bin/env python # # FPFS shear estimator # Copyright 20221013 Xiangchong Li. # # 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 la...
mr-superonionREPO_NAMEFPFSPATH_START.@FPFS_extracted@FPFS-master@bin@fpfs_summary_sim.py@.PATH_END.py
{ "filename": "demodulation.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/tod_ops/demodulation.py", "type": "Python" }
"""Functions used for demodulating general sinusoidal modulation in timestreams. Often used in lab testing or with optical choppers.""" import numpy as np from sotodlib.tod_ops import filters from scipy.optimize import curve_fit import logging logger = logging.getLogger(__name__) def _remove_demod_placeholders(aman...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@tod_ops@demodulation.py@.PATH_END.py
{ "filename": "_opacitysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/_opacitysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scatter.marker", **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@_opacitysrc.py@.PATH_END.py
{ "filename": "Synchrotron.py", "repo_name": "TommasoRonconi/galapy", "repo_path": "galapy_extracted/galapy-main/galapy/Synchrotron.py", "type": "Python" }
""" The Synchrotron module implements a generic parameterized synchrotron emission. """ ######################################################################################## # External imports import numpy # Internal imports from galapy.internal.constants import clight from .SYN_core import CSYN ################...
TommasoRonconiREPO_NAMEgalapyPATH_START.@galapy_extracted@galapy-main@galapy@Synchrotron.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CosmoLike/cocoa", "repo_path": "cocoa_extracted/cocoa-main/Cocoa/external_modules/code/planck/code/plc_3.0/plc-3.1/src/python/clik/__init__.py", "type": "Python" }
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path as osp if osp.exists(osp.join(osp.dirname(__file__),"lkl.pyx")): raise ImportError("Cannot import clik python wrapper from the source directory.\nMake sure that you have compiled and installed ...
CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@Cocoa@external_modules@code@planck@code@plc_3.0@plc-3.1@src@python@clik@__init__.py@.PATH_END.py
{ "filename": "function-calculation.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-common-phrases/function-calculation.md", "type": "Markdown" }
The calculation of this function consists of the following steps:
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-common-phrases@function-calculation.md@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/marker/colorbar/_title.py", "type": "Python" }
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.TitleValidator): def __init__( self, plotly_name="title", parent_name="sunburst.marker.colorbar", **kwargs ): super(TitleValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@marker@colorbar@_title.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/splom/marker/colorbar/title/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "splom.marker.colorbar.title" _path_str = "splom.marker.colorbar.title.font" _valid_props = {"c...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@splom@marker@colorbar@title@_font.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/numcosmo_py/plotting/__init__.py", "type": "Python" }
# # __init__.py # # Wed Feb 8 10:00:00 2023 # Copyright 2023 Sandro Dias Pinto Vitenti # <vitenti@uel.br> # # __init__.py # Copyright (C) 2023 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 License as publi...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@numcosmo_py@plotting@__init__.py@.PATH_END.py
{ "filename": "pixel_grid_test.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/test/Coordinates/pixel_grid_test.py", "type": "Python" }
# Testing modeling workflows # # Copyright (c) 2023, herculens developers and contributors import pytest import numpy as np import numpy.testing as npt from herculens.Coordinates.pixel_grid import PixelGrid def _create_pixel_grid(nx, ny, pix_scl, rot_angle, centered=True): transform_pix2angle = pix_scl * np.ar...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@test@Coordinates@pixel_grid_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "swagnercarena/paltas", "repo_path": "paltas_extracted/paltas-main/paltas/Utils/__init__.py", "type": "Python" }
from . import cosmology_utils from . import power_law from . import hubble_utils from . import lenstronomy_utils
swagnercarenaREPO_NAMEpaltasPATH_START.@paltas_extracted@paltas-main@paltas@Utils@__init__.py@.PATH_END.py
{ "filename": "test_penalized.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/gam/tests/test_penalized.py", "type": "Python" }
""" unit test for GAM Author: Josef Perktold """ import os import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_ import pandas as pd import pytest import patsy from statsmodels.discrete.discrete_model import Poisson, Logit, Probit from statsmodels.genmod.generalized_linear_model imp...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@gam@tests@test_penalized.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ML4GW/ml4gw", "repo_path": "ml4gw_extracted/ml4gw-main/ml4gw/nn/autoencoder/__init__.py", "type": "Python" }
from .base import Autoencoder from .convolutional import ConvolutionalAutoencoder from .skip_connection import AddSkipConnect, ConcatSkipConnect, SkipConnection
ML4GWREPO_NAMEml4gwPATH_START.@ml4gw_extracted@ml4gw-main@ml4gw@nn@autoencoder@__init__.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/io/ascii/tests/common.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import import os import numpy as np __all__ = ['raises', 'assert_equal', 'assert_almost_equal', 'assert_true', 'setup_function', 'teardown_function', 'has_isnan'] CWD = os.getcwd() TEST_DIR = os....
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@io@ascii@tests@common.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "jolideco/jolideco", "repo_path": "jolideco_extracted/jolideco-main/jolideco/models/core.py", "type": "Python" }
import logging from pathlib import Path from typing import Any import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from astropy.coordinates import SkyCoord from astropy.utils import lazyproperty from astropy.visualization import simple_norm from astropy...
jolidecoREPO_NAMEjolidecoPATH_START.@jolideco_extracted@jolideco-main@jolideco@models@core.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/contour/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "history.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/schema/runnable/history.py", "type": "Python" }
from langchain_core.runnables.history import ( GetSessionHistoryCallable, MessagesOrDictWithMessages, RunnableWithMessageHistory, ) __all__ = [ "RunnableWithMessageHistory", "GetSessionHistoryCallable", "MessagesOrDictWithMessages", ]
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@schema@runnable@history.py@.PATH_END.py
{ "filename": "_alignsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/hoverlabel/_alignsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="pie.hoverlabel", **kwargs): super(AlignsrcValidator, 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@pie@hoverlabel@_alignsrc.py@.PATH_END.py
{ "filename": "_fisher.py", "repo_name": "deepmind/optax", "repo_path": "optax_extracted/optax-main/optax/second_order/_fisher.py", "type": "Python" }
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@second_order@_fisher.py@.PATH_END.py
{ "filename": "pdftree.py", "repo_name": "hanyk/BayeSED3", "repo_path": "BayeSED3_extracted/BayeSED3-main/test3/seedcat2_0_STARFORMING_inoise2/8144596/pdftree.py", "type": "Python" }
from getdist import plots g=plots.get_subplot_plotter(chain_dir=r'./') roots = [] roots.append('0csp_sfh201_bc2003_hr_stelib_chab_neb_300r_i0100_rdf0_2dal8_10_z_phot_sample_par') roots.append('0csp_sfh201_bc2003_hr_stelib_chab_neb_300r_i0100_rdf0_2dal8_10_z_spec_sample_par') roots.append('0csp_sfh201_bc2003_hr_stelib_...
hanykREPO_NAMEBayeSED3PATH_START.@BayeSED3_extracted@BayeSED3-main@test3@seedcat2_0_STARFORMING_inoise2@8144596@pdftree.py@.PATH_END.py
{ "filename": "plotstuff.py", "repo_name": "RuthAngus/gprotation", "repo_path": "gprotation_extracted/gprotation-master/gprotation/plotstuff.py", "type": "Python" }
import matplotlib.pyplot as plt from colours import plot_colours ocols = plot_colours() def params(): plotpar = {'axes.labelsize': 18, 'font.size': 10, 'legend.fontsize': 15, 'xtick.labelsize': 18, 'ytick.labelsize': 18, 'text.usetex': True...
RuthAngusREPO_NAMEgprotationPATH_START.@gprotation_extracted@gprotation-master@gprotation@plotstuff.py@.PATH_END.py
{ "filename": "pull_request_template.md", "repo_name": "QEF/q-e", "repo_path": "q-e_extracted/q-e-master/.github/pull_request_template.md", "type": "Markdown" }
**You are submitting a Pull Request on [Github](https://github.com/QEF/q-e) which is a mirror of [Gitlab](https://gitlab.com/QEF/q-e).** **Please stop and instead submit a [Merge Request](https://gitlab.com/QEF/q-e/-/merge_requests) at Gitlab.** Some guide about [contributing to Quantum ESPRESSO using Gitlab](https:/...
QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@.github@pull_request_template.md@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "adrn/SuperFreq", "repo_path": "SuperFreq_extracted/SuperFreq-main/superfreq/tests/helpers.py", "type": "Python" }
# coding: utf-8 from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Third-party import numpy as np def cartesian_to_poincare(xy, vxy): # assuming z == 0 R = np.sqrt(xy[0]**2 + xy[1]**2) phi = np.arctan2(xy[0], xy[1]) vR = (xy[0]*vxy[0] + xy[1]*vxy[1]) / R...
adrnREPO_NAMESuperFreqPATH_START.@SuperFreq_extracted@SuperFreq-main@superfreq@tests@helpers.py@.PATH_END.py
{ "filename": "PRyM_jl_sys.py", "repo_name": "vallima/PRyMordial", "repo_path": "PRyMordial_extracted/PRyMordial-main/PRyM/PRyM_jl_sys.py", "type": "Python" }
# -*- coding: utf-8 -*- from julia import Main dTtotdtSMjl = Main.eval(""" function dTtotSMdt_jl(dT,T,p,t) Tg, Tnu = T dT[1] = p[1](Tg,Tnu,Tnu) dT[2] = p[2](Tg,Tnu,Tnu) end""") dTtotdtNPjl = Main.eval(""" function dTtotdtNP_jl(dT,T,p,t) Tg, Tnu, TNP = T dT[1] = p[1](Tg,Tnu,Tnu,TNP) dT[2] = p[2](Tg,Tnu,Tnu...
vallimaREPO_NAMEPRyMordialPATH_START.@PRyMordial_extracted@PRyMordial-main@PRyM@PRyM_jl_sys.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "tardis-sn/tardis", "repo_path": "tardis_extracted/tardis-main/tardis/io/atom_data/util.py", "type": "Python" }
import os import logging from tardis.io.config_internal import get_data_dir from tardis.io.atom_data.atom_web_download import ( get_atomic_repo_config, download_atom_data, ) logger = logging.getLogger(__name__) def resolve_atom_data_fname(fname): """ Check where if atom data HDF file is available on...
tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@io@atom_data@util.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/llh_analysis/__init__.py", "type": "Python" }
__all__ = [ "LLH", "do_bkg_estimation_wPSs_mp2", "do_llh_inFoV4realtime", "do_llh_inFoV4realtime2", "do_llh_outFoV4realtime", "do_llh_outFoV4realtime2", "do_manage2", "minimizers", ] from .LLH import * from .do_bkg_estimation_wPSs_mp2 import * from .do_llh_inFoV4realtime import * from ....
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@llh_analysis@__init__.py@.PATH_END.py
{ "filename": "eti.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/eti_core/eti.py", "type": "Python" }
from multiprocessing import Process, Queue from subprocess import STDOUT, CalledProcessError, check_output from ..utils import logutils log = logutils.get_logger(__name__) def loop_process(in_queue, out_queue): """ Code to spawn a subprocess for running external tasks Parameters ---------- in_q...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@eti_core@eti.py@.PATH_END.py
{ "filename": "legacy.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/settings/legacy.py", "type": "Python" }
import inspect import os from functools import cache from typing import Any, Dict, Optional, Set, Type, get_args from pydantic import AliasChoices from pydantic_settings import BaseSettings from typing_extensions import Self from prefect.settings.base import PrefectBaseSettings from prefect.settings.constants import ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@settings@legacy.py@.PATH_END.py
{ "filename": "_updatemenu.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/_updatemenu.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Updatemenu(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.updatemenu" _valid_props = { "active", "b...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@_updatemenu.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="funnelarea", **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@funnelarea@_uirevision.py@.PATH_END.py
{ "filename": "CMB_CamSpec.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/python/planck/CMB_CamSpec.py", "type": "Python" }
# simplified pure python version of CamSpec. Not yet inherited from CMBlikes # but does need cosmomc:python in path to import CMBlikes.ClsArray type # see main function at bottom for example of usage from __future__ import absolute_import from __future__ import print_function import numpy as np from CMBlikes import Cls...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@python@planck@CMB_CamSpec.py@.PATH_END.py
{ "filename": "Radial_Profile.ipynb", "repo_name": "jzuhone/soxs", "repo_path": "soxs_extracted/soxs-main/doc/source/cookbook/Radial_Profile.ipynb", "type": "Jupyter Notebook" }
# Radial Profile This example shows how to create a radial profile from a SOXS event file, including using an exposure map to get flux-based quantities. We'll simulate a simple isothermal cluster. ```python import matplotlib matplotlib.rc("font", size=18) import matplotlib.pyplot as plt import soxs import astropy.i...
jzuhoneREPO_NAMEsoxsPATH_START.@soxs_extracted@soxs-main@doc@source@cookbook@Radial_Profile.ipynb@.PATH_END.py
{ "filename": "setup.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-arrow/setup.py", "type": "Python" }
import os from setuptools import setup from importlib.machinery import SourceFileLoader dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex_arrow/_version.py") version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = "Maarten A. Breddels" author_email = "maa...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-arrow@setup.py@.PATH_END.py
{ "filename": "_to_register.py", "repo_name": "hgrecco/pint", "repo_path": "pint_extracted/pint-master/pint/delegates/formatter/_to_register.py", "type": "Python" }
""" pint.delegates.formatter.base_formatter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Common class and function for all formatters. :copyright: 2022 by Pint Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import annotations from collections.abc...
hgreccoREPO_NAMEpintPATH_START.@pint_extracted@pint-master@pint@delegates@formatter@_to_register.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/unselected/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterternary.unselected.marker", **kwargs, ): super(OpacityValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@unselected@marker@_opacity.py@.PATH_END.py
{ "filename": "test_scattering.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/tests/test_scattering.py", "type": "Python" }
""" Unit test for the lsl.misc.scattering module. """ import os import time import warnings import unittest import numpy as np from lsl.misc import scattering __version__ = "0.1" __author__ = "Jayce Dowell" class scattering_tests(unittest.TestCase): """A unittest.TestCase collection of unit tests for the l...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_scattering.py@.PATH_END.py
{ "filename": "select_1000_stars_andy.py", "repo_name": "annayqho/TheCannon", "repo_path": "TheCannon_extracted/TheCannon-master/code/lamost/li_giants/select_1000_stars_andy.py", "type": "Python" }
""" Randomly select 1,000 of the stars that meet Andy's criteria """ from astropy.table import Table import sys import numpy as np datadir = "/Users/annaho/Github_Repositories/TheCannon/data/LAMOST/" a = Table.read(datadir + "Mass_And_Age/Ho2017_Catalog.fits") logg = a['logg'] > 3.5 feh = a['MH'] > -0.5 snr = a['SNR...
annayqhoREPO_NAMETheCannonPATH_START.@TheCannon_extracted@TheCannon-master@code@lamost@li_giants@select_1000_stars_andy.py@.PATH_END.py
{ "filename": "ttGlyphPen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/pens/ttGlyphPen.py", "type": "Python" }
from array import array from typing import Any, Callable, Dict, Optional, Tuple from fontTools.misc.fixedTools import MAX_F2DOT14, floatToFixedToFloat from fontTools.misc.loggingTools import LogMixin from fontTools.pens.pointPen import AbstractPointPen from fontTools.misc.roundTools import otRound from fontTools.pens.b...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@pens@ttGlyphPen.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/__init__.py", "type": "Python" }
""" Halotools is a specialized python package for building and testing models of the galaxy-halo connection, and analyzing catalogs of dark matter halos. """ from ._astropy_init import * from . import custom_exceptions def test_installation(*args, **kwargs): kwargs.setdefault('args', '') if kwargs['args']: ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@__init__.py@.PATH_END.py
{ "filename": "galaxy.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/python/marvin/web/controllers/galaxy.py", "type": "Python" }
#!/usr/bin/env python # encoding: utf-8 ''' Created by Brian Cherinka on 2016-04-08 14:31:34 Licensed under a 3-clause BSD license. Revision History: Initial Version: 2016-04-08 14:31:34 by Brian Cherinka Last Modified On: 2016-04-08 14:31:34 by Brian ''' from __future__ import division, print_function impo...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@web@controllers@galaxy.py@.PATH_END.py
{ "filename": "kepler.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/io/kepler.py", "type": "Python" }
"""Reader for official Kepler light curve FITS files produced by the Ames pipeline.""" from ..lightcurve import KeplerLightCurve from ..utils import KeplerQualityFlags from .generic import read_generic_lightcurve def read_kepler_lightcurve( filename, flux_column="pdcsap_flux", quality_bitmask="default" ): ""...
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@io@kepler.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/utilities/schema_tools/__init__.py", "type": "Python" }
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@utilities@schema_tools@__init__.py@.PATH_END.py
{ "filename": "ecdfplot.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/plots/ecdfplot.py", "type": "Python" }
"""Plot ecdf or ecdf-difference plot with confidence bands.""" import warnings import numpy as np from scipy.stats import uniform try: from scipy.stats import ecdf as scipy_ecdf except ImportError: scipy_ecdf = None from ..rcparams import rcParams from ..stats.ecdf_utils import ecdf_confidence_band, _get_ec...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@plots@ecdfplot.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/hoverlabel/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.hoverlabel.font", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@hoverlabel@font@_textcase.py@.PATH_END.py
{ "filename": "2022_06_17_204409_d335ad57d5ba_add_block_schema_indexes.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2022_06_17_204409_d335ad57d5ba_add_block_schema_indexes.py", "type": "Python" }
"""Add block schema indexes Revision ID: d335ad57d5ba Revises: 61c76ee09e02 Create Date: 2022-06-17 20:44:09.726661 """ from alembic import op # revision identifiers, used by Alembic. revision = "d335ad57d5ba" down_revision = "61c76ee09e02" branch_labels = None depends_on = None def upgrade(): # ### commands ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2022_06_17_204409_d335ad57d5ba_add_block_schema_indexes.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pynbody/tangos", "repo_path": "tangos_extracted/tangos-master/tangos/relation_finding/__init__.py", "type": "Python" }
from .multi_hop import MultiHopStrategy from .multi_hop_variants import ( MultiHopAllProgenitorsStrategy, MultiHopMajorDescendantsStrategy, MultiHopMajorProgenitorsStrategy, MultiHopMostRecentMergerStrategy, ) from .multi_source import MultiSourceMultiHopStrategy from .one_hop import HopMajorDescendantS...
pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@relation_finding@__init__.py@.PATH_END.py
{ "filename": "vonmises.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/stats/vonmises.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np import scipy.stats from scipy.special import i0 def von_mises_cdf_series(k,x,p): x = float(x) s = np.sin(x) c = np.cos(x) sn = np.sin(p*x) cn = np.cos(p*x) R = 0 V = 0 for n in range(p-1,0,-1): ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@stats@vonmises.py@.PATH_END.py
{ "filename": "cpFringe.py", "repo_name": "lsst/cp_pipe", "repo_path": "cp_pipe_extracted/cp_pipe-main/python/lsst/cp/pipe/cpFringe.py", "type": "Python" }
# This file is part of cp_pipe. # # Developed for the LSST Data Management System. # 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: you can...
lsstREPO_NAMEcp_pipePATH_START.@cp_pipe_extracted@cp_pipe-main@python@lsst@cp@pipe@cpFringe.py@.PATH_END.py