metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "proj3d.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/mplot3d/proj3d.py", "type": "Python" }
# 3dproj.py # """ Various transforms used for by the 3D code """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import zip import numpy as np import numpy.linalg as linalg def line2d(p0, p1): """ Return 2D equation of l...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@mplot3d@proj3d.py@.PATH_END.py
{ "filename": "losses.py", "repo_name": "astromer-science/main-code", "repo_path": "main-code_extracted/main-code-main/core/losses.py", "type": "Python" }
import tensorflow as tf from tensorflow.keras.losses import BinaryCrossentropy from tensorflow.nn import (sigmoid_cross_entropy_with_logits, softmax_cross_entropy_with_logits) def custom_rmse(y_true, y_pred, sample_weight=None, mask=None): inp_shp = tf.shape(y_true) residuals = tf.sq...
astromer-scienceREPO_NAMEmain-codePATH_START.@main-code_extracted@main-code-main@core@losses.py@.PATH_END.py
{ "filename": "_exponentformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmapgl/colorbar/_exponentformat.py", "type": "Python" }
import _plotly_utils.basevalidators class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="heatmapgl.colorbar", **kwargs ): super(ExponentformatValidator, self).__init__( plotly_name=plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmapgl@colorbar@_exponentformat.py@.PATH_END.py
{ "filename": "cat_hsc_ssp.py", "repo_name": "HETDEX/elixer", "repo_path": "elixer_extracted/elixer-main/elixer/cat_hsc_ssp.py", "type": "Python" }
from __future__ import print_function import scipy.interpolate """ This is for the HSC SSP data. Cloned originally from hsc_nep.py code, but modified extensively """ try: from elixer import global_config as G from elixer import science_image from elixer import cat_base from elixer import match_summar...
HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@cat_hsc_ssp.py@.PATH_END.py
{ "filename": "test_subpkg_imports.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/tests/test_subpkg_imports.py", "type": "Python" }
""" Testing module to ensure that all sub-packages can be imported. """ def test_import_sim_manager(): from .. import sim_manager def test_import_empirical_models(): from .. import empirical_models def test_import_mock_observables(): from .. import mock_observables def test_import_utils(): from ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@tests@test_subpkg_imports.py@.PATH_END.py
{ "filename": "export_back_compat_pallas_test.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/tests/pallas/export_back_compat_pallas_test.py", "type": "Python" }
# Copyright 2024 The JAX Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@pallas@export_back_compat_pallas_test.py@.PATH_END.py
{ "filename": "bao_correlation_Ding2018.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/barry/models/bao_correlation_Ding2018.py", "type": "Python" }
import sys sys.path.append("../..") from barry.models import PowerDing2018 from barry.models.bao_correlation import CorrelationFunctionFit import numpy as np class CorrDing2018(CorrelationFunctionFit): """xi(s) model inspired from Ding 2018. See https://ui.adsabs.harvard.edu/abs/2018MNRAS.479.1021D for deta...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@models@bao_correlation_Ding2018.py@.PATH_END.py
{ "filename": "fit_utils.py", "repo_name": "gmbrandt/HTOF", "repo_path": "HTOF_extracted/HTOF-main/htof/utils/fit_utils.py", "type": "Python" }
""" Module for generating the chi-squared matrix (and vectors) for the N parameter fit to the epoch astrometry. """ import numpy as np from htof.polynomial import polynomial FIT_BASIS = polynomial.TaylorSeries FIT_VANDER = polynomial.taylorvander # FIT_VANDER must follow np.polynomial.polynomial.Polynomial and # np.p...
gmbrandtREPO_NAMEHTOFPATH_START.@HTOF_extracted@HTOF-main@htof@utils@fit_utils.py@.PATH_END.py
{ "filename": "rep_vs_one.py", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/misc/rep_vs_one.py", "type": "Python" }
"""Generate a repeater population and split into repeaters and one-offs.""" import numpy as np from frbpoppy import CosmicPopulation, Survey, SurveyPopulation from frbpoppy import split_pop, pprint, plot DAYS = 1 r = CosmicPopulation.simple(int(1e4), n_days=DAYS, repeaters=True) r.set_time(model='regular', rate=2) r...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@misc@rep_vs_one.py@.PATH_END.py
{ "filename": "fig_poly_simple.py", "repo_name": "rhdtownsend/gyre", "repo_path": "gyre_extracted/gyre-master/docs/source/appendices/build-poly/fig_poly_simple.py", "type": "Python" }
#!/usr/bin/env python # # Simple polytrope plot # Imports import matplotlib.pyplot as plt import matplotlib.ticker as tkr import numpy as np from pygyre import * from colors import * # Plot settings plt.style.use('web.mplstyle') # Read plot data tab = read_model('poly.simple.h5') # Do the plot fig, ax = plt.su...
rhdtownsendREPO_NAMEgyrePATH_START.@gyre_extracted@gyre-master@docs@source@appendices@build-poly@fig_poly_simple.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="heatmap.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@hoverlabel@font@_familysrc.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/bar/marker/pattern/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="bar.marker.pattern", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@pattern@_bgcolor.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/integrate/core.py", "type": "Python" }
""" Base class for integrators. """ from abc import ABCMeta, abstractmethod # Third-party import numpy as np from astropy.utils.decorators import deprecated # This project from gala.units import UnitSystem, DimensionlessUnitSystem __all__ = ["Integrator"] class Integrator(metaclass=ABCMeta): def __init__( ...
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@integrate@core.py@.PATH_END.py
{ "filename": "runNuFloor_SI.py", "repo_name": "cajohare/NeutrinoFog", "repo_path": "NeutrinoFog_extracted/NeutrinoFog-main/src/runNuFloor_SI.py", "type": "Python" }
#==============================================================================# import sys import os sys.path.append('../src') from numpy import * from Params import * from NeutrinoFuncs import BinnedNeutrinoRates from WIMPFuncs import BinnedWIMPRate,MeanInverseSpeed_SHM,C_SI from LabFuncs import FormFactorHelm from L...
cajohareREPO_NAMENeutrinoFogPATH_START.@NeutrinoFog_extracted@NeutrinoFog-main@src@runNuFloor_SI.py@.PATH_END.py
{ "filename": "rms_norm.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/pallas/ops/gpu/rms_norm.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@pallas@ops@gpu@rms_norm.py@.PATH_END.py
{ "filename": "family.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/pynbody/family.py", "type": "Python" }
""" Defines the :class:`Family` class which represents families of particles (e.g. dm, gas, star particles). Most users will not need to use this module directly. New families of particles can, however, be added interactively by creating new instances of the :class:`Family` class. See the example in the class documen...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@pynbody@family.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "grzeimann/Diagnose", "repo_path": "Diagnose_extracted/Diagnose-main/config.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 20 15:06:16 2021 @author: gregz """ import numpy as np stellar_template_file = 'miles_pca_ncomp_10.fits' vbins = np.arange(-500, 550, 50) zbins_gal = np.arange(0.005, 0.471, .001) zbins_qso = np.arange(0.1, 4.01, 0.01)
grzeimannREPO_NAMEDiagnosePATH_START.@Diagnose_extracted@Diagnose-main@config.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/legendgrouptitle/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): super(StyleValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@legendgrouptitle@font@_style.py@.PATH_END.py
{ "filename": "telegram.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/telegram.py", "type": "Python" }
from __future__ import annotations import asyncio import json from pathlib import Path from typing import TYPE_CHECKING, Dict, List, Optional, Union from langchain_core.documents import Document from langchain_community.document_loaders.base import BaseLoader if TYPE_CHECKING: import pandas as pd from telet...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@telegram.py@.PATH_END.py
{ "filename": "view_shell_basemap.py", "repo_name": "geodynamics/Rayleigh", "repo_path": "Rayleigh_extracted/Rayleigh-main/post_processing/legacy/python/view_shell_basemap.py", "type": "Python" }
# # Copyright (C) 2018 by the authors of the RAYLEIGH code. # # This file is part of RAYLEIGH. # # RAYLEIGH 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, or (at your option) # any lat...
geodynamicsREPO_NAMERayleighPATH_START.@Rayleigh_extracted@Rayleigh-main@post_processing@legacy@python@view_shell_basemap.py@.PATH_END.py
{ "filename": "serialization.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/array_serialization/serialization.py", "type": "Python" }
# Copyright 2021 The JAX Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@array_serialization@serialization.py@.PATH_END.py
{ "filename": "test_basic.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/linalg/tests/test_basic.py", "type": "Python" }
import itertools import numpy as np from numpy import (arange, array, dot, zeros, identity, conjugate, transpose, float32) from numpy.random import random from numpy.testing import (assert_equal, assert_almost_equal, assert_, assert_array_almost_equal, assert_allclose, ...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@tests@test_basic.py@.PATH_END.py
{ "filename": "input_pipeline_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/examples/wmt/input_pipeline_test.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@wmt@input_pipeline_test.py@.PATH_END.py
{ "filename": "variant_orbits.py", "repo_name": "TomWagg/lsst-neocp-predictions", "repo_path": "lsst-neocp-predictions_extracted/lsst-neocp-predictions-main/src/variant_orbits.py", "type": "Python" }
import astropy.units as u from astropy.time import Time from astropy.coordinates import SkyCoord, EarthLocation, get_sun from astropy.visualization import quantity_support quantity_support() import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LogNorm import pandas as pd pd.set_option("disp...
TomWaggREPO_NAMElsst-neocp-predictionsPATH_START.@lsst-neocp-predictions_extracted@lsst-neocp-predictions-main@src@variant_orbits.py@.PATH_END.py
{ "filename": "qt_yeti_hardware_settings_tab.py", "repo_name": "jw-echelle/QtYETI", "repo_path": "QtYETI_extracted/QtYETI-main/qt_yeti/qt_yeti_hardware_settings_tab.py", "type": "Python" }
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from dataclasses import dataclass import sys import os from PyQt5.QtWidgets import QWidget from qt_yeti.qt_yeti_general import * from qt_yeti.qt_yeti_functions import * #from qt_yeti.qt_yeti_hardware_settings_tab import * import num...
jw-echelleREPO_NAMEQtYETIPATH_START.@QtYETI_extracted@QtYETI-main@qt_yeti@qt_yeti_hardware_settings_tab.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/histogram2dcontour/xbins/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.xbins", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@xbins@_size.py@.PATH_END.py
{ "filename": "test_pulsemodels.py", "repo_name": "fjankowsk/scatfit", "repo_path": "scatfit_extracted/scatfit-master/tests/test_pulsemodels.py", "type": "Python" }
import numpy as np import scatfit.pulsemodels as pulsemodels def test_normalisation_gaussian(): """ Check that the Gaussian is correctly normalised, i.e. has the correct fluence. """ plot_range = np.linspace(-400.0, 400.0, num=4000) for fluence in np.geomspace(0.1, 1000.0, num=10): ...
fjankowskREPO_NAMEscatfitPATH_START.@scatfit_extracted@scatfit-master@tests@test_pulsemodels.py@.PATH_END.py
{ "filename": "Tutorial-GiRaFFE_NRPy_Main_Driver_new_way.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/in_progress-GiRaFFE_NRPy/Tutorial-GiRaFFE_NRPy_Main_Driver_new_way.ipynb", "type": "Jupyter Notebook" }
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # `GiRaFFE_NRPy`: Main Driver ## Author: Patrick Nelson #...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@in_progress-GiRaFFE_NRPy@Tutorial-GiRaFFE_NRPy_Main_Driver_new_way.ipynb@.PATH_END.py
{ "filename": "functions.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/nn/functions.py", "type": "Python" }
# Copyright 2019 The JAX Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@nn@functions.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/smc/__init__.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@smc@__init__.py@.PATH_END.py
{ "filename": "05-two_point_correlation.ipynb", "repo_name": "aymgal/COOLEST", "repo_path": "COOLEST_extracted/COOLEST-main/docs/notebooks/05-two_point_correlation.ipynb", "type": "Jupyter Notebook" }
# Test two-point correlation function This notebook shows examples of calculating the two-point correlation function, initially for light profiles. This can also be applied to mass profiles, or residuals, in fact, any 2D field. It uses the `Analysis` class to compute effective quantities in a model-independent way. _...
aymgalREPO_NAMECOOLESTPATH_START.@COOLEST_extracted@COOLEST-main@docs@notebooks@05-two_point_correlation.ipynb@.PATH_END.py
{ "filename": "demo_FEA_shells.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/fea/demo_FEA_shells.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@fea@demo_FEA_shells.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "spacetelescope/imexam", "repo_path": "imexam_extracted/imexam-master/setup.py", "type": "Python" }
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst # NOTE: The configuration for the package, including the name, version, and # other information are set in the setup.cfg file. import sys # First provide helpful messages if contributors try and run legacy commands # for tests or d...
spacetelescopeREPO_NAMEimexamPATH_START.@imexam_extracted@imexam-master@setup.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "microsoft/vscode", "repo_path": "vscode_extracted/vscode-main/extensions/npm/README.md", "type": "Markdown" }
# Node npm **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features ### Task Running This extension supports running npm scripts defined in the `package.json` as [tasks](https://code.visualstudio.com/docs/editor/tasks). Scripts with the name 'build', 'compil...
microsoftREPO_NAMEvscodePATH_START.@vscode_extracted@vscode-main@extensions@npm@README.md@.PATH_END.py
{ "filename": "dtype.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/util/dtype.py", "type": "Python" }
import warnings from warnings import warn import numpy as np __all__ = [ 'img_as_float32', 'img_as_float64', 'img_as_float', 'img_as_int', 'img_as_uint', 'img_as_ubyte', 'img_as_bool', 'dtype_limits', ] # Some of these may or may not be aliases depending on architecture & platform _i...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@util@dtype.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/marker/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._width import WidthValidator from ._outlierwidth import OutlierwidthValidator from ._outliercolor import OutliercolorValidator from ._color import ColorValidator else: from _plotly_utils.importers impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@marker@line@__init__.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/heatmap/hoverlabel/font/_weightsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="heatmap.hoverlabel.font", **kwargs ): super(WeightsrcValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@hoverlabel@font@_weightsrc.py@.PATH_END.py
{ "filename": "wiseutils.py", "repo_name": "flomertens/wise", "repo_path": "wise_extracted/wise-master/wise/wiseutils.py", "type": "Python" }
import logging import datetime import numpy as np import wds import matcher import features as wfeatures from libwise import plotutils, nputils, imgutils import matplotlib.cm as cm import matplotlib.pyplot as plt import matplotlib.dates as mdates from mpl_toolkits.axisartist.grid_finder import MaxNLocator from sci...
flomertensREPO_NAMEwisePATH_START.@wise_extracted@wise-master@wise@wiseutils.py@.PATH_END.py
{ "filename": "plot_3d.py", "repo_name": "sophiasosafiscella/highfluencetiming", "repo_path": "highfluencetiming_extracted/highfluencetiming-main/plot_3d.py", "type": "Python" }
import numpy as np import pandas as pd import matplotlib.pyplot as plt import plotly.graph_objs as go import plotly.express as px from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D dir: str = "./results/820_band/0.0_sigma/" n_clusters = np.load(dir + 'MeanShift/n_clusters.npy', allow_pickle=True)...
sophiasosafiscellaREPO_NAMEhighfluencetimingPATH_START.@highfluencetiming_extracted@highfluencetiming-main@plot_3d.py@.PATH_END.py
{ "filename": "text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/msilib/text.py", "type": "Python" }
import msilib,os;dirname=os.path.dirname(__file__) ActionText = [ ('InstallValidate', 'Validating install', None), ('InstallFiles', 'Copying new files', 'File: [1], Directory: [9], Size: [6]'), ('InstallAdminPackage', 'Copying network install files', 'File: [1], Directory: [9], Size: [6]'), ('FileCost', 'Computing s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@msilib@text.py@.PATH_END.py
{ "filename": "layers.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/layers/layers.py", "type": "Python" }
# Copyright 2015 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@layers@layers.py@.PATH_END.py
{ "filename": "centered_eight.ipynb", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/data/example_data/code/centered_eight/centered_eight.ipynb", "type": "Jupyter Notebook" }
# centered_eight example ```python import pathlib import arviz as az import pymc as pm import numpy as np ``` ```python draws = 500 chains = 4 J = 8 scores = np.array([28.0, 8.0, -3.0, 7.0, -1.0, 1.0, 18.0, 12.0]) sigma = np.array([15.0, 10.0, 16.0, 11.0, 9.0, 11.0, 10.0, 18.0]) schools = np.array( [ "...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@data@example_data@code@centered_eight@centered_eight.ipynb@.PATH_END.py
{ "filename": "hook-solara_server.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/standalone/hooks/hook-solara_server.py", "type": "Python" }
from PyInstaller.utils.hooks import collect_data_files, copy_metadata, collect_submodules hiddenimports = collect_submodules("solara-server") datas = collect_data_files('solara-server') datas += copy_metadata('solara-server')
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@standalone@hooks@hook-solara_server.py@.PATH_END.py
{ "filename": "convert_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/python/convert_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@lite@python@convert_test.py@.PATH_END.py
{ "filename": "test_gadget4.py", "repo_name": "ytree-project/ytree", "repo_path": "ytree_extracted/ytree-main/tests/frontends/test_gadget4.py", "type": "Python" }
from ytree.frontends.gadget4 import \ Gadget4Arbor from ytree.utilities.testing import \ ArborTest, \ TempDirTest class Gadget4ArborSingleTest(TempDirTest, ArborTest): arbor_type = Gadget4Arbor test_filename = "gadget4/trees/trees.hdf5" groups = ("forest", "tree", "prog") num_data_files = 1...
ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@tests@frontends@test_gadget4.py@.PATH_END.py
{ "filename": "script_example_ngc6888.ipynb", "repo_name": "thomasorb/orcs", "repo_path": "orcs_extracted/orcs-master/docs/_build/html/script_example_ngc6888.ipynb", "type": "Jupyter Notebook" }
# Automatic estimation of the flux and velocity and double sinc fit The following example shows how to make a quick estimate of the flux + velocity. The NGC6888 shell displays two generally unresolved components which can be fitted with a double sinc model thanks to the generally high SNR of the data. ```python from...
thomasorbREPO_NAMEorcsPATH_START.@orcs_extracted@orcs-master@docs@_build@html@script_example_ngc6888.ipynb@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__(...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "manage_databases.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/tools/module/database/manage_databases.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Completely recreate database from scratch Created on 2020-08-2020-08-18 17:13 @author: cook """ import os from typing import Dict, List, Union import numpy as np import pandas as pd from astropy.table import Table, vstack, MaskedColumn from apero import lang from ap...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@tools@module@database@manage_databases.py@.PATH_END.py
{ "filename": "hashed_crossing_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/hashed_crossing_test.py", "type": "Python" }
import numpy as np import pytest import tensorflow as tf from absl.testing import parameterized from keras.src import backend from keras.src import layers from keras.src import testing from keras.src.testing.test_utils import named_product class HashedCrossingTest(testing.TestCase): def test_basics(self): ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@hashed_crossing_test.py@.PATH_END.py
{ "filename": "acssimEventDispatcher.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acssim/test/acssimEventDispatcher.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acssim@test@acssimEventDispatcher.py@.PATH_END.py
{ "filename": "terminal.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Other/terminal.py", "type": "Python" }
# Copyright: 2008 Nadia Alramli # License: BSD from __future__ import absolute_import from __future__ import division from __future__ import print_function """Terminal controller module Example of usage: print BG_BLUE + 'Text on blue background' + NORMAL print BLUE + UNDERLINE + 'Blue underlined text' + NORM...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@Other@terminal.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/ode/__init__.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@ode@__init__.py@.PATH_END.py
{ "filename": "float_hp.py", "repo_name": "keras-team/keras-tuner", "repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/engine/hyperparameters/hp_types/float_hp.py", "type": "Python" }
# Copyright 2019 The KerasTuner Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@engine@hyperparameters@hp_types@float_hp.py@.PATH_END.py
{ "filename": "splat_backup.py", "repo_name": "aburgasser/splat", "repo_path": "splat_extracted/splat-main/splat/splat_backup.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import print_function, division # WORKING COPY OF SPLAT CODE LIBRARY # based on routines developed by: # Christian Aganze # Daniella Bardalez Gagliuffi # Jessica Birky # Adam Burgasser # Caleb Choban # Andrew Davis # Ivanna Escala # Aishwarya Iyer # Yu...
aburgasserREPO_NAMEsplatPATH_START.@splat_extracted@splat-main@splat@splat_backup.py@.PATH_END.py
{ "filename": "Pre_processing.py", "repo_name": "spal4532/DeepFRi-and-DicFR", "repo_path": "DeepFRi-and-DicFR_extracted/DeepFRi-and-DicFR-main/nrt_wind/Pre_processing.py", "type": "Python" }
import numpy as np import pandas as pd import os from matplotlib import pyplot import matplotlib.pyplot as plt import pickle import glob import shutil from PIL import Image from datetime import datetime from nrt_wind.wind import read_wind_mag from pandas.errors import EmptyDataError def createPlot(fig, ax, x, y, z, in...
spal4532REPO_NAMEDeepFRi-and-DicFRPATH_START.@DeepFRi-and-DicFR_extracted@DeepFRi-and-DicFR-main@nrt_wind@Pre_processing.py@.PATH_END.py
{ "filename": "input.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py2/prompt_toolkit/input.py", "type": "Python" }
""" Abstraction of CLI Input. """ from __future__ import unicode_literals from .utils import DummyContext, is_windows from abc import ABCMeta, abstractmethod from six import with_metaclass import io import os import sys if is_windows(): from .terminal.win32_input import raw_mode, cooked_mode else: from .term...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py2@prompt_toolkit@input.py@.PATH_END.py
{ "filename": "kepprf.py", "repo_name": "KeplerGO/PyKE", "repo_path": "PyKE_extracted/PyKE-master/pyke/kepprf.py", "type": "Python" }
import numpy as np import time import math import glob from matplotlib import pyplot as plt from matplotlib import ticker from astropy.io import fits as pyfits from scipy import interpolate, optimize, ndimage, stats from scipy.optimize import fmin_powell from scipy.interpolate import RectBivariateSpline from scipy.ndim...
KeplerGOREPO_NAMEPyKEPATH_START.@PyKE_extracted@PyKE-master@pyke@kepprf.py@.PATH_END.py
{ "filename": "E21.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/parso/py3/tests/normalizer_issue_files/E21.py", "type": "Python" }
#: E211:4 spam (1) #: E211:4 E211:19 dict ['key'] = list [index] #: E211:11 dict['key'] ['subkey'] = list[index] # Okay spam(1) dict['key'] = list[index] # This is not prohibited by PEP8, but avoid it. # Dave: I think this is extremely stupid. Use the same convention everywhere. #: E211:9 class Foo (Bar, Baz): pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@parso@py3@tests@normalizer_issue_files@E21.py@.PATH_END.py
{ "filename": "Absorption_Continuum.py", "repo_name": "danielkoll/PyRADS", "repo_path": "PyRADS_extracted/PyRADS-master/pyrads/Absorption_Continuum.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np from . import phys ''' Implement functions that return absorption cross-sections for various modes of continuum absorption. ''' ### # Implement fits from Pierrehumbert, PoPC. # Here: Water vapor self-continuum; Eqn. (4.91) # NOTE: '...
danielkollREPO_NAMEPyRADSPATH_START.@PyRADS_extracted@PyRADS-master@pyrads@Absorption_Continuum.py@.PATH_END.py
{ "filename": "response_sender_complete_final_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_backend_python/response_sender/response_sender_complete_final_test.py", "type": "Python" }
# Copyright 2024, 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 of con...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_backend_python@response_sender@response_sender_complete_final_test.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/pie/legendgrouptitle/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.legendgrouptitle.font", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@legendgrouptitle@font@_textcase.py@.PATH_END.py
{ "filename": "k2scfile.py", "repo_name": "OxES/k2sc", "repo_path": "k2sc_extracted/k2sc-master/src/k2scfile.py", "type": "Python" }
import numpy as np import astropy.io.fits as pf from .core import * def submed(a): return a - np.nanmedian(a) class K2SCFile(object): """ Utility class to work with K2SC output files. """ def __init__(self, filename, normalize=False, remove_nans=True, remove_outliers=False): """ ...
OxESREPO_NAMEk2scPATH_START.@k2sc_extracted@k2sc-master@src@k2scfile.py@.PATH_END.py
{ "filename": "cross_corr.py", "repo_name": "annehutter/grid-model", "repo_path": "grid-model_extracted/grid-model-master/analysis_tools/cross_corr.py", "type": "Python" }
import numpy as np from grid import * def compute_cross_corr(field1, field2, boxsize, outputfile, str1, str2): field1_norm = field1/np.mean(field1, dtype=np.float64) - 1. field2_norm = field2/np.mean(field2, dtype=np.float64) - 1. modesField1 = ifftn(field1_norm) modesField2 = ifftn(field2_norm) ...
annehutterREPO_NAMEgrid-modelPATH_START.@grid-model_extracted@grid-model-master@analysis_tools@cross_corr.py@.PATH_END.py
{ "filename": "run_cookbook_part2.py", "repo_name": "spacetelescope/hstaxe", "repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/tests/run_cookbook_part2.py", "type": "Python" }
""" See LICENSE.txt """ # This script needs to be run from the same directory # that the cookbook_data/ directory exists for wfc3 # excute run_cookbook.py first import os import shutil from drizzlepac import astrodrizzle from hstaxe import axetasks cwd = os.getcwd() print("We are in %s" % (cwd)) dimension_info = "18...
spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@tests@run_cookbook_part2.py@.PATH_END.py
{ "filename": "test_spectrum_api.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/ChiantiPy/core/tests/test_spectrum_api.py", "type": "Python" }
import platform import warnings import numpy as np import pytest from ChiantiPy.core import spectrum, bunch, mspectrum, radLoss try: from ChiantiPy.core import ipymspectrum except ImportError as error: warnings.warn("Could not import IpyMspectrum; you may be missing ipyparellel.") ipymspectrum = error #...
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@ChiantiPy@core@tests@test_spectrum_api.py@.PATH_END.py
{ "filename": "smooth_cal_inspect_2458050.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458050.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Calibration Smoothing Nightly Notebook **Josh Dillon**, Last Revised 12/4/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metr...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458050.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jveitchmichaelis/pygadgetreader", "repo_path": "pygadgetreader_extracted/pygadgetreader-master/readgadget/__init__.py", "type": "Python" }
from .readgadget import readsnap,readhead,readheader from .readrockstar import readrockstar from .readrockstar import readrockstargalaxies from .readfofspecial import readfofspecial from .readpstar import readpstar
jveitchmichaelisREPO_NAMEpygadgetreaderPATH_START.@pygadgetreader_extracted@pygadgetreader-master@readgadget@__init__.py@.PATH_END.py
{ "filename": "gmosaiceti.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/gemini/eti/gmosaiceti.py", "type": "Python" }
from copy import copy from pyraf import iraf from iraf import gemini from iraf import gmos from iraf import gemtools from gempy.utils import logutils from gempy.eti_core.pyrafeti import PyrafETI from .gmosaicfile import InAtList, OutAtList, LogFile from .gmosaicparam import FlPaste, FlFixpix, Geointer, FlVardq, FlCl...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@gemini@eti@gmosaiceti.py@.PATH_END.py
{ "filename": "process_fontribera_nz.py", "repo_name": "philbull/RadioFisher", "repo_path": "RadioFisher_extracted/RadioFisher-master/process_fontribera_nz.py", "type": "Python" }
#!/usr/bin/python """ Calculate n(z) bins, in Mpc^-3, based on dN/dz/dSarea from Tables in Font-Ribera et al. (arXiv:1308.4164). """ import numpy as np import pylab as P import scipy.integrate import baofisher import experiments as e from units import * INFILE = "boss_dNdzdS.dat" fname = "boss_nz.dat" INFILE = "wfir...
philbullREPO_NAMERadioFisherPATH_START.@RadioFisher_extracted@RadioFisher-master@process_fontribera_nz.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "jonathansick/MoAstro", "repo_path": "MoAstro_extracted/MoAstro-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this file. # # All configurati...
jonathansickREPO_NAMEMoAstroPATH_START.@MoAstro_extracted@MoAstro-master@docs@conf.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/scatter/marker/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.marker", **kwargs): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@_color.py@.PATH_END.py
{ "filename": "ex_algorestrict.ipynb", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/doc/funcFit2Doc/ex_algorestrict.ipynb", "type": "Jupyter Notebook" }
Restrictions via algorithm (fmin_l_bfgs_b) ================================================= ```python from __future__ import print_function, division from numpy import arange, sqrt, exp, pi, random, ones_like import matplotlib.pylab as plt from PyAstronomy import funcFit2 as fuf2 import scipy.optimize as sco random...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@doc@funcFit2Doc@ex_algorestrict.ipynb@.PATH_END.py
{ "filename": "__yaml_constructors.py", "repo_name": "HERA-Team/hera_sim", "repo_path": "hera_sim_extracted/hera_sim-main/hera_sim/__yaml_constructors.py", "type": "Python" }
""" A module for generating new YAML tags for the various ``hera_sim`` interpolator objects. This may need to be updated if the :mod:`.interpolators` module is updated. """ import astropy.units as u import inspect import warnings import yaml from . import antpos, interpolators def make_interp_constructor(tag, inte...
HERA-TeamREPO_NAMEhera_simPATH_START.@hera_sim_extracted@hera_sim-main@hera_sim@__yaml_constructors.py@.PATH_END.py
{ "filename": "cbvcorrector.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/correctors/cbvcorrector.py", "type": "Python" }
"""Defines Corrector classes that utilize Kepler/K2/TESS Cotrending Basis Vectors. """ import logging import copy import requests import urllib.request import glob import os import warnings from astropy.io import fits as pyfits from astropy.table import Table from astropy.time import Time from astropy.timeseries impor...
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@correctors@cbvcorrector.py@.PATH_END.py
{ "filename": "ScoreBruteForce.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/searcher/ScoreBruteForce.md", "type": "Markdown" }
page_type: reference description: Bruce force in-partition scoring 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_model_maker.se...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_model_maker@searcher@ScoreBruteForce.md@.PATH_END.py
{ "filename": "install.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/wheel/cli/install.py", "type": "Python" }
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@wheel@cli@install.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="choroplethmapbox.colorbar", **kwargs, ): super(ShowticklabelsValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "S_run_bf_polyfit.py", "repo_name": "SJ001/AI-Feynman", "repo_path": "AI-Feynman_extracted/AI-Feynman-master/aifeynman/S_run_bf_polyfit.py", "type": "Python" }
# add a function to compte complexity from .get_pareto import Point, ParetoSet from .RPN_to_pytorch import RPN_to_pytorch from .RPN_to_eq import RPN_to_eq import numpy as np import matplotlib.pyplot as plt from .S_brute_force import brute_force from .S_get_number_DL_snapped import get_number_DL_snapped from sympy.pars...
SJ001REPO_NAMEAI-FeynmanPATH_START.@AI-Feynman_extracted@AI-Feynman-master@aifeynman@S_run_bf_polyfit.py@.PATH_END.py
{ "filename": "script_example_estimate_parameters.ipynb", "repo_name": "thomasorb/orcs", "repo_path": "orcs_extracted/orcs-master/docs/_build/doctrees/nbsphinx/script_example_estimate_parameters.ipynb", "type": "Jupyter Notebook" }
# Multiple components fitting with automatic velocity estimate This is a complete (and complex) example of what can be achieved with the automatic velocity estimation algorithm described in [Martin et al. (2021)](https://doi.org/10.1093/mnras/staa4046). This algorithm permit to estimate the velocity of one or more com...
thomasorbREPO_NAMEorcsPATH_START.@orcs_extracted@orcs-master@docs@_build@doctrees@nbsphinx@script_example_estimate_parameters.ipynb@.PATH_END.py
{ "filename": "MidInfraredPhotometry_unWISEdr1_AllWISE.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/03_ScienceExamples/SpectralEnergyDistributions/MidInfraredPhotometry_unWISEdr1_AllWISE.ipynb", "type": "Jupyter Notebook" }
```python __nbid__ = '0027' __author__ = 'Stephanie Juneau <stephanie.juneau@noirlab.edu>' __version__ = '20240606' # yyyymmdd __datasets__ = ['unwise_dr1', 'allwise'] __keywords__ = ['science example', 'plot:cmd', 'plot:histogram'] ``` # Mid-Infrared Photometry from unWISE DR1 & AllWISE *Stéphanie Juneau (NOIRLab), ...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@03_ScienceExamples@SpectralEnergyDistributions@MidInfraredPhotometry_unWISEdr1_AllWISE.ipynb@.PATH_END.py
{ "filename": "utils.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/toast/utils.py", "type": "Python" }
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import os import gc import numpy as np from ._libtoast import Environment, Timer, GlobalTimers, Logger from ._libtoast impo...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@toast@utils.py@.PATH_END.py
{ "filename": "data_manager.py", "repo_name": "matthiasfabry/spinOS", "repo_path": "spinOS_extracted/spinOS-master/modules/data_manager.py", "type": "Python" }
""" Copyright 2020, 2021, 2022 Matthias Fabry This file is part of spinOS. spinOS 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. spinOS is...
matthiasfabryREPO_NAMEspinOSPATH_START.@spinOS_extracted@spinOS-master@modules@data_manager.py@.PATH_END.py
{ "filename": "data_inspect_2458045.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/data_inspect/data_inspect_2458045.ipynb", "type": "Jupyter Notebook" }
```python import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import matplotlib.patches as mpatches import matplotlib.gridspec as gridspec import numpy as np from pyuvdata import UVCal, UVData import os import sys import glob import uvtools as uvt from astropy.time import ...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@data_inspect@data_inspect_2458045.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/selected/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._textfont import TextfontValidator from ._marker import MarkerValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValid...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@selected@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/utils/_pytest_helpers/__init__.py", "type": "Python" }
from plasmapy.utils._pytest_helpers.pytest_helpers import ( assert_can_handle_nparray, run_test, run_test_equivalent_calls, )
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@utils@_pytest_helpers@__init__.py@.PATH_END.py
{ "filename": "helper_functions.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/GalfitModule/Functions/helper_functions.py", "type": "Python" }
#!/usr/bin/env python # coding: utf-8 # In[1]: import os import sys from glob import glob from os.path import join as pj from os.path import abspath as absp from os.path import exists import shutil import subprocess from copy import deepcopy from astropy.io import fits # In[2]: # For debugging purposes from IP...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@GalfitModule@Functions@helper_functions.py@.PATH_END.py
{ "filename": "template.py", "repo_name": "peregrine-gw/saqqara", "repo_path": "saqqara_extracted/saqqara-main/sgwbfish/scripts/template.py", "type": "Python" }
import sgwbfish as sf import jax import numpy as np import jax.numpy as jnp jax.config.update("jax_enable_x64", True) import matplotlib.pyplot as plt pl = sf.PowerLaw() freq_grid = jnp.geomspace(1e-5, 5e-1, 1000) Nc = 95 Tc = 1e6 theta = jnp.hstack( [ jnp.array([-11.0, 0.0]), jnp.hstack([jnp.array...
peregrine-gwREPO_NAMEsaqqaraPATH_START.@saqqara_extracted@saqqara-main@sgwbfish@scripts@template.py@.PATH_END.py
{ "filename": "statistics.py", "repo_name": "ratt-ru/CubiCal", "repo_path": "CubiCal_extracted/CubiCal-master/cubical/statistics.py", "type": "Python" }
# CubiCal: a radio interferometric calibration suite # (c) 2017 Rhodes University & Jonathan S. Kenyon # http://github.com/ratt-ru/CubiCal # This code is distributed under the terms of GPLv2, see LICENSE.md for details """ Handles solver statistics. """ from __future__ import print_function from builtins import range i...
ratt-ruREPO_NAMECubiCalPATH_START.@CubiCal_extracted@CubiCal-master@cubical@statistics.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/sankey/link/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "sankey.link" _path_str = "sankey.link.line" _valid_props = {"color", "colorsrc", "width", "wid...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@sankey@link@_line.py@.PATH_END.py
{ "filename": "test_representation_arithmetic.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_representation_arithmetic.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import operator import numpy as np import pytest from astropy import units as u from astropy.coordinates import ( CartesianDifferential, CartesianRepresentation, CylindricalDifferential, CylindricalRepresentation, Latitude, Longi...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_representation_arithmetic.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/constants/__init__.py", "type": "Python" }
from . import astronomy from . import math from . import physics from . import time
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@constants@__init__.py@.PATH_END.py
{ "filename": "modified_tait.py", "repo_name": "CaymanUnterborn/ExoPlex", "repo_path": "ExoPlex_extracted/ExoPlex-master/ExoPlex/burnman/eos/modified_tait.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU # GPL v2 or later. from __future__ import absolute_import import warnings import numpy as np from . import equation_of_state as eos ...
CaymanUnterbornREPO_NAMEExoPlexPATH_START.@ExoPlex_extracted@ExoPlex-master@ExoPlex@burnman@eos@modified_tait.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-github/README.md", "type": "Markdown" }
# prefect-github <p align="center"> <a href="https://pypi.python.org/pypi/prefect-github/" alt="PyPI version"> <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-github?color=26272B&labelColor=090422"></a> <a href="https://pepy.tech/badge/prefect-github/" alt="Downloads"> <img src="http...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-github@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "remi-adam/minot", "repo_path": "minot_extracted/minot-master/README.md", "type": "Markdown" }
# minot: Modeling the ICM (Non-)thermal content and Observable prediction Tools Software dedicated to provide a self-consistent modeling framework for the thermal and the non-thermal diffuse components in galaxy clusters, and provide multi-wavelenght observables predictions. ...
remi-adamREPO_NAMEminotPATH_START.@minot_extracted@minot-master@README.md@.PATH_END.py
{ "filename": "_uid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/_uid.py", "type": "Python" }
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattergeo", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@_uid.py@.PATH_END.py
{ "filename": "data_sequence.py", "repo_name": "devanshkv/fetch", "repo_path": "fetch_extracted/fetch-master/fetch/data_sequence.py", "type": "Python" }
""" https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly """ import logging import os import h5py import keras import numpy as np import scipy.signal as s os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" logger = logging.getLogger(__name__) class DataGenerator(keras.utils.Sequence): def __ini...
devanshkvREPO_NAMEfetchPATH_START.@fetch_extracted@fetch-master@fetch@data_sequence.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/source/MulensModel/utils.py", "type": "Python" }
""" File with general code used in other parts of MulensModel package. Most importantly there are Utils and PlotUtils classes. """ import numpy as np from math import fsum, pow, sqrt import warnings from matplotlib.colors import ColorConverter from astropy import __version__ as astropy__version__ from astropy.time im...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@source@MulensModel@utils.py@.PATH_END.py
{ "filename": "particles.ipynb", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/docs/notebooks/getting_started/particles.ipynb", "type": "Jupyter Notebook" }
# Using PlasmaPy Particles [plasmapy.particles]: ../../particles/index.rst The [plasmapy.particles] subpackage contains functions to access basic particle data and classes to represent particles. ```python from plasmapy.particles import ( CustomParticle, DimensionlessParticle, Particle, ParticleList...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@docs@notebooks@getting_started@particles.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "OSSOS/SurveySimulator", "repo_path": "SurveySimulator_extracted/SurveySimulator-master/python/ossssim/__init__.py", "type": "Python" }
""" Outer Solar System Survey Simulator See ossssim.examples for usage examples. ossssim consists of two main modules: core and models The core module contains the class OSSSSim which provides access to the simulator, see pydoc ossssim.core.OSSSSim for details The modeles modules contains classes to build models to...
OSSOSREPO_NAMESurveySimulatorPATH_START.@SurveySimulator_extracted@SurveySimulator-master@python@ossssim@__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/surface/colorbar/tickformatstop/_enabled.py", "type": "Python" }
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="surface.colorbar.tickformatstop", **kwargs, ): super(EnabledValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@colorbar@tickformatstop@_enabled.py@.PATH_END.py