metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/period/__init__.py", "type": "Python" }
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@period@__init__.py@.PATH_END.py
{ "filename": "localdb.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/recipe_system/cal_service/localdb.py", "type": "Python" }
# Defines the LocalDB class for calibration returns. This is a high-level # interface to the local calibration manager, and provides an API for # modifying the database on disk. from os import path, makedirs from .caldb import CalDB, CalReturn from .calrequestlib import get_cal_requests, generate_md5_digest try: ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@recipe_system@cal_service@localdb.py@.PATH_END.py
{ "filename": "test_rename_axis.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_rename_axis.py", "type": "Python" }
import pytest from pandas import ( Index, MultiIndex, Series, ) import pandas._testing as tm class TestSeriesRenameAxis: def test_rename_axis_mapper(self): # GH 19978 mi = MultiIndex.from_product([["a", "b", "c"], [1, 2]], names=["ll", "nn"]) ser = Series(list(range(len(mi))),...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_rename_axis.py@.PATH_END.py
{ "filename": "make_superdark.py", "repo_name": "jotaylor/acdc-hst", "repo_path": "acdc-hst_extracted/acdc-hst-main/src/acdc/superdark/make_superdark.py", "type": "Python" }
import numpy as np import argparse from astropy.io import fits import os import glob from acdc.database.query_cos_dark import files_by_mjd def sum_data(mjdstart, mjdend): df = files_by_mjd(mjdstart, mjdend) total_time_a = 0 total_time_b = 0 sumdark_a = np.zeros(16384*1024).reshape(1024, 16384) su...
jotaylorREPO_NAMEacdc-hstPATH_START.@acdc-hst_extracted@acdc-hst-main@src@acdc@superdark@make_superdark.py@.PATH_END.py
{ "filename": "art3d.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/art3d.py", "type": "Python" }
# art3d.py, original mplot3d version by John Porter # Parts rewritten by Reinier Heeres <reinier@heeres.eu> # Minor additions by Ben Axelrod <baxelrod@coroware.com> """ Module containing 3D artist code and functions to convert 2D artists into 3D versions which can be added to an Axes3D. """ import math import numpy ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@mpl_toolkits@mplot3d@art3d.py@.PATH_END.py
{ "filename": "demo_ROS_viper.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/ros/demo_ROS_viper.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2023 projectchrono.org # All right 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 distri...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@ros@demo_ROS_viper.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/bse/__init__.py", "type": "Python" }
from .interface import Bse
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@bse@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jolideco/jolideco", "repo_path": "jolideco_extracted/jolideco-main/jolideco/priors/patches/__init__.py", "type": "Python" }
from .core import GMMPatchPrior, MultiScalePrior from .gmm import GMM_REGISTRY, GaussianMixtureModel __all__ = ["GaussianMixtureModel", "GMMPatchPrior", "MultiScalePrior", "GMM_REGISTRY"]
jolidecoREPO_NAMEjolidecoPATH_START.@jolideco_extracted@jolideco-main@jolideco@priors@patches@__init__.py@.PATH_END.py
{ "filename": "lax_numpy_einsum_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/lax_numpy_einsum_test.py", "type": "Python" }
# Copyright 2018 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...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@lax_numpy_einsum_test.py@.PATH_END.py
{ "filename": "test_stretch.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/emcee_ES/tests/integration/test_stretch.py", "type": "Python" }
# -*- coding: utf-8 -*- import pytest from emcee import moves from .test_proposal import _test_normal, _test_uniform __all__ = [ "test_normal_stretch", "test_uniform_stretch", "test_nsplits_stretch", ] @pytest.mark.parametrize("blobs", [True, False]) def test_normal_stretch(blobs, **kwargs): kwarg...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@emcee_ES@tests@integration@test_stretch.py@.PATH_END.py
{ "filename": "test_datacube.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/mangadap/tests/test_datacube.py", "type": "Python" }
import pytest from IPython import embed import numpy from astropy.io import fits from mangadap.config.manga import MaNGAConfig from mangadap.proc.reductionassessments import ReductionAssessmentDef from mangadap.util.covariance import Covariance from mangadap.datacube import MaNGADataCube from mangadap.tests.util im...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@mangadap@tests@test_datacube.py@.PATH_END.py
{ "filename": "imports.py", "repo_name": "catrionamurray/occultence", "repo_path": "occultence_extracted/occultence-main/occultence/imports.py", "type": "Python" }
import numpy as np import copy import astropy from astropy.time import Time from astropy.timeseries import TimeSeries, aggregate_downsample import astropy.units as u from .utils import * # import fitsio import math import matplotlib.pyplot as plt import pandas as pd import os import glob from astropy.io import fits, as...
catrionamurrayREPO_NAMEoccultencePATH_START.@occultence_extracted@occultence-main@occultence@imports.py@.PATH_END.py
{ "filename": "_b0.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/_b0.py", "type": "Python" }
import _plotly_utils.basevalidators class B0Validator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="b0", parent_name="carpet", **kwargs): super(B0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@_b0.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "aeictf/EPiCA", "repo_path": "EPiCA_extracted/EPiCA-main/README.md", "type": "Markdown" }
Information Currently under constructions 🚧🏗, first stable release version is expected in January 2024. This package is an implementation of the Pierre Connes' algorithm (Connes 1985). EPiCA (Exoplanetary Pierre Connes Algorithm) Current version works only for pipeline ESPRESSO CCFs, summed-up. Requirements The al...
aeictfREPO_NAMEEPiCAPATH_START.@EPiCA_extracted@EPiCA-main@README.md@.PATH_END.py
{ "filename": "config.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/analysis/config.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import html import json import logging from collections import defaultdict from collections.abc import Mapping from enum import Enum from pathlib import Path from typing import List, Optional import yaml from pydantic import BaseModel, ConfigDict from gamm...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@analysis@config.py@.PATH_END.py
{ "filename": "_paramtreecfg.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/_paramtreecfg.py", "type": "Python" }
import numpy as np from pyqtgraph.parametertree.parameterTypes import QtEnumParameter as enum from pyqtgraph.Qt import QtWidgets dlg = QtWidgets.QFileDialog cfg = { 'list': { 'limits': { 'type': 'checklist', 'limits': ['a', 'b', 'c'] } }, 'file': { 'acceptM...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@_paramtreecfg.py@.PATH_END.py
{ "filename": "_legendwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/_legendwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scatterpolar", **kwargs): super(LegendwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@_legendwidth.py@.PATH_END.py
{ "filename": "abstract.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/non_linear/paths/abstract.py", "type": "Python" }
import logging import os import re import shutil import zipfile from abc import ABC, abstractmethod from configparser import NoSectionError from os import path from pathlib import Path from typing import Optional import numpy as np from autoconf import conf from autofit.mapper.identifier import Identifier, Identifier...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@non_linear@paths@abstract.py@.PATH_END.py
{ "filename": "test_umath.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_umath.py", "type": "Python" }
import platform import warnings import fnmatch import itertools import pytest import sys import operator from fractions import Fraction from functools import reduce from collections import namedtuple import numpy._core.umath as ncu from numpy._core import _umath_tests as ncu_tests, sctypes import numpy as np from nump...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_umath.py@.PATH_END.py
{ "filename": "_annotation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/scene/_annotation.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Annotation(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.annotation" _valid_props = { "align",...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@scene@_annotation.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/table/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._visible import VisibleValidator from ._uirevision import UirevisionValidator from ._uid import UidValidator from ._stream import StreamValidator from ._name import NameValidator from ._metasrc import MetasrcValidator from ._meta import MetaVal...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@table@__init__.py@.PATH_END.py
{ "filename": "_insidetextorientation.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/_insidetextorientation.py", "type": "Python" }
import _plotly_utils.basevalidators class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="insidetextorientation", parent_name="sunburst", **kwargs ): super(InsidetextorientationValidator, self).__init__( plotly_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@_insidetextorientation.py@.PATH_END.py
{ "filename": "ps_fit.py", "repo_name": "TianlaiProject/tlpipe", "repo_path": "tlpipe_extracted/tlpipe-master/tlpipe/timestream/ps_fit.py", "type": "Python" }
"""Calibration by strong point source fitting. Inheritance diagram ------------------- .. inheritance-diagram:: PsFit :parts: 2 """ import os import numpy as np import ephem import aipy as a import timestream_task from tlpipe.container.timestream import Timestream from caput import mpiutil from tlpipe.utils.path...
TianlaiProjectREPO_NAMEtlpipePATH_START.@tlpipe_extracted@tlpipe-master@tlpipe@timestream@ps_fit.py@.PATH_END.py
{ "filename": "_bounds.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/map/_bounds.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Bounds(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.map" _path_str = "layout.map.bounds" _valid_props = {"east", "north", "south", "we...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@map@_bounds.py@.PATH_END.py
{ "filename": "_histnorm.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_histnorm.py", "type": "Python" }
import _plotly_utils.basevalidators class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="histnorm", parent_name="histogram2dcontour", **kwargs ): super(HistnormValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_histnorm.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "list.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/core/langchain_core/output_parsers/list.py", "type": "Python" }
from __future__ import annotations import csv import re from abc import abstractmethod from collections import deque from collections.abc import AsyncIterator, Iterator from io import StringIO from typing import Optional as Optional from typing import TypeVar, Union from langchain_core.messages import BaseMessage fro...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@langchain_core@output_parsers@list.py@.PATH_END.py
{ "filename": "metaestimators.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/utils/metaestimators.py", "type": "Python" }
"""Utilities for meta-estimators.""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from abc import ABCMeta, abstractmethod from contextlib import suppress from typing import Any, List import numpy as np from ..base import BaseEstimator from ..utils import _safe_indexing from ..utils...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@utils@metaestimators.py@.PATH_END.py
{ "filename": "RadFil_Tutorial.ipynb", "repo_name": "catherinezucker/radfil", "repo_path": "radfil_extracted/radfil-master/RadFil_Tutorial.ipynb", "type": "Jupyter Notebook" }
# RadFil Tutorial This tutorial walks through all the steps you need in order to build and fit your own radial density profiles. Feel free to run it in Python 2.7, Python 3.4, Python 3.5, or Python 3.6. For this tutorial, our filament of choice is the Musca infrared dark cloud, whose density profile has already been an...
catherinezuckerREPO_NAMEradfilPATH_START.@radfil_extracted@radfil-master@RadFil_Tutorial.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/sphinxext/__init__.py", "type": "Python" }
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@sphinxext@__init__.py@.PATH_END.py
{ "filename": "write_parset_tables.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/docs/scripts/write_parset_tables.py", "type": "Python" }
#!/usr/bin/env python3 """ Dynamically build the rst documentation of the bitmasks. """ import time from importlib import resources #----------------------------------------------------------------------------- def write_parset(parset_class, opath, class_link=True): ofile = opath / f'{parset_class.__name__.lowe...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@docs@scripts@write_parset_tables.py@.PATH_END.py
{ "filename": "rp.py", "repo_name": "AMReX-Astro/MAESTROeX", "repo_path": "MAESTROeX_extracted/MAESTROeX-main/sphinx_docs/rp.py", "type": "Python" }
#!/usr/bin/env python3 import os import re import sys import textwrap from more_itertools import unique_everseen MAIN_HEADER = """ +----------------------------------------+---------------------------------------------------------+---------------+ | parameter | description ...
AMReX-AstroREPO_NAMEMAESTROeXPATH_START.@MAESTROeX_extracted@MAESTROeX-main@sphinx_docs@rp.py@.PATH_END.py
{ "filename": "surgery.md", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs_nnx/guides/surgery.md", "type": "Markdown" }
--- jupytext: formats: ipynb,md:myst text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.13.8 --- # Model surgery Model surgery is an act of making modifications on an existing neural network's building blocks and parameters, such as layer replacement, pa...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs_nnx@guides@surgery.md@.PATH_END.py
{ "filename": "old_build_frbs.py", "repo_name": "FRBs/FRB", "repo_path": "FRB_extracted/FRB-main/frb/builds/old_build_frbs.py", "type": "Python" }
""" Module to generate individual FRB files """ import importlib_resources import numpy as np from astropy import units from astropy.coordinates import SkyCoord from frb import frb def frb_121102(): """ FRB 121102 All of the data currently comes from Tendulkar et al. 2017 https://ui.adsabs...
FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@frb@builds@old_build_frbs.py@.PATH_END.py
{ "filename": "test_r0_to_dl1.py", "repo_name": "cta-observatory/cta-lstchain", "repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/reco/tests/test_r0_to_dl1.py", "type": "Python" }
from ctapipe.containers import ArrayEventContainer import numpy as np from lstchain.reco.r0_to_dl1 import r0_to_dl1, rescale_dl1_charge from lstchain.io import standard_config from copy import copy, deepcopy def test_rescale_dl1_charge(): event = ArrayEventContainer() tel_ids = [1, 3] images = {} for ...
cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@reco@tests@test_r0_to_dl1.py@.PATH_END.py
{ "filename": "text.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/legacy/preprocessing/text.py", "type": "Python" }
"""Deprecated text preprocessing APIs from Keras 1.""" import collections import hashlib import json import warnings import numpy as np from keras.src.api_export import keras_export @keras_export("keras._legacy.preprocessing.text.text_to_word_sequence") def text_to_word_sequence( input_text, filters='!"#$%...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@legacy@preprocessing@text.py@.PATH_END.py
{ "filename": "test_nonlinearity.py", "repo_name": "litebird/litebird_sim", "repo_path": "litebird_sim_extracted/litebird_sim-master/test/test_nonlinearity.py", "type": "Python" }
import numpy as np import litebird_sim as lbs from astropy.time import Time def test_add_quadratic_nonlinearity(): # Test function to check consistency of wrappers and low level functions start_time = Time("2025-02-02T00:00:00") mission_time_days = 1 sampling_hz = 1 dets = [ lbs.DetectorI...
litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@test@test_nonlinearity.py@.PATH_END.py
{ "filename": "fastpm.py", "repo_name": "changhoonhahn/pySpectrum", "repo_path": "pySpectrum_extracted/pySpectrum-master/run/fastpm/fastpm.py", "type": "Python" }
#!/bin/python ''' calculate the powerspectrum and bipsectrum for QPM halo box ''' import os import h5py import numpy as np # -- nbodykit -- import nbodykit.lab as NBlab # -- pyspectrum -- from pyspectrum import util as UT from pyspectrum import plots as Plots from pyspectrum import pyspectrum as pySpec # -- p...
changhoonhahnREPO_NAMEpySpectrumPATH_START.@pySpectrum_extracted@pySpectrum-master@run@fastpm@fastpm.py@.PATH_END.py
{ "filename": "short_uvmap.py", "repo_name": "micbia/serenet", "repo_path": "serenet_extracted/serenet-main/utils_data/short_uvmap.py", "type": "Python" }
import numpy as np, pickle uvs = pickle.load(open('uvmap_128_z7-20.pkl', 'rb')) redshift = np.arange(7,11.5005,0.001) uvs_short = {} for i in range(redshift.size+1): if(i < redshift.size): z = redshift[i] uvs_short['%.3f' %z] = uvs['%.3f' %z] else: uvs_short['Nant'] = uvs['Nant'...
micbiaREPO_NAMEserenetPATH_START.@serenet_extracted@serenet-main@utils_data@short_uvmap.py@.PATH_END.py
{ "filename": "base_optimizer.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/optimizers/base_optimizer.py", "type": "Python" }
import re import warnings from keras.src import backend from keras.src import initializers from keras.src import ops from keras.src.optimizers.schedules import learning_rate_schedule from keras.src.saving import serialization_lib from keras.src.saving.keras_saveable import KerasSaveable from keras.src.utils import tra...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@optimizers@base_optimizer.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/analysis_modules/star_analysis/api.py", "type": "Python" }
from yt.utilities.exceptions import YTModuleRemoved raise YTModuleRemoved( "star_analysis", "https://github.com/yt-project/yt_attic", "https://yt-attic.readthedocs.io/", )
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@analysis_modules@star_analysis@api.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "test_svm_ibqk07.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/tests/hap/test_svm_ibqk07.py", "type": "Python" }
""" This module tests full pipeline SVM processing of a WFC3 dataset containing both IR and UVIS data. The two detectors do NOT have the same WCS solution. """ import datetime import os import math import numpy as np import pytest from drizzlepac.haputils import astroquery_utils as aqutils from drizzlepac import ...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@tests@hap@test_svm_ibqk07.py@.PATH_END.py
{ "filename": "emma.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/input/litdata/emma.py", "type": "Python" }
#From Moster2010, table 7 logM_0 = 11.88 #(0.01) mu = 0.019 #(0.002) #or not N_0 = 0.0282 #(0.0003) nu = -0.72 #(0.06) gamma_0 = 0.556 #0.001 gamma_1 = -0.26 #(0.05) beta_0 = 1.06 #(0.06) beta_1 = 0.17 #(0.12) model1 = \ { 'pop_sfr_model':'hod', #star-forming fraction - a, b dpl z dependance, other linear 'pop_s...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@input@litdata@emma.py@.PATH_END.py
{ "filename": "shared_to_item.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/utils/tap/model/shared_to_item.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ============= TAP plus ============= @author: Javier Durtan @contact: javier.duran@sciops.esa.int European Space Astronomy Centre (ESAC) European Space Agency (ESA) Created on 28 sep. 2018 """ class TapSharedToItem: """TAP shared to item obj...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@utils@tap@model@shared_to_item.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="violin", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@_y.py@.PATH_END.py
{ "filename": "constants.py", "repo_name": "discsim/frank", "repo_path": "frank_extracted/frank-master/frank/constants.py", "type": "Python" }
# Frankenstein: 1D disc brightness profile reconstruction from Fourier data # using non-parametric Gaussian Processes # # Copyright (C) 2019-2020 R. Booth, J. Jennings, M. Tazzari # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
discsimREPO_NAMEfrankPATH_START.@frank_extracted@frank-master@frank@constants.py@.PATH_END.py
{ "filename": "test_dataset.py", "repo_name": "ska-sa/katdal", "repo_path": "katdal_extracted/katdal-master/katdal/test/test_dataset.py", "type": "Python" }
############################################################################### # Copyright (c) 2018-2019,2021-2024, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License...
ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@katdal@test@test_dataset.py@.PATH_END.py
{ "filename": "test_fitsblob.py", "repo_name": "transientskp/pyse", "repo_path": "pyse_extracted/pyse-master/test/test_fitsblob.py", "type": "Python" }
""" Try the in memory fits stream Accessor """ import os import unittest from astropy.io.fits import open as fitsopen from sourcefinder.accessors import open as tkpopen from sourcefinder.testutil.decorators import requires_data from sourcefinder.accessors.fitsimageblob import FitsImageBlob from .conftest import DATAPA...
transientskpREPO_NAMEpysePATH_START.@pyse_extracted@pyse-master@test@test_fitsblob.py@.PATH_END.py
{ "filename": "tpu_sharding.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tpu_sharding.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@tpu@tpu_sharding.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ebachelet/pyLIMA", "repo_path": "pyLIMA_extracted/pyLIMA-master/pyLIMA/pyLIMASS/__init__.py", "type": "Python" }
from .pyLIMASS import SourceLensProbabilities __all__ = ["SourceLensProbabilities"]
ebacheletREPO_NAMEpyLIMAPATH_START.@pyLIMA_extracted@pyLIMA-master@pyLIMA@pyLIMASS@__init__.py@.PATH_END.py
{ "filename": "test_like.ipynb", "repo_name": "threeML/hawc_hal", "repo_path": "hawc_hal_extracted/hawc_hal-master/notebooks/test_like.ipynb", "type": "Jupyter Notebook" }
```python from threeML import * from hawc_hal import HAL, HealpixConeROI import os os.environ['OMP_NUM_THREADS'] = "1" os.environ['MKL_NUM_THREADS'] = "1" %matplotlib notebook ``` Configuration read from /home/giacomov/.threeML/threeML_config.yml ```python ra_crab, dec_crab = 83.633083, 22.014500 roi = Hea...
threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@notebooks@test_like.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dask/dask-image", "repo_path": "dask-image_extracted/dask-image-main/dask_image/ndfourier/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- import numbers import dask.array as da from . import _utils __all__ = [ "fourier_gaussian", "fourier_shift", "fourier_uniform", ] def fourier_gaussian(image, sigma, n=-1, axis=-1): """ Multi-dimensional Gaussian fourier filter. The array is multiplied with the fouri...
daskREPO_NAMEdask-imagePATH_START.@dask-image_extracted@dask-image-main@dask_image@ndfourier@__init__.py@.PATH_END.py
{ "filename": "test_formats.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/base_class/test_formats.py", "type": "Python" }
import numpy as np import pytest from pandas._config import using_string_dtype import pandas._config.config as cf from pandas import Index import pandas._testing as tm class TestIndexRendering: def test_repr_is_valid_construction_code(self): # for the case of Index, where the repr is traditional rather ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@base_class@test_formats.py@.PATH_END.py
{ "filename": "7-IndividualLine_Tutorial.ipynb", "repo_name": "folsomcp/specpolFlow", "repo_path": "specpolFlow_extracted/specpolFlow-main/docs-jb/Tutorials/7-IndividualLine_Tutorial.ipynb", "type": "Jupyter Notebook" }
# How analyze individual spectral lines Many of the tools in SpecpolFlow can be applied to a single line in an observed spectrum. In this example we analyze a few emission lines in the spectrum of a T Tauri star. First, import SpecpolFlow and some packages that will help with data visualization. ```python import s...
folsomcpREPO_NAMEspecpolFlowPATH_START.@specpolFlow_extracted@specpolFlow-main@docs-jb@Tutorials@7-IndividualLine_Tutorial.ipynb@.PATH_END.py
{ "filename": "cpu_eigh_lapack_syev.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/internal_test_util/export_back_compat_test_data/cpu_eigh_lapack_syev.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@_src@internal_test_util@export_back_compat_test_data@cpu_eigh_lapack_syev.py@.PATH_END.py
{ "filename": "_show.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/slices/y/_show.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.slices.y", **kwargs): super(ShowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@slices@y@_show.py@.PATH_END.py
{ "filename": "events.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/core/events.py", "type": "Python" }
"""Infrastructure for registering and firing callbacks on application events. Unlike :mod:`IPython.core.hooks`, which lets end users set single functions to be called at specific times, or a collection of alternative methods to try, callbacks are designed to be used by extension authors. A number of callbacks can be r...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@core@events.py@.PATH_END.py
{ "filename": "CustomBackground_wnorm.py", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/examples/true_background/CustomBackground_wnorm.py", "type": "Python" }
from __future__ import print_function, division import numpy as np import math import xpsi class CustomBackground(xpsi.Background): """ Currently tailored to the NICER light-curve SWG model specification. NICER parameter recovery from synthetic photon count data. The background must be set using the pr...
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@examples@true_background@CustomBackground_wnorm.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/shapepipe/__init__.py", "type": "Python" }
"""SHAPEPIPE PACKAGE. ShapePipe is a galaxy shape measurement pipeline. :Author: Samuel Farrens <samuel.farrens@cea.fr> """ __all__ = ['modules', 'pipeline', 'utilities'] from . import * from .info import __about__, __version__
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@shapepipe@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/tools/tests/__init__.py", "type": "Python" }
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@tools@tests@__init__.py@.PATH_END.py
{ "filename": "tf_utils.py", "repo_name": "SKA-INAF/sclassifier", "repo_path": "sclassifier_extracted/sclassifier-master/sclassifier/tf_utils.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function ################################################## ### MODULE IMPORT ################################################## ## STANDARD MODULES import os import sys import subprocess import string import time import signal from threading import Thread i...
SKA-INAFREPO_NAMEsclassifierPATH_START.@sclassifier_extracted@sclassifier-master@sclassifier@tf_utils.py@.PATH_END.py
{ "filename": "omegaxyz.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/devutils/comparison_tools/read_hla/omegaxyz.py", "type": "Python" }
"""Functions to get and apply HSC infinitesimal rotations to correct small shifts and rotations in spherical coordinates Uses formulae from `Budavari & Lubow (2012, ApJ, 761, 188) <http://adsabs.harvard.edu/abs/2012ApJ...761..188B>`_ vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 ai : 2019 June 12, Rick White "...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@devutils@comparison_tools@read_hla@omegaxyz.py@.PATH_END.py
{ "filename": "probes.py", "repo_name": "DifferentiableUniverseInitiative/jax_cosmo", "repo_path": "jax_cosmo_extracted/jax_cosmo-master/jax_cosmo/probes.py", "type": "Python" }
# This module defines kernel functions for various tracers import jax.numpy as np from jax import jit from jax import vmap from jax.tree_util import register_pytree_node_class import jax_cosmo.background as bkgrd import jax_cosmo.constants as const import jax_cosmo.redshift as rds from jax_cosmo.jax_utils import conta...
DifferentiableUniverseInitiativeREPO_NAMEjax_cosmoPATH_START.@jax_cosmo_extracted@jax_cosmo-master@jax_cosmo@probes.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/util.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r''' (<\?.*?\?>...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@util.py@.PATH_END.py
{ "filename": "field.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/dedalus/core/field.py", "type": "Python" }
""" Class for data fields. """ import weakref from functools import partial, reduce from collections import defaultdict import numpy as np from mpi4py import MPI from scipy import sparse from scipy.sparse import linalg as splinalg from numbers import Number import h5py from math import prod from ..libraries.fftw im...
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@dedalus@core@field.py@.PATH_END.py
{ "filename": "plot_limb_darkening.py", "repo_name": "DaneSpaeth/pyoscillot", "repo_path": "pyoscillot_extracted/pyoscillot-main/pyoscillot/plot_scripts/plot_limb_darkening.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from three_dim_star import ThreeDimStar, TwoDimProjector from utils import calc_mean_limb_dark, add_limb_darkening from dataloader import phoenix_spectrum from star import GridSpectrumSimulator from cfg import parse_global_ini conf_dict = parse_global_ini() def plot_...
DaneSpaethREPO_NAMEpyoscillotPATH_START.@pyoscillot_extracted@pyoscillot-main@pyoscillot@plot_scripts@plot_limb_darkening.py@.PATH_END.py
{ "filename": "_position.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/delta/_position.py", "type": "Python" }
import _plotly_utils.basevalidators class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="position", parent_name="indicator.delta", **kwargs): super(PositionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@delta@_position.py@.PATH_END.py
{ "filename": "mixed_models.md", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/docs/source/developer_guides/mixed_models.md", "type": "Markdown" }
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@docs@source@developer_guides@mixed_models.md@.PATH_END.py
{ "filename": "_showexponent.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/colorbar/_showexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="choropleth.colorbar", **kwargs ): super(ShowexponentValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choropleth@colorbar@_showexponent.py@.PATH_END.py
{ "filename": "gen_qa_noshape_models.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/common/gen_qa_noshape_models.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2018-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 ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@common@gen_qa_noshape_models.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/distutils/command/__init__.py", "type": "Python" }
"""distutils.command Package containing implementation of all the standard Distutils commands. """ def test_na_writable_attributes_deletion(): a = np.NA(2) attr = ['payload', 'dtype'] for s in attr: assert_raises(AttributeError, delattr, a, s) __revision__ = "$Id: __init__.py,v 1.3 2005/05/16 1...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@distutils@command@__init__.py@.PATH_END.py
{ "filename": "sod.py", "repo_name": "EigenDev/simbi", "repo_path": "simbi_extracted/simbi-main/simbi_configs/examples/sod.py", "type": "Python" }
from simbi import BaseConfig, DynamicArg, simbi_property from simbi.key_types import * class SodProblem(BaseConfig): """ Sod's Shock Tube Problem in 1D Newtonian Fluid """ nzones = DynamicArg("nzones", 1000, help="number of grid zones", var_type=int) ad_gamma = DynamicArg("ad-gamma", 5.0 / 3.0...
EigenDevREPO_NAMEsimbiPATH_START.@simbi_extracted@simbi-main@simbi_configs@examples@sod.py@.PATH_END.py
{ "filename": "_shape.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/line/_shape.py", "type": "Python" }
import _plotly_utils.basevalidators class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scattersmith.line", **kwargs): super(ShapeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@line@_shape.py@.PATH_END.py
{ "filename": "resunet_se.py", "repo_name": "BiaPyX/BiaPy", "repo_path": "BiaPy_extracted/BiaPy-master/biapy/models/resunet_se.py", "type": "Python" }
import torch import torch.nn as nn from typing import List from biapy.models.blocks import ( ResConvBlock, ResUpBlock, ConvBlock, ) class ResUNet_SE(nn.Module): """ Create Residual 2D/3D U-Net with squeeze-excite blocks. Reference: `Squeeze and Excitation Networks <https://arxiv.org/abs/1709...
BiaPyXREPO_NAMEBiaPyPATH_START.@BiaPy_extracted@BiaPy-master@biapy@models@resunet_se.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "keflavich/plfit", "repo_path": "plfit_extracted/plfit-master/setup.py", "type": "Python" }
import sys if 'build_sphinx' in sys.argv or 'develop' in sys.argv: from setuptools import setup,Extension else: from distutils.core import setup,Extension import distutils.util #from scipy_distutils.core import Extension as scipyExtension #from scipy_distutils.core import setup as scipysetup from numpy.distutil...
keflavichREPO_NAMEplfitPATH_START.@plfit_extracted@plfit-master@setup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "andreicuceu/vega", "repo_path": "vega_extracted/vega-master/vega/plots/__init__.py", "type": "Python" }
andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@vega@plots@__init__.py@.PATH_END.py
{ "filename": "test_plot_psw.py", "repo_name": "STBadman/ParkerSolarWind", "repo_path": "ParkerSolarWind_extracted/ParkerSolarWind-main/parkersolarwind/tests/test_plot_psw.py", "type": "Python" }
import parkersolarwind as psw import plot_parkersolarwind as parkersolarwind def test_plot_isothermal() : # Make example isothermal solution # Check input error handling # Check fexts error handling # Check output is fig and axes object (3 columns) assert False def test_plot_polytropic() : # M...
STBadmanREPO_NAMEParkerSolarWindPATH_START.@ParkerSolarWind_extracted@ParkerSolarWind-main@parkersolarwind@tests@test_plot_psw.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattersmith/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattersmith@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "pol2noise.py", "repo_name": "Starlink/starlink", "repo_path": "starlink_extracted/starlink-master/applications/smurf/scripts/pol2noise.py", "type": "Python" }
#!/usr/bin/env python3 ''' *+ * Name: * POL2NOISE * Purpose: * Analyse the noise in a POL2 vector catalogue * Language: * python (2.7 or 3.*) * Description: * This script manipulates the noise estimates contained within a POL2 * vector catalogue. Currently two options are available, selected...
StarlinkREPO_NAMEstarlinkPATH_START.@starlink_extracted@starlink-master@applications@smurf@scripts@pol2noise.py@.PATH_END.py
{ "filename": "event_file_writer_v2.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/summary/writer/event_file_writer_v2.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@summary@writer@event_file_writer_v2.py@.PATH_END.py
{ "filename": "index.md", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/providers/pebblo/index.md", "type": "Markdown" }
# Pebblo [Pebblo](https://www.daxa.ai/pebblo) enables developers to safely load and retrieve data to promote their Gen AI app to deployment without worrying about the organization’s compliance and security requirements. The Pebblo SafeLoader identifies semantic topics and entities found in the loaded data and the Pebb...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@providers@pebblo@index.md@.PATH_END.py
{ "filename": "00aInstallPackages.py", "repo_name": "MehrnooshTahani/MC-BLOS", "repo_path": "MC-BLOS_extracted/MC-BLOS-main/MolecularClouds/00aInstallPackages.py", "type": "Python" }
''' Downloads and installs all the packages needed to run these scripts. ''' import sys import subprocess #Install packages: '''recommended packages = ['numpy<=1.24.2', 'scipy<=1.10.1', 'astropy<=5.2.1', 'pandas<=1.5.3', 'matplotlib<=3.7.1', 'adjusttext==0.7....
MehrnooshTahaniREPO_NAMEMC-BLOSPATH_START.@MC-BLOS_extracted@MC-BLOS-main@MolecularClouds@00aInstallPackages.py@.PATH_END.py
{ "filename": "test_psf_fitting.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Workflow/test_psf_fitting.py", "type": "Python" }
__author__ = "sibirrer" import pytest import numpy as np import copy import lenstronomy.Util.util as util import lenstronomy.Util.simulation_util as sim_util from lenstronomy.ImSim.image_model import ImageModel from lenstronomy.ImSim.image_linear_solve import ImageLinearFit import lenstronomy.Util.param_util as param_...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Workflow@test_psf_fitting.py@.PATH_END.py
{ "filename": "AtmosClass.py", "repo_name": "wmpg/Supracenter", "repo_path": "Supracenter_extracted/Supracenter-master/supra/Atmosphere/AtmosClass.py", "type": "Python" }
import random import numpy as np from netCDF4 import Dataset import pyximport pyximport.install(setup_args={'include_dirs':[np.get_include()]}) from scipy.interpolate import CubicSpline from supra.Utils.AngleConv import roundToNearest from supra.Utils.Classes import Constants from supra.Supracenter.cyzInteg import z...
wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@Atmosphere@AtmosClass.py@.PATH_END.py
{ "filename": "fitsfunc.py", "repo_name": "healpy/healpy", "repo_path": "healpy_extracted/healpy-main/lib/healpy/fitsfunc.py", "type": "Python" }
# # This file is part of Healpy. # # Healpy 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 2 of the License, or # (at your option) any later version. # # Healpy is distributed in the hope...
healpyREPO_NAMEhealpyPATH_START.@healpy_extracted@healpy-main@lib@healpy@fitsfunc.py@.PATH_END.py
{ "filename": "align_data.py", "repo_name": "amanchokshi/EMBERS", "repo_path": "EMBERS_extracted/EMBERS-master/src/embers/rf_tools/align_data.py", "type": "Python" }
""" Align Data ---------- Tools to temporally align pairs of rf data files, enabling comparisons between data sets """ import concurrent.futures import logging import math import re from itertools import repeat from pathlib import Path import numpy as np from embers.rf_tools.rf_data import (read_data, tile_names, ti...
amanchokshiREPO_NAMEEMBERSPATH_START.@EMBERS_extracted@EMBERS-master@src@embers@rf_tools@align_data.py@.PATH_END.py
{ "filename": "TeeResMaxEvolutionStudy.py", "repo_name": "mmicromegas/ransX", "repo_path": "ransX_extracted/ransX-master/EVOLUTION/TeeResMaxEvolutionStudy.py", "type": "Python" }
import numpy as np import sys import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.EVOL.ALIMITevol import ALIMITevol from UTILS.Tools import Tools # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Arnett, 2014, Compressible Hydrodynamic Mean-Field # # Equati...
mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EVOLUTION@TeeResMaxEvolutionStudy.py@.PATH_END.py
{ "filename": "ultratb.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/core/ultratb.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Verbose and colourful traceback formatting. **ColorTB** I've always found it a bit hard to visually parse tracebacks in Python. The ColorTB class is a solution to that problem. It colors the different parts of a traceback in a manner similar to what you would expect from a syntax-highlig...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@core@ultratb.py@.PATH_END.py
{ "filename": "tfsa-2022-164.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-164.md", "type": "Markdown" }
## TFSA-2022-164: `CHECK_EQ` fail via input in `SparseMatrixNNZ` ### CVE Number CVE-2022-41901 ### Impact An input `sparse_matrix` that is not a matrix with a shape with rank 0 will trigger a `CHECK` fail in [`tf.raw_ops.SparseMatrixNNZ`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/sp...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-164.md@.PATH_END.py
{ "filename": "plot_atomic_data.md", "repo_name": "Morisset/PyNeb_devel", "repo_path": "PyNeb_devel_extracted/PyNeb_devel-master/docs/api_reference/plot/plot_atomic_data.md", "type": "Markdown" }
::: pyneb.plot.plotAtomicData handler: python rendering: show_root_heading: false selection: docstring_style: google docstring_options: replace_admonitions: no
MorissetREPO_NAMEPyNeb_develPATH_START.@PyNeb_devel_extracted@PyNeb_devel-master@docs@api_reference@plot@plot_atomic_data.md@.PATH_END.py
{ "filename": "flask_theme_support.py", "repo_name": "dfm/python-fsps", "repo_path": "python-fsps_extracted/python-fsps-main/docs/_themes/flask_theme_support.py", "type": "Python" }
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import ( Comment, Error, Generic, Keyword, Literal, Name, Number, Operator, Other, Punctuation, String, Whitespace, ) class FlaskyStyle(Style): back...
dfmREPO_NAMEpython-fspsPATH_START.@python-fsps_extracted@python-fsps-main@docs@_themes@flask_theme_support.py@.PATH_END.py
{ "filename": "ra_dec.py", "repo_name": "HeRTA/FRBSTATS", "repo_path": "FRBSTATS_extracted/FRBSTATS-main/figs/ra_dec.py", "type": "Python" }
import numpy as np from astropy import units as u import astropy.coordinates as apycoords from astropy.coordinates import SkyCoord from shutil import copyfile from csv import reader import urllib.request import matplotlib import matplotlib.pyplot as plt # Use TeX plt.rcParams['text.usetex'] = True # Adjust figsize p...
HeRTAREPO_NAMEFRBSTATSPATH_START.@FRBSTATS_extracted@FRBSTATS-main@figs@ra_dec.py@.PATH_END.py
{ "filename": "testme.py", "repo_name": "idefix-code/idefix", "repo_path": "idefix_extracted/idefix-master/test/HD/sod/testme.py", "type": "Python" }
#!/usr/bin/env python3 """ @author: glesur """ import os import sys sys.path.append(os.getenv("IDEFIX_DIR")) import pytools.idfx_test as tst name="dump.0001.dmp" def testMe(test): test.configure() test.compile() inifiles=["idefix.ini","idefix-hll.ini","idefix-hllc.ini","idefix-tvdlf.ini"] if test.reconstru...
idefix-codeREPO_NAMEidefixPATH_START.@idefix_extracted@idefix-master@test@HD@sod@testme.py@.PATH_END.py
{ "filename": "sim.py", "repo_name": "thomasorb/orb", "repo_path": "orb_extracted/orb-master/orb/sim.py", "type": "Python" }
#!/usr/bin/python # *-* coding: utf-8 *-* # Author: Thomas Martin <thomas.martin.1@ulaval.ca> # File: sim.py ## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca> ## ## This file is part of ORB ## ## ORB is free software: you can redistribute it and/or modify it ## under the terms of the GNU General Pu...
thomasorbREPO_NAMEorbPATH_START.@orb_extracted@orb-master@orb@sim.py@.PATH_END.py
{ "filename": "queue_timeout_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_batcher/queue_timeout_test.py", "type": "Python" }
#!/usr/bin/env python3 # 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 # ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_batcher@queue_timeout_test.py@.PATH_END.py
{ "filename": "_linepositionsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/outsidetextfont/_linepositionsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnel.outsidetextfont", **kwargs, ): super(LinepositionsrcValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@outsidetextfont@_linepositionsrc.py@.PATH_END.py
{ "filename": "_cone.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/template/data/_cone.py", "type": "Python" }
import _plotly_utils.basevalidators class ConeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="cone", parent_name="layout.template.data", **kwargs ): super(ConeValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@template@data@_cone.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "nanograv/holodeck", "repo_path": "holodeck_extracted/holodeck-main/holodeck/plot.py", "type": "Python" }
"""Plotting module. Provides convenience methods for generating standard plots and components using `matplotlib`. """ import numpy as np import scipy as sp import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm import kalepy as kale import holodeck as holo from holodeck import utils, l...
nanogravREPO_NAMEholodeckPATH_START.@holodeck_extracted@holodeck-main@holodeck@plot.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/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="scatter3d.marker.colorbar.tickformatstop", **kwargs ): super(DtickrangeValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py