metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "ver.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/solver/ver.py", "type": "Python" }
# This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE import math try: import pyfits except ImportError: try: from astropy.io import fits as pyfits except ImportError: raise ImportError("Cannot import either pyfits or astropy.io.fits") f...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@solver@ver.py@.PATH_END.py
{ "filename": "test_from_records.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/constructors/test_from_records.py", "type": "Python" }
from collections.abc import Iterator from datetime import ( datetime, timezone, ) from decimal import Decimal import numpy as np import pytest from pandas._config import using_string_dtype from pandas.compat import is_platform_little_endian from pandas import ( CategoricalIndex, DataFrame, Index...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@constructors@test_from_records.py@.PATH_END.py
{ "filename": "Q_RKF45CuPyTolTestScott.ipynb", "repo_name": "peijin94/FastQSL", "repo_path": "FastQSL_extracted/FastQSL-main/demo/Q_RKF45CuPyTolTestScott.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import scipy.io as sciIO import matplotlib.pyplot as plt import cupy # CUDA interface for python %load_ext autoreload %autoreload 2 %load_ext autotime import FastQSL ``` time: 344 ms (started: 2021-12-05 09:52:59 +08:00) ```python cupy.__version__ ``` '8.6.0' t...
peijin94REPO_NAMEFastQSLPATH_START.@FastQSL_extracted@FastQSL-main@demo@Q_RKF45CuPyTolTestScott.ipynb@.PATH_END.py
{ "filename": "astropt001M.py", "repo_name": "Smith42/astroPT", "repo_path": "astroPT_extracted/astroPT-main/config/astropt001M.py", "type": "Python" }
# this file will train a ~1M parameter model # # launch as the following (e.g. in a tmux session) and wait ~5 days: # $ OMP_NUM_THREADS=32 torchrun --standalone --nproc_per_node=8 src/train.py config/astropt001M.py # # don't forget to $(mkdir logs) ! # params n_layer=4 n_head=8 n_embd=128 block_size=1024 # here we fo...
Smith42REPO_NAMEastroPTPATH_START.@astroPT_extracted@astroPT-main@config@astropt001M.py@.PATH_END.py
{ "filename": "_ticktextsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/aaxis/_ticktextsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.aaxis", **kwargs): super(TicktextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@aaxis@_ticktextsrc.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/selected/marker/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.selected.marker", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@selected@marker@_color.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "tvtk_segmentation.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/docs/source/mayavi/auto/tvtk_segmentation.py", "type": "Python" }
""" Using VTK to assemble a pipeline for segmenting MRI images. This example shows how to insert well-controled custom VTK filters in Mayavi. This example downloads an MRI scan, turns it into a 3D numpy array, applies a segmentation procedure made of VTK filters to extract the gray-matter/white-matter boundary. The s...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@docs@source@mayavi@auto@tvtk_segmentation.py@.PATH_END.py
{ "filename": "pgm.py", "repo_name": "abmantz/lrgs", "repo_path": "lrgs_extracted/lrgs-master/pgm.py", "type": "Python" }
from matplotlib import rc import daft rc("font", family="serif", size=12) rc("text", usetex=True) pgm = daft.PGM([3.6, 4.1], observed_style="inner") pgm.add_node(daft.Node("xy", r"$x,y$", 1.95, 0.4, observed=True)) pgm.add_node(daft.Node("M", r"$M$", 2.9, 0.4, fixed=True)) pgm.add_node(daft.Node("eta", r"$\eta$", 2.9...
abmantzREPO_NAMElrgsPATH_START.@lrgs_extracted@lrgs-master@pgm.py@.PATH_END.py
{ "filename": "model_metrics.py", "repo_name": "daniel-muthukrishna/astrodash", "repo_path": "astrodash_extracted/astrodash-master/astrodash/model_metrics.py", "type": "Python" }
import os import pickle import matplotlib import matplotlib.pyplot as plt import itertools import numpy as np from astrodash.multilayer_convnet import convnet_variables try: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() except ModuleNotFoundError: import tensorflow as tf def plot_confusion_...
daniel-muthukrishnaREPO_NAMEastrodashPATH_START.@astrodash_extracted@astrodash-master@astrodash@model_metrics.py@.PATH_END.py
{ "filename": "haloassigned_spectra.py", "repo_name": "sbird/fake_spectra", "repo_path": "fake_spectra_extracted/fake_spectra-master/fake_spectra/haloassigned_spectra.py", "type": "Python" }
"""This module contains a class and functions which do analysis on spectra associated to galactic halos. This is fundamentally a somewhat wooly idea, because absorbers and halos are not always closely associated!""" from __future__ import print_function import numpy as np try: import numexpr as ne except ImportErro...
sbirdREPO_NAMEfake_spectraPATH_START.@fake_spectra_extracted@fake_spectra-master@fake_spectra@haloassigned_spectra.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="heatmap", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@_uirevision.py@.PATH_END.py
{ "filename": "calculator.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/nannyml/stats/median/calculator.py", "type": "Python" }
# Author: Nikolaos Perrakis <nikos@nannyml.com> # # License: Apache Software License 2.0 """Simple Statistics Median Calculator.""" from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd from pandas import MultiIndex from nannyml.base import AbstractCalculator, _list_...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@stats@median@calculator.py@.PATH_END.py
{ "filename": "_counts.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/_counts.py", "type": "Python" }
import _plotly_utils.basevalidators class CountsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="counts", parent_name="parcats", **kwargs): super(CountsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, a...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcats@_counts.py@.PATH_END.py
{ "filename": "test_discrete_basic.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/tests/test_discrete_basic.py", "type": "Python" }
import numpy.testing as npt from numpy.testing import assert_allclose import numpy as np import pytest from scipy import stats from .common_tests import (check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@tests@test_discrete_basic.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "test_base.py", "repo_name": "hyperopt/hyperopt", "repo_path": "hyperopt_extracted/hyperopt-master/hyperopt/tests/test_base.py", "type": "Python" }
import copy import unittest import numpy as np import bson from hyperopt.pyll import scope from hyperopt.base import JOB_STATE_DONE, JOB_STATE_NEW from hyperopt.base import TRIAL_KEYS from hyperopt.base import TRIAL_MISC_KEYS from hyperopt.base import InvalidTrial from hyperopt.base import miscs_to_idxs_vals from hyp...
hyperoptREPO_NAMEhyperoptPATH_START.@hyperopt_extracted@hyperopt-master@hyperopt@tests@test_base.py@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2d/colorbar/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="histogram2d.colorbar", **kwargs ): super(TickmodeValidator, self).__init__( plotly_name=plotly_name, p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2d@colorbar@_tickmode.py@.PATH_END.py
{ "filename": "setup_package.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/vo_conesearch/setup_package.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst def get_package_data(): return {'astroquery.vo_conesearch.tests': ['data/*.xml', 'data/*.json']} def requires_2to3(): return False
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@vo_conesearch@setup_package.py@.PATH_END.py
{ "filename": "adapt_data.py", "repo_name": "micbia/serenet", "repo_path": "serenet_extracted/serenet-main/utils_data/adapt_data.py", "type": "Python" }
import tools21cm as t2c, numpy as np from sklearn.decomposition import PCA as sciPCA path_in = '/store/ska/sk02/lightcones/EOS21/test_dataset/' path_out = '/scratch/snx3000/mibianco/test_skalow/data/' fout = 'dT4' print(fout) #data = np.load(path_in + fout + '_EOS21_EoR.npy') data = t2c.read_cbin(path_in+fout+'_21cm....
micbiaREPO_NAMEserenetPATH_START.@serenet_extracted@serenet-main@utils_data@adapt_data.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PabloVD/HAYASHI", "repo_path": "HAYASHI_extracted/HAYASHI-master/hayashi/__init__.py", "type": "Python" }
__all__ = ['constants', 'cosmo', 'utils', 'subhalos'] from hayashi.constants import * from hayashi.cosmo import * from hayashi.utils import * from hayashi.version import __version__
PabloVDREPO_NAMEHAYASHIPATH_START.@HAYASHI_extracted@HAYASHI-master@hayashi@__init__.py@.PATH_END.py
{ "filename": "lensdemo_funcs.py", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/06_EPO/e-TeenAstronomyCafe_Spanish/05_Gravitational_Lensing/lensdemo_funcs.py", "type": "Python" }
# # lensdemo_funcs.py # # Function module for strong lensing demos # # Intended for use with lensdemo_script.py # # Copyright 2009 by Adam S. Bolton # Creative Commons Attribution-Noncommercial-ShareAlike 3.0 license applies: # http://creativecommons.org/licenses/by-nc-sa/3.0/ # All redistributions, modified or otherwi...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@06_EPO@e-TeenAstronomyCafe_Spanish@05_Gravitational_Lensing@lensdemo_funcs.py@.PATH_END.py
{ "filename": "test_hera_lk.py", "repo_name": "21cmfast/21CMMC", "repo_path": "21CMMC_extracted/21CMMC-master/tests/test_hera_lk.py", "type": "Python" }
import numpy as np from py21cmmc import ( Likelihood1DPowerLightconeUpper, LikelihoodPlanck, analyse, build_computation_chain, core, likelihood, mcmc, run_mcmc, ) def test_hera_lk(): lk = Likelihood1DPowerLightconeUpper.from_builtin_data("HERA_H1C_IDR3") c21cmemu = core.Core2...
21cmfastREPO_NAME21CMMCPATH_START.@21CMMC_extracted@21CMMC-master@tests@test_hera_lk.py@.PATH_END.py
{ "filename": "unwrap_woden_phases.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/scripts/unwrap_woden_phases.py", "type": "Python" }
import numpy as np import os import warnings import sys from astropy.io import fits from astropy.time import Time, TimeDelta from astropy.coordinates import EarthLocation from astropy import units as u import matplotlib.pyplot as plt import palpy as pal D2R = np.pi / 180 MWA_LAT = -26.7033194444 MWA_LAT_RAD = MWA_LAT...
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@scripts@unwrap_woden_phases.py@.PATH_END.py
{ "filename": "_hoverlabel.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattermapbox/_hoverlabel.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.hoverlabel" _valid_props = { "align", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattermapbox@_hoverlabel.py@.PATH_END.py
{ "filename": "toolbars.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/toolbars.py", "type": "Python" }
from __future__ import unicode_literals from ..enums import IncrementalSearchDirection from .processors import BeforeInput from .lexers import SimpleLexer from .dimension import LayoutDimension from .controls import BufferControl, TokenListControl, UIControl, UIContent from .containers import Window, ConditionalCont...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py2@prompt_toolkit@layout@toolbars.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/pallas/triton/__init__.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@pallas@triton@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@caxis@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "simulation_example.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/docs/examples/simulation_example.py", "type": "Python" }
# %% [markdown] # # Demonstrate TOA simulation using PINT # %% from pint.models import get_model from pint.simulation import ( make_fake_toas_uniform, make_fake_toas_fromtim, ) from pint.residuals import Residuals, WidebandTOAResiduals from pint.logging import setup as setup_log from pint import dmu from pint....
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@docs@examples@simulation_example.py@.PATH_END.py
{ "filename": "visualize_tests.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/tools/visualize_tests.py", "type": "Python" }
#!/usr/bin/env python # # This builds a html page of all images from the image comparison tests # and opens that page in the browser. # # $ python tools/visualize_tests.py # import argparse import os from collections import defaultdict # Non-png image extensions NON_PNG_EXTENSIONS = ['pdf', 'svg', 'eps'] html_temp...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@tools@visualize_tests.py@.PATH_END.py
{ "filename": "_edists.py", "repo_name": "LoganAMorrison/blackthorn", "repo_path": "blackthorn_extracted/blackthorn-master/blackthorn/phase_space/_edists.py", "type": "Python" }
from typing import Sequence, Optional from ..fields import QuantumField from ._proto import SquaredMatrixElement from ._three_body import energy_distributions_three_body_decay from ._nbody import energy_distributions_nbody_decay def energy_distributions_decay( cme, final_states: Sequence[QuantumField], ...
LoganAMorrisonREPO_NAMEblackthornPATH_START.@blackthorn_extracted@blackthorn-master@blackthorn@phase_space@_edists.py@.PATH_END.py
{ "filename": "pixreplace.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/pixreplace.py", "type": "Python" }
""" Pixreplace -- Replace pixels which have one value with another value :License: :doc:`/LICENSE` """ import os import numpy as np from astropy.io import fits from stsci.tools import parseinput from . import util __all__ = ['replace', 'help'] __taskname__ = 'pixreplace' def replace(input, **pars): ""...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@pixreplace.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/dace/core.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from collections import defaultdict from json import JSONDecodeError from astropy.table import Table from ..query import BaseQuery from ..utils import async_to_sync from . import conf __all__ = ['Dace', 'DaceClass'] class ParseException(Exception): ...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@dace@core.py@.PATH_END.py
{ "filename": "RTS_ScaledownZ.ipynb", "repo_name": "NuGrid/NuPyCEE", "repo_path": "NuPyCEE_extracted/NuPyCEE-master/regression_tests/temp/RTS_ScaledownZ.ipynb", "type": "Jupyter Notebook" }
# Regression test suite: Test of scaling of yields below Z=1e-4 Yields of 1e-5 and 1e-6 as a input for SYGMA can be calculated by scaling down the yields fromm Z=1e-4. SYGMA is doing it in the read_yields.py. You can find the documentation <a href="doc/sygma.html">here</a>. Run this to set up the environment: ...
NuGridREPO_NAMENuPyCEEPATH_START.@NuPyCEE_extracted@NuPyCEE-master@regression_tests@temp@RTS_ScaledownZ.ipynb@.PATH_END.py
{ "filename": "line_endings.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/distutils/line_endings.py", "type": "Python" }
""" Functions for converting from DOS to UNIX line endings """ from __future__ import division, absolute_import, print_function import sys, re, os def dos2unix(file): "Replace CRLF with LF in argument files. Print names of changed files." if os.path.isdir(file): print(file, "Directory!") ret...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@distutils@line_endings.py@.PATH_END.py
{ "filename": "testing.py", "repo_name": "sherpa/sherpa", "repo_path": "sherpa_extracted/sherpa-main/sherpa/plot/testing.py", "type": "Python" }
# # Copyright (C) 2023, 2024 # MIT # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distri...
sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@plot@testing.py@.PATH_END.py
{ "filename": "_fftlog_backend.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/fft/_fftlog_backend.py", "type": "Python" }
import numpy as np from warnings import warn from ._basic import rfft, irfft from ..special import loggamma, poch from scipy._lib._array_api import array_namespace __all__ = ['fht', 'ifht', 'fhtoffset'] # constants LN_2 = np.log(2) def fht(a, dln, mu, offset=0.0, bias=0.0): xp = array_namespace(a) a = xp.a...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@fft@_fftlog_backend.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/examples/air/main.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ AIR applied to the multi-mnist data set [1]. [1] Eslami, SM Ali, et al. "Attend, infer, repeat: Fast scene understanding with generative models." Advances in Neural Information Processing Systems. 2016. """ import argparse i...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@examples@air@main.py@.PATH_END.py
{ "filename": "_base.py", "repo_name": "snad-space/ztf-viewer", "repo_path": "ztf-viewer_extracted/ztf-viewer-master/ztf_viewer/catalogs/conesearch/_base.py", "type": "Python" }
import dataclasses import logging import urllib.parse from functools import partial from typing import Dict, List, Optional import pandas as pd import requests from astropy.coordinates import SkyCoord from astropy.cosmology import FlatLambdaCDM from astropy.table import Table from astroquery.utils.commons import Table...
snad-spaceREPO_NAMEztf-viewerPATH_START.@ztf-viewer_extracted@ztf-viewer-master@ztf_viewer@catalogs@conesearch@_base.py@.PATH_END.py
{ "filename": "kepimages.py", "repo_name": "KeplerGO/PyKE", "repo_path": "PyKE_extracted/PyKE-master/pyke/kepimages.py", "type": "Python" }
from .utils import PyKEArgumentHelpFormatter import sys import numpy as np from astropy.io import fits as pyfits from tqdm import tqdm from . import kepio, kepmsg, kepkey, kepstat __all__ = ['kepimages'] def kepimages(infile, prefix, imtype='FLUX', ranges='0,0', overwrite=True, verbose=True, logfile='...
KeplerGOREPO_NAMEPyKEPATH_START.@PyKE_extracted@PyKE-master@pyke@kepimages.py@.PATH_END.py
{ "filename": "_hoverinfo.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/_hoverinfo.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="ohlc", **kwargs): super(HoverinfoValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@_hoverinfo.py@.PATH_END.py
{ "filename": "test_sed_apl.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/examples/sources/test_sed_apl.py", "type": "Python" }
""" test_sed_apl.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Thu May 2 10:46:44 2013 Description: Plot an absorbed power-law spectrum. """ import ares import numpy as np import matplotlib.pyplot as pl pars = \ { 'source_type': 'bh', 'source_sed': 'pl', 'source_Emin': ...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@examples@sources@test_sed_apl.py@.PATH_END.py
{ "filename": "shorten.py", "repo_name": "LSSTDESC/chroma", "repo_path": "chroma_extracted/chroma-master/doc/shorten.py", "type": "Python" }
#!/usr/bin/env python # # shorten.py exerpted and modified from prep_jour.py by M. Fitzgerald. # Copyright information for prep_jour.py follows. # Kyle Barbary, November 2010 # # Copyright (c) 2007, Michael P. Fitzgerald (mpfitz@berkeley.edu) # All rights reserved. # # Redistribution and use in source and binary forms...
LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@doc@shorten.py@.PATH_END.py
{ "filename": "image_classification_Dense.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/examples/TorchGA/image_classification_Dense.py", "type": "Python" }
import torch import pygad.torchga import pygad import numpy def fitness_func(ga_instanse, solution, sol_idx): global data_inputs, data_outputs, torch_ga, model, loss_function predictions = pygad.torchga.predict(model=model, solution=solution, ...
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@examples@TorchGA@image_classification_Dense.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="funnel.marker.colorbar", **kwargs ): super(ShowticklabelsValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="isosurface", **kwargs): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@_colorscale.py@.PATH_END.py
{ "filename": "TestEvidence2.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestEvidence2.py", "type": "Python" }
# run with : python3 -m unittest TestEvidence2 import unittest import os import numpy import math from numpy.testing import assert_array_almost_equal as assertAAE import matplotlib.pyplot as plt from BayesicFitting import * from BayesicFitting import formatter as fmt from FitPlot import plotFit from FitPlot import ...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestEvidence2.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "SKA-INAF/caesar-rest", "repo_path": "caesar-rest_extracted/caesar-rest-master/caesar_rest/__init__.py", "type": "Python" }
#! /usr/bin/env python __title__ = 'caesar_rest' __version__ = '1.0.0' __author__ = 'Simone Riggi' __license__ = 'GPL3' __date__ = '2020-04-17' __copyright__ = 'Copyright 2020 by Simone Riggi - INAF' # - Create the standard Logger import logging import logging.handlers #import logging.config #logging.basicConfig(f...
SKA-INAFREPO_NAMEcaesar-restPATH_START.@caesar-rest_extracted@caesar-rest-master@caesar_rest@__init__.py@.PATH_END.py
{ "filename": "test_geom.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/maps/hpx/tests/test_geom.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io import fits from regions import CircleSkyRegion from gammapy.maps import HpxGeom, MapAxis, Ma...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@maps@hpx@tests@test_geom.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/pie/marker/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "pie.marker" _path_str = "pie.marker.line" _valid_props = {"color", "colorsrc", "width", "width...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@pie@marker@_line.py@.PATH_END.py
{ "filename": "_box.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/_box.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Box(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "box" _valid_props = { "alignmentgroup", "boxmean", "boxpoints", "customdata...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@_box.py@.PATH_END.py
{ "filename": "gen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/tools/enum_parser/parse_enum/benchmark_build/lib/gen.py", "type": "Python" }
#!/usr/bin/env python3 # - * - encoding: UTF-8 - * - from argparse import ArgumentParser import random import sys import math def parse_args(): parser = ArgumentParser(description="") parser.add_argument('--range', type=int) parser.add_argument('--enum', nargs=2, action="append", metavar=("NAME", "SIZE")...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@tools@enum_parser@parse_enum@benchmark_build@lib@gen.py@.PATH_END.py
{ "filename": "ensemble_predict.py", "repo_name": "ExoplanetML/Nigraha", "repo_path": "Nigraha_extracted/Nigraha-main/models/ensemble_predict.py", "type": "Python" }
'''Script that generates PC predictions using an ensemble predictor and writes their output to a file.''' from data import records_io import tensorflow as tf from tensorflow import keras import numpy as np import pandas as pd import os, sys import pprint import json from train import get_absolute_path_listings #import...
ExoplanetMLREPO_NAMENigrahaPATH_START.@Nigraha_extracted@Nigraha-main@models@ensemble_predict.py@.PATH_END.py
{ "filename": "_cauto.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/marker/_cauto.py", "type": "Python" }
import _plotly_utils.basevalidators class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="histogram.marker", **kwargs): super(CautoValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@marker@_cauto.py@.PATH_END.py
{ "filename": "twavpol.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/analysis/twavpol.py", "type": "Python" }
""" Perform polarisation analysis of three orthogonal component time series data. Assumes data are in righthanded fieldaligned coordinate system with Z pointing the direction of the ambient magnetic field. The program outputs five spectral results derived from the fourier transform of the covariance matrix (spectral ...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@analysis@twavpol.py@.PATH_END.py
{ "filename": "kmpfit_chauvenet.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/kmpfit_chauvenet.py", "type": "Python" }
#!/usr/bin/env python # Demonstrate criterion of Chauvenet to exclude poor data from numpy.random import normal from scipy.special import erf, erfc import numpy from kapteyn import kmpfit from matplotlib.pyplot import figure, show, rc def chauvenet(x, y, mean=None, stdv=None): #------------------------------------...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@kmpfit_chauvenet.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/e2b_data_analysis/tool.py", "type": "Python" }
from __future__ import annotations import ast import json import os from io import StringIO from sys import version_info from typing import IO, TYPE_CHECKING, Any, Callable, List, Optional, Type, Union from langchain_core.callbacks import ( AsyncCallbackManagerForToolRun, CallbackManager, CallbackManagerF...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@e2b_data_analysis@tool.py@.PATH_END.py
{ "filename": "simple_functions.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-engine/dlg/apps/simple_functions.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2017 # 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@apps@simple_functions.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/slider/currentvalue/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.slider.currentvalue.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@slider@currentvalue@font@_shadow.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="splom", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, d...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@_stream.py@.PATH_END.py
{ "filename": "_outlinewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/colorbar/_outlinewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="densitymapbox.colorbar", **kwargs ): super(OutlinewidthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@colorbar@_outlinewidth.py@.PATH_END.py
{ "filename": "test_performance.py", "repo_name": "radio-astro-tools/spectral-cube", "repo_path": "spectral-cube_extracted/spectral-cube-master/spectral_cube/tests/test_performance.py", "type": "Python" }
""" Performance-related tests to make sure we don't use more memory than we should. For now this is just for SpectralCube, not DaskSpectralCube. """ import numpy as np import pytest import tempfile import sys try: import tracemalloc tracemallocOK = True except ImportError: tracemallocOK = False # The c...
radio-astro-toolsREPO_NAMEspectral-cubePATH_START.@spectral-cube_extracted@spectral-cube-master@spectral_cube@tests@test_performance.py@.PATH_END.py
{ "filename": "pyNTHCOMP.py", "repo_name": "scotthgn/AGNvar", "repo_path": "AGNvar_extracted/AGNvar-main/src/pyNTHCOMP.py", "type": "Python" }
""" This was taken from https://github.com/arnauqb/qsosed/tree/master/qsosed, which in turn was taken from https://github.com/ADThomas-astro/oxaf/blob/master/oxaf.py . Credit to A.D. Thomas. Code was adapted from Xspec for https://arxiv.org/pdf/1611.05165.pdf . """ import numpy as np def donthcomp(ear, param): ...
scotthgnREPO_NAMEAGNvarPATH_START.@AGNvar_extracted@AGNvar-main@src@pyNTHCOMP.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/volume/hoverlabel/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "volume.hoverlabel" _path_str = "volume.hoverlabel.font" _valid_props = {"color", "colorsrc", "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@volume@hoverlabel@_font.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/pynbody/analysis/__init__.py", "type": "Python" }
"""Tools for scientific analysis with pynbody This sub-package contains a number of modules that enable scientific analysis beyond the basic capabilities of pynbody. The most essential tools are imported into the sub-package itself, so that they can be accessed directly from pynbody.analysis. For example, :meth:`pynbo...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@pynbody@analysis@__init__.py@.PATH_END.py
{ "filename": "01_🔵_Home.py", "repo_name": "ander-son-almeida/DashboardOCmass", "repo_path": "DashboardOCmass_extracted/DashboardOCmass-main/01_🔵_Home.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Tue Aug 16 23:50:07 2022 @author: Anderson Almeida """ import streamlit as st st.set_page_config(page_title="Home",layout='centered', page_icon='🔵') st.sidebar.image("images/logo.png", use_column_width=True) st.title('Revisiting the mass of open clusters with Gaia data') ...
ander-son-almeidaREPO_NAMEDashboardOCmassPATH_START.@DashboardOCmass_extracted@DashboardOCmass-main@01_🔵_Home.py@.PATH_END.py
{ "filename": "broadening.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/radis/lbl/broadening.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Summary ------- A class to handle all broadening related functions (and unload factory.py) BroadenFactory is inherited by SpectrumFactory eventually Routine Listing --------------- Most methods are written in inherited class with the following inheritance scheme: :py:class:`~radis.lbl....
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@radis@lbl@broadening.py@.PATH_END.py
{ "filename": "p10advtables.py", "repo_name": "kevin218/POET", "repo_path": "POET_extracted/POET-master/code/lib/p10advtables.py", "type": "Python" }
#! /usr/bin/env python # $Author: kevin $ # $Revision: 549 $ # $Date: 2011-08-24 12:40:35 -0400 (Wed, 24 Aug 2011) $ # $HeadURL: file:///home/esp01/svn/code/python/pipeline/trunk/p10advtables.py $ # $Id: p10advtables.py 549 2011-08-24 16:40:35Z kevin $ ''' To run this program, please fill in all the fields commented ...
kevin218REPO_NAMEPOETPATH_START.@POET_extracted@POET-master@code@lib@p10advtables.py@.PATH_END.py
{ "filename": "test_pair_all.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/fit/positions/image/test_pair_all.py", "type": "Python" }
import numpy as np import pytest import autolens as al def test__three_sets_of_positions__model_is_repeated__does_not_double_count(): point = al.ps.Point(centre=(0.1, 0.1)) galaxy = al.Galaxy(redshift=1.0, point_0=point) tracer = al.Tracer(galaxies=[al.Galaxy(redshift=0.5), galaxy]) data = al.Grid2D...
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@fit@positions@image@test_pair_all.py@.PATH_END.py
{ "filename": "test_photometry_lc_interp_singlemet.py", "repo_name": "LSSTDESC/lsstdesc-diffsky", "repo_path": "lsstdesc-diffsky_extracted/lsstdesc-diffsky-main/lsstdesc_diffsky/photometry/tests/test_photometry_lc_interp_singlemet.py", "type": "Python" }
""" """ import numpy as np from dsps.data_loaders.retrieve_fake_fsps_data import load_fake_ssp_data from dsps.metallicity.mzr import DEFAULT_MET_PDICT from jax import random as jran from ... import read_diffskypop_params from ...defaults import DEFAULT_DIFFGAL_PARAMS from ...disk_bulge_modeling.disk_knots import FKNOT...
LSSTDESCREPO_NAMElsstdesc-diffskyPATH_START.@lsstdesc-diffsky_extracted@lsstdesc-diffsky-main@lsstdesc_diffsky@photometry@tests@test_photometry_lc_interp_singlemet.py@.PATH_END.py
{ "filename": "test_krome.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/codes_tests/test_krome.py", "type": "Python" }
import os.path import numpy from amuse.test.amusetest import TestWithMPI from amuse.community.krome.interface import KromeInterface, Krome, solar_abundances from amuse.units import units from amuse.datamodel import Particles from amuse.io import read_set_from_file # default_options={} default_options = dict(redirect...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@codes_tests@test_krome.py@.PATH_END.py
{ "filename": "ScalEqs.ipynb", "repo_name": "SBU-COSMOLIKE/CAMBLateDE", "repo_path": "CAMBLateDE_extracted/CAMBLateDE-main/docs/ScalEqs.ipynb", "type": "Jupyter Notebook" }
```python # Notebook demonstrating the use of quantities defined incamb.symbolic, and examples of usage # for defining custom sources and plotting different quantities. # Set of scalar equations implemented in CAMB, and calculation of the line-of-sight sources # indices are: # g - photons, r- massless neutrinos, c - ...
SBU-COSMOLIKEREPO_NAMECAMBLateDEPATH_START.@CAMBLateDE_extracted@CAMBLateDE-main@docs@ScalEqs.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "SNOwGLoBES/snowglobes", "repo_path": "snowglobes_extracted/snowglobes-master/README.md", "type": "Markdown" }
# SNOwGLoBES SuperNova Observatories with GLoBES ## Dependencies Make sure you have **gcc** and **GNU gls** installed (GLoBES install prerequisite) <br> * **ROOT** must be installed ! * **gcc** can be installed through the ROOT prereqs * **GNU gls** can be intalled through the ROOT Optional prereqs * Se...
SNOwGLoBESREPO_NAMEsnowglobesPATH_START.@snowglobes_extracted@snowglobes-master@README.md@.PATH_END.py
{ "filename": "_separatethousands.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_separatethousands.py", "type": "Python" }
import _plotly_utils.basevalidators class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.polar.angularaxis", **kwargs, ): super(SeparatethousandsValidator, self).__init_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@angularaxis@_separatethousands.py@.PATH_END.py
{ "filename": "chain_plot.py", "repo_name": "jmeyers314/linmix", "repo_path": "linmix_extracted/linmix-master/tests/chain_plot.py", "type": "Python" }
import numpy as np import astropy.io.ascii as ascii import matplotlib.pyplot as plt pyout = ascii.read('test.pyout') idlout = ascii.read('test.idlout') fig, axarr = plt.subplots(4, 2, figsize=(10, 10)) fig.suptitle("python") axarr[0,0].plot(pyout['alpha']) axarr[0,0].set_ylabel('alpha') axarr[0,1].plot(pyout['beta']...
jmeyers314REPO_NAMElinmixPATH_START.@linmix_extracted@linmix-master@tests@chain_plot.py@.PATH_END.py
{ "filename": "_maxallowed.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/autorangeoptions/_maxallowed.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): super(MaxallowedValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@autorangeoptions@_maxallowed.py@.PATH_END.py
{ "filename": "IsothermalAtmo.py", "repo_name": "DavidDahlbudding/AtmosphericScatteringPinn", "repo_path": "AtmosphericScatteringPinn_extracted/AtmosphericScatteringPinn-main/EquationModels/IsothermalAtmo.py", "type": "Python" }
from ImportFile import * import time #from petitRADTRANS import Radtrans pi = math.pi extrema_values = None space_dimensions = 1 time_dimensions = 0 domain_values = torch.tensor([[-1.0, 1.0]]) # x, only boundary condition at x = -1 parameters_values = torch.tensor([[-1.0, 1.0]]) # y, other parameters added with appen...
DavidDahlbuddingREPO_NAMEAtmosphericScatteringPinnPATH_START.@AtmosphericScatteringPinn_extracted@AtmosphericScatteringPinn-main@EquationModels@IsothermalAtmo.py@.PATH_END.py
{ "filename": "tfsa-2021-066.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-066.md", "type": "Markdown" }
## TFSA-2021-066: Undefined behavior and `CHECK`-fail in `FractionalMaxPoolGrad` ### CVE Number CVE-2021-29580 ### Impact The implementation of `tf.raw_ops.FractionalMaxPoolGrad` triggers an undefined behavior if one of the input tensors is empty: ```python import tensorflow as tf orig_input = tf.constant([2, 3], s...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-066.md@.PATH_END.py
{ "filename": "_cmin.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/marker/_cmin.py", "type": "Python" }
import _plotly_utils.basevalidators class CminValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="splom.marker", **kwargs): super(CminValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@marker@_cmin.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs ): super(FamilyValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@tickfont@_family.py@.PATH_END.py
{ "filename": "Interactive_data.ipynb", "repo_name": "ialopezt/GalLenspy", "repo_path": "GalLenspy_extracted/GalLenspy-master/Puntual_source/Mass_reconstruction/Interactive_data.ipynb", "type": "Jupyter Notebook" }
```python from scipy.misc import * import numpy as np import pylab as plb import matplotlib.pyplot as plt import matplotlib.cm as cm from scipy.integrate import quad from scipy.integrate import nquad from scipy.misc import derivative from ipywidgets import interact, interactive, fixed, interact_manual from ipywidgets i...
ialopeztREPO_NAMEGalLenspyPATH_START.@GalLenspy_extracted@GalLenspy-master@Puntual_source@Mass_reconstruction@Interactive_data.ipynb@.PATH_END.py
{ "filename": "SAGE_MM.ipynb", "repo_name": "darrencroton/sage", "repo_path": "sage_extracted/sage-master/output/SAGE_MM.ipynb", "type": "Jupyter Notebook" }
``` %pylab inline ``` Populating the interactive namespace from numpy and matplotlib ``` import urllib import os import time ``` ``` datadir = 'sage_output/' # Change me to whatever you like # Retrieve output of SAGE from Mini Millennium with fiducial parameters if directory is empty # Run this for an empty d...
darrencrotonREPO_NAMEsagePATH_START.@sage_extracted@sage-master@output@SAGE_MM.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "JulianBMunoz/21cmvFAST", "repo_path": "21cmvFAST_extracted/21cmvFAST-master/public_21CMvFAST_MC/Programs/CosmoHammer_21CMMC/likelihood/module/wmap/__init__.py", "type": "Python" }
JulianBMunozREPO_NAME21cmvFASTPATH_START.@21cmvFAST_extracted@21cmvFAST-master@public_21CMvFAST_MC@Programs@CosmoHammer_21CMMC@likelihood@module@wmap@__init__.py@.PATH_END.py
{ "filename": "lax_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/lax_test.py", "type": "Python" }
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@lax_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "VChristiaens/MINDS", "repo_path": "MINDS_extracted/MINDS-main/src/minds/__init__.py", "type": "Python" }
from . import _version try: __version__ = _version.version except Exception: __version__ = "dev"
VChristiaensREPO_NAMEMINDSPATH_START.@MINDS_extracted@MINDS-main@src@minds@__init__.py@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "scikit-optimize/scikit-optimize", "repo_path": "scikit-optimize_extracted/scikit-optimize-master/CONTRIBUTING.md", "type": "Markdown" }
# Contributing Scikit-Optimize is an open-source project and contributions of all kinds are welcome. We believe in this [code of conduct](CONDUCT.md). You can contribute with documentation, examples, reviewing pull requests, code, helping answer questions in issues, creating visualizations, maintaining project infras...
scikit-optimizeREPO_NAMEscikit-optimizePATH_START.@scikit-optimize_extracted@scikit-optimize-master@CONTRIBUTING.md@.PATH_END.py
{ "filename": "_colorbar.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.colorbar" _valid_props = { "bgcolor", "borderc...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@mesh3d@_colorbar.py@.PATH_END.py
{ "filename": "limongi_chieffi_yields.py", "repo_name": "bretthandrews/flexCE", "repo_path": "flexCE_extracted/flexCE-master/flexCE/calc_yields/limongi_chieffi_yields.py", "type": "Python" }
"""Generate finely spaced grid of SN II isotopic yields. Use a combination of the Chieffi & Limongi (2004) & Limongi & Chieffi (2006). Chieffi & Limongi (2004): M = 13--35 Msun; Z = 0--solar Limongi & Chieffi (2006): M = 11--120; Z = solar Mass cut = 0.1 Msun Ni56 """ from __future__ import print_function, division...
bretthandrewsREPO_NAMEflexCEPATH_START.@flexCE_extracted@flexCE-master@flexCE@calc_yields@limongi_chieffi_yields.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/aaxis/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.aaxis.title.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@aaxis@title@font@_style.py@.PATH_END.py
{ "filename": "loginterp.py", "repo_name": "sfschen/velocileptors", "repo_path": "velocileptors_extracted/velocileptors-master/velocileptors/Utils/loginterp.py", "type": "Python" }
import numpy as np from scipy.interpolate import InterpolatedUnivariateSpline as interpolate from scipy.misc import derivative import inspect def loginterp(x, y, yint = None, side = "both", lorder = 9, rorder = 9, lp = 1, rp = -2, ldx = 1e-6, rdx = 1e-6,\ interp_min = -12, interp_max = 12, ...
sfschenREPO_NAMEvelocileptorsPATH_START.@velocileptors_extracted@velocileptors-master@velocileptors@Utils@loginterp.py@.PATH_END.py
{ "filename": "fista.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/itreg/regpy/solvers/fista.py", "type": "Python" }
import logging import numpy as np from regpy.solvers import Solver from regpy import util from regpy.functionals import Functional """ The generalized FISTA algorithm for minimization of regpar * G+H (where G, H: Hdomain -> R are the penalty term and the data fidelity term respectively). We assume: -> G, H are co...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@itreg@regpy@solvers@fista.py@.PATH_END.py
{ "filename": "pyqt_nonblock.py", "repo_name": "spacetelescope/specview", "repo_path": "specview_extracted/specview-master/proto/specviewer/samp-based/pyqt_nonblock.py", "type": "Python" }
'''Setup for non-blocking PyQt apps Routine Listings ---------------- There are two interfaces: pyqtapplication: Functional interface that returns the QApplication instance PyQtNonblock: Class that ensures the QApplication instance never goes out-of-scope Usage ----- The main class inherits PyQtNonblock, ensu...
spacetelescopeREPO_NAMEspecviewPATH_START.@specview_extracted@specview-master@proto@specviewer@samp-based@pyqt_nonblock.py@.PATH_END.py
{ "filename": "_symbol.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/_symbol.py", "type": "Python" }
import _plotly_utils.basevalidators class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scatterternary.marker", **kwargs ): super(SymbolValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@_symbol.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/models/strategies/__init__.py", "type": "Python" }
__all__ = [ 'st_model_instance_list', 'st_model_prompt', 'st_model_prompt_list', 'st_model_run', 'st_model_run_list', 'st_model_script', 'st_model_script_list', 'st_model_stdout', 'st_model_stdout_list', 'st_model_trace', 'st_model_trace_list', 'st_model_trace_call', ...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@models@strategies@__init__.py@.PATH_END.py
{ "filename": "adi_tools.py", "repo_name": "markusbonse/fours", "repo_path": "fours_extracted/fours-main/fours/utils/adi_tools.py", "type": "Python" }
import numpy as np import multiprocessing from scipy.ndimage import rotate from tqdm import tqdm import torch from fours.models.rotation import FieldRotationModel def cadi_psf_subtraction( images: np.ndarray, angles: np.ndarray): median_frame = np.median(images, axis=0) residual_sequence = ...
markusbonseREPO_NAMEfoursPATH_START.@fours_extracted@fours-main@fours@utils@adi_tools.py@.PATH_END.py
{ "filename": "train_model_on_catalog.py", "repo_name": "mwalmsley/zoobot", "repo_path": "zoobot_extracted/zoobot-main/zoobot/tensorflow/examples/train_from_scratch/train_model_on_catalog.py", "type": "Python" }
import logging import argparse import os import pandas as pd import tensorflow as tf import wandb from galaxy_datasets.shared import label_metadata from zoobot.shared import schemas from zoobot.tensorflow.training import train_with_keras if __name__ == '__main__': """ Convenient command-line API/example fo...
mwalmsleyREPO_NAMEzoobotPATH_START.@zoobot_extracted@zoobot-main@zoobot@tensorflow@examples@train_from_scratch@train_model_on_catalog.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sankey.node.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sankey@node@hoverlabel@font@_familysrc.py@.PATH_END.py
{ "filename": "__main__.py", "repo_name": "maxmahlke/ssos", "repo_path": "ssos_extracted/ssos-master/ssos/__main__.py", "type": "Python" }
#!/usr/bin/env python """ Pipeline to search for Solar System objects in wide-field imaging surveys Information on the project can be found in arXiv:1711.02780 and arXiv:1906.03673 For questions, contact max.mahlke (at) oca.eu Call as: ssos """ import os import shutil import sys import time ...
maxmahlkeREPO_NAMEssosPATH_START.@ssos_extracted@ssos-master@ssos@__main__.py@.PATH_END.py
{ "filename": "_ticksuffix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.ternary.caxis", **kwargs ): super(TicksuffixValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@caxis@_ticksuffix.py@.PATH_END.py
{ "filename": "test_units.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/utils/tests/test_units.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np import astropy.units as u from gammapy.maps import MapAxis from gammapy.utils.units import energy_unit_format, standardise_unit def test_standardise_unit(): assert standardise_unit("ph cm-2 s-1") == "cm-2 s-1" ass...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@utils@tests@test_units.py@.PATH_END.py