metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_tz_convert.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimes/methods/test_tz_convert.py", "type": "Python" }
from datetime import datetime import dateutil.tz from dateutil.tz import gettz import numpy as np import pytest from pandas._libs.tslibs import timezones from pandas import ( DatetimeIndex, Index, NaT, Timestamp, date_range, offsets, ) import pandas._testing as tm class TestTZConvert: d...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimes@methods@test_tz_convert.py@.PATH_END.py
{ "filename": "run_episode.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/chrono-tensorflow/PPO/run_episode.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 26 11:36:45 2019 @author: simonebenatti """ import sys sys.path.append('../envs') import chtrain as gym import numpy as np from policy import Policy from utils import Scaler def run_parallel_episodes(arg): total_steps = 0 ...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@chrono-tensorflow@PPO@run_episode.py@.PATH_END.py
{ "filename": "_range.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/_range.py", "type": "Python" }
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.scene.yaxis", **kwargs): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@_range.py@.PATH_END.py
{ "filename": "_maxallowed.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/_maxallowed.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.yaxis", **kwargs ): super(MaxallowedValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@_maxallowed.py@.PATH_END.py
{ "filename": "test_b1.py", "repo_name": "nickhand/pyRSD", "repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/tests/test_qso_derivatives/test_b1.py", "type": "Python" }
from . import numdifftools, numpy as np from pyRSD.rsd.power.qso.derivatives import dPqso_db1 NMU = 41 def test_partial(driver): model = driver.theory.model # get the deriv arguments k = driver.data.combined_k mu = np.linspace(0., 1., NMU) # get the deriv arguments k = driver.data.com...
nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@tests@test_qso_derivatives@test_b1.py@.PATH_END.py
{ "filename": "_xperiodalignment.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/_xperiodalignment.py", "type": "Python" }
import _plotly_utils.basevalidators class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="funnel", **kwargs): super(XperiodalignmentValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@_xperiodalignment.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="scattersmith", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@_name.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/dtype_policies/__init__.py", "type": "Python" }
from keras.src import backend from keras.src.api_export import keras_export from keras.src.dtype_policies import dtype_policy from keras.src.dtype_policies.dtype_policy import QUANTIZATION_MODES from keras.src.dtype_policies.dtype_policy import DTypePolicy from keras.src.dtype_policies.dtype_policy import FloatDTypePol...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@dtype_policies@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "gully/blase", "repo_path": "blase_extracted/blase-main/README.md", "type": "Markdown" }
# blasé Interpretable Machine Learning for high-resolution astronomical spectroscopy. <a href="https://blase.readthedocs.io/en/latest/"><img src="https://img.shields.io/badge/Read-the%20docs-blue"></a> <a href="https://ui.adsabs.harvard.edu/abs/2022ApJ...941..200G/abstract"><img src="https://img.shields.io/badge/Pape...
gullyREPO_NAMEblasePATH_START.@blase_extracted@blase-main@README.md@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="contour", **kwargs): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "field_functions.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/fields/field_functions.py", "type": "Python" }
from collections.abc import Callable from inspect import signature import numpy as np from yt.utilities.lib.misc_utilities import obtain_position_vector def get_radius(data, field_prefix, ftype): center = data.get_field_parameter("center").to("code_length") DW = (data.ds.domain_right_edge - data.ds.domain_l...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@fields@field_functions.py@.PATH_END.py
{ "filename": "Basic example 5--resampling DES Y1.ipynb", "repo_name": "tmcclintock/AReconstructionTool", "repo_path": "AReconstructionTool_extracted/AReconstructionTool-master/notebooks/Basic example 5--resampling DES Y1.ipynb", "type": "Jupyter Notebook" }
# Resampling DES Y1 The DES Y1 3x2pt analysis is a tricky beast because it has SO many parameters (26). Samplers don't know the marginal likelihoods of only the interesting parameters (cosmology), and only ever report the joint posterior of all parameters given the data. For this reason, if we want to resample the DES...
tmcclintockREPO_NAMEAReconstructionToolPATH_START.@AReconstructionTool_extracted@AReconstructionTool-master@notebooks@Basic example 5--resampling DES Y1.ipynb@.PATH_END.py
{ "filename": "hera_sim_tour.ipynb", "repo_name": "HERA-Team/hera_sim", "repo_path": "hera_sim_extracted/hera_sim-main/docs/tutorials/hera_sim_tour.ipynb", "type": "Jupyter Notebook" }
# Tour of hera_sim This notebook briefly introduces some of the effects that can be modeled with `hera_sim`. ```python %matplotlib inline import uvtools import numpy as np import pylab as plt from astropy.units import sday from hera_sim import DATA_PATH plt.rcParams["figure.figsize"] = [14, 8] ``` ```python from h...
HERA-TeamREPO_NAMEhera_simPATH_START.@hera_sim_extracted@hera_sim-main@docs@tutorials@hera_sim_tour.ipynb@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcats/legendgrouptitle/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcats.legendgrouptitle.font", **kwargs, ): super(VariantValidator, self).__init__( plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcats@legendgrouptitle@font@_variant.py@.PATH_END.py
{ "filename": "np_dtypes_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/numpy_ops/np_dtypes_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@ops@numpy_ops@np_dtypes_test.py@.PATH_END.py
{ "filename": "limpy_v2.ipynb", "repo_name": "Anirbancosmo/limpy", "repo_path": "limpy_extracted/limpy-master/examples/limpy_v2.ipynb", "type": "Jupyter Notebook" }
```python import camb import numpy as np import scipy.integrate as si from camb import get_matter_power_interpolator from colossus.cosmology import cosmology as col_cosmology from colossus.lss import bias, mass_function import limpy.cosmos as cosmos import limpy.lines as ll ``` <---Parameters used in cosmo.py--->...
AnirbancosmoREPO_NAMElimpyPATH_START.@limpy_extracted@limpy-master@examples@limpy_v2.ipynb@.PATH_END.py
{ "filename": "pixelmask.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/mangadap/util/pixelmask.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ A class hierarchy for pixel masks. ---- .. include license and copyright .. include:: ../include/copy.rst ---- .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ impo...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@mangadap@util@pixelmask.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "VMBoehm/MADLens", "repo_path": "MADLens_extracted/MADLens-master/setup.py", "type": "Python" }
from setuptools import setup setup(name='MADLens', use_scm_version=True, setup_requires=['setuptools_scm'], description='a differentiable lensing simulator', url='http://github.com/VMBoehm/MADLens', author='Vanessa Martina Boehm', author_email='vboehm@berkeley.edu', license='G...
VMBoehmREPO_NAMEMADLensPATH_START.@MADLens_extracted@MADLens-master@setup.py@.PATH_END.py
{ "filename": "tpu.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tpu.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@tpu@tpu.py@.PATH_END.py
{ "filename": "test_samples.py", "repo_name": "handley-lab/anesthetic", "repo_path": "anesthetic_extracted/anesthetic-master/tests/test_samples.py", "type": "Python" }
import anesthetic.examples._matplotlib_agg # noqa: F401 import pytest from contextlib import nullcontext from math import floor, ceil import numpy as np from pandas import MultiIndex import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Rectangle from anesthetic.weighted_p...
handley-labREPO_NAMEanestheticPATH_START.@anesthetic_extracted@anesthetic-master@tests@test_samples.py@.PATH_END.py
{ "filename": "test_csr.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/tests/test_csr.py", "type": "Python" }
import numpy as np from numpy.testing import assert_array_almost_equal, assert_ from scipy.sparse import csr_matrix, hstack import pytest def _check_csr_rowslice(i, sl, X, Xcsr): np_slice = X[i, sl] csr_slice = Xcsr[i, sl] assert_array_almost_equal(np_slice, csr_slice.toarray()[0]) assert_(type(csr_sl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@tests@test_csr.py@.PATH_END.py
{ "filename": "license.md", "repo_name": "golmschenk/eesunhong", "repo_path": "eesunhong_extracted/eesunhong-main/third_party/minuit/license.md", "type": "Markdown" }
GNU Lesser General Public License ================================= _Version 2.1, February 1999_ _Copyright © 1991, 1999 Free Software Foundation, Inc._ _51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA_ Everyone is permitted to copy and distribute verbatim copies of this license document, but changin...
golmschenkREPO_NAMEeesunhongPATH_START.@eesunhong_extracted@eesunhong-main@third_party@minuit@license.md@.PATH_END.py
{ "filename": "prizmo_main.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/prizmo_main.py", "type": "Python" }
from prizmo_commons import print_title from prizmo_preprocess import preprocess import os def prepare(H2_inc, CO_inc): print_title("main") if not os.path.isfile("../main.f90"): print("skipping, main.f90 file not found") return update_code = "" if H2_inc: preprocess("../main.f...
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@prizmo_main.py@.PATH_END.py
{ "filename": "_autotypenumbers.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/zaxis/_autotypenumbers.py", "type": "Python" }
import _plotly_utils.basevalidators class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.scene.zaxis", **kwargs ): super(AutotypenumbersValidator, self).__init__( plotly_name=plotly_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@zaxis@_autotypenumbers.py@.PATH_END.py
{ "filename": "image.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/galsim/image.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@galsim@image.py@.PATH_END.py
{ "filename": "get_colors.py", "repo_name": "annayqho/TheCannon", "repo_path": "TheCannon_extracted/TheCannon-master/code/lamost/mass_age/cn/get_colors.py", "type": "Python" }
import pyfits import numpy as np def get_colors(catalog): """ Pull colors from catalog Parameters ---------- catalog: filename """ print("Get Colors") a = pyfits.open(catalog) data = a[1].data a.close() all_ids = data['LAMOST_ID_1'] all_ids = np.array([val.strip() for ...
annayqhoREPO_NAMETheCannonPATH_START.@TheCannon_extracted@TheCannon-master@code@lamost@mass_age@cn@get_colors.py@.PATH_END.py
{ "filename": "searchapi.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/tools/searchapi.ipynb", "type": "Jupyter Notebook" }
# SearchApi This notebook shows examples of how to use SearchApi to search the web. Go to [https://www.searchapi.io/](https://www.searchapi.io/) to sign up for a free account and get API key. ```python import os os.environ["SEARCHAPI_API_KEY"] = "" ``` ```python from langchain_community.utilities import SearchApi...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@tools@searchapi.ipynb@.PATH_END.py
{ "filename": "merge_FITS_masks.py", "repo_name": "IanHeywood/oxkat", "repo_path": "oxkat_extracted/oxkat-master/tools/merge_FITS_masks.py", "type": "Python" }
#!/usr/bin/env python # ian.heywood@physics.ox.ac.uk from astropy.io import fits import numpy import random from scipy.ndimage.morphology import binary_dilation import shutil import sys def genhex(): ran = random.randrange(10**80) myhex = "%064x" % ran myhex = myhex[:32] return myhex def getImage(...
IanHeywoodREPO_NAMEoxkatPATH_START.@oxkat_extracted@oxkat-master@tools@merge_FITS_masks.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="contour", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@_y.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/text-splitters/tests/unit_tests/conftest.py", "type": "Python" }
"""Configuration for unit tests.""" from importlib import util from typing import Dict, Sequence import pytest from pytest import Config, Function, Parser def pytest_addoption(parser: Parser) -> None: """Add custom command line options to pytest.""" parser.addoption( "--only-extended", actio...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@text-splitters@tests@unit_tests@conftest.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/wodenpy/array_layout/__init__.py", "type": "Python" }
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@wodenpy@array_layout@__init__.py@.PATH_END.py
{ "filename": "stopping_conditions.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/interface/stopping_conditions.py", "type": "Python" }
from amuse.units import units, generic_unit_system from amuse.units import nbody_system as nbody from amuse.support.exceptions import AmuseException from amuse.rfi.core import legacy_function from amuse.rfi.core import LegacyFunctionSpecification class StoppingConditionInterface: @legacy_function def has_sto...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@interface@stopping_conditions.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/newshape/legendgrouptitle/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@newshape@legendgrouptitle@font@_size.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/benchmark/fortran/pm_distNorm/setNormRandBox_Basic_vs_Polar/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import os dirname = os.path.basename(os.getcwd()) fontsize = 14 df = pd.read_csv("main.out", delimiter = ",") colnames = list(df.columns.values) ############################################################################...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@benchmark@fortran@pm_distNorm@setNormRandBox_Basic_vs_Polar@main.py@.PATH_END.py
{ "filename": "headers.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/wsgiref/headers.py", "type": "Python" }
"""Manage HTTP Response Headers Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ # Regular expression that matches `special' characters in parameters, the # existence of which force ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@wsgiref@headers.py@.PATH_END.py
{ "filename": "jackknife_weights.py", "repo_name": "oliverphilcox/RascalC", "repo_path": "RascalC_extracted/RascalC-master/python/jackknife_weights.py", "type": "Python" }
## Script to generate RR pair counts from a given set of random particles. This is based on the Corrfunc code of Sinha & Garrison. ## Weights and weighted pair counts are saved in the ../weight_files/ subdirectory. ## If the periodic flag is set, we assume a periodic simulation and measure mu from the Z-axis. import ...
oliverphilcoxREPO_NAMERascalCPATH_START.@RascalC_extracted@RascalC-master@python@jackknife_weights.py@.PATH_END.py
{ "filename": "translator_test_client.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/OpenAPI/tests/translator_test_client.py", "type": "Python" }
import sys import translator_client as tc translator_config = tc.Configuration() translator_config.host = "localhost:8084" with open(sys.argv[1], "rt") as f: graph = f.read() with tc.ApiClient(translator_config) as translator_client: translator = tc.DefaultApi(translator_client) html_content = translato...
icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@OpenAPI@tests@translator_test_client.py@.PATH_END.py
{ "filename": "womjoin.py", "repo_name": "msiebert1/UCSC_spectral_pipeline", "repo_path": "UCSC_spectral_pipeline_extracted/UCSC_spectral_pipeline-master/spectral_reduction/tmath/wombat/womjoin.py", "type": "Python" }
def womjoin(hop): """join two spectra that abut in wavelength""" import numpy as np import logging from tmath.wombat.inputter import inputter from tmath.wombat import HOPSIZE print('\nThis will join two hoppers (with no overlap)\n') hopnum1=0 hopnum2=0 while (hopnum1 < 1) or (hopnum1...
msiebert1REPO_NAMEUCSC_spectral_pipelinePATH_START.@UCSC_spectral_pipeline_extracted@UCSC_spectral_pipeline-master@spectral_reduction@tmath@wombat@womjoin.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/potential/frame/core.py", "type": "Python" }
__all__ = ['FrameBase'] # This package from ..common import CommonBase class FrameBase(CommonBase): ndim = 3 def __init__(self, *args, units=None, **kwargs): parameter_values = self._parse_parameter_values(*args, **kwargs) self._setup_frame(parameters=parameter_values, ...
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@potential@frame@core.py@.PATH_END.py
{ "filename": "glossary.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/doc/glossary.py", "type": "Python" }
""" ======== Glossary ======== .. glossary:: along an axis Axes are defined for arrays with more than one dimension. A 2-dimensional array has two corresponding axes: the first running vertically downwards across rows (axis 0), and the second running horizontally across columns (axis 1...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@doc@glossary.py@.PATH_END.py
{ "filename": "2022_10_19_093542_fa319f214160_add_created_by.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/sqlite/2022_10_19_093542_fa319f214160_add_created_by.py", "type": "Python" }
"""add_created_by Revision ID: fa319f214160 Revises: ad4b1b4d1e9d Create Date: 2022-10-19 09:35:42.371899 """ import sqlalchemy as sa from alembic import op import prefect # revision identifiers, used by Alembic. revision = "fa319f214160" down_revision = "ad4b1b4d1e9d" branch_labels = None depends_on = None def ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@sqlite@2022_10_19_093542_fa319f214160_add_created_by.py@.PATH_END.py
{ "filename": "fm.py", "repo_name": "meganmansfield/IGRINS_transit", "repo_path": "IGRINS_transit_extracted/IGRINS_transit-main/retrieval_set_up/fm.py", "type": "Python" }
import math as mth import math import numpy as np import scipy as sp from array import * from scipy import interpolate from scipy import signal from scipy import special from scipy import interp from scipy import ndimage import pdb import datetime import pickle from scipy import constants from numba import jit from num...
meganmansfieldREPO_NAMEIGRINS_transitPATH_START.@IGRINS_transit_extracted@IGRINS_transit-main@retrieval_set_up@fm.py@.PATH_END.py
{ "filename": "test_prims.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/tests/test_prims.py", "type": "Python" }
# Copyright (c) 2019-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@tests@test_prims.py@.PATH_END.py
{ "filename": "population.py", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/frbpoppy/population.py", "type": "Python" }
"""Define a class to hold a population of FRBs.""" import os import dill as pickle import numpy as np from copy import deepcopy from frbpoppy.paths import paths from frbpoppy.frbs import FRBs class Population: """Class to hold a population of FRBs.""" def __init__(self): """Initializing.""" ...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@frbpoppy@population.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/line/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter3d.line", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@line@_colorscale.py@.PATH_END.py
{ "filename": "tutorial.ipynb", "repo_name": "tingyuansen/binspec_plus", "repo_path": "binspec_plus_extracted/binspec_plus-master/tutorial.ipynb", "type": "Jupyter Notebook" }
** This file gives a brief overview of the capabilities of the code. ** * If you want to predict the spectrum of a single or binary star with particular labels, you'll want the "spectral_model" package. * If you want to fit an observed spectrum, see the "fitting" package. * Downloading and processing APOGEE spectra is...
tingyuansenREPO_NAMEbinspec_plusPATH_START.@binspec_plus_extracted@binspec_plus-master@tutorial.ipynb@.PATH_END.py
{ "filename": "_xhoverformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/_xhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="isosurface", **kwargs): super(XhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@_xhoverformat.py@.PATH_END.py
{ "filename": "gexceptions.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/gexceptions.py", "type": "Python" }
class NGmixBaseException(Exception): """Base exception class for ngmix""" def __init__(self, value): super(NGmixBaseException, self).__init__(value) self.value = value def __str__(self): return repr(self.value) class GMixRangeError(NGmixBaseException): """ Some number was ...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@gexceptions.py@.PATH_END.py
{ "filename": "SpectralEnergyDistributionsInSplusDr1.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/03_ScienceExamples/SpectralEnergyDistributions/SpectralEnergyDistributionsInSplusDr1.ipynb", "type": "Jupyter Notebook" }
```python __nbid__ = '0028' __author__ = 'David Nidever <david.nidever@noirlab.edu>, Astro Data Lab Team <datalab@noirlab.edu>' __version__ = '20240606' # yyymmdd __datasets__ = ['splus_dr1'] __keywords__ = ['science example', 'plot:cmd', 'plot:color-color', 'image cutout'] ``` # Spectral Energy Distributions with S-P...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@03_ScienceExamples@SpectralEnergyDistributions@SpectralEnergyDistributionsInSplusDr1.ipynb@.PATH_END.py
{ "filename": "pytables.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/io/pytables.py", "type": "Python" }
""" High level interface to PyTables for reading and writing pandas data structures to disk """ from __future__ import annotations from contextlib import suppress import copy from datetime import ( date, tzinfo, ) import itertools import os import re from textwrap import dedent from typing import ( TYPE_C...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@pytables.py@.PATH_END.py
{ "filename": "_showocean.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/geo/_showocean.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowoceanValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showocean", parent_name="layout.geo", **kwargs): super(ShowoceanValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@geo@_showocean.py@.PATH_END.py
{ "filename": "_showtickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/colorbar/_showtickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="contourcarpet.colorbar", **kwargs ): super(ShowtickprefixValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@colorbar@_showtickprefix.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="surface.colorbar", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@colorbar@_thickness.py@.PATH_END.py
{ "filename": "test_setup.py", "repo_name": "ucberkeleyseti/blimpy", "repo_path": "blimpy_extracted/blimpy-master/tests/test_setup.py", "type": "Python" }
r""" Testspectra_gen functions""" def test_setup(): import os cmd = "python3 setup.py check" os.system(cmd)
ucberkeleysetiREPO_NAMEblimpyPATH_START.@blimpy_extracted@blimpy-master@tests@test_setup.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymap/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="densitymap", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymap@_name.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "maho3/ltu-ili", "repo_path": "ltu-ili_extracted/ltu-ili-main/ili/__init__.py", "type": "Python" }
from .dataloaders import * from .inference import * from .utils import * from .validation import * try: from .embedding import * except ModuleNotFoundError: pass
maho3REPO_NAMEltu-iliPATH_START.@ltu-ili_extracted@ltu-ili-main@ili@__init__.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pure-eval/pure_eval/utils.py", "type": "Python" }
from collections import OrderedDict, deque from datetime import date, time, datetime from decimal import Decimal from fractions import Fraction import ast import enum import typing class CannotEval(Exception): def __repr__(self): return self.__class__.__name__ __str__ = __repr__ def is_any(x, *args...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pure-eval@pure_eval@utils.py@.PATH_END.py
{ "filename": "ContentEnd.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata_schema_py_generated/ContentEnd.md", "type": "Markdown" }
page_type: reference <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.metadata_schema_py_generated.ContentEnd" /> <meta itemprop="path" co...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@metadata_schema_py_generated@ContentEnd.md@.PATH_END.py
{ "filename": "table_wide.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/wcwidth/py2/wcwidth/table_wide.py", "type": "Python" }
""" Exports WIDE_EASTASIAN table keyed by supporting unicode version level. This code generated by wcwidth/bin/update-tables.py on 2024-01-06 01:39:49 UTC. """ WIDE_EASTASIAN = { '4.1.0': ( # Source: EastAsianWidth-4.1.0.txt # Date: 2005-03-17, 15:21:00 PST [KW] # (0x01100, 0x01159,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@wcwidth@py2@wcwidth@table_wide.py@.PATH_END.py
{ "filename": "InstrumentDescription.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/examples/core/InstrumentDescription.py", "type": "Python" }
""" Working with Instrumental Descriptions ====================================== the instrumental description is loaded by the event source, and consists of a hierarchy of classes in the ctapipe.instrument module, the base of which is the ``SubarrayDescription`` """ from astropy.coordinates import SkyCoord from ct...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@examples@core@InstrumentDescription.py@.PATH_END.py
{ "filename": "rawfibers.py", "repo_name": "danielrd6/ifscube", "repo_path": "ifscube_extracted/ifscube-master/ifscube/rawfibers.py", "type": "Python" }
from astropy.io import fits import numpy as np import matplotlib.pyplot as plt class Cube: def __init__(self, fitsfile): hdu = fits.open(fitsfile) self.data = hdu['sci'].data self._full_mdf = hdu['mdf'].data # Valid apertures, which must equal the number of lines # in th...
danielrd6REPO_NAMEifscubePATH_START.@ifscube_extracted@ifscube-master@ifscube@rawfibers.py@.PATH_END.py
{ "filename": "test_argcomplete.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/traitlets/py3/tests/config/test_argcomplete.py", "type": "Python" }
""" Tests for argcomplete handling by traitlets.config.application.Application """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import annotations import io import os import typing as t import pytest argcomplete = pytest.importorskip("argcomple...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@traitlets@py3@tests@config@test_argcomplete.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/packages/amuse-kepler/setup.py", "type": "Python" }
#!/usr/bin/env python3 from support.classifiers import classifiers from setuptools import setup import support support.use("system") from support.setup_codes import setup_commands name = 'amuse-kepler' author = 'The AMUSE team' author_email = 'info@amusecode.org' license_ = "Apache License 2.0" url = 'http://www.amu...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@packages@amuse-kepler@setup.py@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.tickfont" _valid_props = { "...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@bar@marker@colorbar@_tickfont.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "jlustigy/coronagraph", "repo_path": "coronagraph_extracted/coronagraph-master/setup.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from setuptools import setup # Hackishly inject a constant into builtins to enable importing of the # module in "setup" mode. Stolen from `kplr` import sys if sys.version_info[0] < 3: import __builtin__ ...
jlustigyREPO_NAMEcoronagraphPATH_START.@coronagraph_extracted@coronagraph-master@setup.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/_textfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="heatmap", **kwargs): super(TextfontValidator, 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@heatmap@_textfont.py@.PATH_END.py
{ "filename": "custom_instrument_example.py", "repo_name": "AWehrhahn/PyReduce", "repo_path": "PyReduce_extracted/PyReduce-master/examples/custom_instrument_example.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Simple usage example for PyReduce Loads a sample UVES dataset, and runs the full extraction """ import os.path import pyreduce from pyreduce.configuration import get_configuration_for_instrument from pyreduce.instruments.common import create_custom_instrument from pyreduce.reduce import Re...
AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@examples@custom_instrument_example.py@.PATH_END.py
{ "filename": "geometry.ipynb", "repo_name": "rtazaki1205/AggScatVIR", "repo_path": "AggScatVIR_extracted/AggScatVIR-master/docs/geometry.ipynb", "type": "Jupyter Notebook" }
# Visualization of Particles This database already contains visualization images of particles rendered using POV-RAY. However, you may wish to change rendering parameters, such as particle and background colors, reference scale, particle orientation ... etc. To meet up needs, the `aggscatpy` package implements a sim...
rtazaki1205REPO_NAMEAggScatVIRPATH_START.@AggScatVIR_extracted@AggScatVIR-master@docs@geometry.ipynb@.PATH_END.py
{ "filename": "_ypad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/_ypad.py", "type": "Python" }
import _plotly_utils.basevalidators class YpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(YpadValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@_ypad.py@.PATH_END.py
{ "filename": "test_abscal.py", "repo_name": "HERA-Team/hera_cal", "repo_path": "hera_cal_extracted/hera_cal-main/hera_cal/tests/test_abscal.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright 2019 the HERA Project # Licensed under the MIT License import pytest import os from scipy import constants import numpy as np import sys from collections import OrderedDict as odict import copy import glob from pyuvdata import UVCal, UVData import warnings from hera_sim.antpos impor...
HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@hera_cal@tests@test_abscal.py@.PATH_END.py
{ "filename": "authurls.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/auth/authurls.py", "type": "Python" }
import collections import logging from . import securitymethods __all__ = ["AuthURLs"] class AuthURLs(): """ AuthURLs helps determine which security method should be used with a given URL. It learns the security methods through the VOSI capabilities, which are passed in via update_from_capabilities...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@auth@authurls.py@.PATH_END.py
{ "filename": "test_synthetic_data.py", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/tests/test_synthetic_data.py", "type": "Python" }
"""Use synthetic data to verify lightkurve detrending and signal recovery. """ from __future__ import division, print_function from astropy.utils.data import get_pkg_data_filename from astropy.timeseries import BoxLeastSquares import numpy as np import pytest from scipy import stats from lightkurve.targetpixelfile i...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@tests@test_synthetic_data.py@.PATH_END.py
{ "filename": "classification.py", "repo_name": "samuelperezdi/umlcaxs", "repo_path": "umlcaxs_extracted/umlcaxs-main/classification.py", "type": "Python" }
from umlcaxs_lib import lognorm, mahal_classifier_all import pandas as pd # Feature definitions features = ['hard_hm', 'hard_hs', 'hard_ms', 'powlaw_gamma', 'bb_kt', 'var_prob_b', 'var_ratio_b', 'var_prob_h', 'var_ratio_h', 'var_prob_s', 'var_ratio_s', 'var_newq_b'] features_lognorm = ['bb_kt',...
samuelperezdiREPO_NAMEumlcaxsPATH_START.@umlcaxs_extracted@umlcaxs-main@classification.py@.PATH_END.py
{ "filename": "los_pvd_vs_rp.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/pairwise_velocities/los_pvd_vs_rp.py", "type": "Python" }
r""" Module containing the `~halotools.mock_observables.los_pvd_vs_rp` function used to calculate the pairwise line-of-sight velocity dispersion as a function of projected distance between the pairs. """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from .pairw...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@pairwise_velocities@los_pvd_vs_rp.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "ThomasHelfer/multimodal-supernovae", "repo_path": "multimodal-supernovae_extracted/multimodal-supernovae-main/src/utils.py", "type": "Python" }
import os from typing import List, Optional from pytorch_lightning import LightningModule, Trainer from pytorch_lightning.callbacks import Callback import torch import numpy as np from torch.utils.data import DataLoader from typing import Tuple, List, Dict, Any from matplotlib import pyplot as plt from ruamel.yaml impo...
ThomasHelferREPO_NAMEmultimodal-supernovaePATH_START.@multimodal-supernovae_extracted@multimodal-supernovae-main@src@utils.py@.PATH_END.py
{ "filename": "flagging.py", "repo_name": "realfastvla/rfpipe", "repo_path": "rfpipe_extracted/rfpipe-main/rfpipe/flagging.py", "type": "Python" }
from __future__ import print_function, division, absolute_import, unicode_literals from builtins import bytes, dict, object, range, map, input, str from future.utils import itervalues, viewitems, iteritems, listvalues, listitems import numpy as np from numba import jit from rfpipe import util import logging logger = ...
realfastvlaREPO_NAMErfpipePATH_START.@rfpipe_extracted@rfpipe-main@rfpipe@flagging.py@.PATH_END.py
{ "filename": "mcmc_kernel.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/infer/mcmc/mcmc_kernel.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from abc import ABCMeta, abstractmethod class MCMCKernel(object, metaclass=ABCMeta): def setup(self, warmup_steps, *args, **kwargs): r""" Optional method to set up any state required at the start of the ...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@infer@mcmc@mcmc_kernel.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="surface", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@_stream.py@.PATH_END.py
{ "filename": "download_regression_models.py", "repo_name": "sxs-collaboration/gwsurrogate", "repo_path": "gwsurrogate_extracted/gwsurrogate-master/test/download_regression_models.py", "type": "Python" }
""" download all models to be tested in test_model_regression.py This is useful to do when using continuous integration. """ import gwsurrogate as gws import hashlib, os def md5(fname): """ Compute has from file. code taken from https://stackoverflow.com/questions/3431825/generating-an-md5-checksum-of-a-file"""...
sxs-collaborationREPO_NAMEgwsurrogatePATH_START.@gwsurrogate_extracted@gwsurrogate-master@test@download_regression_models.py@.PATH_END.py
{ "filename": "clickup.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/utilities/clickup.py", "type": "Python" }
"""Util that calls clickup.""" import json import warnings from dataclasses import asdict, dataclass, fields from typing import Any, Dict, List, Mapping, Optional, Tuple, Type, Union import requests from langchain_core.utils import get_from_dict_or_env from pydantic import BaseModel, ConfigDict, model_validator DEFA...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@utilities@clickup.py@.PATH_END.py
{ "filename": "OConnor_2013.ipynb", "repo_name": "SNEWS2/snewpy", "repo_path": "snewpy_extracted/snewpy-main/doc/nb/ccsn/OConnor_2013.ipynb", "type": "Jupyter Notebook" }
# O'Connor 2013 Models Data from O'Connor & Ott 2013, 32 progenitors (Woosley and Heger 2007) and 2 EOS (LS220 and HShen) for 500 ms post bounce in spherical symmetry (no explosions) Reference: O'Connor and Ott ApJ 762 126 2013 - [doi:10.1088/0004-637X/762/2/126](https://doi.org/10.1088/0004-637X/762/2/126) - [arXi...
SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@doc@nb@ccsn@OConnor_2013.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/preprocessing/image/__init__.py", "type": "Python" }
"""DO NOT EDIT. This file was autogenerated. Do not edit it by hand, since your modifications would be overwritten. """ from keras.src.legacy.preprocessing.image import DirectoryIterator from keras.src.legacy.preprocessing.image import ImageDataGenerator from keras.src.legacy.preprocessing.image import Iterator from ...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@preprocessing@image@__init__.py@.PATH_END.py
{ "filename": "lbl_wrap.py", "repo_name": "njcuk9999/lbl", "repo_path": "lbl_extracted/lbl-main/lbl/recipes/lbl_wrap.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # CODE NAME HERE # CODE DESCRIPTION HERE Created on 2021-03-19 @author: cook """ import sys from lbl.core import base from lbl.core import base_classes from lbl.core import io from lbl.recipes import lbl_compile from lbl.recipes import lbl_compute from lbl.recipes i...
njcuk9999REPO_NAMElblPATH_START.@lbl_extracted@lbl-main@lbl@recipes@lbl_wrap.py@.PATH_END.py
{ "filename": "style_widget.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/core/style_widget.py", "type": "Python" }
from ipyvuetify import VuetifyTemplate __all__ = ['StyleWidget'] class StyleWidget(VuetifyTemplate): def __init__(self, template_file, *args, **kwargs): self.template_file = template_file super().__init__(*args, **kwargs)
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@core@style_widget.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="box", **kwargs): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_legendgrouptitle.py@.PATH_END.py
{ "filename": "tuningOptimization.py", "repo_name": "tjlcbakx/redshift-search-graphs", "repo_path": "redshift-search-graphs_extracted/redshift-search-graphs-master/tuningOptimization.py", "type": "Python" }
##----------------------------------------- ## Code written and edited by Tom Bakx ## tjlcbakx@gmail.com ##----------------------------------------- ##----------------------------------------- ## Header imports, colours ##----------------------------------------- import numpy as np import matplotlib.pyplot as plt im...
tjlcbakxREPO_NAMEredshift-search-graphsPATH_START.@redshift-search-graphs_extracted@redshift-search-graphs-master@tuningOptimization.py@.PATH_END.py
{ "filename": "functional.py", "repo_name": "halomod/halomod", "repo_path": "halomod_extracted/halomod-main/src/halomod/functional.py", "type": "Python" }
r"""Module defining functional approaches to generating halo model quantities.""" from __future__ import annotations from hmf import Framework, get_hmf from .halo_model import HaloModel def get_halomodel( required_attrs, get_label=True, kls=HaloModel, fast_kwargs: dict | None = None, **kwargs ) -> list[Framewo...
halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@src@halomod@functional.py@.PATH_END.py
{ "filename": "test_ivp.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/integrate/_ivp/tests/test_ivp.py", "type": "Python" }
from itertools import product from numpy.testing import (assert_, assert_allclose, assert_array_less, assert_equal, assert_no_warnings, suppress_warnings) import pytest from pytest import raises as assert_raises import numpy as np from scipy.optimize._numdiff import group_columns from scipy.i...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@integrate@_ivp@tests@test_ivp.py@.PATH_END.py
{ "filename": "core_correlation_pytorch.py", "repo_name": "leungcalvin/pyfx-public", "repo_path": "pyfx-public_extracted/pyfx-public-main/src/pyfx/core_correlation_pytorch.py", "type": "Python" }
""" Identical to core_correlation, but uses gpus. Still W.I.P. Fringestops station B to station A and cross correlates baseband data from station A and B. Written by Shion Andrew """ import numpy as np from astropy.time import Time, TimeDelta from decimal import Decimal import astropy.units as un import time from ...
leungcalvinREPO_NAMEpyfx-publicPATH_START.@pyfx-public_extracted@pyfx-public-main@src@pyfx@core_correlation_pytorch.py@.PATH_END.py
{ "filename": "do_signal_llhs_quick.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/archive/do_signal_llhs_quick.py", "type": "Python" }
import numpy as np from astropy.io import fits import os import argparse import logging, traceback import time from ..analysis_seeds.bkg_rate_estimation import rate_obj_from_sqltab from ..lib.sqlite_funcs import get_conn, write_result from ..lib.dbread_funcs import ( get_rate_fits_tab, guess_dbfname, get_s...
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@archive@do_signal_llhs_quick.py@.PATH_END.py
{ "filename": "filament.py", "repo_name": "SimonPfeifer/cows", "repo_path": "cows_extracted/cows-master/src/cows/filament.py", "type": "Python" }
import numpy as np from ._filament import _label_skeleton, _find_filaments def label_skeleton(skel, periodic=False): ''' Label the skeleton. Label all skeleton cells with their respective number of neighbour that they share a face, edge or vertex with (N_26). Parameters ---------- sk...
SimonPfeiferREPO_NAMEcowsPATH_START.@cows_extracted@cows-master@src@cows@filament.py@.PATH_END.py
{ "filename": "_linewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/aaxis/_linewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="linewidth", parent_name="carpet.aaxis", **kwargs): super(LinewidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@aaxis@_linewidth.py@.PATH_END.py
{ "filename": "CANDIDATES-Oumuamua-Past.md", "repo_name": "seap-udea/iWander", "repo_path": "iWander_extracted/iWander-master/objects/CANDIDATES-Oumuamua-Past.md", "type": "Markdown" }
# Progenitor candidates of 1I/2017 U1 [![arXiv](http://img.shields.io/badge/arXiv-1711.09397-orange.svg?style=flat)](http://arxiv.org/abs/1711.09397) _Latest update_: ``Mon Mar 19 08:45:41 2018`` |#|Name|d(pc)|q|dmin(pc)|tmin(Myr)|vrel(km/s)|Ppos|find|Pposvel| |--|--|--|--|--|--|--|--|--|--| | 1 | HIP 103749 ([HD 2...
seap-udeaREPO_NAMEiWanderPATH_START.@iWander_extracted@iWander-master@objects@CANDIDATES-Oumuamua-Past.md@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="densitymapbox.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "TTTEEE.py", "repo_name": "SouthPoleTelescope/spt3g_y1_dist", "repo_path": "spt3g_y1_dist_extracted/spt3g_y1_dist-main/cobaya_files/SPT3G_Y1/TTTEEE.py", "type": "Python" }
from cobaya.likelihoods.base_classes import planck_clik from cobaya.log import LoggedError, get_logger from cobaya.tools import are_different_params_lists import numpy as np from typing import Optional import os class TTTEEE(planck_clik.PlanckClik): SPT3G_2018_TTTEEE_late_crop_msk : Optional[str] SPT3G_20...
SouthPoleTelescopeREPO_NAMEspt3g_y1_distPATH_START.@spt3g_y1_dist_extracted@spt3g_y1_dist-main@cobaya_files@SPT3G_Y1@TTTEEE.py@.PATH_END.py
{ "filename": "_fgopacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/pattern/_fgopacity.py", "type": "Python" }
import _plotly_utils.basevalidators class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="treemap.marker.pattern", **kwargs ): super(FgopacityValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@pattern@_fgopacity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/itreg/regpy/solvers/__init__.py", "type": "Python" }
"""Iterative solvers for inverse problems. """ from regpy.util import classlogger from regpy.hilbert import HilbertSpace class Solver: """Abstract base class for solvers. Solvers do not loop themselves, but are driven by repeatedly calling the `next` method. They expose the current iterate and value as attri...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@itreg@regpy@solvers@__init__.py@.PATH_END.py
{ "filename": "grid.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/herculens/LensImage/Numerics/grid.py", "type": "Python" }
# Handles coordinate grid on which ray-tracing and convolution are performed # # Copyright (c) 2021, herculens developers and contributors # Copyright (c) 2018, Simon Birrer & lenstronomy contributors # based on the ImSim.Numerics module from lenstronomy (version 1.9.3) __author__ = 'sibirrer', 'austinpeel', 'aymgal'...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@LensImage@Numerics@grid.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/hoverlabel/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="heatmapgl.hoverlabel", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@hoverlabel@_bordercolor.py@.PATH_END.py
{ "filename": "lineout.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/pyCalculations/lineout.py", "type": "Python" }
# # This file is part of Analysator. # Copyright 2013-2016 Finnish Meteorological Institute # Copyright 2017-2018 University of Helsinki # # For details of usage, see the COPYING file and read the "Rules of the Road" # at http://www.physics.helsinki.fi/vlasiator/ # # This program is free software; you can redistribu...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@pyCalculations@lineout.py@.PATH_END.py