metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "eddingtondf.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/df/eddingtondf.py", "type": "Python" }
# Class that implements isotropic spherical DFs computed using the Eddington # formula import numpy from scipy import integrate, interpolate from ..potential import evaluateR2derivs from ..potential.Potential import _evaluatePotentials, _evaluateRforces from ..util import conversion from .sphericaldf import isotropics...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@df@eddingtondf.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/MSCommon/common.py", "type": "Python" }
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitati...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@MSCommon@common.py@.PATH_END.py
{ "filename": "pipeline_testenv_nirissdata.ipynb", "repo_name": "spacetelescope/jwebbinar_prep", "repo_path": "jwebbinar_prep_extracted/jwebbinar_prep-main/test_environment/pipeline_testenv_nirissdata.ipynb", "type": "Jupyter Notebook" }
# Test notebook for JWebbinars ## Running the pipeline on NIRISS simulated data Test environment for the JWebbinars with just - jwst==0.17.1 - jdaviz Pinned CRDS version - 0645 ```python %env CRDS_CONTEXT=jwst_0645.pmap #system general import os import fnmatch import sys import urllib.request #plotting and tablin...
spacetelescopeREPO_NAMEjwebbinar_prepPATH_START.@jwebbinar_prep_extracted@jwebbinar_prep-main@test_environment@pipeline_testenv_nirissdata.ipynb@.PATH_END.py
{ "filename": "test_gaussian.py", "repo_name": "wdpozzo/raynest", "repo_path": "raynest_extracted/raynest-main/raynest/tests/test_gaussian.py", "type": "Python" }
import unittest import numpy as np import raynest.model class GaussianModel(raynest.model.Model): """ A simple gaussian model with parameters mean and sigma """ names=['mean','sigma'] bounds=[[-5,5],[0.05,1]] data = np.array([x for x in np.random.normal(0.5,0.5,size=10)]) analyticZ = np.log...
wdpozzoREPO_NAMEraynestPATH_START.@raynest_extracted@raynest-main@raynest@tests@test_gaussian.py@.PATH_END.py
{ "filename": "makedustopac.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/opac/dust_continuum/dustopac_for_example_models/makedustopac.py", "type": "Python" }
from bhmie import * import numpy as np from scipy.interpolate import interp1d import math def compute_opac_mie(optconst_file,matdens,agraincm,lamcm,wgt=None, theta=None,logawidth=None,wfact=3.0,na=20, chopforward=0.0,errtol=0.01,verbose=False, extrapolate=...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@opac@dust_continuum@dustopac_for_example_models@makedustopac.py@.PATH_END.py
{ "filename": "ClassWirtingerSolver.py", "repo_name": "saopicc/killMS", "repo_path": "killMS_extracted/killMS-master/killMS/Wirtinger/ClassWirtingerSolver.py", "type": "Python" }
#!/usr/bin/env python """ killMS, a package for calibration in radio interferometry. Copyright (C) 2013-2017 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
saopiccREPO_NAMEkillMSPATH_START.@killMS_extracted@killMS-master@killMS@Wirtinger@ClassWirtingerSolver.py@.PATH_END.py
{ "filename": "get_thread.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/gmail/get_thread.py", "type": "Python" }
from typing import Dict, Optional, Type from langchain_core.callbacks import CallbackManagerForToolRun from pydantic import BaseModel, Field from langchain_community.tools.gmail.base import GmailBaseTool class GetThreadSchema(BaseModel): """Input for GetMessageTool.""" # From https://support.google.com/mai...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@gmail@get_thread.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="layout.yaxis", **kwargs): super(TickformatValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@_tickformat.py@.PATH_END.py
{ "filename": "_scatter3d.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/data/_scatter3d.py", "type": "Python" }
import _plotly_utils.basevalidators class Scatter3DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="scatter3d", parent_name="layout.template.data", **kwargs ): super(Scatter3DValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@template@data@_scatter3d.py@.PATH_END.py
{ "filename": "history.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/pyspeckit/spectrum/history.py", "type": "Python" }
from __future__ import print_function """ History logger for the spectroscopic toolkit packge Goal: Save history... (should this be implemented as a Header class method?) Author: Adam Ginsburg Created: 03/18/2011 """ import time from ..specwarnings import warn try: import astropy.io.fits as pyfits except ImportEr...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@pyspeckit@spectrum@history.py@.PATH_END.py
{ "filename": "TOI-1798-vetting.ipynb", "repo_name": "franpoz/SHERLOCK", "repo_path": "SHERLOCK_extracted/SHERLOCK-master/docs/source/TOI-1798/TOI-1798-vetting.ipynb", "type": "Jupyter Notebook" }
# 2 Vetting TOI 1798.01 Whenever we find a new promising signal in `sherlock` we will have to carry a proper vetting of the data. This is the standard practice by the Science Processing Operations Center (SPOC) with their Data Validation (DV) Reports presented by Twicken et al. (2018) and Li et al. (2018) for the Keple...
franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@docs@source@TOI-1798@TOI-1798-vetting.ipynb@.PATH_END.py
{ "filename": "file.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/memory/chat_message_histories/file.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.chat_message_histories import FileChatMessageHistory # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling op...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@memory@chat_message_histories@file.py@.PATH_END.py
{ "filename": "numpyro_refitting_xr_lik.ipynb", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/doc/source/user_guide/numpyro_refitting_xr_lik.ipynb", "type": "Jupyter Notebook" }
# Refitting NumPyro models with ArviZ (and xarray) ArviZ is backend agnostic and therefore does not sample directly. In order to take advantage of algorithms that require refitting models several times, ArviZ uses `SamplingWrappers` to convert the API of the sampling backend to a common set of functions. Hence, functi...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@doc@source@user_guide@numpyro_refitting_xr_lik.ipynb@.PATH_END.py
{ "filename": "test_pathos.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/tests/io/test_pathos.py", "type": "Python" }
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve import search_lightcurve from lightkurve.io.pathos import read_pathos_lightcurve from lightkurve.io.detect import detect_filetype @pytest.mark.remote_data def test_detect_pathos(): """Can we...
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@tests@io@test_pathos.py@.PATH_END.py
{ "filename": "binomialObsFPRate-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_kic/.ipynb_checkpoints/binomialObsFPRate-checkpoint.ipynb", "type": "Jupyter Notebook" }
Reliability is given by $$ R = \frac{N_{\mathrm{truePC}}}{N_{\mathrm{obsPC}}} = 1 - \frac{N_{\mathrm{obsFP}}}{N_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) = 1 - \frac{F_{\mathrm{obsFP}}}{F_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) $$ where $E = N_{\mathrm{obsFP}}/N_{\mathrm{trueFP}}$ is the false positiv...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_kic@.ipynb_checkpoints@binomialObsFPRate-checkpoint.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "jw-lin/lightbeam", "repo_path": "lightbeam_extracted/lightbeam-master/README.md", "type": "Markdown" }
# lightbeam Simulate light through weakly guiding waveguides using the finite-differences beam propagation method on an adaptive mesh. ## installation The master branch includes the raw files of the beam propagation code. For a packaged version of the code, you can use the "package" branch. Just run <pip install git+h...
jw-linREPO_NAMElightbeamPATH_START.@lightbeam_extracted@lightbeam-master@README.md@.PATH_END.py
{ "filename": "magnetopause2d.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/scripts/magnetopause2d.py", "type": "Python" }
''' Finds the magnetopause position by tracing steamines of the plasma flow for two-dimensional Vlasiator runs. Needs the yt package. ''' import matplotlib.pylab as plt import numpy as np import pytools as pt import plot_colormap import yt from yt.visualization.api import Streamlines def interpolate(streamline, x_...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@scripts@magnetopause2d.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattersmith", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@_uirevision.py@.PATH_END.py
{ "filename": "test_io.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/test/test_io.py", "type": "Python" }
import contextlib import os import sys import tempfile import pytest import torch import torchvision.io as io from common_utils import assert_equal, cpu_and_cuda from torchvision import get_video_backend try: import av # Do a version test too io.video._check_av_available() except ImportError: av = N...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@test@test_io.py@.PATH_END.py
{ "filename": "pywrap_tfe_monitoring_reader.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/pywrap_tfe_monitoring_reader.py", "type": "Python" }
# Copyright 2023 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@pywrap_tfe_monitoring_reader.py@.PATH_END.py
{ "filename": "test_dask_serialization.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/tests/dask/test_dask_serialization.py", "type": "Python" }
# Copyright (c) 2019-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@tests@dask@test_dask_serialization.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/dace/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Dace API -------- :author: Julien Burnier (julien.burnier@unige.ch) """ from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.dace`. """ server = _config.ConfigItem(...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@dace@__init__.py@.PATH_END.py
{ "filename": "Feature_request.md", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/.github/ISSUE_TEMPLATE/Feature_request.md", "type": "Markdown" }
--- name: 'Feature Request' about: 'Suggest a new idea or improvement for JAX' labels: 'enhancement' --- Please: - [ ] Check for duplicate requests. - [ ] Describe your goal, and if possible provide a code snippet with a motivating example.
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@.github@ISSUE_TEMPLATE@Feature_request.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/rangeslider/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._yaxis import YaxisValidator from ._visible import VisibleValidator from ._thickness import ThicknessValidator from ._range import RangeValidator from ._borderwidth import BorderwidthValidator from ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@rangeslider@__init__.py@.PATH_END.py
{ "filename": "training_routines.py", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/code/training_routines.py", "type": "Python" }
import tensorflow as tf from tensorflow.keras import initializers from sklearn.preprocessing import StandardScaler from draw_new_injections import draw_new_injections import numpy as np from tqdm import tqdm import sys tf.keras.backend.set_floatx('float64') class NegativeLogLikelihood(tf.keras.losses.Loss): """ ...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@code@training_routines.py@.PATH_END.py
{ "filename": "write_tests.ipynb", "repo_name": "dvallesp/vortex-p", "repo_path": "vortex-p_extracted/vortex-p-master/test/write_tests.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np from matplotlib import pyplot as plt, cm import os, sys sys.path.append('/scratch/valles/masclet_framework') import masclet_framework as masclet import g3read as g3 from cython_fortran_file import FortranFile as FF import pickle, json from sklearn.neighbors import NearestNeighbors import f...
dvallespREPO_NAMEvortex-pPATH_START.@vortex-p_extracted@vortex-p-master@test@write_tests.ipynb@.PATH_END.py
{ "filename": "_base.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/sparse/_base.py", "type": "Python" }
"""Base class for sparse matrices""" import numpy as np from ._sputils import (asmatrix, check_reshape_kwargs, check_shape, get_sum_dtype, isdense, isscalarlike, matrix, validateaxis, getdtype) from ._matrix import spmatrix __all__ = ['isspmatrix', 'issparse', 'sparray'...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@_base.py@.PATH_END.py
{ "filename": "contour3d_2.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/mplot3d/contour3d_2.py", "type": "Python" }
""" =========================================================== Plot contour (level) curves in 3D using the extend3d option =========================================================== This modification of the :doc:`contour3d` example uses ``extend3d=True`` to extend the curves vertically into 'ribbons'. """ import ma...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@mplot3d@contour3d_2.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/apps/object/utils.py", "type": "Python" }
import pandas as pd from astropy.time import Time import plotly.graph_objects as go import math, json import numpy as np bands = ['u', 'g', 'r', 'i', 'z', 'y'] bandColors = ["#9900cc", "#3366ff", "#33cc33", "#ffcc00", "#ff0000", "#cc6600"] def object_difference_lightcurve( objectData ): """*Generate the Plot...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@apps@object@utils.py@.PATH_END.py
{ "filename": "kep_wavelets.py", "repo_name": "christopherburke/TESS-ExoClass", "repo_path": "TESS-ExoClass_extracted/TESS-ExoClass-master/code/kep_wavelets.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is a port of the Kepler wavelet search TPS machinary from matlab to python. The Kepler pipeline is open source and available here https://github.com/nasa/kepler-pipeline The original matlab code that this code is a modification of was released under NASA Open So...
christopherburkeREPO_NAMETESS-ExoClassPATH_START.@TESS-ExoClass_extracted@TESS-ExoClass-master@code@kep_wavelets.py@.PATH_END.py
{ "filename": "xla.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/interpreters/xla.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@jax@interpreters@xla.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/frame/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._traces import TracesValidator from ._name import NameValidator from ._layout import LayoutValidator from ._group import GroupValidator from ._data import DataValidator from ._baseframe import BaseframeValidator else: from _plotly_utils.importe...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@frame@__init__.py@.PATH_END.py
{ "filename": "feffit_basic_znse.ipynb", "repo_name": "xraypy/xraylarch", "repo_path": "xraylarch_extracted/xraylarch-master/examples/Jupyter/feffit_basic_znse.ipynb", "type": "Jupyter Notebook" }
This example shows a basic example of "Feff fitting" with larch. We start with some import statements, then 1. read in data for ZnSe, Zn K edge 2. do background subtraction and plot $\chi(k)$ 3. set the Fourier transform ranges 4. define a Group of Parameters for the fit 5. read in a Feff Path for Zn...
xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@examples@Jupyter@feffit_basic_znse.ipynb@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/insidetextfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.insidetextfont", **kwargs): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@insidetextfont@_size.py@.PATH_END.py
{ "filename": "test_framedata_io.py", "repo_name": "juliotux/astropop", "repo_path": "astropop_extracted/astropop-main/tests/test_framedata_io.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # flake8: noqa: F403, F405 import pytest import numpy as np from astropy.io import fits from astropy.wcs import WCS from astropop.framedata import FrameData from astropop.testing import * from .test_framedata import create_framedata class TestFrameData2...
juliotuxREPO_NAMEastropopPATH_START.@astropop_extracted@astropop-main@tests@test_framedata_io.py@.PATH_END.py
{ "filename": "clik_lensing_flip_ren1.py", "repo_name": "CosmoLike/cocoa", "repo_path": "cocoa_extracted/cocoa-main/Cocoa/external_modules/code/planck/code/spt_clik/src/python/tools/clik_lensing_flip_ren1.py", "type": "Python" }
#! PYTHONEXE import sys sys.path = ["REPLACEPATH"]+sys.path import numpy as nm import clik.parobject as php import clik import clik.hpy as hpy import os.path as osp def main(argv): lkl = clik.clik_lensing(argv[1]) del(lkl) if hpy.cldf.is_cldf(argv[1]): hpy.copyfile(argv[1],argv[2]) root = hpy.File(argv...
CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@Cocoa@external_modules@code@planck@code@spt_clik@src@python@tools@clik_lensing_flip_ren1.py@.PATH_END.py
{ "filename": "install.py", "repo_name": "rabrahm/zaspe", "repo_path": "zaspe_extracted/zaspe-master/install.py", "type": "Python" }
import sys import os import shutil import subprocess import glob def getDirs(foldername): return os.walk(foldername).next()[1] def spaced(input,space): fixed = False i = 0 input = space+input while(not fixed): if(input[i:i+1] == '\n'): input = input[0:i+1]+space+input[i+1:] ...
rabrahmREPO_NAMEzaspePATH_START.@zaspe_extracted@zaspe-master@install.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "swagnercarena/ovejero", "repo_path": "ovejero_extracted/ovejero-master/test/test_data/__init__.py", "type": "Python" }
__author__ = 'Sebastian Wagner-Carena' __email__ = 'sebaswagner@outlook.com' __version__ = '1.0.0'
swagnercarenaREPO_NAMEovejeroPATH_START.@ovejero_extracted@ovejero-master@test@test_data@__init__.py@.PATH_END.py
{ "filename": "nddata.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/nddata/nddata.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the base NDData class. from copy import deepcopy import numpy as np from astropy import log from astropy.units import Quantity, Unit from astropy.utils.compat.optional_deps import HAS_DASK from astropy.utils.masked import Maske...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@nddata@nddata.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/api/datasets/reuters/__init__.py", "type": "Python" }
"""DO NOT EDIT. This file was autogenerated. Do not edit it by hand, since your modifications would be overwritten. """ from keras.src.datasets.reuters import get_label_names from keras.src.datasets.reuters import get_word_index from keras.src.datasets.reuters import load_data
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@datasets@reuters@__init__.py@.PATH_END.py
{ "filename": "positional_embeddings_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/examples/gemma/positional_embeddings_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 writ...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@gemma@positional_embeddings_test.py@.PATH_END.py
{ "filename": "lightcurve.py", "repo_name": "guillochon/MOSFiT", "repo_path": "MOSFiT_extracted/MOSFiT-master/mosfit/modules/outputs/lightcurve.py", "type": "Python" }
"""Definitions for the `LightCurve` class.""" from collections import OrderedDict import numpy as np from mosfit.modules.outputs.output import Output # Important: Only define one ``Module`` class per file. class LightCurve(Output): """Output a light curve to disk.""" _lc_keys = [ 'magnitudes', 'e...
guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@mosfit@modules@outputs@lightcurve.py@.PATH_END.py
{ "filename": "setup_outdir.py", "repo_name": "icecube/TauRunner", "repo_path": "TauRunner_extracted/TauRunner-master/taurunner/utils/setup_outdir.py", "type": "Python" }
import os, json from datetime import date def make_dirname(savedir, i): today = date.today() TODAYSTR = today.strftime("%Y%m%d") stri = ('000000'+str(i))[-6:] dir_name = '%s/%s_%s' % (savedir, TODAYSTR, stri) return dir_name def make_outdir(savedir): i = 0 proposed_dir = ...
icecubeREPO_NAMETauRunnerPATH_START.@TauRunner_extracted@TauRunner-master@taurunner@utils@setup_outdir.py@.PATH_END.py
{ "filename": "test_power.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/tests/test_power.py", "type": "Python" }
import numpy as np import pytest import pyccl as ccl COSMO = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96, transfer_function='bbks', matter_power_spectrum='halofit') @pytest.mark.parametrize('k', [ 1, 1.0, [0.3, 0.5, 10], np.array([0.3, 0.5, 10])]) def test_linear...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@tests@test_power.py@.PATH_END.py
{ "filename": "array_like.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/typing/tests/data/pass/array_like.py", "type": "Python" }
from __future__ import annotations from typing import Any import numpy as np from numpy._typing import ArrayLike, _SupportsArray x1: ArrayLike = True x2: ArrayLike = 5 x3: ArrayLike = 1.0 x4: ArrayLike = 1 + 1j x5: ArrayLike = np.int8(1) x6: ArrayLike = np.float64(1) x7: ArrayLike = np.complex128(1) x8: ArrayLike = ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@typing@tests@data@pass@array_like.py@.PATH_END.py
{ "filename": "plot_fits.py", "repo_name": "JortBox/Halo-FDCA", "repo_path": "Halo-FDCA_extracted/Halo-FDCA-master/halo_fdca/plot_fits.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Author: J.M. Boxelaar ''' import numpy as np import astropy.units as u import corner import matplotlib.pyplot as plt import matplotlib.colors as mplc from matplotlib.ticker import ScalarFormatter from . import fdca_utils as utils Jydeg2 = u.Jy/(u.deg*u.deg) mJy...
JortBoxREPO_NAMEHalo-FDCAPATH_START.@Halo-FDCA_extracted@Halo-FDCA-master@halo_fdca@plot_fits.py@.PATH_END.py
{ "filename": "_gcutils.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/_lib/_gcutils.py", "type": "Python" }
""" Module for testing automatic garbage collection of objects .. autosummary:: :toctree: generated/ set_gc_state - enable or disable garbage collection gc_state - context manager for given state of garbage collector assert_deallocated - context manager to check for circular references on object """ impo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@_lib@_gcutils.py@.PATH_END.py
{ "filename": "summary_plots.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/run_comparison/summary_plots.py", "type": "Python" }
"""Summary metric plotting functions. """ __all__ = ( "normalize_metric_summaries", "plot_run_metric", "plot_run_metric_mesh", "plot_run_metric_uncert", "find_family_lines", ) # imports import warnings import colorcet import cycler import matplotlib.pyplot as plt import numpy as np import pandas ...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@run_comparison@summary_plots.py@.PATH_END.py
{ "filename": "test_nnls.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/optimize/tests/test_nnls.py", "type": "Python" }
import numpy as np from numpy.testing import assert_allclose from pytest import raises as assert_raises from scipy.optimize import nnls class TestNNLS: def setup_method(self): self.rng = np.random.default_rng(1685225766635251) def test_nnls(self): a = np.arange(25.0).reshape(-1, 5) x ...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@optimize@tests@test_nnls.py@.PATH_END.py
{ "filename": "sample.py", "repo_name": "sherpa/sherpa", "repo_path": "sherpa_extracted/sherpa-main/sherpa/sim/sample.py", "type": "Python" }
# # Copyright (C) 2011, 2015, 2016, 2019, 2020, 2021, 2023 # Smithsonian Astrophysical Observatory # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # ...
sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@sim@sample.py@.PATH_END.py
{ "filename": "do_25.py", "repo_name": "robbassett/TAOIST_MC", "repo_path": "TAOIST_MC_extracted/TAOIST_MC-master/do_25.py", "type": "Python" }
import numpy as np from matplotlib import pyplot as plt from astropy.cosmology import WMAP9 as cosmo from scipy import integrate as integ import warnings import TAOIST_MC as tao # THIS CODE CREATES 25 SIMULATED IGM_tau CURVES # AT z=3.05 BASED ON APPENDIX B OF STEIDEL ET AL. 2018. # AS WRITTEN, USES IGM+CGM MODEL, IG...
robbassettREPO_NAMETAOIST_MCPATH_START.@TAOIST_MC_extracted@TAOIST_MC-master@do_25.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "einsteinpy/einsteinpy", "repo_path": "einsteinpy_extracted/einsteinpy-main/src/einsteinpy/utils/__init__.py", "type": "Python" }
from .dual import DualNumber, _deriv, _diff_g, _jacobian_g from .exceptions import BaseError, CoordinateError from .scalar_factor import scalar_factor, scalar_factor_derivative __all__ = ["BaseError", "CoordinateError", "DualNumber"]
einsteinpyREPO_NAMEeinsteinpyPATH_START.@einsteinpy_extracted@einsteinpy-main@src@einsteinpy@utils@__init__.py@.PATH_END.py
{ "filename": "ps_cal.py", "repo_name": "TianlaiProject/tlpipe", "repo_path": "tlpipe_extracted/tlpipe-master/tlpipe/timestream/ps_cal.py", "type": "Python" }
"""Calibration using a strong point source. Inheritance diagram ------------------- .. inheritance-diagram:: PsCal :parts: 2 """ import re import itertools import time import numpy as np from scipy import linalg as la import ephem import h5py import aipy as a import timestream_task from tlpipe.container.timestre...
TianlaiProjectREPO_NAMEtlpipePATH_START.@tlpipe_extracted@tlpipe-master@tlpipe@timestream@ps_cal.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/outsidetextfont/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="pie.outsidetextfont", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@outsidetextfont@_sizesrc.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattermap/_legendgrouptitle.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.legendgrouptitle" _valid_props = {"font", "tex...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattermap@_legendgrouptitle.py@.PATH_END.py
{ "filename": "delta.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/distributions/delta.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import numbers import torch from pyro.distributions.torch_distribution import TorchDistribution from pyro.distributions.util import sum_rightmost from . import constraints class Delta(TorchDistribution): """ Degenerate...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@distributions@delta.py@.PATH_END.py
{ "filename": "test_export_frb.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/visualization/tests/test_export_frb.py", "type": "Python" }
import numpy as np from numpy.testing import assert_equal from yt.testing import assert_allclose_units, fake_random_ds def setup_module(): """Test specific setup.""" from yt.config import ytcfg ytcfg["yt", "internals", "within_testing"] = True def test_export_frb(): test_ds = fake_random_ds(128) ...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@tests@test_export_frb.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/colorbar/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): super(StyleValidator, self).__init__( plotly_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@colorbar@title@font@_style.py@.PATH_END.py
{ "filename": "plot_threshold_passband_comparison.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/examples/cr_efficiency_analysis/plot_threshold_passband_comparison.py", "type": "Python" }
import numpy as np import json import os import matplotlib.pyplot as plt from NuRadioReco.utilities import units, io_utilities import argparse '''This script plots the results from the analysis for different passbands. It makes only sense if you want to compare different trigger settings such as passband which are sto...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@examples@cr_efficiency_analysis@plot_threshold_passband_comparison.py@.PATH_END.py
{ "filename": "hydro.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/interface/hydro.py", "type": "Python" }
""" Hydrodynamics Interface Defintion """ from amuse.support.interface import InCodeComponentImplementation from amuse.units import nbody_system from amuse.units import generic_unit_converter from amuse.community.interface import common from amuse.rfi.core import legacy_function from amuse.rfi.core import LegacyFunct...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@interface@hydro.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/testing/tests/test_utils.py", "type": "Python" }
import warnings import sys import os import itertools import pytest import weakref import re import numpy as np import numpy._core._multiarray_umath as ncu from numpy.testing import ( assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_array_less, build_err_msg, assert_...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@testing@tests@test_utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/estimators/tests/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@estimators@tests@__init__.py@.PATH_END.py
{ "filename": "gaia_dr3.py", "repo_name": "snad-space/ztf-viewer", "repo_path": "ztf-viewer_extracted/ztf-viewer-master/ztf_viewer/catalogs/conesearch/gaia_dr3.py", "type": "Python" }
import logging import os import random from string import ascii_lowercase from tempfile import TemporaryDirectory import numpy as np from astropy.time import Time, TimeDelta from astroquery.gaia import GaiaClass from requests.exceptions import RequestException from ztf_viewer.catalogs.conesearch._base import ( Va...
snad-spaceREPO_NAMEztf-viewerPATH_START.@ztf-viewer_extracted@ztf-viewer-master@ztf_viewer@catalogs@conesearch@gaia_dr3.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermapbox.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@hoverlabel@font@_sizesrc.py@.PATH_END.py
{ "filename": "datatype.py", "repo_name": "h5py/h5py", "repo_path": "h5py_extracted/h5py-master/h5py/_hl/datatype.py", "type": "Python" }
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Implements high-level access to committed da...
h5pyREPO_NAMEh5pyPATH_START.@h5py_extracted@h5py-master@h5py@_hl@datatype.py@.PATH_END.py
{ "filename": "split_traintest.py", "repo_name": "omboersma/deepglow", "repo_path": "deepglow_extracted/deepglow-main/paper/split_traintest.py", "type": "Python" }
import pandas as pd import numpy as np import sys filename = sys.argv[1] out = sys.argv[2] print("reading in data") dataset = pd.read_csv(filename) print("dataset size: " + str(len(dataset))) allinf = np.where(np.all(dataset.iloc[:, 8:] == -np.inf, axis=1))[0] dataset = dataset.drop(allinf) print("dataset size: " ...
omboersmaREPO_NAMEdeepglowPATH_START.@deepglow_extracted@deepglow-main@paper@split_traintest.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/fft/__init__.py", "type": "Python" }
from __future__ import division, absolute_import, print_function # To get sub-modules from .info import __doc__ from .fftpack import * from .helper import * from numpy.testing import _numpy_tester test = _numpy_tester().test bench = _numpy_tester().bench
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@fft@__init__.py@.PATH_END.py
{ "filename": "join_cell_assign_files.py", "repo_name": "AndresaCampos/sompz_y6", "repo_path": "sompz_y6_extracted/sompz_y6-main/utils/join_cell_assign_files.py", "type": "Python" }
import h5py import pickle import numpy as np def join_cell_assign_files(path_cats, som_type, shear, run_name): cells = [] for item in range(256): for subsample in range(10): if som_type == 'wide': cells_subsample = np.load( f'{path_cats}/{som_type}_{shea...
AndresaCamposREPO_NAMEsompz_y6PATH_START.@sompz_y6_extracted@sompz_y6-main@utils@join_cell_assign_files.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/poutine/conftest.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import pytest def pytest_collection_modifyitems(items): for item in items: if item.nodeid.startswith("tests/poutine"): if "stage" not in item.keywords: item.add_marker(pytest.mark.stage("un...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@poutine@conftest.py@.PATH_END.py
{ "filename": "strategies.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/hypothesis/py2/hypothesis/strategies/_internal/strategies.py", "type": "Python" }
# coding=utf-8 # # This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Most of this work is copyright (C) 2013-2019 David R. MacIver # (david@drmaciver.com), but it contains contributions by others. See # CONTRIBUTING.rst for a full list of people who may hold cop...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@hypothesis@py2@hypothesis@strategies@_internal@strategies.py@.PATH_END.py
{ "filename": "toolkit.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/agent_toolkits/clickup/toolkit.py", "type": "Python" }
from typing import Dict, List from langchain_core.tools import BaseTool from langchain_core.tools.base import BaseToolkit from langchain_community.tools.clickup.prompt import ( CLICKUP_FOLDER_CREATE_PROMPT, CLICKUP_GET_ALL_TEAMS_PROMPT, CLICKUP_GET_FOLDERS_PROMPT, CLICKUP_GET_LIST_PROMPT, CLICKUP_...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@agent_toolkits@clickup@toolkit.py@.PATH_END.py
{ "filename": "Tutorial 3 - BOSS Pk Multipoles-checkpoint.ipynb", "repo_name": "oliverphilcox/PolyBin3D", "repo_path": "PolyBin3D_extracted/PolyBin3D-main/.ipynb_checkpoints/Tutorial 3 - BOSS Pk Multipoles-checkpoint.ipynb", "type": "Jupyter Notebook" }
# Tutorial 3: Computing Unwindowed Power Spectra from BOSS DR12 In this tutorial we will use PolyBin3D to estimate the power spectra of a section of the BOSS DR12 dataset. We will compute both the standard window-convolved and new unwindowed spectra, and discuss various choices of weighting schemes. Much of the data-h...
oliverphilcoxREPO_NAMEPolyBin3DPATH_START.@PolyBin3D_extracted@PolyBin3D-main@.ipynb_checkpoints@Tutorial 3 - BOSS Pk Multipoles-checkpoint.ipynb@.PATH_END.py
{ "filename": "_hoverlabel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/_hoverlabel.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="table", **kwargs): super(HoverlabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@_hoverlabel.py@.PATH_END.py
{ "filename": "_yref.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_yref.py", "type": "Python" }
import _plotly_utils.basevalidators class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="histogram.marker.colorbar", **kwargs ): super(YrefValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@colorbar@_yref.py@.PATH_END.py
{ "filename": "test_variational.py", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/rebound/tests/test_variational.py", "type": "Python" }
import rebound import unittest import math import sys class TestVariationalRescale(unittest.TestCase): def test_var_rescale_ias15(self): sim = rebound.Simulation() sim.integrator = "ias15" sim.add(m=1.) # Star sim.add(m=0.000954, a=5.204, M=0.600, omega=0.257, e=0.048) sim.a...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@rebound@tests@test_variational.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/pixell", "repo_path": "pixell_extracted/pixell-master/scripts/generate_tests/__init__.py", "type": "Python" }
simonsobsREPO_NAMEpixellPATH_START.@pixell_extracted@pixell-master@scripts@generate_tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/numpy_ops/__init__.py", "type": "Python" }
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@numpy_ops@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/font/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._size import SizeValidator from ._family import FamilyValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._siz...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@font@__init__.py@.PATH_END.py
{ "filename": "_insidetextanchor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/_insidetextanchor.py", "type": "Python" }
import _plotly_utils.basevalidators class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): super(InsidetextanchorValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@_insidetextanchor.py@.PATH_END.py
{ "filename": "pairme.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/edge/webservice/pairme.py", "type": "Python" }
############################################################################## # # Crossbar.io # Copyright (C) Crossbar.io Technologies GmbH. All rights reserved. # ############################################################################## import os from copy import deepcopy from pprint ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@edge@webservice@pairme.py@.PATH_END.py
{ "filename": "zeropoints.py", "repo_name": "Schwarzam/splusdata", "repo_path": "splusdata_extracted/splusdata-master/splusdata/features/zeropoints.py", "type": "Python" }
import pandas as pd source_cat = "https://splus.cloud/files/documentation/iDR4/tabelas/iDR4_zero-points.csv" zps = pd.read_csv(source_cat) def get_zeropoint(conn, ra, dec, band): """ Retrieve the zero point for a given sky position and band. Parameters ---------- conn : object Connection ...
SchwarzamREPO_NAMEsplusdataPATH_START.@splusdata_extracted@splusdata-master@splusdata@features@zeropoints.py@.PATH_END.py
{ "filename": "_outlinecolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="histogram2dcontour.colorbar", **kwargs, ): super(OutlinecolorValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@_outlinecolor.py@.PATH_END.py
{ "filename": "combine_frames.py", "repo_name": "AWehrhahn/PyReduce", "repo_path": "PyReduce_extracted/PyReduce-master/pyreduce/combine_frames.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Combine several fits files into one master frame Used to create master bias and master flat """ import datetime import logging import os import astropy.io.fits as fits import matplotlib.pyplot as plt import numpy as np from dateutil import parser from scipy.ndimage.filters import median_f...
AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@pyreduce@combine_frames.py@.PATH_END.py
{ "filename": "_util.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/transforms/_util.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import numpy as np from ...ext.decorator import decorator from ...util import logger def arg_to_array(func): """ Decorator to conver...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@transforms@_util.py@.PATH_END.py
{ "filename": "FortesFit_emcee.py", "repo_name": "vikalibrate/FortesFit", "repo_path": "FortesFit_extracted/FortesFit-master/fortesfit/FortesFit_emcee.py", "type": "Python" }
import sys import pickle import numpy as np import emcee from fortesfit import FortesFit_Settings from fortesfit import FortesFit_Filters from fortesfit import FortesFit_ModelManagement from fortesfit import FortesFit_Fitting """ A module with functions that connect the common fitting functionality of FortesFit wit...
vikalibrateREPO_NAMEFortesFitPATH_START.@FortesFit_extracted@FortesFit-master@fortesfit@FortesFit_emcee.py@.PATH_END.py
{ "filename": "test_varpsf_coadd.py", "repo_name": "quatrope/ProperImage", "repo_path": "ProperImage_extracted/ProperImage-master/drafts/test_varpsf_coadd.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # test_recoverstats.py # # Copyright 2016 Bruno S <bruno.sanchez.63@gmail.com> # import os import shlex import subprocess import sys sys.path.insert(0, os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from astropy.time import Time from astrop...
quatropeREPO_NAMEProperImagePATH_START.@ProperImage_extracted@ProperImage-master@drafts@test_varpsf_coadd.py@.PATH_END.py
{ "filename": "_interpolation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/ndimage/_interpolation.py", "type": "Python" }
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@ndimage@_interpolation.py@.PATH_END.py
{ "filename": "Sample.py", "repo_name": "xpsi-group/xpsi", "repo_path": "xpsi_extracted/xpsi-main/xpsi/Sample.py", "type": "Python" }
__all__ = ["nested", "ensemble", "ultranested"] from xpsi.global_imports import * from xpsi import _comm, _rank, _size from xpsi.utils import make_verbose from xpsi import Likelihood from xpsi.Posterior import Posterior try: from xpsi.EnsembleSampler import EnsembleSampler except ImportError: print("""Check ...
xpsi-groupREPO_NAMExpsiPATH_START.@xpsi_extracted@xpsi-main@xpsi@Sample.py@.PATH_END.py
{ "filename": "FourierFT.ipynb", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/examples/sequence_classification/FourierFT.ipynb", "type": "Jupyter Notebook" }
# Using FourierFT for sequence classification In this example, we fine-tune Roberta (base) on a sequence classification task using FourierFT. ## Imports ```python # To run this notebook, please run `pip install evaluate` to install additional dependencies not covered by PEFT. import torch from torch.optim import A...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@examples@sequence_classification@FourierFT.ipynb@.PATH_END.py
{ "filename": "hierarchy.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/cluster/hierarchy.py", "type": "Python" }
""" Hierarchical clustering (:mod:`scipy.cluster.hierarchy`) ======================================================== .. currentmodule:: scipy.cluster.hierarchy These functions cut hierarchical clusterings into flat clusterings or find the roots of the forest formed by a cut by providing the flat cluster ids of each ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@cluster@hierarchy.py@.PATH_END.py
{ "filename": "pairwise.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py3/sklearn/metrics/pairwise.py", "type": "Python" }
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck # Joel Nothman <...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py3@sklearn@metrics@pairwise.py@.PATH_END.py
{ "filename": "tight_layout_guide.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/users_explain/axes/tight_layout_guide.py", "type": "Python" }
""" .. redirect-from:: /tutorial/intermediate/tight_layout_guide .. _tight_layout_guide: ================== Tight layout guide ================== How to use tight-layout to fit plots within your figure cleanly. *tight_layout* automatically adjusts subplot params so that the subplot(s) fits in to the figure area. Th...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@users_explain@axes@tight_layout_guide.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/sunburst/marker/pattern/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._soliditysrc import SoliditysrcValidator from ._solidity import SolidityValidator from ._sizesrc import SizesrcValidator from ._size import SizeValidator from ._shapesrc import ShapesrcValidator fro...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@marker@pattern@__init__.py@.PATH_END.py
{ "filename": "dylib.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/ctypes/macholib/dylib.py", "type": "Python" }
""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ A dylib name can take one of the ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@ctypes@macholib@dylib.py@.PATH_END.py
{ "filename": "_meta.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/image/_meta.py", "type": "Python" }
import _plotly_utils.basevalidators class MetaValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="meta", parent_name="image", **kwargs): super(MetaValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok=kwa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@image@_meta.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ExObsSim/ExoRad2-public", "repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/exorad/utils/__init__.py", "type": "Python" }
ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@exorad@utils@__init__.py@.PATH_END.py
{ "filename": "trainer.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/reference/engine/trainer.md", "type": "Markdown" }
--- description: Learn how to use BaseTrainer in Ultralytics YOLO for efficient model training. Comprehensive guide for configurations, datasets, and optimization. keywords: Ultralytics, YOLO, BaseTrainer, model training, configuration, datasets, optimization, machine learning --- # Reference for `ultralytics/engine/t...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@reference@engine@trainer.md@.PATH_END.py
{ "filename": "heritage.md", "repo_name": "LSSTDESC/surveycodex", "repo_path": "surveycodex_extracted/surveycodex-main/docs/guides/heritage.md", "type": "Markdown" }
# Extend surveycodex objects ## Frozen dataclasses The goal of surveycodex is to provide a **sourced reference** for survey parameters. Therefore the `Survey` and `Filter` objects have been implemented as frozen dataclasses. This means that trying to modify the attributes of an instance of a `Survey` or a `Filter` wi...
LSSTDESCREPO_NAMEsurveycodexPATH_START.@surveycodex_extracted@surveycodex-main@docs@guides@heritage.md@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@marker@colorbar@tickfont@_weight.py@.PATH_END.py
{ "filename": "start_helm_cluster.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-engine/dlg/deploy/start_helm_cluster.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2022 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-engine@dlg@deploy@start_helm_cluster.py@.PATH_END.py