metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "evidence.py", "repo_name": "mj-will/nessai", "repo_path": "nessai_extracted/nessai-main/src/nessai/evidence.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Functions related to computing the evidence. """ import logging from abc import ABC, abstractmethod from typing import Optional import matplotlib.pyplot as plt import numpy as np from scipy.special import logsumexp from .plot import nessai_style logger = logging.getLogger(__name__) def...
mj-willREPO_NAMEnessaiPATH_START.@nessai_extracted@nessai-main@src@nessai@evidence.py@.PATH_END.py
{ "filename": "noise_simulations.py", "repo_name": "astro-informatics/DarkMappy", "repo_path": "DarkMappy_extracted/DarkMappy-main/darkmappy/noise_simulations.py", "type": "Python" }
import numpy as np import pyssht as ssht import darkmappy.forward_models as fm def simulate_shear_plane( x, sidelength, ngal=30, sigma_e=0.37, mask=None, supersample=1 ): """Creates a realistic simulation of shear observations from input convergence. Args: x (np.ndarray): Input convergen...
astro-informaticsREPO_NAMEDarkMappyPATH_START.@DarkMappy_extracted@DarkMappy-main@darkmappy@noise_simulations.py@.PATH_END.py
{ "filename": "test_prompt_tokenizers.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/tests/test_prompt_tokenizers.py", "type": "Python" }
"""Module for testing prompt tokenizers.""" import json import logging import unittest from pathlib import Path from typing import Optional import pytest from datasets import load_dataset from transformers import AddedToken, AutoTokenizer, LlamaTokenizer from axolotl.prompt_strategies.alpaca_chat import NoSystemProm...
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@tests@test_prompt_tokenizers.py@.PATH_END.py
{ "filename": "fullstingray.py", "repo_name": "vhaasteren/piccard", "repo_path": "piccard_extracted/piccard-master/piccard/fullstingray.py", "type": "Python" }
#!/usr/bin/env python # encoding: utf-8 # vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab from __future__ import division, print_function import numpy as np import math import scipy.linalg as sl, scipy.special as ss from transformations import * from choleskyext import * from choleskyext_omp import * # This fil...
vhaasterenREPO_NAMEpiccardPATH_START.@piccard_extracted@piccard-master@piccard@fullstingray.py@.PATH_END.py
{ "filename": "learning_rate_schedule.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.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@keras@optimizer_v2@learning_rate_schedule.py@.PATH_END.py
{ "filename": "transmission_grad_test.py", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/tests/integration/unittests_long/transmission/transmission_grad_test.py", "type": "Python" }
"""This example checks if the derivative of transmission spectrum is valid (not nan), see #464. """ import jax from jax import config import pandas as pd import numpy as np import jax.numpy as jnp from exojax.utils.grids import wavenumber_grid from exojax.spec.opacalc import OpaPremodit from exojax.spec.atmrt import...
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@integration@unittests_long@transmission@transmission_grad_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/hoverlabel/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import BordercolorValidator from ._bgcolorsrc import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ShaunFell/GRBoondi", "repo_path": "GRBoondi_extracted/GRBoondi-main/PostProcessing/Source/OneD/__init__.py", "type": "Python" }
from .LinePlot import *
ShaunFellREPO_NAMEGRBoondiPATH_START.@GRBoondi_extracted@GRBoondi-main@PostProcessing@Source@OneD@__init__.py@.PATH_END.py
{ "filename": "observationmode.py", "repo_name": "spacetelescope/stsynphot_refactor", "repo_path": "stsynphot_refactor_extracted/stsynphot_refactor-master/stsynphot/observationmode.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Module to handle observations based on observation modes.""" # STDLIB import re import warnings # THIRD-PARTY import numpy as np # ASTROPY from astropy import log from astropy import units as u from astropy.utils.decorators import lazyproperty from a...
spacetelescopeREPO_NAMEstsynphot_refactorPATH_START.@stsynphot_refactor_extracted@stsynphot_refactor-master@stsynphot@observationmode.py@.PATH_END.py
{ "filename": "prompt_node.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/schema/nodes/prompt_node.py", "type": "Python" }
import datetime from typing import TYPE_CHECKING, Annotated, Optional import strawberry from nextline_rdb import models as db_models if TYPE_CHECKING: from .run_node import RunNode from .trace_call_node import TraceCallNode from .trace_node import TraceNode @strawberry.type class PromptNode: _model...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@schema@nodes@prompt_node.py@.PATH_END.py
{ "filename": "README_install.md", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/README_install.md", "type": "Markdown" }
## Instalation There are many options to run Exo-Striker. One may try an Anaconda environment, install it from pip, or run directly the source code from the repository. All the methods listed below work in Linux, Windows, or MacOS if you have python and gfortran installed. ### Getting the pip version You can easil...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@README_install.md@.PATH_END.py
{ "filename": "distances.py", "repo_name": "miguelzuma/hi_class_public", "repo_path": "hi_class_public_extracted/hi_class_public-master/scripts/distances.py", "type": "Python" }
# coding: utf-8 # In[ ]: # import necessary modules # uncomment to get plots displayed in notebook #%matplotlib inline import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class # In[ ]: font = {'size' : 20, 'family':'STIXGeneral'} axislabelfontsize='large' matplotlib.rc('font...
miguelzumaREPO_NAMEhi_class_publicPATH_START.@hi_class_public_extracted@hi_class_public-master@scripts@distances.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "JamesKirk11/Tiberius", "repo_path": "Tiberius_extracted/Tiberius-main/README.md", "type": "Markdown" }
# Tiberius The Tiberius pipeline to extract time-series spectra and fit exoplanet transit light curves. There is a [readthedocs](https://tiberius.readthedocs.io/en/latest/) in development. In the meantime, please checkout the READMEs under reduction_utils (to extract stellar spectra) and fitting_utils (to fit transit...
JamesKirk11REPO_NAMETiberiusPATH_START.@Tiberius_extracted@Tiberius-main@README.md@.PATH_END.py
{ "filename": "mdi_pychecker.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/Pythonwin/pywin/framework/mdi_pychecker.py", "type": "Python" }
###################################################################### ## ## The Pychecker MDI Plug-In UserModule for Pythonwin ## ## contributed by Robert Kiendl ## ## Style is similar to (and inherited) from the SGrepMDI UserModule ## ## Usage: ## ## Start Pychecker on current file: Menu/File/New../Pychecker. ## Use ...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@Pythonwin@pywin@framework@mdi_pychecker.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "dgerosa/surrkick", "repo_path": "surrkick_extracted/surrkick-master/README.md", "type": "Markdown" }
# surrkick #### Black-hole kicks from numerical-relativity surrogate models Binary black holes radiate linear momentum in gravitational waves as they merge. Recoils imparted to the black-hole remnant can reach thousands of km/s, thus ejecting black holes from their host galaxies. We exploit recent advances in gravita...
dgerosaREPO_NAMEsurrkickPATH_START.@surrkick_extracted@surrkick-master@README.md@.PATH_END.py
{ "filename": "mcmcTemplatePriors.py", "repo_name": "ixkael/Delight", "repo_path": "Delight_extracted/Delight-master/scripts/mcmcTemplatePriors.py", "type": "Python" }
import sys from mpi4py import MPI import numpy as np from scipy.interpolate import interp1d sys.path.append('/Users/bl/Dropbox/repos/Delight/') from delight.io import * from delight.utils import * from delight.photoz_gp import PhotozGP from delight.photoz_kernels import Photoz_mean_function, Photoz_kernel import scipy...
ixkaelREPO_NAMEDelightPATH_START.@Delight_extracted@Delight-master@scripts@mcmcTemplatePriors.py@.PATH_END.py
{ "filename": "sim_tools.py", "repo_name": "ivastar/clear", "repo_path": "clear_extracted/clear-master/notebooks/forward_modeling/sim_tools.py", "type": "Python" }
__author__ = 'Vince.ec' from grizli import model from grizli import multifit import numpy as np from scipy.interpolate import interp1d from astropy.table import Table from astropy import wcs from astropy.io import fits from glob import glob import os def Extract_BeamCutout(target_id, grism_file, mosaic, seg_map, inst...
ivastarREPO_NAMEclearPATH_START.@clear_extracted@clear-master@notebooks@forward_modeling@sim_tools.py@.PATH_END.py
{ "filename": "test_distribution.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/tests/formulary/test_distribution.py", "type": "Python" }
"""Tests for functions that uses Distribution functions.""" import astropy.units as u import numpy as np import pytest import scipy.integrate as spint from astropy.constants import k_B, m_e from plasmapy.formulary.distribution import ( Maxwellian_1D, Maxwellian_speed_1D, Maxwellian_speed_2D, Maxwellia...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@tests@formulary@test_distribution.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/carpet/baxis/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@carpet@baxis@title@__init__.py@.PATH_END.py
{ "filename": "calrequestlib.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/recipe_system/cal_service/calrequestlib.py", "type": "Python" }
# # DRAGONS # # calrequestlib.py # ------------------------------------------------------------------------------ import hashlib from gempy.utils import logutils # GetterError is needed...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@recipe_system@cal_service@calrequestlib.py@.PATH_END.py
{ "filename": "read_yaml_skymodel.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/wodenpy/skymodel/read_yaml_skymodel.py", "type": "Python" }
import numpy as np import sys import os from typing import Union, Tuple from wodenpy.skymodel.woden_skymodel import Component_Type_Counter, Component_Info, CompTypes, calc_pl_norm_at_200MHz, calc_cpl_norm_at_200MHz from wodenpy.skymodel.chunk_sky_model import Skymodel_Chunk_Map from wodenpy.use_libwoden.skymodel_struc...
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@wodenpy@skymodel@read_yaml_skymodel.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Textfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.mapbox.layer.symbol" _path_str = "layout.mapbox.layer.symbol.textfont" _valid_pr...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@mapbox@layer@symbol@_textfont.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/impl/api.py", "type": "Python" }
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@autograph@impl@api.py@.PATH_END.py
{ "filename": "_tickwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatter3d.marker.colorbar", **kwargs ): super(TickwidthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@colorbar@_tickwidth.py@.PATH_END.py
{ "filename": "timelib.py", "repo_name": "skyfielders/python-skyfield", "repo_path": "python-skyfield_extracted/python-skyfield-master/skyfield/timelib.py", "type": "Python" }
# -*- coding: utf-8 -*- import datetime as dt_module import re import sys from collections import namedtuple from datetime import date, datetime, timedelta from numpy import ( array, concatenate, cos, float64, int64, isnan, isinf, linspace, nan, ndarray, nonzero, pi, rollaxis, searchsorted, sin, where, zeros_li...
skyfieldersREPO_NAMEpython-skyfieldPATH_START.@python-skyfield_extracted@python-skyfield-master@skyfield@timelib.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/scalar/timedelta/__init__.py", "type": "Python" }
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@scalar@timedelta@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/analysis_modules/star_analysis/__init__.py", "type": "Python" }
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@analysis_modules@star_analysis@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "xC-ell/growth-history", "repo_path": "growth-history_extracted/growth-history-main/xCell/xcell/tests/__init__.py", "type": "Python" }
xC-ellREPO_NAMEgrowth-historyPATH_START.@growth-history_extracted@growth-history-main@xCell@xcell@tests@__init__.py@.PATH_END.py
{ "filename": "aeff.py", "repo_name": "icecube/skyllh", "repo_path": "skyllh_extracted/skyllh-master/skyllh/analyses/i3/publicdata_ps/aeff.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np from scipy import ( integrate, interpolate, ) from skyllh.analyses.i3.publicdata_ps.utils import ( FctSpline2D, ) from skyllh.core.binning import ( get_bin_indices_from_lower_and_upper_binedges, get_bincenters_from_binedges, ) from skyllh.core.storage im...
icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@skyllh@analyses@i3@publicdata_ps@aeff.py@.PATH_END.py
{ "filename": "load_pkl.py", "repo_name": "michaelhb/superplot", "repo_path": "superplot_extracted/superplot-master/superplot/example/load_pkl.py", "type": "Python" }
""" ====================== Display a pickled plot ====================== This script demonstrates how a pickled plot file can be loaded from disk and displayed. For usage, see `python load_pkl.py --help`. """ from argparse import ArgumentParser as arg_parser from pickle import load import matplotlib.pyplot as plt d...
michaelhbREPO_NAMEsuperplotPATH_START.@superplot_extracted@superplot-master@superplot@example@load_pkl.py@.PATH_END.py
{ "filename": "analysis_test_matiasfile_18082020.py", "repo_name": "kumikokotera/GRAND_tools", "repo_path": "GRAND_tools_extracted/GRAND_tools-master/grid_shape/tools/analysis_test_matiasfile_18082020.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import os import json from grid_shape import diff_spec as diff_spec from grid_shape import grids as grids from grid_shape import utils_analysis as ua path = "/Users/benoitl/Documents/GRAND/test_matias_18082020/" plot_path = os.path.join(path, "plots") events_data_...
kumikokoteraREPO_NAMEGRAND_toolsPATH_START.@GRAND_tools_extracted@GRAND_tools-master@grid_shape@tools@analysis_test_matiasfile_18082020.py@.PATH_END.py
{ "filename": "code.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/core/magics/code.py", "type": "Python" }
"""Implementation of code management magic functions. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@core@magics@code.py@.PATH_END.py
{ "filename": "michi2_filter_flux_2sigma_no_dust_no_radio.py", "repo_name": "1054/Crab.Toolkit.michi2", "repo_path": "Crab.Toolkit.michi2_extracted/Crab.Toolkit.michi2-master/bin/michi2_filter_flux_2sigma_no_dust_no_radio.py", "type": "Python" }
#!/usr/bin/env python # import os import sys import numpy import astropy import astropy.io.ascii as asciitable from copy import copy #################################### # MAIN # #################################### if not len(sys.argv) > 2: print('Usage: michi2_filter_flux_3sigma...
1054REPO_NAMECrab.Toolkit.michi2PATH_START.@Crab.Toolkit.michi2_extracted@Crab.Toolkit.michi2-master@bin@michi2_filter_flux_2sigma_no_dust_no_radio.py@.PATH_END.py
{ "filename": "_stylesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/title/font/_stylesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="pie.title.font", **kwargs): super(StylesrcValidator, 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@pie@title@font@_stylesrc.py@.PATH_END.py
{ "filename": "_customdata.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/_customdata.py", "type": "Python" }
import _plotly_utils.basevalidators class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="streamtube", **kwargs): super(CustomdataValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@_customdata.py@.PATH_END.py
{ "filename": "surfaceSigmaProfile.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/df/surfaceSigmaProfile.py", "type": "Python" }
############################################################################### # surfaceSigmaProfile: classes that implement different surface-mass and # radial velocity dispersion profiles # # Includes the following: # surfaceSigmaProfile - top-level class that represents a surface # ...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@df@surfaceSigmaProfile.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/utilities/classes/config/config.py", "type": "Python" }
import copy import os from pprint import pprint from typing import Any, Tuple from TidalPy import extensive_checks, version from TidalPy import _output_dir as disk_loc from TidalPy.configurations import save_dict_to_toml from TidalPy.exceptions import ImproperPropertyHandling, OuterscopePropertySetError, ParameterMiss...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@utilities@classes@config@config.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "grazianoucci/game", "repo_path": "game_extracted/game-master/setup.py", "type": "Python" }
# !/usr/bin/python3 # coding: utf-8 """ Setups librarys and install dependencies """ from setuptools import setup, find_packages DESCRIPTION = \ '--------------------------------------------------------\n' + \ '--- GAME (GAlaxy Machine learning for Emission lines) --\n' + \ '------- see Uc...
grazianoucciREPO_NAMEgamePATH_START.@game_extracted@game-master@setup.py@.PATH_END.py
{ "filename": "test_camera.py", "repo_name": "panoptes/POCS", "repo_path": "POCS_extracted/POCS-main/tests/test_camera.py", "type": "Python" }
import os import time import glob from ctypes.util import find_library from contextlib import suppress import pytest import astropy.units as u from astropy.io import fits import requests from panoptes.pocs.camera.simulator.dslr import Camera as SimCamera from panoptes.pocs.camera.simulator.ccd import Camera as SimSDK...
panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@tests@test_camera.py@.PATH_END.py
{ "filename": "score_function.py", "repo_name": "oliverphilcox/ChempyMulti", "repo_path": "ChempyMulti_extracted/ChempyMulti-master/Chempy/score_function.py", "type": "Python" }
import numpy as np import os def CV_score(): """This function will compute the UNNORMALISED cross-validation abundances for each of the 22 elements, using the best parameter choice for each. This computes the likelihood contribution, and saves each separately. """ from Chempy.parameter import ModelParameters i...
oliverphilcoxREPO_NAMEChempyMultiPATH_START.@ChempyMulti_extracted@ChempyMulti-master@Chempy@score_function.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/line/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="barpolar.marker.line", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@line@_colorscale.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "astro-informatics/s2wav", "repo_path": "s2wav_extracted/s2wav-main/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
astro-informaticsREPO_NAMEs2wavPATH_START.@s2wav_extracted@s2wav-main@docs@conf.py@.PATH_END.py
{ "filename": "_showgrid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/_showgrid.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.ternary.aaxis", **kwargs ): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@_showgrid.py@.PATH_END.py
{ "filename": "HST.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/SimulationAPI/ObservationConfig/HST.py", "type": "Python" }
"""Provisional HST instrument and observational settings. See Optics and Observation Conditions spreadsheet at https://docs.google.com/spreadsheets/d/1pMUB_OOZWwXON2dd5oP8PekhCT5MBBZJO1HV7IMZg4Y/edit?usp=sharing for list of sources. """ import lenstronomy.Util.util as util __all__ = ["HST"] # F160W filter configs W...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@SimulationAPI@ObservationConfig@HST.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/ocs", "repo_path": "ocs_extracted/ocs-main/ocs/agents/registry/__init__.py", "type": "Python" }
simonsobsREPO_NAMEocsPATH_START.@ocs_extracted@ocs-main@ocs@agents@registry@__init__.py@.PATH_END.py
{ "filename": "scaling.py", "repo_name": "AMReX-Astro/wdmerger", "repo_path": "wdmerger_extracted/wdmerger-main/scaling/edison-2014-06-24/scaling.py", "type": "Python" }
import numpy as np import pylab data = np.loadtxt("scaling-48.txt") cores = data[:,0]*data[:,1] time = data[:,2] pylab.loglog(cores, time, "o-", color="r", label=r"3 levels, jumps of 2$\times$ (0 $\rightarrow$ 1) and 4$\times$ (1 $\rightarrow$ 2)") ideal = time[0]*cores[0]/cores pylab.loglog(cores, i...
AMReX-AstroREPO_NAMEwdmergerPATH_START.@wdmerger_extracted@wdmerger-main@scaling@edison-2014-06-24@scaling.py@.PATH_END.py
{ "filename": "MicImagePlugin.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/PIL/MicImagePlugin.py", "type": "Python" }
# # The Python Imaging Library. # $Id$ # # Microsoft Image Composer support for PIL # # Notes: # uses TiffImagePlugin.py to read the actual image streams # # History: # 97-01-20 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@PIL@MicImagePlugin.py@.PATH_END.py
{ "filename": "light-delay.md", "repo_name": "exoplanet-dev/exoplanet", "repo_path": "exoplanet_extracted/exoplanet-main/docs/tutorials/light-delay.md", "type": "Markdown" }
--- jupytext: text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.4 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3 --- # Light travel time delay ```{code-cell} :nbsphinx: hidden import exoplanet exoplanet.utils.docs...
exoplanet-devREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@docs@tutorials@light-delay.md@.PATH_END.py
{ "filename": "fake_rfi.py", "repo_name": "mattpitkin/tempo2", "repo_path": "tempo2_extracted/tempo2-master/python/toasim/bin/fake_rfi.py", "type": "Python" }
#!/usr/bin/python import toasim import sys,random nreal = 1 header = toasim.header() header.parfile_name=sys.argv[1] header.timfile_name=sys.argv[2] par=open(sys.argv[1]) tim=open(sys.argv[2]) header.orig_parfile=par.read() header.idealised_toas=tim.read() reals=list() i=0 while i < len(sys.argv): if sys.arg...
mattpitkinREPO_NAMEtempo2PATH_START.@tempo2_extracted@tempo2-master@python@toasim@bin@fake_rfi.py@.PATH_END.py
{ "filename": "plot_PMN_transmission_JWST_CC.py", "repo_name": "mrline/CHIMERA", "repo_path": "CHIMERA_extracted/CHIMERA-master/MASTER_ROUTINES/plot_PMN_transmission_JWST_CC.py", "type": "Python" }
import matplotlib as mpl mpl.use('TkAgg') from matplotlib.pyplot import * from matplotlib import pyplot as plt import pickle import pdb from fm import * from scipy import interp rc('font',family='serif') import pickle import corner #PLOTTING UP CORNER PLOT-------------------------------------------------------------...
mrlineREPO_NAMECHIMERAPATH_START.@CHIMERA_extracted@CHIMERA-master@MASTER_ROUTINES@plot_PMN_transmission_JWST_CC.py@.PATH_END.py
{ "filename": "watchdog_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/coordinator/watchdog_test.py", "type": "Python" }
# Copyright 2021 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 applicable ...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@distribute@coordinator@watchdog_test.py@.PATH_END.py
{ "filename": "gclm2lenmap.py", "repo_name": "carronj/lenspyx", "repo_path": "lenspyx_extracted/lenspyx-master/lenspyx/tests/gclm2lenmap.py", "type": "Python" }
"""Times the deflection angles calculation etc""" import os import numpy as np from lenspyx.tests.helper import syn_ffi_ducc_29, syn_alms from lenspyx import cachers import multiprocessing import argparse import time from lenspyx.remapping import utils_geom from lenspyx.utils import timer import ducc0 import tracemall...
carronjREPO_NAMElenspyxPATH_START.@lenspyx_extracted@lenspyx-master@lenspyx@tests@gclm2lenmap.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/projects/__init__.py", "type": "Python" }
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@projects@__init__.py@.PATH_END.py
{ "filename": "statespace_custom_models.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/examples/python/statespace_custom_models.py", "type": "Python" }
#!/usr/bin/env python # DO NOT EDIT # Autogenerated from the notebook statespace_custom_models.ipynb. # Edit the notebook and then sync the output with this file. # # flake8: noqa # DO NOT EDIT # # Custom statespace models # # The true power of the state space model is to allow the creation and # estimation of custom...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@examples@python@statespace_custom_models.py@.PATH_END.py
{ "filename": "_shadowsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/insidetextfont/_shadowsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sunburst.insidetextfont", **kwargs ): super(ShadowsrcValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@insidetextfont@_shadowsrc.py@.PATH_END.py
{ "filename": "gruppioni2020.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/input/litdata/gruppioni2020.py", "type": "Python" }
""" Gruppioni et al., 2020, A&A, 643, 8G """ import numpy as np info = \ { 'reference': 'Gruppioni et al., 2020, A&A, 643, 8G', 'data': 'Tables 2 & 3', 'label': 'Gruppioni+ (2020)', } # Really coarse redshift bins redshifts = np.array([4, 5.25]) zbins = np.array([[3.5, 4.5], [4.5, 6.]]) ULIM = -1e10 # Table 3 t...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@input@litdata@gruppioni2020.py@.PATH_END.py
{ "filename": "computeHugoniotWithPorosity.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Porosity/computeHugoniotWithPorosity.py", "type": "Python" }
#------------------------------------------------------------------------------- # Generalized version of computeHugoniot to include porosity, which can lead to # a new elastic porosity compression state in front of the shock front. # # Based on the discussion in the section on Hugoniots and Isentropes from # Herrmann,...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Porosity@computeHugoniotWithPorosity.py@.PATH_END.py
{ "filename": "uncertaintyquantification.ipynb", "repo_name": "yongsukyee/uncertain_blackholemass", "repo_path": "uncertain_blackholemass_extracted/uncertain_blackholemass-main/uncertain_blackholemass/notebooks/uncertaintyquantification.ipynb", "type": "Jupyter Notebook" }
# Uncertainty Quantification for Regression with MAPIE ```python import sys sys.path.append("..") from pathlib import Path from scipy import stats from sklearn.linear_model import QuantileRegressor from sklearn.metrics import r2_score from sklearn.model_selection import cross_val_score, train_test_split import matp...
yongsukyeeREPO_NAMEuncertain_blackholemassPATH_START.@uncertain_blackholemass_extracted@uncertain_blackholemass-main@uncertain_blackholemass@notebooks@uncertaintyquantification.ipynb@.PATH_END.py
{ "filename": "cli-regular-settings.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/cli-regular-settings.md", "type": "Markdown" }
## Input file settings ### -f, --learn-set #### Description The path to the input file{% if audience == "internal" %} or table{% endif %} that contains the training dataset. {% include [files-internal-files-internal__desc__full](../../../_includes/work_src/reusage-formats/files-internal__desc__full.md) %} **{{ cli...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@cli-regular-settings.md@.PATH_END.py
{ "filename": "test_power_mg.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/benchmarks/test_power_mg.py", "type": "Python" }
import numpy as np import pytest import pyccl as ccl from pyccl.modified_gravity import MuSigmaMG POWER_MG_TOL = 1e-2 @pytest.mark.parametrize('model', list(range(5))) def test_power_mg(model): mu_0 = [0., 0.1, -0.1, 0.1, -0.1] sigma_0 = [0., 0.1, -0.1, -0.1, 0.1] cosmo = ccl.Cosmology( Omega_c...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@benchmarks@test_power_mg.py@.PATH_END.py
{ "filename": "llamafile.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/llms/llamafile.py", "type": "Python" }
from __future__ import annotations import json from io import StringIO from typing import Any, Dict, Iterator, List, Optional import requests from langchain_core.callbacks.manager import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.outputs import GenerationChunk fro...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@llms@llamafile.py@.PATH_END.py
{ "filename": "phasecurves.py", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/pytransit/utils/phasecurves.py", "type": "Python" }
# PyTransit: fast and easy exoplanet transit modelling in Python. # Copyright (C) 2010-2020 Hannu Parviainen # # 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 Licen...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@utils@phasecurves.py@.PATH_END.py
{ "filename": "galaxy.py", "repo_name": "grand-mother/grand", "repo_path": "grand_extracted/grand-main/grand/simu/galaxy.py", "type": "Python" }
""" Simulation of galaxy emission in radio frequency """ import h5py import numpy as np import matplotlib.pyplot as plt from grand.num.signal import interpol_at_new_x from grand import grand_add_path_data def galaxy_radio_signal(f_lst, size_out, freqs_mhz, nb_ant, show_flag=False): """ This program is used...
grand-motherREPO_NAMEgrandPATH_START.@grand_extracted@grand-main@grand@simu@galaxy.py@.PATH_END.py
{ "filename": "make_cube_vdfi.py", "repo_name": "grzeimann/Remedy", "repo_path": "Remedy_extracted/Remedy-master/make_cube_vdfi.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 5 11:09:49 2024 @author: grz85 """ import numpy as np from astropy.io import fits from astrometry import Astrometry from input_utils import setup_logging import os.path as op import warnings from astropy.convolution import convolve, Moffat2DKernel...
grzeimannREPO_NAMERemedyPATH_START.@Remedy_extracted@Remedy-master@make_cube_vdfi.py@.PATH_END.py
{ "filename": "feature_request.md", "repo_name": "halomod/halomod", "repo_path": "halomod_extracted/halomod-main/.github/ISSUE_TEMPLATE/feature_request.md", "type": "Markdown" }
--- name: Feature request about: Suggest an idea for this project title: "[Feature Req]" labels: 'Type: feature' assignees: steven-murray --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the ...
halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py
{ "filename": "_namelength.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/hoverlabel/_namelength.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattersmith.hoverlabel", **kwargs ): super(NamelengthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@hoverlabel@_namelength.py@.PATH_END.py
{ "filename": "test_orphan.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/coordinates/tests/test_orphan.py", "type": "Python" }
""" Test the coordinates class that represents the plane of orbit of the Sgr dwarf galaxy. """ # Third-party import astropy.coordinates as coord import astropy.units as u from astropy.io import ascii from astropy.table import Table from astropy.utils.data import get_pkg_data_filename import numpy as np # This project...
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@coordinates@tests@test_orphan.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/python/radmc3dPy/radmc3dPy/__init__.py", "type": "Python" }
""" RADMC-3D Python module (c) Attila Juhasz, 2011-2018 """ from radmc3dPy import analyze from radmc3dPy import crd_trans from radmc3dPy import data from radmc3dPy import dustopac from radmc3dPy import image from radmc3dPy import miescat from radmc3dPy import models from radmc3dPy import molecule from radmc3dPy impo...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@python@radmc3dPy@radmc3dPy@__init__.py@.PATH_END.py
{ "filename": "collective_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/collective_ops_test.py", "type": "Python" }
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@collective_ops_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/benchmark/automated/dask/__init__.py", "type": "Python" }
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@benchmark@automated@dask@__init__.py@.PATH_END.py
{ "filename": "NeuralNet.py", "repo_name": "ja-vazquez/SimpleMC", "repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/analyzers/neuralike/NeuralNet.py", "type": "Python" }
# Temporarily unavailable. Neuralike in development. import sys import numpy as np import matplotlib.pyplot as plt class NeuralNet: def __init__(self, load=False, model_path=None, X=None, Y=None, topology=None, **kwargs): """ Read the network params Parameters ----------- ...
ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@analyzers@neuralike@NeuralNet.py@.PATH_END.py
{ "filename": "calculus.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/mpmath/py3/mpmath/matrices/calculus.py", "type": "Python" }
from ..libmp.backend import xrange # TODO: should use diagonalization-based algorithms class MatrixCalculusMethods(object): def _exp_pade(ctx, a): """ Exponential of a matrix using Pade approximants. See G. H. Golub, C. F. van Loan 'Matrix Computations', third Ed., page 572 ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@mpmath@py3@mpmath@matrices@calculus.py@.PATH_END.py
{ "filename": "test_to_timestamp.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/period/methods/test_to_timestamp.py", "type": "Python" }
from datetime import datetime import numpy as np import pytest from pandas import ( DatetimeIndex, NaT, PeriodIndex, Timedelta, Timestamp, date_range, period_range, ) import pandas._testing as tm class TestToTimestamp: def test_to_timestamp_non_contiguous(self): # GH#44100 ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@period@methods@test_to_timestamp.py@.PATH_END.py
{ "filename": "io.py", "repo_name": "MNiwano/Eclaire", "repo_path": "Eclaire_extracted/Eclaire-master/eclaire/io.py", "type": "Python" }
# -*- coding: utf-8 -*- import sys import io import copy import time import itertools import warnings from pathlib import Path if sys.version_info.major == 2: from future_builtins import zip, map from collections import Sized, Iterable, Iterator, Sequence import __builtin__ as builtins else: from ...
MNiwanoREPO_NAMEEclairePATH_START.@Eclaire_extracted@Eclaire-master@eclaire@io.py@.PATH_END.py
{ "filename": "test_io.py", "repo_name": "handley-lab/fgivenx", "repo_path": "fgivenx_extracted/fgivenx-master/fgivenx/test/test_io.py", "type": "Python" }
import numpy import pytest import os import fgivenx.io from shutil import rmtree from numpy.testing import assert_allclose def test_Cache(): """ Fully test the cache """ # Stuff for testing the functionality numpy.random.seed(0) dirname = '.test_cache' root = os.path.join(dirname, 'test_root') ...
handley-labREPO_NAMEfgivenxPATH_START.@fgivenx_extracted@fgivenx-master@fgivenx@test@test_io.py@.PATH_END.py
{ "filename": "linalg.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/jax/linalg.py", "type": "Python" }
import jax import jax.numpy as jnp import jax.scipy as jsp from keras.src.backend import config from keras.src.backend import standardize_dtype from keras.src.backend.common import dtypes from keras.src.backend.jax.core import cast from keras.src.backend.jax.core import convert_to_tensor def cholesky(a): out = j...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@jax@linalg.py@.PATH_END.py
{ "filename": "BADASS3_config_test_example.ipynb", "repo_name": "remingtonsexton/BADASS3", "repo_path": "BADASS3_extracted/BADASS3-master/example_notebooks/BADASS3_config_test_example.ipynb", "type": "Jupyter Notebook" }
## Bayesian AGN Decomposition Analysis for SDSS Spectra (BADASS) ### Single Spectrum Configuration Test Example This notebook shows how to perform configuration testing. Configuration testing is different from line testing. Line testing performs tests on individual lines, whereas configurations can be multiple diffe...
remingtonsextonREPO_NAMEBADASS3PATH_START.@BADASS3_extracted@BADASS3-master@example_notebooks@BADASS3_config_test_example.ipynb@.PATH_END.py
{ "filename": "plot_images.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/examples/run_ppdisk_fargo3d_1/plot_images.py", "type": "Python" }
import numpy as np from matplotlib import pyplot as plt from matplotlib import cm from radmc3dPy.image import * from radmc3dPy.analyze import * from radmc3dPy.natconst import * # # Make sure to have done the following beforhand: # # First compile RADMC-3D # Then run: # python problem_setup.py # radmc3d mctherm #...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@examples@run_ppdisk_fargo3d_1@plot_images.py@.PATH_END.py
{ "filename": "ModelStorage.ipynb", "repo_name": "natashabatalha/picaso", "repo_path": "picaso_extracted/picaso-master/docs/notebooks/ModelStorage.ipynb", "type": "Jupyter Notebook" }
# Model Storage: Preservation and Reuse Storing data is often tricky. You may be wondering what output to save, what output to throw away. You may also have questions surround what formats to use to store your data. PICASO's recommended model output is `xarray`. There are several `xarray` tutorials throughout the p...
natashabatalhaREPO_NAMEpicasoPATH_START.@picaso_extracted@picaso-master@docs@notebooks@ModelStorage.ipynb@.PATH_END.py
{ "filename": "sample_pureB.py", "repo_name": "LSSTDESC/NaMaster", "repo_path": "NaMaster_extracted/NaMaster-master/test/sample_pureB.py", "type": "Python" }
import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt # This script describes the computation of polarized power spectra using the # pure-E and B approach # We'll run this many simulations nsim = 10 # HEALPix map resolution nside = 256 # Let us first create a square mask: msk ...
LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@test@sample_pureB.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/evaluation/stereo/__init__.py", "type": "Python" }
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@evaluation@stereo@__init__.py@.PATH_END.py
{ "filename": "wrapper.py", "repo_name": "jordanflitter/21cmFirstCLASS", "repo_path": "21cmFirstCLASS_extracted/21cmFirstCLASS-main/src/py21cmfast/wrapper.py", "type": "Python" }
""" The main wrapper for the underlying 21cmFAST C-code. The module provides both low- and high-level wrappers, using the very low-level machinery in :mod:`~py21cmfast._utils`, and the convenient input and output structures from :mod:`~py21cmfast.inputs` and :mod:`~py21cmfast.outputs`. This module provides a number o...
jordanflitterREPO_NAME21cmFirstCLASSPATH_START.@21cmFirstCLASS_extracted@21cmFirstCLASS-main@src@py21cmfast@wrapper.py@.PATH_END.py
{ "filename": "jax_primitives_coverage.md", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/jax2tf/g3doc/jax_primitives_coverage.md", "type": "Markdown" }
# Primitives with limited JAX support *Last generated on: 2023-07-31* (YYYY-MM-DD) ## Supported data types for primitives We use a set of 7554 test harnesses to test the implementation of 133 numeric JAX primitives. We consider a JAX primitive supported for a particular data type if it is supported on at least one d...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@jax2tf@g3doc@jax_primitives_coverage.md@.PATH_END.py
{ "filename": "axepreptor.py", "repo_name": "spacetelescope/hstaxe", "repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/axesrc/axepreptor.py", "type": "Python" }
import os import logging from astropy.io import fits import stsci.imagestats as imagestats from hstaxe import config as config_util from hstaxe.axeerror import aXeError from . import axelowlev from . import configfile from . import axetasks # make sure there is a logger _log = logging.getLogger(__name__) class aX...
spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@axesrc@axepreptor.py@.PATH_END.py
{ "filename": "cori.py", "repo_name": "changhoonhahn/provabgs", "repo_path": "provabgs_extracted/provabgs-main/svda/bin/cori.py", "type": "Python" }
import os, sys import h5py import glob import numpy as np from astropy import table as aTable import svda as SVDA dir_fuji = '/global/cfs/cdirs/desi/spectro/redux/fuji/' ##################################################################################### # healpix ##############################################...
changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@svda@bin@cori.py@.PATH_END.py
{ "filename": "MPL.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/python/marvin/utils/datamodel/query/MPL.py", "type": "Python" }
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2017-09-20 13:24:13 # @Last modified by: Brian Cherinka # @Last Modified time: 2018-11-15 12:00:27 from __future__ import absolute_import, division, print_function import copy from marvin ...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@utils@datamodel@query@MPL.py@.PATH_END.py
{ "filename": "reporters.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/resolvelib/reporters.py", "type": "Python" }
class BaseReporter(object): """Delegate class to provider progress reporting for the resolver. """ def starting(self): """Called before the resolution actually starts. """ def starting_round(self, index): """Called before each round of resolution starts. The index is z...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@resolvelib@reporters.py@.PATH_END.py
{ "filename": "test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/eager/test.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@eager@test.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/third_party/xla/xla/pjrt/plugin/xla_tpu/README.md", "type": "Markdown" }
Public PJRT entry point for XLA:TPU. Please use PJRT to access XLA:TPU functionality.
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@third_party@xla@xla@pjrt@plugin@xla_tpu@README.md@.PATH_END.py
{ "filename": "checkpoint.py", "repo_name": "magic-sph/magic", "repo_path": "magic_extracted/magic-master/python/magic/checkpoint.py", "type": "Python" }
import numpy as np import os import scipy.interpolate as sint from magic.libmagic import chebgrid, fd_grid, scanDir def get_truncation(n_theta_max, nalias, minc): """ This routine determines l_max, m_max and lm_max from the values of n_theta_max, minc and nalias. :param n_theta_max: number of points a...
magic-sphREPO_NAMEmagicPATH_START.@magic_extracted@magic-master@python@magic@checkpoint.py@.PATH_END.py
{ "filename": "_showscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_showscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="histogram2dcontour", **kwargs ): super(ShowscaleValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_showscale.py@.PATH_END.py
{ "filename": "plot_linear_temporal.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/examples/models/temporal/plot_linear_temporal.py", "type": "Python" }
r""" .. _linear-temporal-model: Linear temporal model ======================= This model parametrises a linear time model. .. math:: F(t) = \alpha + \beta \cdot (t - t_{\rm{ref}}) """ # %% # Example plot # ------------ # Here is an example plot of the model: from astropy import units as u from astropy.time import...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@examples@models@temporal@plot_linear_temporal.py@.PATH_END.py
{ "filename": "test_call.py", "repo_name": "light-curve/light-curve-python", "repo_path": "light-curve-python_extracted/light-curve-python-master/light-curve/tests/light_curve_py/test_call.py", "type": "Python" }
import pytest from light_curve.light_curve_py import MaximumSlope def test_normalize(): t = [1, 4, 3, 8] m = [2, 15, 4, 3] feature = MaximumSlope() actual = feature(t, m, None, sorted=False) desired = 11.0 assert actual == desired def test_fill_zero_division(): t = [1, 1, 3, 4] feat...
light-curveREPO_NAMElight-curve-pythonPATH_START.@light-curve-python_extracted@light-curve-python-master@light-curve@tests@light_curve_py@test_call.py@.PATH_END.py
{ "filename": "video_matplotlib.py", "repo_name": "wokast/PyCactus", "repo_path": "PyCactus_extracted/PyCactus-master/SimVideo/simvideo/video_matplotlib.py", "type": "Python" }
# -*- coding: utf-8 -*- """This module contains classes that serve as base classes for movies based on matplotlib. Further it provides functions adding common commandline options, e.g. colormap, to a parser.""" from __future__ import division from builtins import zip from builtins import object import math import nu...
wokastREPO_NAMEPyCactusPATH_START.@PyCactus_extracted@PyCactus-master@SimVideo@simvideo@video_matplotlib.py@.PATH_END.py
{ "filename": "_xref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/_xref.py", "type": "Python" }
import _plotly_utils.basevalidators class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattergl.marker.colorbar", **kwargs ): super(XrefValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@_xref.py@.PATH_END.py
{ "filename": "zenodo.py", "repo_name": "showyourwork/showyourwork", "repo_path": "showyourwork_extracted/showyourwork-main/src/showyourwork/exceptions/zenodo.py", "type": "Python" }
from .base import ShowyourworkException class ZenodoException(ShowyourworkException): pass class ZenodoError(ZenodoException): def __init__(self, status="", message="An error occurred while accessing Zenodo."): super().__init__( f"Zenodo error{' ' * bool(len(str(status)))}{status}: {mess...
showyourworkREPO_NAMEshowyourworkPATH_START.@showyourwork_extracted@showyourwork-main@src@showyourwork@exceptions@zenodo.py@.PATH_END.py
{ "filename": "evaluation.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/schema/callbacks/tracers/evaluation.py", "type": "Python" }
from langchain_core.tracers.evaluation import ( EvaluatorCallbackHandler, wait_for_all_evaluators, ) __all__ = ["wait_for_all_evaluators", "EvaluatorCallbackHandler"]
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@schema@callbacks@tracers@evaluation.py@.PATH_END.py
{ "filename": "crires_plus_example.py", "repo_name": "AWehrhahn/PyReduce", "repo_path": "PyReduce_extracted/PyReduce-master/examples/crires_plus_example.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Simple usage example for PyReduce Loads a sample UVES dataset, and runs the full extraction """ import os.path import pyreduce from pyreduce import datasets from pyreduce.configuration import get_configuration_for_instrument # define parameters instrument = "Crires_plus" target = None nig...
AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@examples@crires_plus_example.py@.PATH_END.py
{ "filename": "correct_HST_ACS_image.py", "repo_name": "wfirst-cgi/emccd_detect", "repo_path": "emccd_detect_extracted/emccd_detect-master/arcticpy_folder/examples/correct_HST_ACS_image.py", "type": "Python" }
""" Correct CTI in an image from the Hubble Space Telescope (HST) Advanced Camera for Surveys (ACS) instrument. It takes a while to correct a full image, so a small patch far from the readout register (where CTI has the most effect) is used for this example. """ import arcticpy as ac import os from autoconf import co...
wfirst-cgiREPO_NAMEemccd_detectPATH_START.@emccd_detect_extracted@emccd_detect-master@arcticpy_folder@examples@correct_HST_ACS_image.py@.PATH_END.py
{ "filename": "test_hash.py", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/rebound/tests/test_hash.py", "type": "Python" }
import rebound import unittest from ctypes import c_uint32 class TestHash(unittest.TestCase): def setUp(self): self.sim = rebound.Simulation() self.sim.add(m=1.) self.sim.add(a=0.1) self.sim.add(a=1.) self.sim.add(a=5.) self.sim.particles[2].hash = "earth" se...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@rebound@tests@test_hash.py@.PATH_END.py