metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "README.md", "repo_name": "revoltek/LiLF", "repo_path": "LiLF_extracted/LiLF-master/README.md", "type": "Markdown" }
# LiLF Library for Low Frequencies LiLF is a set of functions linked together in pipelines for the reduction of low-frequency interferometric data in radio astronomy. It is built upon LOFAR software. LiLF can be used on both LOFAR and uGMRT data. - LOFAR: http://lofar.org/ - uGMRT: http://www.ncra.tifr.res.in/ncra/gm...
revoltekREPO_NAMELiLFPATH_START.@LiLF_extracted@LiLF-master@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "exoplanet-dev/celerite2", "repo_path": "celerite2_extracted/celerite2-main/python/celerite2/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- __all__ = ["__version__", "terms", "GaussianProcess"] import celerite2.terms as terms from celerite2.celerite2_version import __version__ from celerite2.numpy import GaussianProcess __uri__ = "https://celerite2.readthedocs.io" __author__ = "Daniel Foreman-Mackey" __email__ = "foreman.mackey@g...
exoplanet-devREPO_NAMEcelerite2PATH_START.@celerite2_extracted@celerite2-main@python@celerite2@__init__.py@.PATH_END.py
{ "filename": "_mode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/_mode.py", "type": "Python" }
import _plotly_utils.basevalidators class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatterternary", **kwargs): super(ModeValidator, 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@scatterternary@_mode.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/bridge/mqtt/__init__.py", "type": "Python" }
##################################################################################### # # Copyright (c) typedef int GmbH # SPDX-License-Identifier: EUPL-1.2 # #####################################################################################
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@bridge@mqtt@__init__.py@.PATH_END.py
{ "filename": "_enabled.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py", "type": "Python" }
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): super(EnabledValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@colorbar@tickformatstop@_enabled.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "cajohare/AxionLimits", "repo_path": "AxionLimits_extracted/AxionLimits-master/limit_data/AxionElectron/README.md", "type": "Markdown" }
# AxionLimits All data files have ma [eV] in the first column and g_ae [dimensionless] in the second column. Projected limits are in the Projections folder # Limits: ### Underground detectors * DARWIN: [projection](https://github.com/cajohare/AxionLimits/raw/master/limit_data/AxionElectron/Projections/DARWIN.txt), [r...
cajohareREPO_NAMEAxionLimitsPATH_START.@AxionLimits_extracted@AxionLimits-master@limit_data@AxionElectron@README.md@.PATH_END.py
{ "filename": "Calibration.py", "repo_name": "GBTSpectroscopy/gbtpipe", "repo_path": "gbtpipe_extracted/gbtpipe-master/gbtpipe/Calibration.py", "type": "Python" }
"""Calibration methods for the GBT Pipeline. This module contains all the core calibration methods for GBT single dish mapping needed by the pipeline. It includes both position-switched and frequency-switched calibration methods. """ # Copyright (C) 2007 Associated Universities, Inc. Washington DC, USA. # # This pro...
GBTSpectroscopyREPO_NAMEgbtpipePATH_START.@gbtpipe_extracted@gbtpipe-master@gbtpipe@Calibration.py@.PATH_END.py
{ "filename": "_violin.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/_violin.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Violin(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "violin" _valid_props = { "alignmentgroup", "bandwidth", "box", "customda...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@_violin.py@.PATH_END.py
{ "filename": "simple_example.py", "repo_name": "rbuehler/vasca", "repo_path": "vasca_extracted/vasca-main/docs/tutorials/simple_example.py", "type": "Python" }
# --- # jupyter: # jupytext: # text_represenation: # extension: .py # format_name: percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.16.4 # kernelspec: # display_name: vasca-github # language: pyth...
rbuehlerREPO_NAMEvascaPATH_START.@vasca_extracted@vasca-main@docs@tutorials@simple_example.py@.PATH_END.py
{ "filename": "_gradient.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/_gradient.py", "type": "Python" }
import _plotly_utils.basevalidators class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scattergeo.marker", **kwargs ): super(GradientValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@_gradient.py@.PATH_END.py
{ "filename": "grid.py", "repo_name": "clemson-cal/sailfish", "repo_path": "sailfish_extracted/sailfish-master/ideas/grid.py", "type": "Python" }
from numpy import zeros, linspace, meshgrid, exp def copy_guard_zones(grid): for i, j in grid: cc = grid.get((i, j)) lc = grid.get((i - 1, j), None) rc = grid.get((i + 1, j), None) cl = grid.get((i, j - 1), None) cr = grid.get((i, j + 1), None) if lc is not None: ...
clemson-calREPO_NAMEsailfishPATH_START.@sailfish_extracted@sailfish-master@ideas@grid.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter3d.marker", **kwargs): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@_cmax.py@.PATH_END.py
{ "filename": "syn_phot.py", "repo_name": "tomasstolker/species", "repo_path": "species_extracted/species-main/species/phot/syn_phot.py", "type": "Python" }
""" Module with functionalities for calculating synthetic photometry. """ import os import math import warnings import configparser from typing import List, Optional, Union, Tuple import h5py import numpy as np from typeguard import typechecked from species.data.spec_data.spec_vega import add_vega from species.rea...
tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@phot@syn_phot.py@.PATH_END.py
{ "filename": "atomic.py", "repo_name": "atomdb/pyatomdb", "repo_path": "pyatomdb_extracted/pyatomdb-master/pyatomdb/pyatomdb/atomic.py", "type": "Python" }
""" atomic.py contains routines related to basic atomic data, e.g. converting integer nuclear charge to element symbols, etc. Version -.1 - initial release Adam Foster July 17th 2015 """ llist = 'spdfghiklmnoqrtuvwxyzABCDEFGHIJKLMNOP' import re, numpy ##################################################################...
atomdbREPO_NAMEpyatomdbPATH_START.@pyatomdb_extracted@pyatomdb-master@pyatomdb@pyatomdb@atomic.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_model_config/autofill_noplatform/python/no_return/model.py", "type": "Python" }
# Copyright 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list o...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_model_config@autofill_noplatform@python@no_return@model.py@.PATH_END.py
{ "filename": "Documentation.md", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googletest/docs/Documentation.md", "type": "Markdown" }
This page lists all documentation wiki pages for Google Test **(the SVN trunk version)** -- **if you use a released version of Google Test, please read the documentation for that specific version instead.** * [Primer](Primer.md) -- start here if you are new to Google Test. * [Samples](Samples.md) -- learn from exa...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googletest@docs@Documentation.md@.PATH_END.py
{ "filename": "210_DataLoading_Automatic.ipynb", "repo_name": "rometsch/fargocpt", "repo_path": "fargocpt_extracted/fargocpt-master/examples/210_DataLoading_Automatic.ipynb", "type": "Jupyter Notebook" }
## Loading data from the simulation output - the automatic way This notebook teaches you how to load data from the simulation output using a helper tool. We will use the data from the simulation in the quickstart example, so make sure you ran this beforehand. We'll first create a Data object and ask what's available...
rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@examples@210_DataLoading_Automatic.ipynb@.PATH_END.py
{ "filename": "slices_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/converters/slices_test.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@autograph@converters@slices_test.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "1313e/CMasher", "repo_path": "CMasher_extracted/CMasher-master/src/cmasher/utils.py", "type": "Python" }
""" Utils ===== Utility functions for registering and manipulating colormaps in various ways. """ import os from collections import OrderedDict from collections.abc import Callable from importlib.util import find_spec from pathlib import Path from textwrap import dedent from typing import TYPE_CHECKING import matplo...
1313eREPO_NAMECMasherPATH_START.@CMasher_extracted@CMasher-master@src@cmasher@utils.py@.PATH_END.py
{ "filename": "_sunburst.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/template/data/_sunburst.py", "type": "Python" }
from plotly.graph_objs import Sunburst
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@template@data@_sunburst.py@.PATH_END.py
{ "filename": "setup_package.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/timeseries/periodograms/lombscargle/setup_package.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from pathlib import Path from numpy import get_include as get_numpy_include from setuptools import Extension ROOT = Path(__file__).parent.resolve().relative_to(Path.cwd()) def get_extensions(): ext = Extension( "astropy.timeseries.periodog...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@timeseries@periodograms@lombscargle@setup_package.py@.PATH_END.py
{ "filename": "_outsidetextfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/funnel/_outsidetextfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel" _path_str = "funnel.outsidetextfont" _valid_props = { "color", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@funnel@_outsidetextfont.py@.PATH_END.py
{ "filename": "test_spectral_models.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_spectral_models.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2015, 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_spectral_models.py@.PATH_END.py
{ "filename": "seq.py", "repo_name": "simonsobs/sorunlib", "repo_path": "sorunlib_extracted/sorunlib-main/src/sorunlib/seq.py", "type": "Python" }
import datetime as dt import sorunlib as run from sorunlib.commands import _timestamp_to_utc_datetime from sorunlib._internal import check_response, check_started, monitor_process OP_TIMEOUT = 60 def scan(description, stop_time, width, az_drift=0, tag=None, subtype=None, min_duration=None): """Run a ...
simonsobsREPO_NAMEsorunlibPATH_START.@sorunlib_extracted@sorunlib-main@src@sorunlib@seq.py@.PATH_END.py
{ "filename": "check_sph.py", "repo_name": "LSSTDESC/NaMaster", "repo_path": "NaMaster_extracted/NaMaster-master/sandbox_validation/check_sph.py", "type": "Python" }
from __future__ import print_function from optparse import OptionParser import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt import os import sys DTOR=np.pi/180 def opt_callback(option, opt, value, parser): setattr(parser.values, option.dest, value.split(',')) parser = Opt...
LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@sandbox_validation@check_sph.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/tickfont/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): super(TextcaseValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@tickfont@_textcase.py@.PATH_END.py
{ "filename": "_coloraxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/line/_coloraxis.py", "type": "Python" }
import _plotly_utils.basevalidators class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="parcats.line", **kwargs): super(ColoraxisValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@line@_coloraxis.py@.PATH_END.py
{ "filename": "field_plugin_registry.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/fields/field_plugin_registry.py", "type": "Python" }
from collections.abc import Callable FunctionName = str FieldPluginMap = dict[FunctionName, Callable] field_plugins: FieldPluginMap = {} def register_field_plugin(func: Callable) -> Callable: name = func.__name__ if name.startswith("setup_"): name = name[len("setup_") :] if name.endswith("_fields...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@field_plugin_registry.py@.PATH_END.py
{ "filename": "normalizers.py", "repo_name": "neuraloperator/neuraloperator", "repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/data/transforms/normalizers.py", "type": "Python" }
from typing import Dict from ...utils import count_tensor_params from .base_transforms import Transform, DictTransform import torch class Normalizer(Transform): def __init__(self, mean, std, eps=1e-6): self.mean = mean self.std = std self.eps = eps def transform(self, data): r...
neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@data@transforms@normalizers.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.ternary.aaxis", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@_tickformat.py@.PATH_END.py
{ "filename": "test_return_logical.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/f2py/tests/test_return_logical.py", "type": "Python" }
import pytest from numpy import array from . import util class TestReturnLogical(util.F2PyTest): def check_function(self, t): assert t(True) == 1 assert t(False) == 0 assert t(0) == 0 assert t(None) == 0 assert t(0.0) == 0 assert t(0j) == 0 assert t(1j) == ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@f2py@tests@test_return_logical.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "California-Planet-Search/planet-pi", "repo_path": "planet-pi_extracted/planet-pi-master/README.md", "type": "Markdown" }
# planet-pi
California-Planet-SearchREPO_NAMEplanet-piPATH_START.@planet-pi_extracted@planet-pi-master@README.md@.PATH_END.py
{ "filename": "minres.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/_isolve/minres.py", "type": "Python" }
from numpy import inner, zeros, inf, finfo from numpy.linalg import norm from math import sqrt from .utils import make_system __all__ = ['minres'] def minres(A, b, x0=None, *, rtol=1e-5, shift=0.0, maxiter=None, M=None, callback=None, show=False, check=False): """ Use MINimum RESidual iteration t...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@_isolve@minres.py@.PATH_END.py
{ "filename": "model_export_as_cpp_code_tutorial.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/tutorials/apply_model/model_export_as_cpp_code_tutorial.md", "type": "Markdown" }
Export of CatBoost model as standalone C++ code =============================================== Catboost model could be saved as standalone C++ code. This can ease an integration of a generated model into an application built from C++ sources, simplify porting the model to an architecture not direcly supported by CatB...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@tutorials@apply_model@model_export_as_cpp_code_tutorial.md@.PATH_END.py
{ "filename": "spherical_geometry.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/utils/spherical_geometry.py", "type": "Python" }
""" """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from astropy.utils.misc import NumpyRNGContext __all__ = ['spherical_to_cartesian', 'chord_to_cartesian', 'sample_spherical_surface'] __author__ = ('Duncan Campbell', ) def spherical_to_cartesian(ra, dec): ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@utils@spherical_geometry.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/chat_models/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@chat_models@__init__.py@.PATH_END.py
{ "filename": "jaxemulator.py", "repo_name": "gully/blase", "repo_path": "blase_extracted/blase-main/src/blase/jaxemulator.py", "type": "Python" }
r""" emulator -------------- Precomputed synthetic spectral models are awesome but imperfect and rigid. Here we clone the most prominent spectral lines and continuum appearance of synthetic spectral models to turn them into tunable, flexible, semi-empirical models. We can ultimately learn the properties of the pre-c...
gullyREPO_NAMEblasePATH_START.@blase_extracted@blase-main@src@blase@jaxemulator.py@.PATH_END.py
{ "filename": "fast_bilinar_interpolation.py", "repo_name": "threeML/hawc_hal", "repo_path": "hawc_hal_extracted/hawc_hal-master/hawc_hal/interpolation/fast_bilinar_interpolation.py", "type": "Python" }
from __future__ import division from builtins import object from past.utils import old_div import numpy as np from numba import jit class FastBilinearInterpolation(object): """ A super fast bilinar interpolation implementation which exploits the fact that we are always interpolating in the same grid. For...
threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@hawc_hal@interpolation@fast_bilinar_interpolation.py@.PATH_END.py
{ "filename": "test_with_scipy.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/tests/python/test_with_scipy.py", "type": "Python" }
import itertools import warnings from typing import Type import numpy as np import pytest import scipy.sparse import xgboost as xgb from xgboost import testing as tm @pytest.mark.filterwarnings("error") @pytest.mark.parametrize( "DMatrixT,CSR", [ (m, n) for m, n in itertools.product( ...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@tests@python@test_with_scipy.py@.PATH_END.py
{ "filename": "test_imaging_data.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Data/test_imaging_data.py", "type": "Python" }
import pytest import numpy as np import numpy.testing as npt import copy import unittest from lenstronomy.Data.imaging_data import ImageData import lenstronomy.Util.util as util class TestData(object): def setup_method(self): self.numPix = 10 kwargs_data = { "image_data": np.zeros((se...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Data@test_imaging_data.py@.PATH_END.py
{ "filename": "ps_roi_align.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/ops/ps_roi_align.py", "type": "Python" }
import torch import torch.fx from torch import nn, Tensor from torch.nn.modules.utils import _pair from torchvision.extension import _assert_has_ops from ..utils import _log_api_usage_once from ._utils import check_roi_boxes_shape, convert_boxes_to_roi_format @torch.fx.wrap def ps_roi_align( input: Tensor, b...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@ops@ps_roi_align.py@.PATH_END.py
{ "filename": "cc_calc_cbass_plot.py", "repo_name": "mpeel/fastcc", "repo_path": "fastcc_extracted/fastcc-master/cc_calc_cbass_plot.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np outdir = 'plots_2022_11_08/' alphas = [-3.0, -2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0] alphas = np.asarray(alphas) old_I = [1.0001032131966172, -0.0007238230723749948, -0.00133638092466769, 4.76] old_P = [0.9985614382180937, -0.0059052...
mpeelREPO_NAMEfastccPATH_START.@fastcc_extracted@fastcc-master@cc_calc_cbass_plot.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "PeterKamphuis/pyFAT-astro", "repo_path": "pyFAT-astro_extracted/pyFAT-astro-main/docs/source/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # -- Project information project = 'pyFAT-astro' copyright = '2021, P. Kamphuis' author = 'P. Kamphuis' release = '0.1' version = '0.1.6' # -- General configuration extensions = [ 'sphinx.ext.duration', 'sphinx.ext.doctest', 'sphinx.ext.autodoc...
PeterKamphuisREPO_NAMEpyFAT-astroPATH_START.@pyFAT-astro_extracted@pyFAT-astro-main@docs@source@conf.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/colorbar/title/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="heatmapgl.colorbar.title", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@colorbar@title@_font.py@.PATH_END.py
{ "filename": "_weightsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/hoverlabel/font/_weightsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): super(WeightsrcValidator, self).__init__( plotly_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@hoverlabel@font@_weightsrc.py@.PATH_END.py
{ "filename": "milvus.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/query_constructors/milvus.py", "type": "Python" }
"""Logic for converting internal query language to a valid Milvus query.""" from typing import Tuple, Union from langchain_core.structured_query import ( Comparator, Comparison, Operation, Operator, StructuredQuery, Visitor, ) COMPARATOR_TO_BER = { Comparator.EQ: "==", Comparator.GT: ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@query_constructors@milvus.py@.PATH_END.py
{ "filename": "LHCDMCosmology.py", "repo_name": "igomezv/simplemc_tests", "repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/models/LHCDMCosmology.py", "type": "Python" }
from simplemc.models.LCDMCosmology import LCDMCosmology from simplemc.cosmo.paramDefs import alpha_1_par import math as N import numpy as np #TODO Add more DE EoS for comparison class LHCDMCosmology(LCDMCosmology): """ This is CDM cosmology with w, wa and Ok. CPL parameterization with curvature....
igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@models@LHCDMCosmology.py@.PATH_END.py
{ "filename": "TensorStrainPolicyInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Damage/TensorStrainPolicyInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "Damage/TensorStrainPolicy.cc" namespace Spheral { template class Spheral::...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Damage@TensorStrainPolicyInst.cc.py@.PATH_END.py
{ "filename": "python-reference_pool_set_feature_names.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_pool_set_feature_names.md", "type": "Markdown" }
# set_feature_names {% include [set_feature_names-set_feature_names__desc](../_includes/work_src/reusage-python/set_feature_names__desc.md) %} ## {{ dl--invoke-format }} {#call-format} ```python set_feature_names(feature_names) ``` ## {{ dl--parameters }} {#parameters} ### feature_names #### Description A list ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_pool_set_feature_names.md@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/zaxis/tickfont/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.zaxis.tickfont", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@zaxis@tickfont@_shadow.py@.PATH_END.py
{ "filename": "_streamtube.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/template/data/_streamtube.py", "type": "Python" }
from plotly.graph_objs import Streamtube
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@template@data@_streamtube.py@.PATH_END.py
{ "filename": "_token.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/stream/_token.py", "type": "Python" }
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="token", parent_name="indicator.stream", **kwargs): super(TokenValidator, 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@indicator@stream@_token.py@.PATH_END.py
{ "filename": "_labelformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/contours/_labelformat.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="labelformat", parent_name="contour.contours", **kwargs ): super(LabelformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@contours@_labelformat.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/surface/contours/_x.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "surface.contours" _path_str = "surface.contours.x" _valid_props = { "color", "end...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@surface@contours@_x.py@.PATH_END.py
{ "filename": "_sizemin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/_sizemin.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizemin", parent_name="scatter3d.marker", **kwargs): super(SizeminValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@_sizemin.py@.PATH_END.py
{ "filename": "run_lsd.ipynb", "repo_name": "florian-lienhard/MM-LSD", "repo_path": "MM-LSD_extracted/MM-LSD-main/notebooks/run_lsd.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np from pandas import read_csv, DataFrame, concat import matplotlib.pyplot as plt from matplotlib import rc,rcParams from matplotlib.cm import rainbow from matplotlib.colors import rgb2hex from scipy.sparse import csc_matrix from scipy.optimize import curve_fit from scipy.stats import median...
florian-lienhardREPO_NAMEMM-LSDPATH_START.@MM-LSD_extracted@MM-LSD-main@notebooks@run_lsd.ipynb@.PATH_END.py
{ "filename": "tfsa-2021-156.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-156.md", "type": "Markdown" }
## TFSA-2021-156: Use of unitialized value in TFLite ### CVE Number CVE-2021-37682 ### Impact All TFLite operations that use quantization can be made to use unitialized values. [For example](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/depthwise_conv.c...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-156.md@.PATH_END.py
{ "filename": "words.md", "repo_name": "youngjookim/sdr", "repo_path": "sdr_extracted/sdr-master/Code/packages/tapkee-master/examples/words/words.md", "type": "Markdown" }
This example shows how Tapkee can be used with Python, thanks to the language bindings provided by Shogun. The data consists of words from the English vocabulary. These words belong to different grammar groups: there are several common nouns (e.g. cowboy, dragon), adjectives (e.g. harmful), proper nouns such as Rivera ...
youngjookimREPO_NAMEsdrPATH_START.@sdr_extracted@sdr-master@Code@packages@tapkee-master@examples@words@words.md@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "open_city_data.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/document_loaders/open_city_data.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import OpenCityDataLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imp...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@document_loaders@open_city_data.py@.PATH_END.py
{ "filename": "toasim_seed.py", "repo_name": "mattpitkin/tempo2", "repo_path": "tempo2_extracted/tempo2-master/python/toasim/bin/toasim_seed.py", "type": "Python" }
#!/usr/bin/python import sys import hashlib str="".join(sys.argv[1:]) m=hashlib.md5() m.update(str) hex=m.hexdigest() print(int(hex,16)%(2**30))
mattpitkinREPO_NAMEtempo2PATH_START.@tempo2_extracted@tempo2-master@python@toasim@bin@toasim_seed.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator else: from _plotly_utils.importers import rel...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@colorbar@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "_optimize.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/optimize/_optimize.py", "type": "Python" }
#__docformat__ = "restructuredtext en" # ******NOTICE*************** # optimize.py module by Travis E. Oliphant # # You may copy and use this module as you see fit with no # guarantee implied provided you keep this notice in all copies. # *****END NOTICE************ # A collection of optimization algorithms. Version 0...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@optimize@_optimize.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "franciscovillaescusa/Pylians3", "repo_path": "Pylians3_extracted/Pylians3-master/library/integration_library/setup.py", "type": "Python" }
from setuptools import setup from setuptools.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import numpy ext_modules = cythonize([ Extension("integration_library", ["integration_library.pyx",'integration.c'], include_dirs=[numpy.get_include()], extra_c...
franciscovillaescusaREPO_NAMEPylians3PATH_START.@Pylians3_extracted@Pylians3-master@library@integration_library@setup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/mixture/tests/__init__.py", "type": "Python" }
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@mixture@tests@__init__.py@.PATH_END.py
{ "filename": "managerhelper.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/tests/managerhelper.py", "type": "Python" }
from chimera.core.chimeraobject import ChimeraObject class ManagerHelper(ChimeraObject): def __init__(self): ChimeraObject.__init__(self) def foo(self): return 42
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@tests@managerhelper.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/insidetextfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@insidetextfont@__init__.py@.PATH_END.py
{ "filename": "data_structures.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/halo_catalog/data_structures.py", "type": "Python" }
import glob import weakref from collections import defaultdict from functools import cached_property, partial import numpy as np from yt.data_objects.selection_objects.data_selection_objects import ( YTSelectionContainer, ) from yt.data_objects.static_output import ( ParticleDataset, ParticleFile, ) from ...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@halo_catalog@data_structures.py@.PATH_END.py
{ "filename": "recipes_FLAT_IMAGE.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/recipes/qa/recipes_FLAT_IMAGE.py", "type": "Python" }
""" Recipes available to data with tags ['GMOS', 'IMAGE', 'CAL', 'FLAT'] Default is "makeProcessedFlat". """ recipe_tags = {'GMOS', 'IMAGE', 'CAL', 'FLAT'} def makeProcessedFlat(p): """ This recipe performs the standardization and corrections needed to convert the raw input flat images into a single stacke...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@recipes@qa@recipes_FLAT_IMAGE.py@.PATH_END.py
{ "filename": "sigmas.ipynb", "repo_name": "dfm/corner.py", "repo_path": "corner.py_extracted/corner.py-main/docs/pages/sigmas.ipynb", "type": "Jupyter Notebook" }
# A note about sigmas We are regularly asked about the "sigma" levels in the 2D histograms. These are not the 68%, *etc.* values that we're used to for 1D distributions. In two dimensions, a Gaussian density is given by: pdf(r) = exp(-(r/s)^2/2) / (2*pi*s^2) The integral under this density (using polar coordinat...
dfmREPO_NAMEcorner.pyPATH_START.@corner.py_extracted@corner.py-main@docs@pages@sigmas.ipynb@.PATH_END.py
{ "filename": "test_embeddings.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/fireworks/tests/unit_tests/test_embeddings.py", "type": "Python" }
"""Test embedding model integration.""" from langchain_fireworks.embeddings import FireworksEmbeddings def test_initialization() -> None: """Test embedding model initialization.""" FireworksEmbeddings(model="nomic-ai/nomic-embed-text-v1.5")
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@fireworks@tests@unit_tests@test_embeddings.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/scatterternary/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.textfont", **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@scatterternary@textfont@_color.py@.PATH_END.py
{ "filename": "_mesh3d.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/_mesh3d.py", "type": "Python" }
import _plotly_utils.basevalidators class Mesh3DValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="mesh3d", parent_name="", **kwargs): super(Mesh3DValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@_mesh3d.py@.PATH_END.py
{ "filename": "_symbolsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/_symbolsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattergeo.marker", **kwargs ): super(SymbolsrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@_symbolsrc.py@.PATH_END.py
{ "filename": "test_schechter.py", "repo_name": "skypyproject/skypy", "repo_path": "skypy_extracted/skypy-main/skypy/galaxies/tests/test_schechter.py", "type": "Python" }
import numpy as np from astropy.cosmology import default_cosmology def test_schechter_lf(): from pytest import raises from skypy.galaxies import schechter_lf from astropy import units # redshift and magnitude distributions are tested separately # only test that output is consistent here # p...
skypyprojectREPO_NAMEskypyPATH_START.@skypy_extracted@skypy-main@skypy@galaxies@tests@test_schechter.py@.PATH_END.py
{ "filename": "_locations.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/slices/y/_locations.py", "type": "Python" }
import _plotly_utils.basevalidators class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="isosurface.slices.y", **kwargs ): super(LocationsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@slices@y@_locations.py@.PATH_END.py
{ "filename": "test_vonkarman.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/tests/test_vonkarman.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@tests@test_vonkarman.py@.PATH_END.py
{ "filename": "test_doc.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/util/test_doc.py", "type": "Python" }
from textwrap import dedent from pandas.util._decorators import doc @doc(method="cumsum", operation="sum") def cumsum(whatever): """ This is the {method} method. It computes the cumulative {operation}. """ @doc( cumsum, dedent( """ Examples -------- >>> cum...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@util@test_doc.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/map/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.map", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@map@_uirevision.py@.PATH_END.py
{ "filename": "metricWrapper.py", "repo_name": "lsstdesc/sn_pipe", "repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/metrics/metricWrapper.py", "type": "Python" }
import numpy as np from sn_metrics.sn_snr_metric import SNSNRMetric from sn_metrics.sn_cadence_metric import SNCadenceMetric from sn_metrics.sn_obsrate_metric import SNObsRateMetric from sn_metrics.sn_nsn_metric import SNNSNMetric from sn_metrics.sn_sl_metric import SLSNMetric from sn_tools.sn_cadence_tools import Refe...
lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@metrics@metricWrapper.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/hoverlabel/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="isosurface.hoverlabel", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@hoverlabel@_bgcolor.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "exo-cesm/CESM2.1.3", "repo_path": "CESM2.1.3_extracted/CESM2.1.3-main/Tidally_locked_exoplanets/cases/TP_1_e_SSPO_W21_10pc/README.md", "type": "Markdown" }
# TRAPPIST-1 e (W21 spectrum, 10% PAL of oxygen, with the substellar point over ocean) case setup instructions ## If setting the case up on ARC4: run buildcase_TP_1_e_SSPO_W21_10pc. A case will be created with the name b.e21.BWma1850.f19_g17.TRAPPIST1_e.SSPO..W21.10pc_o2.my_case.001. Change the name in buildcase_TP_1...
exo-cesmREPO_NAMECESM2.1.3PATH_START.@CESM2.1.3_extracted@CESM2.1.3-main@Tidally_locked_exoplanets@cases@TP_1_e_SSPO_W21_10pc@README.md@.PATH_END.py
{ "filename": "_thicknessmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2d/colorbar/_thicknessmode.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="histogram2d.colorbar", **kwargs ): super(ThicknessmodeValidator, self).__init__( plotly_name=plotly_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2d@colorbar@_thicknessmode.py@.PATH_END.py
{ "filename": "_minexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/marker/colorbar/_minexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattergl.marker.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@marker@colorbar@_minexponent.py@.PATH_END.py
{ "filename": "test_invertible_resnet.py", "repo_name": "vislearn/FrEIA", "repo_path": "FrEIA_extracted/FrEIA-master/tests/test_invertible_resnet.py", "type": "Python" }
import unittest import torch.optim import sys sys.path.append('../') from FrEIA.modules import * from FrEIA.framework import * class ActNormTest(unittest.TestCase): batch_size = 256 def test_linear(self): torch.manual_seed(0) inp_size_linear = (20,) act_norm = ActNorm([inp_...
vislearnREPO_NAMEFrEIAPATH_START.@FrEIA_extracted@FrEIA-master@tests@test_invertible_resnet.py@.PATH_END.py
{ "filename": "getting_started.ipynb", "repo_name": "icecube/skyllh", "repo_path": "skyllh_extracted/skyllh-master/doc/sphinx/tutorials/getting_started.ipynb", "type": "Jupyter Notebook" }
# Getting started SkyLLH is a Python based framework to develop and to perform maximum likelihood ratio hypothesis testing. The idea of SkyLLH is to provide a framework with a class structure that is tied to the mathematical objects of the likelihood functions. Slack channel: [#skyllh](https://icecube-spno.slack.com...
icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@doc@sphinx@tutorials@getting_started.ipynb@.PATH_END.py
{ "filename": "_legendwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/_legendwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="heatmap", **kwargs): super(LegendwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@_legendwidth.py@.PATH_END.py
{ "filename": "_legendgroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/_legendgroup.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="pie", **kwargs): super(LegendgroupValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@_legendgroup.py@.PATH_END.py
{ "filename": "adadelta.py", "repo_name": "BRML/climin", "repo_path": "climin_extracted/climin-master/climin/adadelta.py", "type": "Python" }
# -*- coding: utf-8 -*- """This module provides an implementation of adadelta.""" from __future__ import absolute_import from .base import Minimizer from .mathadapt import sqrt, ones_like, clip class Adadelta(Minimizer): """Adadelta optimizer. Adadelta [zeiler2013adadelta]_ is a method that uses the magni...
BRMLREPO_NAMEcliminPATH_START.@climin_extracted@climin-master@climin@adadelta.py@.PATH_END.py
{ "filename": "5_wavelength_binning_individual_wvl_solutions.ipynb", "repo_name": "JamesKirk11/Tiberius", "repo_path": "Tiberius_extracted/Tiberius-main/src/reduction_utils/ACAM_utils/example_notebooks/5_wavelength_binning_individual_wvl_solutions.ipynb", "type": "Jupyter Notebook" }
Now we can make the spectroscopic light curves given all spectra are aligned and the wavelength solution has been calculated. ```python %matplotlib nbagg ``` ```python import numpy as np import reduction_utils.wavelength_binning as wb import reduction_utils.wavelength_calibration as wc import matplotlib.pyplot as p...
JamesKirk11REPO_NAMETiberiusPATH_START.@Tiberius_extracted@Tiberius-main@src@reduction_utils@ACAM_utils@example_notebooks@5_wavelength_binning_individual_wvl_solutions.ipynb@.PATH_END.py
{ "filename": "CHANGELOG.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/chart-studio/CHANGELOG.md", "type": "Markdown" }
# Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [1.1.0] - 2020-01-4-01 ### Updated - The default URLs have been changed from `plot.ly` to `plotly.com` to match the changes to Chart Studio Cloud. ## [1.0.0] - 2019...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@chart-studio@CHANGELOG.md@.PATH_END.py
{ "filename": "afino_series.py", "repo_name": "aringlis/afino_release_version", "repo_path": "afino_release_version_extracted/afino_release_version-master/afino/afino_series.py", "type": "Python" }
""" A simple time series object """ import numpy as np from matplotlib import pyplot as plt class SampleTimes: def __init__(self, time, label='time', units='seconds'): """A class holding time series sample times.""" # ensure that the initial time is zero self.time = time - time[0] ...
aringlisREPO_NAMEafino_release_versionPATH_START.@afino_release_version_extracted@afino_release_version-master@afino@afino_series.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "QEF/q-e", "repo_path": "q-e_extracted/q-e-master/EPW/irobjs/README.md", "type": "Markdown" }
# How to Install IR Object Files To use `sparse-ir` sampling for anisotropic Migdal-Eliashberg calculations, set the input value `gridsamp` to 2 and specify the file containing the IR functions in `filirobj`. By running the following command in this directory, you can download several files that contain precomputed ...
QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@EPW@irobjs@README.md@.PATH_END.py
{ "filename": "gaindrifts.py", "repo_name": "litebird/litebird_sim", "repo_path": "litebird_sim_extracted/litebird_sim-master/litebird_sim/gaindrifts.py", "type": "Python" }
import numpy as np import hashlib from enum import IntEnum from typing import Union, List from dataclasses import dataclass from .observations import Observation class GainDriftType(IntEnum): """An enumeration class to specify the type of gain drift injection. The gain drift type can be: - ``LINEAR_GA...
litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@litebird_sim@gaindrifts.py@.PATH_END.py
{ "filename": "test_spectral_model_creation.py", "repo_name": "andycasey/smhr", "repo_path": "smhr_extracted/smhr-master/smh/tests/test_spectral_model_creation.py", "type": "Python" }
from __future__ import (division, print_function, absolute_import, unicode_literals) import os from nose.tools import assert_equals, assert_almost_equals, ok_ from smh import Session, LineList import smh.spectral_models as sm datadir = os.path.dirname(os.path.abspath(__file__))+'/test_data' s...
andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@smh@tests@test_spectral_model_creation.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "CosmoStatGW/WF4Py", "repo_path": "WF4Py_extracted/WF4Py-master/docs/README.md", "type": "Markdown" }
# WF4Py documentation ## Documentation requirements In order to build the documentation, the following packages have to be installed * [```sphinx```](<https://www.sphinx-doc.org/en/master>) * [```sphinx_rtd_theme```](<https://sphinx-rtd-theme.readthedocs.io/en/stable/>) * [```nbsphinx```](<https://nbsphinx.readthedo...
CosmoStatGWREPO_NAMEWF4PyPATH_START.@WF4Py_extracted@WF4Py-master@docs@README.md@.PATH_END.py
{ "filename": "cirs.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/coordinates/builtin_frames/cirs.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.coordinates.attributes import EarthLocationAttribute, TimeAttribute from astropy.coordinates.baseframe import base_doc from astropy.utils.decorators import format_doc from .baseradec import BaseRADecFrame, doc_components from .utils import D...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@builtin_frames@cirs.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/aaxis/tickfont/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): super(ShadowValidator, self).__init__( plotly_name=pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@aaxis@tickfont@_shadow.py@.PATH_END.py
{ "filename": "ModelHParams.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/recommendation/spec/ModelHParams.md", "type": "Markdown" }
page_type: reference description: Class to hold parameters for model architecture configuration. <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...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_model_maker@recommendation@spec@ModelHParams.md@.PATH_END.py
{ "filename": "decorators.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/testing/_private/decorators.py", "type": "Python" }
""" Decorators for labeling and modifying behavior of test objects. Decorators that merely return a modified version of the original function object are straightforward. Decorators that return a new function object need to use :: nose.tools.make_decorator(original_function)(decorator) in returning the decorator, i...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@testing@_private@decorators.py@.PATH_END.py