Dataset Viewer
Auto-converted to Parquet Duplicate
metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_waste_free_smc.py", "repo_name": "blackjax-devs/blackjax", "repo_path": "blackjax_extracted/blackjax-main/tests/smc/test_waste_free_smc.py", "type": "Python" }
"""Test the tempered SMC steps and routine""" import functools import chex import jax import jax.numpy as jnp import numpy as np import pytest from absl.testing import absltest import blackjax import blackjax.smc.resampling as resampling from blackjax import adaptive_tempered_smc, tempered_smc from blackjax.smc impo...
blackjax-devsREPO_NAMEblackjaxPATH_START.@blackjax_extracted@blackjax-main@tests@smc@[email protected]_END.py
{ "filename": "_y0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_y0.py", "type": "Python" }
import _plotly_utils.basevalidators class Y0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="y0", parent_name="box", **kwargs): super(Y0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop...
[email protected][email protected]@packages@python@plotly@plotly@validators@box@[email protected]_END.py
{ "filename": "crd_trans.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/python/radmc3dPy/radmc3dPy/crd_trans.py", "type": "Python" }
""" This module contains functions for coordinate transformations (e.g. rotation). For help on the syntax or functionality of each function see the help of the individual functions """ from __future__ import absolute_import from __future__ import print_function import traceback try: import numpy as np except Impor...
[email protected][email protected]@python@radmc3dPy@radmc3dPy@[email protected]_END.py
{ "filename": "test_st_prompt_list.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/models/strategies/tests/test_st_prompt_list.py", "type": "Python" }
from typing import Optional, TypedDict from hypothesis import Phase, given, note, settings from hypothesis import strategies as st from nextline_test_utils import safe_compare as sc from nextline_test_utils.strategies import st_none_or, st_ranges from ... import Model, Run from .. import ( st_model_prompt_list, ...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@models@strategies@tests@[email protected]_END.py
{ "filename": "helpers.py", "repo_name": "spacetelescope/calcos", "repo_path": "calcos_extracted/calcos-master/tests/helpers.py", "type": "Python" }
"""CALCOS regression test helpers.""" import os import sys import pytest from ci_watson.artifactory_helpers import get_bigdata from ci_watson.hst_helpers import raw_from_asn, ref_from_image, download_crds from astropy.io import fits from astropy.io.fits import FITSDiff __all__ = ['calref_from_image', 'BaseCOS'] d...
spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@[email protected]@.PATH_END.py
{ "filename": "find_stars.py", "repo_name": "ucl-exoplanets/pylightcurve", "repo_path": "pylightcurve_extracted/pylightcurve-master/pylightcurve/images/find_stars.py", "type": "Python" }
__all__ = ['find_single_star'] import numpy as np import warnings from pylightcurve.analysis.gaussian import fit_two_d_gaussian from pylightcurve.analysis.distributions import one_d_distribution def find_single_star(data_array, predicted_x, predicted_y, mean=None, std=None, burn_limit=65000, star_std=2, ...
ucl-exoplanetsREPO_NAMEpylightcurvePATH_START.@pylightcurve_extracted@pylightcurve-master@pylightcurve@images@[email protected]_END.py
{ "filename": "Useful_Utilities.ipynb", "repo_name": "LSSTDESC/rail", "repo_path": "rail_extracted/rail-main/examples/core_examples/Useful_Utilities.ipynb", "type": "Jupyter Notebook" }
# Useful Utilities **Authors:** Olivia Lynn **Last Run Successfully:** September 20, 2023 This is a notebook that contains various utilities that may be used when working with RAIL. ## Setting Things Up ```python import rail ``` ### Listing imported stages (1/2) Let's list out our currently imported stages. Rig...
LSSTDESCREPO_NAMErailPATH_START.@rail_extracted@rail-main@examples@core_examples@[email protected]_END.py
{ "filename": "__init__.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/pygad/utils/__init__.py", "type": "Python" }
from pygad.utils import parent_selection from pygad.utils import crossover from pygad.utils import mutation from pygad.utils import nsga2 __version__ = "1.2.1"
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@pygad@utils@[email protected]_END.py
{ "filename": "test_special.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/ops/test_special.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pytest import torch from scipy.special import iv from torch import tensor from torch.autograd import grad from pyro.ops.special import get_quad_rule, log_beta, log_binomial, log_I1, safe_log from tests.common import assert_equa...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@ops@[email protected]_END.py
{ "filename": "scanner.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/scanner.py", "type": "Python" }
""" pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like the `RegexLexer`. ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@[email protected]@.PATH_END.py
{ "filename": "clusters.py", "repo_name": "ICRAR/shark", "repo_path": "shark_extracted/shark-master/standard_plots/clusters.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2018 # Copyright by UWA (in the framework of the ICRAR) # # 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 Fre...
ICRARREPO_NAMEsharkPATH_START.@shark_extracted@shark-master@[email protected]@.PATH_END.py
{ "filename": "filters.py", "repo_name": "astro-informatics/s2wav", "repo_path": "s2wav_extracted/s2wav-main/s2wav/filters.py", "type": "Python" }
from jax import jit import jax.numpy as jnp import torch import numpy as np from typing import Tuple from functools import partial from s2wav import samples def filters_axisym( L: int, J_min: int = 0, lam: float = 2.0 ) -> Tuple[np.ndarray, np.ndarray]: r"""Computes wavelet kernels :math:`\Psi^j_{\ell m}` and...
astro-informaticsREPO_NAMEs2wavPATH_START.@s2wav_extracted@s2wav-main@[email protected]@.PATH_END.py
{ "filename": "saveable_object.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/saving/saveable_object.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@training@saving@[email protected]_END.py
{ "filename": "test_bookkeeping.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/tests/test_bookkeeping.py", "type": "Python" }
# pytest suite """ Tests for primitives_bookkeeping. This is a suite of tests to be run with pytest. To run: 1) Set the environment variable GEMPYTHON_TESTDATA to the path that contains the directories with the test data. Eg. /net/chara/data2/pub/gempython_testdata/ 2) From the ??? (location): p...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@tests@[email protected]_END.py
{ "filename": "__init__.py", "repo_name": "ggmichael/craterstats", "repo_path": "craterstats_extracted/craterstats-main/src/craterstats/sample/__init__.py", "type": "Python" }
ggmichaelREPO_NAMEcraterstatsPATH_START.@craterstats_extracted@craterstats-main@src@craterstats@sample@[email protected]_END.py
{ "filename": "pi_pi_eta.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/vector_mediator/form_factors/pi_pi_eta.py", "type": "Python" }
""" F_{eta,pi,pi} = (1/Z) * BW(s, 0) [ a0*e^{i*p0}BW(q^2,0) + a1*e^{i*p1}BW(q^2,1) + a2*e^{i*p2}BW(q^2,2) ] Z = a0*e^{i*p0} + a1*e^{i*p1} + a2*e^{i*p2} """ from dataclasses import dataclass import numpy as np from scipy.integrate import quad from .cross_sections import width_to_cs from hazma.utils impo...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@vector_mediator@form_factors@[email protected]_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattercarpet", **kwargs ): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@[email protected]_END.py
{ "filename": "make_figure_07.ipynb", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/figures/make_figure_07.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.ticker mpl.style.use("plotting.mplstyle") import pandas as pd import sys sys.path.append('./../../pdet/') from pdet.emulator import * sys.path.append("./../code/") from training_routines import * from draw_new_inject...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@figures@[email protected]_END.py
{ "filename": "io.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/io.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@[email protected]@.PATH_END.py
{ "filename": "data_structures.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/exodus_ii/data_structures.py", "type": "Python" }
import numpy as np from yt.data_objects.index_subobjects.unstructured_mesh import UnstructuredMesh from yt.data_objects.static_output import Dataset from yt.data_objects.unions import MeshUnion from yt.funcs import setdefaultattr from yt.geometry.unstructured_mesh_handler import UnstructuredIndex from yt.utilities.fil...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@exodus_ii@[email protected]_END.py
{ "filename": "DQ_definitions.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gemini/lookups/DQ_definitions.py", "type": "Python" }
import numpy as np datatype = np.uint16 max = np.iinfo(datatype).max good = datatype(0) bad_pixel = datatype(1) non_linear = datatype(2) saturated = datatype(4) cosmic_ray = datatype(8) no_data = datatype(16) overlap = datatype(32) unilluminated = datatype(64) fail = bad_pixel | saturated | cosmic_ray | no_data not_...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gemini@lookups@[email protected]_END.py
{ "filename": "utils.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/wcs/wcsapi/utils.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import importlib import numpy as np __all__ = ["deserialize_class", "wcs_info_str"] def deserialize_class(tpl, construct=True): """ Deserialize classes recursively. """ if not isinstance(tpl, tuple) or len(tpl) != 3: raise Valu...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@wcs@[email protected]@.PATH_END.py
{ "filename": "setup.py", "repo_name": "tvwenger/kd", "repo_path": "kd_extracted/kd-master/setup.py", "type": "Python" }
""" Copyright(C) 2017-2021 by Trey V. Wenger; [email protected] GNU General Public License v3 (GNU GPLv3) 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 you...
tvwengerREPO_NAMEkdPATH_START.@kd_extracted@[email protected]@.PATH_END.py
{ "filename": "increasebuffer.py", "repo_name": "CosmicFish/CosmicFish", "repo_path": "CosmicFish_extracted/CosmicFish-master/bundled/doxygen/src/increasebuffer.py", "type": "Python" }
# Since the internal token buffer of a generated flex file is hardcoded # to 16K, this script is used to increase the buffer size of a flex # generated scanner to 256K. import sys sys.stdout.write(sys.stdin.read(). replace('YY_BUF_SIZE 16384','YY_BUF_SIZE 262144'). replace('YY_READ_BUF_SIZE 8192','YY_READ_BUF_S...
CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@bundled@doxygen@[email protected]@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/image/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.image", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@image@[email protected]_END.py
{ "filename": "__init__.py", "repo_name": "ESDS-Leipzig/sen2nbar", "repo_path": "sen2nbar_extracted/sen2nbar-main/sen2nbar/__init__.py", "type": "Python" }
"""sen2nbar - Nadir BRDF Adjusted Reflectance (NBAR) for Sentinel-2 in Python""" __version__ = "2024.6.0" __author__ = "David Montero Loaiza <[email protected]>" __all__ = [] from . import *
ESDS-LeipzigREPO_NAMEsen2nbarPATH_START.@sen2nbar_extracted@sen2nbar-main@sen2nbar@[email protected]_END.py
{ "filename": "_h_e_a_d.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttLib/tables/_h_e_a_d.py", "type": "Python" }
from fontTools.misc import sstruct from fontTools.misc.fixedTools import floatToFixedToStr, strToFixedToFloat from fontTools.misc.textTools import safeEval, num2binary, binary2num from fontTools.misc.timeTools import ( timestampFromString, timestampToString, timestampNow, ) from fontTools.misc.timeTools imp...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttLib@tables@[email protected]_END.py
{ "filename": "bayesian.ipynb", "repo_name": "sotzee/CPREX", "repo_path": "CPREX_extracted/CPREX-main/bayesian.ipynb", "type": "Jupyter Notebook" }
```python ``` ```python import numpy as np import scipy import toolbox import unitconvert from matplotlib_rc import * from load_all_data import * from cov import cov_ellipse_xy from pdf_plot import get_kde_1D,get_kde_2D,plot_density_2D Fw_exp=np.array([0.1304,0.368]) Fw_sig2=np.array([0.0052**2+0.002**2,0.013**2]...
sotzeeREPO_NAMECPREXPATH_START.@CPREX_extracted@[email protected]@.PATH_END.py
{ "filename": "AmoebaFitter.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/AmoebaFitter.py", "type": "Python" }
import numpy as numpy import math from . import Tools from .MaxLikelihoodFitter import MaxLikelihoodFitter from .AnnealingAmoeba import AnnealingAmoeba __author__ = "Do Kester" __year__ = 2023 __license__ = "GPL3" __version__ = "3.1.0" __url__ = "https://www.bayesicfitting.nl" __status__ = "Perpetual Beta" # * # *...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@[email protected]@.PATH_END.py
{ "filename": "_xref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/_xref.py", "type": "Python" }
import _plotly_utils.basevalidators class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="surface.colorbar", **kwargs): super(XrefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@[email protected]_END.py
{ "filename": "__init__.py", "repo_name": "bwinkel/cygrid", "repo_path": "cygrid_extracted/cygrid-master/cygrid/__init__.py", "type": "Python" }
from .cygrid import * from .healpix import * from .hphashtab import * from .helpers import * from .mock import * from .init_testrunner import * from .version import version __version__ = version
bwinkelREPO_NAMEcygridPATH_START.@cygrid_extracted@cygrid-master@cygrid@[email protected]_END.py
{ "filename": "setup.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/setup.py", "type": "Python" }
from setuptools import setup, find_packages import re def get_property(prop, project): result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop), open(project + '/__init__.py').read()) return result.group(1) # reqs = [] # for line in open('requirements.txt', 'r').readlines(): # ...
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@[email protected]@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
[email protected][email protected]@packages@python@plotly@plotly@validators@densitymap@legendgrouptitle@font@[email protected]_END.py
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
4