metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "ordered_set.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/beniget/beniget/ordered_set.py", "type": "Python" }
""" Copied from https://github.com/bustawin/ordered-set-37 """ # Unlicense # This is free and unencumbered software released into the public domain. # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, comme...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@beniget@beniget@ordered_set.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mavrix93/LightCurvesClassifier", "repo_path": "LightCurvesClassifier_extracted/LightCurvesClassifier-master/test/stars_processing/__init__.py", "type": "Python" }
mavrix93REPO_NAMELightCurvesClassifierPATH_START.@LightCurvesClassifier_extracted@LightCurvesClassifier-master@test@stars_processing@__init__.py@.PATH_END.py
{ "filename": "quirks.py", "repo_name": "MazinLab/MKIDGen3", "repo_path": "MKIDGen3_extracted/MKIDGen3-main/mkidgen3/quirks.py", "type": "Python" }
import pynq class Quirk: """A class to unify working around hardware/pynq quirks in different versions Indicate quirk presence with .quirkname properties, provide fixes with .do_quirkname(cls, ..) classmethods, and indicate fix completion with .done_quirkname class properties For groups of quirks us...
MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@mkidgen3@quirks.py@.PATH_END.py
{ "filename": "trunchen.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/observationmodel/noisemodel/trunchen.py", "type": "Python" }
""" Trunchen version of noisemodel Goal is to compute the full n-band covariance matrix for each model """ import numpy as np from scipy.spatial import cKDTree from tqdm import tqdm from beast.observationmodel.noisemodel.noisemodel import NoiseModel from beast.observationmodel.vega import Vega __all__ = ["MultiFilt...
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@observationmodel@noisemodel@trunchen.py@.PATH_END.py
{ "filename": "Tutorial-Start_to_Finish-ScalarWave.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/Tutorial-Start_to_Finish-ScalarWave.ipynb", "type": "Jupyter Notebook" }
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Start-to-Finish Example: Numerical Solution of the Scalar...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Tutorial-Start_to_Finish-ScalarWave.ipynb@.PATH_END.py
{ "filename": "tutorial_pipe.md", "repo_name": "rbuehler/vasca", "repo_path": "vasca_extracted/vasca-main/docs/tutorials/tutorial_pipe.md", "type": "Markdown" }
--- jupytext: hide_notebook_metadata: true text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.4 kernelspec: display_name: vasca-github language: python name: vasca-github --- ```{code-cell} :tags: [remove-cell] # ruff: noqa: T201 ``` ```{code-c...
rbuehlerREPO_NAMEvascaPATH_START.@vasca_extracted@vasca-main@docs@tutorials@tutorial_pipe.md@.PATH_END.py
{ "filename": "acspyTestAcsCORBA.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/test/acspyTestAcsCORBA.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@test@acspyTestAcsCORBA.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "cmillion/gPhoton", "repo_path": "gPhoton_extracted/gPhoton-master/README.md", "type": "Markdown" }
**gPhoton** is a project to calibrate, archive, and make available every photon event observed by the GALEX mission in an effort to dramatically improve the flexibility and utility of the data with specific emphasis on enabling short time domain photometric studies. To get started, please read the [User Guide](https:/...
cmillionREPO_NAMEgPhotonPATH_START.@gPhoton_extracted@gPhoton-master@README.md@.PATH_END.py
{ "filename": "piecewise.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/src/pint/models/piecewise.py", "type": "Python" }
"""Pulsar timing piecewise spin-down solution.""" import astropy.units as u import numpy as np from pint.models.parameter import prefixParameter from pint.models.timing_model import PhaseComponent from pint.utils import split_prefixed_name, taylor_horner from pint.exceptions import MissingParameter class PiecewiseS...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@models@piecewise.py@.PATH_END.py
{ "filename": "_textsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/_textsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="image", **kwargs): super(TextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@_textsrc.py@.PATH_END.py
{ "filename": "axes.py", "repo_name": "marblestation/posidonius", "repo_path": "posidonius_extracted/posidonius-master/posidonius/particles/axes.py", "type": "Python" }
import numpy as np class Axes(object): def __init__(self, x, y, z): if type(x) is np.ndarray: if len(x) != len(y) or len(x) != len(z): raise Exception("Arrays length do not match!") self._data = {u'x': x, u'y': y, u'z': z} else: self._data = {u'x'...
marblestationREPO_NAMEposidoniusPATH_START.@posidonius_extracted@posidonius-master@posidonius@particles@axes.py@.PATH_END.py
{ "filename": "plot_triple_with_wind.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/plot_triple_with_wind.py", "type": "Python" }
import os import numpy from amuse.lab import * from prepare_figure import single_frame from distinct_colours import get_distinct from matplotlib import pyplot def read_triple_data(filename): t = [] ain = [] aout = [] ein = [] eout = [] a0in = 0 a0out = 0 for line in open(filename): ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@plot_triple_with_wind.py@.PATH_END.py
{ "filename": "methods.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/timeseries/periodograms/bls/methods.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ["bls_fast", "bls_slow"] from functools import partial import numpy as np from ._impl import bls_impl def bls_slow(t, y, ivar, period, duration, oversample, use_likelihood): """Compute the periodogram using a brute force reference metho...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@timeseries@periodograms@bls@methods.py@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/tools/helpers.py", "type": "Python" }
""" This is a first collection of tools making the design easier """ import sys from functools import wraps import itertools # replace the common range by the generator try: range = xrange except NameError: pass __all__ = [ "generator", "chunks", "isNestedInstance", "type_checker", "nbyte...
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@tools@helpers.py@.PATH_END.py
{ "filename": "UPGRADES.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/restricted/abseil-cpp/UPGRADES.md", "type": "Markdown" }
# C++ Upgrade Tools Abseil may occasionally release API-breaking changes. As noted in our [Compatibility Guidelines][compatibility-guide], we will aim to provide a tool to do the work of effecting such API-breaking changes, when absolutely necessary. These tools will be listed on the [C++ Upgrade Tools][upgrade-tools...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@restricted@abseil-cpp@UPGRADES.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "yulongzh/SPEMR", "repo_path": "SPEMR_extracted/SPEMR-main/README.md", "type": "Markdown" }
# SPEMR the source code and dataset of SPEMR model
yulongzhREPO_NAMESPEMRPATH_START.@SPEMR_extracted@SPEMR-main@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "SatoshiHamano/WARP", "repo_path": "WARP_extracted/WARP-main/README.md", "type": "Markdown" }
# WARP WINERED Automatic Reduction Pipeline ## What is WARP? The pipeline software to reduce the astronomical spectroscopic data obtained with NIR high-resolution echelle spectrograph, WINERED. WARP is written with Python. ## How to install? Using git: `git clone https://github.com/SatoshiHamano/WARP` WARP can als...
SatoshiHamanoREPO_NAMEWARPPATH_START.@WARP_extracted@WARP-main@README.md@.PATH_END.py
{ "filename": "random.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/torch/random.py", "type": "Python" }
import torch import torch._dynamo as dynamo import torch.nn.functional as tnn from keras.src.backend.config import floatx from keras.src.backend.torch.core import convert_to_tensor from keras.src.backend.torch.core import get_device from keras.src.backend.torch.core import to_torch_dtype from keras.src.random.seed_gen...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@torch@random.py@.PATH_END.py
{ "filename": "_thicknessmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="choroplethmapbox.colorbar", **kwargs ): super(ThicknessmodeValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choroplethmapbox@colorbar@_thicknessmode.py@.PATH_END.py
{ "filename": "_uid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_uid.py", "type": "Python" }
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="uid", parent_name="histogram2d", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_uid.py@.PATH_END.py
{ "filename": "grb_transient_metric.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/maf_contrib/grb_transient_metric.py", "type": "Python" }
__all__ = ("GRBTransientMetric",) import numpy as np import rubin_sim.maf.metrics as metrics # Gamma-ray burst afterglow metric # ebellm@caltech.edu class GRBTransientMetric(metrics.BaseMetric): """Evaluate the likelihood of detecting a GRB optical counterpart. Detections for an on-axis GRB afterglows de...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@maf_contrib@grb_transient_metric.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "jpcoles/mosaic", "repo_path": "mosaic_extracted/mosaic-master/README.md", "type": "Markdown" }
# mosaic Multipole Operators in Symbols, Automatically Improved and Condensed
jpcolesREPO_NAMEmosaicPATH_START.@mosaic_extracted@mosaic-master@README.md@.PATH_END.py
{ "filename": "overpressure2.py", "repo_name": "wmpg/Supracenter", "repo_path": "Supracenter_extracted/Supracenter-master/supra/Geminus/overpressure2.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import scipy from supra.Utils.Classes import Constants, Position from supra.Utils.Formatting import * c = Constants() # function [dp,dpws,dpratio,tau,tauws,Z,td,talt,Ro] = overpressureihmod_Ro(meteor,stn,Ro,v,theta,dphi,atmos,sw); def overpressureihmod_Ro(meteor, s...
wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@Geminus@overpressure2.py@.PATH_END.py
{ "filename": "arrays.py", "repo_name": "MikeSWang/Harmonia", "repo_path": "Harmonia_extracted/Harmonia-master/harmonia/algorithms/arrays.py", "type": "Python" }
""" Structured arrays (:mod:`~harmonia.algorithms.arrays`) =========================================================================== Provide structured arrays for cosmological data. .. autosummary:: DataArray SphericalArray CartesianArray | """ from collections.abc import Sequence from itertools impo...
MikeSWangREPO_NAMEHarmoniaPATH_START.@Harmonia_extracted@Harmonia-master@harmonia@algorithms@arrays.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/analysis/plot.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> import collections import copy import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast from warnings import warn import...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@analysis@plot.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scattercarpet/marker/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattercarpet.marker" _path_str = "scattercarpet.marker.line" _valid_props = { "autoco...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scattercarpet@marker@_line.py@.PATH_END.py
{ "filename": "_griddash.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_griddash.py", "type": "Python" }
import _plotly_utils.basevalidators class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.radialaxis", **kwargs ): super(GriddashValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@radialaxis@_griddash.py@.PATH_END.py
{ "filename": "_usecolormap.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/contours/y/_usecolormap.py", "type": "Python" }
import _plotly_utils.basevalidators class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="usecolormap", parent_name="surface.contours.y", **kwargs ): super(UsecolormapValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@contours@y@_usecolormap.py@.PATH_END.py
{ "filename": "histogram_splitter.py", "repo_name": "minzastro/unidam", "repo_path": "unidam_extracted/unidam-master/unidam/core/histogram_splitter.py", "type": "Python" }
from __future__ import division from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from builtins import range from future import standard_library import numpy as np from scipy.signal import argrelextrema standard_library.install_aliases() def histogram...
minzastroREPO_NAMEunidamPATH_START.@unidam_extracted@unidam-master@unidam@core@histogram_splitter.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sblunt/orbitize", "repo_path": "orbitize_extracted/orbitize-main/orbitize/__init__.py", "type": "Python" }
import os __version__ = "3.1.0" # set Python env variable to keep track of example data dir orbitize_dir = os.path.dirname(__file__) DATADIR = os.path.join(orbitize_dir, "example_data/") # Detect a valid CUDA environment try: import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import...
sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@orbitize@__init__.py@.PATH_END.py
{ "filename": "intrinsics.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pythran/pythran/analyses/intrinsics.py", "type": "Python" }
""" Intrinsics gathers all intrinsics referenced in a module. """ from pythran.passmanager import ModuleAnalysis import pythran.intrinsic as intrinsic from pythran.utils import attr_to_path class Intrinsics(ModuleAnalysis): """ Gather all intrinsics used in the module """ def __init__(self): ""...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pythran@pythran@analyses@intrinsics.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/tickfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@tickfont@__init__.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/marker/line/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatter3d.marker.line", **kwargs ): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@marker@line@_cmax.py@.PATH_END.py
{ "filename": "_fixedrange.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/_fixedrange.py", "type": "Python" }
import _plotly_utils.basevalidators class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="layout.yaxis", **kwargs): super(FixedrangeValidator, 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@layout@yaxis@_fixedrange.py@.PATH_END.py
{ "filename": "simrephtml.py", "repo_name": "wokast/PyCactus", "repo_path": "PyCactus_extracted/PyCactus-master/SimRep/simrep/simrephtml.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals from builtins import str from builtins import filter from builtins import object import os import shutil from .htmlfactory import * class RepNav(object): def __init__(self, name, secs): self.name = name sel...
wokastREPO_NAMEPyCactusPATH_START.@PyCactus_extracted@PyCactus-master@SimRep@simrep@simrephtml.py@.PATH_END.py
{ "filename": "preds_analysis_uce.py", "repo_name": "devinamhn/RadioGalaxies-BNNs", "repo_path": "RadioGalaxies-BNNs_extracted/RadioGalaxies-BNNs-main/radiogalaxies_bnns/eval/uncertainty/preds_analysis_uce.py", "type": "Python" }
import torch import hamiltorch import torch.nn as nn import torch.nn.functional as F from pathlib import Path import numpy as np import torchvision.transforms as transforms from torchvision import datasets from torchvision.transforms import InterpolationMode from pytorch_lightning.demos.mnist_datamodule import MNIST ...
devinamhnREPO_NAMERadioGalaxies-BNNsPATH_START.@RadioGalaxies-BNNs_extracted@RadioGalaxies-BNNs-main@radiogalaxies_bnns@eval@uncertainty@preds_analysis_uce.py@.PATH_END.py
{ "filename": "C_halo_special_target_list.ipynb", "repo_name": "ChrisBoettner/plato", "repo_path": "plato_extracted/plato-main/notebooks/C_halo_special_target_list.ipynb", "type": "Jupyter Notebook" }
```python import pandas as pd from astropy import units as u from astropy.coordinates import SkyCoord from plato.stars import filter_p1_targets, filter_valid_targets from plato.utils import get_abspath ``` A new version of galpy (1.10.0) is available, please upgrade using pip/conda/... to get the latest feat...
ChrisBoettnerREPO_NAMEplatoPATH_START.@plato_extracted@plato-main@notebooks@C_halo_special_target_list.ipynb@.PATH_END.py
{ "filename": "PIDOptimizer.py", "repo_name": "jacotay7/pyRTC", "repo_path": "pyRTC_extracted/pyRTC-main/pyRTC/hardware/PIDOptimizer.py", "type": "Python" }
from pyRTC.utils import * from pyRTC.Pipeline import * from pyRTC.Optimizer import * import numpy as np class PIDOptimizer(Optimizer): def __init__(self, conf, loop) -> None: self.loop = loop self.mode = 'strehl' self.strehlShm, _, _ = initExistingShm("strehl") self.tipT...
jacotay7REPO_NAMEpyRTCPATH_START.@pyRTC_extracted@pyRTC-main@pyRTC@hardware@PIDOptimizer.py@.PATH_END.py
{ "filename": "test_instrument.py", "repo_name": "ExObsSim/ExoRad2-public", "repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/tests/test_instrument.py", "type": "Python" }
import logging import os import pathlib import unittest import h5py from test_options import payload_file from exorad.log import setLogLevel from exorad.models.instruments import Photometer from exorad.models.instruments import Spectrometer from exorad.output.hdf5 import HDF5Output from exorad.tasks import MergeChann...
ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@tests@test_instrument.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._widthsrc import WidthsrcValidator from ._width import WidthValidator from ._reversescale import ReversescaleValidator from ._colorsrc import ColorsrcValidator from ._colorscale import ColorscaleValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@line@__init__.py@.PATH_END.py
{ "filename": "get_aux_data.py", "repo_name": "LSSTDESC/lsstdesc-diffsky", "repo_path": "lsstdesc-diffsky_extracted/lsstdesc-diffsky-main/lsstdesc_diffsky/validation/get_aux_data.py", "type": "Python" }
import os import re import numpy as np from astropy.table import Table cosmos_dir = '/lus/eagle/projects/LastJourney/kovacs/COSMOS2020' restcolor_dir = '/lus/eagle/projects/LastJourney/kovacs/ValidationData/RestColorData' def get_data(restcolor_dir=restcolor_dir, cosmos_dir=cosmos_dir): aux_data = add_rest_color...
LSSTDESCREPO_NAMElsstdesc-diffskyPATH_START.@lsstdesc-diffsky_extracted@lsstdesc-diffsky-main@lsstdesc_diffsky@validation@get_aux_data.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/tests/logprob/__init__.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # 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 ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@logprob@__init__.py@.PATH_END.py
{ "filename": "_heatmapgl.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/template/data/_heatmapgl.py", "type": "Python" }
from plotly.graph_objs import Heatmapgl
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@template@data@_heatmapgl.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/slider/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.slider", **kwargs): super(FontValidator, 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@layout@slider@_font.py@.PATH_END.py
{ "filename": "airglow.py", "repo_name": "spacetelescope/calcos", "repo_path": "calcos_extracted/calcos-master/calcos/airglow.py", "type": "Python" }
from __future__ import absolute_import, print_function from . import cosutil from . import dispersion from .calcosparam import * # parameter definitions # Half width (pixels) of airglow region to be excluded. AIRGLOW_LyA = 250. # Lyman alpha AIRGLOW_FUV = 100. # anything but Lyman alpha, but still FUV ...
spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@calcos@airglow.py@.PATH_END.py
{ "filename": "plot_convergence_bondi.py", "repo_name": "AFD-Illinois/iharm3d", "repo_path": "iharm3d_extracted/iharm3d-master/script/test/convergence/plot_convergence_bondi.py", "type": "Python" }
################################################################################ # # # BONDI INFLOW CONVERGENCE PLOTS # # ...
AFD-IllinoisREPO_NAMEiharm3dPATH_START.@iharm3d_extracted@iharm3d-master@script@test@convergence@plot_convergence_bondi.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/sunburst/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._colorbar import ColorBar from ._line import Line from ._pattern import Pattern from . import colorbar else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = rela...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@sunburst@marker@__init__.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/unselected/marker/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.unselected.marker", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@unselected@marker@_size.py@.PATH_END.py
{ "filename": "_ticklabelposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="isosurface.colorbar", **kwargs, ): super(TicklabelpositionValidator, self).__init__(...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatterpolar/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.textfont" _valid_props = {"color", "colorsrc", "fa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatterpolar@_textfont.py@.PATH_END.py
{ "filename": "test_inverse_cdf.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/utils/random/tests/test_inverse_cdf.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import scipy.stats as stats from numpy.testing import assert_allclose from gammapy.utils.random import InverseCDFSampler def uniform_dist(x, a, b): return np.select([x <= a, x >= b], [0, 0], 1 / (b - a)) def gauss_dist(x, mu, sig...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@utils@random@tests@test_inverse_cdf.py@.PATH_END.py
{ "filename": "_textsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/_textsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="choroplethmapbox", **kwargs): super(TextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@_textsrc.py@.PATH_END.py
{ "filename": "test_linear.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/tests/python/test_linear.py", "type": "Python" }
from hypothesis import given, note, settings, strategies import xgboost as xgb from xgboost import testing as tm pytestmark = tm.timeout(20) parameter_strategy = strategies.fixed_dictionaries({ 'booster': strategies.just('gblinear'), 'eta': strategies.floats(0.01, 0.25), 'tolerance': strategies.floats(1...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@tests@python@test_linear.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Cosmo/__init__.py", "type": "Python" }
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Cosmo@__init__.py@.PATH_END.py
{ "filename": "eventwrapper.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/eventwrapper.py", "type": "Python" }
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@eventwrapper.py@.PATH_END.py
{ "filename": "test__basinhopping.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/optimize/tests/test__basinhopping.py", "type": "Python" }
""" Unit tests for the basin hopping global minimization algorithm. """ from __future__ import division, print_function, absolute_import import copy from numpy.testing import assert_almost_equal, assert_equal, assert_ from pytest import raises as assert_raises import numpy as np from numpy import cos, sin from scipy....
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@optimize@tests@test__basinhopping.py@.PATH_END.py
{ "filename": "learnlet_training.py", "repo_name": "utsav-akhaury/understanding-unets", "repo_path": "understanding-unets_extracted/understanding-unets-master/learning_wavelets/training_scripts/learnlet_training.py", "type": "Python" }
import os import os.path as op import time import click from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint, LearningRateScheduler import tensorflow as tf from learning_wavelets.config import LOGS_DIR, CHECKPOINTS_DIR from learning_wavelets.data.datasets import im_dataset_div2k, im_dataset_bsd500 from...
utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@learning_wavelets@training_scripts@learnlet_training.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "nickhand/pyRSD", "repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsdfit/plotly/__init__.py", "type": "Python" }
try: import plotly.offline as py import plotly.graph_objs as go import plotly.tools as pytools except ImportError as e: raise ImportError("install 'plotly' to use interactive plotting features") def enable_latex(): """ A workaround in :mod:`plotly` where latex labels are broken in notebooks. ...
nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsdfit@plotly@__init__.py@.PATH_END.py
{ "filename": "_showexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatterpolargl.marker.colorbar", **kwargs ): super(ShowexponentValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@marker@colorbar@_showexponent.py@.PATH_END.py
{ "filename": "map_defun.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/experimental/ops/map_defun.py", "type": "Python" }
# Copyright 2018 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@data@experimental@ops@map_defun.py@.PATH_END.py
{ "filename": "bouwens2017.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/input/litdata/bouwens2017.py", "type": "Python" }
""" Bouwens et al., 2017, ApJ, 843, 129 Table 4 and volume estimate from text. """ info = \ { 'reference': 'Bouwens et al., 2017, ApJ, 843, 129', 'data': 'Table 5', 'label': 'Bouwens+ (2017)' } import numpy as np redshifts = [6.] wavelength = 1600. # I think? ULIM = -1e10 tmp_data = {} tmp_data['lf'] = \ { ...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@input@litdata@bouwens2017.py@.PATH_END.py
{ "filename": "securitymethods.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/auth/securitymethods.py", "type": "Python" }
ANONYMOUS = 'anonymous' BASIC = 'ivo://ivoa.net/sso#BasicAA' CLIENT_CERTIFICATE = 'ivo://ivoa.net/sso#tls-with-certificate' COOKIE = 'ivo://ivoa.net/sso#cookie'
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@auth@securitymethods.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/setup.py", "type": "Python" }
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pygad", version="3.3.1", author="Ahmed Fawzy Gad", install_requires=["numpy", "matplotlib", "cloudpickle",], author_email="ahmed.f.gad@gmail.com", description="PyGAD: A Pytho...
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@setup.py@.PATH_END.py
{ "filename": "pyright_diff.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/scripts/pyright_diff.py", "type": "Python" }
import json import sys from typing import Any, Dict, NamedTuple class Diagnostic(NamedTuple): """Structured representation of a diagnostic for easier table formatting.""" file: str line: int character: int severity: str message: str def normalize_diagnostic(diagnostic: Dict[Any, Any]) -> Di...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@scripts@pyright_diff.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/inference/trainers/npe/__init__.py", "type": "Python" }
from sbi.inference.trainers.npe.npe_a import NPE_A # noqa: F401 from sbi.inference.trainers.npe.npe_b import NPE_B # noqa: F401 from sbi.inference.trainers.npe.npe_base import PosteriorEstimator # noqa: F401 from sbi.inference.trainers.npe.npe_c import NPE_C # noqa: F401 SNPE_A = NPE_A SNPE_B = NPE_C SNPE_C = SNPE...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@trainers@npe@__init__.py@.PATH_END.py
{ "filename": "generate_Pk_example.py", "repo_name": "yacobozdalkiran/CLASS_mod", "repo_path": "CLASS_mod_extracted/CLASS_mod-main/class_public-master/external/external_Pk/generate_Pk_example.py", "type": "Python" }
#!/usr/bin/python from __future__ import print_function import sys from math import exp # README: # # This is an example python script for the external_Pk mode of Class. # It generates the primordial spectrum of LambdaCDM. # It can be edited and used directly, though keeping a copy of it is recommended. # # Two (maybe...
yacobozdalkiranREPO_NAMECLASS_modPATH_START.@CLASS_mod_extracted@CLASS_mod-main@class_public-master@external@external_Pk@generate_Pk_example.py@.PATH_END.py
{ "filename": "run_and_gather_logs_lib.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/tools/test/run_and_gather_logs_lib.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@tools@test@run_and_gather_logs_lib.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "Pranab-JD/iPIC3D-CPU-SPACE-CoE", "repo_path": "iPIC3D-CPU-SPACE-CoE_extracted/iPIC3D-CPU-SPACE-CoE-main/README.md", "type": "Markdown" }
# iPIC3D ## Requirements - gcc/g++ compiler - cmake (minimum version 2.8) - MPI (OpenMPI or MPICH) - HDF5 (optional) - Paraview/Catalyst (optional) If you are on a supercomputer or cluster, it's highly possible that you can use tools like `module` to change the compiler, MPI or libraries used. ## Installat...
Pranab-JDREPO_NAMEiPIC3D-CPU-SPACE-CoEPATH_START.@iPIC3D-CPU-SPACE-CoE_extracted@iPIC3D-CPU-SPACE-CoE-main@README.md@.PATH_END.py
{ "filename": "CompatibleDifferenceSpecificThermalEnergyPolicyInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Hydro/CompatibleDifferenceSpecificThermalEnergyPolicyInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "Hydro/CompatibleDifferenceSpecificThermalEnergyPolicy.cc" namespace Spheral ...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Hydro@CompatibleDifferenceSpecificThermalEnergyPolicyInst.cc.py@.PATH_END.py
{ "filename": "Generator.py", "repo_name": "COSMOGRAIL/PyCS", "repo_path": "PyCS_extracted/PyCS-master/pycs/sim/old/Generator.py", "type": "Python" }
""" Generate simulated light curve with the PureLightCurve """ from PureLightCurve import * from SimLightCurve import * from MlCurve import * from util import * import sys sys.path.append("../../") from pycs.gen import lc class Generator: """ This class is the main class of this program, it takes a pure light curv...
COSMOGRAILREPO_NAMEPyCSPATH_START.@PyCS_extracted@PyCS-master@pycs@sim@old@Generator.py@.PATH_END.py
{ "filename": "image_data_new.py", "repo_name": "sibirrer/AstroObjectAnalyser", "repo_path": "AstroObjectAnalyser_extracted/AstroObjectAnalyser-master/astroObjectAnalyser/image_data_new.py", "type": "Python" }
__author__ = 'sibirrer' #external modules import astropy.io.fits as pyfits import astropy.wcs as pywcs import numpy as np import pyextract.image_config as ImageConfig import astropy.coordinates as coords #internal modules from astroObjectAnalyser.DataAnalysis.analysis import Analysis from astroObjectAnalyser.DataAna...
sibirrerREPO_NAMEAstroObjectAnalyserPATH_START.@AstroObjectAnalyser_extracted@AstroObjectAnalyser-master@astroObjectAnalyser@image_data_new.py@.PATH_END.py
{ "filename": "_increasing.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/ohlc/_increasing.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Increasing(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.increasing" _valid_props = {"line"} # line # ---- @...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@ohlc@_increasing.py@.PATH_END.py
{ "filename": "correct_files.py", "repo_name": "saltastro/polsalt", "repo_path": "polsalt_extracted/polsalt-master/scripts/correct_files.py", "type": "Python" }
import os import sys import copy import numpy as np from astropy.io import fits polsaltdir = '/'.join(os.path.realpath(__file__).split('/')[:-2]) datadir = polsaltdir+'/polsalt/data/' sys.path.extend((polsaltdir+'/polsalt/',)) from specpolwollaston import correct_wollaston, read_wollaston def correct_files(hdu,tilt=...
saltastroREPO_NAMEpolsaltPATH_START.@polsalt_extracted@polsalt-master@scripts@correct_files.py@.PATH_END.py
{ "filename": "_opacitysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/_opacitysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="barpolar.marker", **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@_opacitysrc.py@.PATH_END.py
{ "filename": "treering_skybg2.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/lsst/treering_skybg2.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@lsst@treering_skybg2.py@.PATH_END.py
{ "filename": "check_group_membership.py", "repo_name": "SWIFTSIM/SOAP", "repo_path": "SOAP_extracted/SOAP-master/check_group_membership.py", "type": "Python" }
#!/bin/env python import os import sys import numpy as np import h5py import virgo.mpi.parallel_sort as psort import virgo.mpi.parallel_hdf5 as phdf5 from mpi4py import MPI comm = MPI.COMM_WORLD comm_size = comm.Get_size() comm_rank = comm.Get_rank() def check_membership( membership_filenames, nr_memb_fil...
SWIFTSIMREPO_NAMESOAPPATH_START.@SOAP_extracted@SOAP-master@check_group_membership.py@.PATH_END.py
{ "filename": "array_like.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/typing/tests/data/pass/array_like.py", "type": "Python" }
from __future__ import annotations from typing import Any, TYPE_CHECKING import numpy as np if TYPE_CHECKING: from numpy._typing import NDArray, ArrayLike, _SupportsArray x1: ArrayLike = True x2: ArrayLike = 5 x3: ArrayLike = 1.0 x4: ArrayLike = 1 + 1j x5: ArrayLike = np.int8(1) x6: ArrayLike = np.float64(1) x7...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@typing@tests@data@pass@array_like.py@.PATH_END.py
{ "filename": "SECURITY.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/libs/protobuf/SECURITY.md", "type": "Markdown" }
To report security concerns or vulnerabilities within protobuf, please use Google's official channel for reporting these. https://www.google.com/appserve/security-bugs/m2/new
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@protobuf@SECURITY.md@.PATH_END.py
{ "filename": "python_net_approx.ipynb", "repo_name": "pynucastro/pynucastro", "repo_path": "pynucastro_extracted/pynucastro-main/examples/python_net_approx.ipynb", "type": "Jupyter Notebook" }
```python import pynucastro as pyna ``` ```python reaclib_lib = pyna.ReacLibLibrary() ``` ```python all_reactants = ["p", "he4", "c12", "o16", "ne20", "mg24", "si28", "s32", "ar36", "ca40", "ti44", "cr48", "fe52", "ni56", "al27", "p31", "cl35", "k39", "sc43", "v47"...
pynucastroREPO_NAMEpynucastroPATH_START.@pynucastro_extracted@pynucastro-main@examples@python_net_approx.ipynb@.PATH_END.py
{ "filename": "test_channelizer.ipynb", "repo_name": "MazinLab/MKIDGen3", "repo_path": "MKIDGen3_extracted/MKIDGen3-main/notebooks/old/test_channelizer.ipynb", "type": "Jupyter Notebook" }
# Imports, Definitions, and Instantiating the overlay ```python from mkidgen3.daccomb import generate as gen_comb from mkidgen3.testutils import * import mkidgen3.testutils as tu from mkidgen3.fixedpoint import * from mkidgen3.pynq import dma_status ## also activates the drivers import logging import numpy as np imp...
MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@notebooks@old@test_channelizer.ipynb@.PATH_END.py
{ "filename": "subscriptions.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/client/subscriptions.py", "type": "Python" }
import asyncio from collections.abc import Iterable from logging import Logger from typing import Any, Generic, Optional, TypeVar import orjson import websockets import websockets.exceptions from starlette.status import WS_1008_POLICY_VIOLATION from typing_extensions import Self from prefect._internal.schemas.bases i...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@client@subscriptions.py@.PATH_END.py
{ "filename": "_namelengthsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="choropleth.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@hoverlabel@_namelengthsrc.py@.PATH_END.py
{ "filename": "smith_kcorr.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/smith_kcorr.py", "type": "Python" }
import os import numpy as np import matplotlib.pyplot as plt import os from scipy.interpolate import interp1d from pkg_resources import resource_filename raw_dir = os.environ['CODE_ROOT'] + '/data/' class GAMA_KCorrection(object): def __init__(self, band, kind="linear"): """ Colou...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@smith_kcorr.py@.PATH_END.py
{ "filename": "astropy-bls-tutorial-checkpoint.ipynb", "repo_name": "noraeisner/LATTE", "repo_path": "LATTE_extracted/LATTE-master/.ipynb_checkpoints/astropy-bls-tutorial-checkpoint.ipynb", "type": "Jupyter Notebook" }
``` %matplotlib inline %config IPython.matplotlib.backend = "retina" from matplotlib import rcParams rcParams["figure.dpi"] = 150 rcParams["savefig.dpi"] = 150 ``` In this tutorial, we will demonstrate the usage patterns for the `astropy.stats.bls` package. To run this tutorial, you need to install the `transit-period...
noraeisnerREPO_NAMELATTEPATH_START.@LATTE_extracted@LATTE-master@.ipynb_checkpoints@astropy-bls-tutorial-checkpoint.ipynb@.PATH_END.py
{ "filename": "gc_runfit.py", "repo_name": "GalacticDynamics-Oxford/Agama", "repo_path": "Agama_extracted/Agama-master/py/gc_runfit.py", "type": "Python" }
#!/usr/bin/env python ''' This file is part of the Gaia Challenge, and contains the main fitting routine. The Gaia Challenge (or, more specifically, the "Spherical and triaxial" group) presents the following task: infer the gravitational potential, created entirely by the dark matter, from the array of discrete tracer...
GalacticDynamics-OxfordREPO_NAMEAgamaPATH_START.@Agama_extracted@Agama-master@py@gc_runfit.py@.PATH_END.py
{ "filename": "_tickwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(TickwidthValidator, self).__init__( plot...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@colorbar@_tickwidth.py@.PATH_END.py
{ "filename": "hod_modeling_tutorial5.ipynb", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/docs/notebooks/hod_modeling/hod_modeling_tutorial5.ipynb", "type": "Jupyter Notebook" }
# Example 5: An HOD model with cross-component dependencies This notebook is intended to accompany the corresponding page of the Halotools documentation on HOD-style model building. Although the tutorial on `halotools.readthedocs.io` is in principle comprehensive and stand-alone, there is supplementary material cover...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@docs@notebooks@hod_modeling@hod_modeling_tutorial5.ipynb@.PATH_END.py
{ "filename": "archival.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/ChiantiPy/tools/archival.py", "type": "Python" }
""" Functions for reading pre-v8 CHIANTI files """ import os #from .FortranFormat import * from ChiantiPy.fortranformat import FortranRecordReader import ChiantiPy.tools.util as util # # ------------------------------------------------------------------------------------- # def elvlcRead(ions, filename =...
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@ChiantiPy@tools@archival.py@.PATH_END.py
{ "filename": "_traceref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/error_z/_traceref.py", "type": "Python" }
import _plotly_utils.basevalidators class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scatter3d.error_z", **kwargs ): super(TracerefValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@error_z@_traceref.py@.PATH_END.py
{ "filename": "_labelpadding.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/aaxis/_labelpadding.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="labelpadding", parent_name="carpet.aaxis", **kwargs ): super(LabelpaddingValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@aaxis@_labelpadding.py@.PATH_END.py
{ "filename": "TT_lite.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2018_highl_plik/TT_lite.py", "type": "Python" }
from cobaya.likelihoods.base_classes import Planck2018Clik class TT_lite(Planck2018Clik): r""" High-$\ell$ temperature-only, foreground-marginalized \textsc{plik\_lite} likelihood of Planck's 2018 data release \cite{Aghanim:2019ame}. """ pass
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2018_highl_plik@TT_lite.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@_colorsrc.py@.PATH_END.py
{ "filename": "DASpec_reduce.py", "repo_name": "PuDu-Astro/DASpec", "repo_path": "DASpec_extracted/DASpec-master/DASpec_reduce.py", "type": "Python" }
#!/usr/bin/env python def DASpec_reduce(filename): l = open(filename).readlines() sep = [i[0] for i in zip(range(len(l)), l) if '####' in i[1]] name = [l[1 + i[0]].replace('\n', '') for i in zip(range(len(l)), l) if '####' in i[1]] name_only = set(name) name_only = list(name_only) sep_name = zi...
PuDu-AstroREPO_NAMEDASpecPATH_START.@DASpec_extracted@DASpec-master@DASpec_reduce.py@.PATH_END.py
{ "filename": "show_refs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/testing/plugin/show_refs.py", "type": "Python" }
"""Simple script to show reference holding behavior. This is used by a companion test case. """ from __future__ import print_function import gc class C(object): def __del__(self): pass #print 'deleting object...' # dbg if __name__ == '__main__': c = C() c_refs = gc.get_referrers(c) ref_ids...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@testing@plugin@show_refs.py@.PATH_END.py
{ "filename": "SNRtools.py", "repo_name": "CosmoStatGW/DarkSirensStat", "repo_path": "DarkSirensStat_extracted/DarkSirensStat-master/DarkSirensStat/SNRtools.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 24 12:56:37 2021 @author: Michi """ import numpy as np import time import pycbc.waveform import pycbc.filter import pycbc.psd from pycbc.types import FrequencySeries from scipy.signal import savgol_filter import h5py from scipy.interpolate import R...
CosmoStatGWREPO_NAMEDarkSirensStatPATH_START.@DarkSirensStat_extracted@DarkSirensStat-master@DarkSirensStat@SNRtools.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "danhey/echelle", "repo_path": "echelle_extracted/echelle-master/docs/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
danheyREPO_NAMEechellePATH_START.@echelle_extracted@echelle-master@docs@conf.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "ali-beheshti/Astro-Paint", "repo_path": "Astro-Paint_extracted/Astro-Paint-master/paper/paper.md", "type": "Markdown" }
--- title: 'AstroPaint: A Python Package for Painting Halo Catalogs into Celestial Maps' tags: - python - astrophysics - simulation - visualization - extragalactic foregrounds authors: - name: Siavash Yasini^[corresponding author] orcid: 0000-0003-1978-6325 affiliation: 1 - name: Marcelo Alvarez...
ali-beheshtiREPO_NAMEAstro-PaintPATH_START.@Astro-Paint_extracted@Astro-Paint-master@paper@paper.md@.PATH_END.py
{ "filename": "data_operations.py", "repo_name": "bcalden/ClusterPyXT", "repo_path": "ClusterPyXT_extracted/ClusterPyXT-master/data_operations.py", "type": "Python" }
import numpy as np def normalize_data(image: np.ndarray): image = np.nan_to_num(image) normalized_image = (image - image.min()) / (image.max() - image.min()) return normalized_image def make_sizes_match(image1, image2): # quit early if the image shapes already match if image1.shape == image2.sh...
bcaldenREPO_NAMEClusterPyXTPATH_START.@ClusterPyXT_extracted@ClusterPyXT-master@data_operations.py@.PATH_END.py
{ "filename": "PULL_REQUEST_TEMPLATE.md", "repo_name": "joshspeagle/dynesty", "repo_path": "dynesty_extracted/dynesty-master/.github/PULL_REQUEST_TEMPLATE.md", "type": "Markdown" }
<!-- Thanks for contributing a pull request! Before submitting a PR please take a look at the [CONTRIBUTING.md](CONTRIBUTING.md) page. --> ### Reference issue ### What does you PR implement/fix ?
joshspeagleREPO_NAMEdynestyPATH_START.@dynesty_extracted@dynesty-master@.github@PULL_REQUEST_TEMPLATE.md@.PATH_END.py
{ "filename": "plot_adapt_rgb.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/doc/examples/color_exposure/plot_adapt_rgb.py", "type": "Python" }
""" ========================================= Adapting gray-scale filters to RGB images ========================================= There are many filters that are designed to work with gray-scale images but not with color images. To simplify the process of creating functions that can adapt to RGB images, scikit-image p...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@examples@color_exposure@plot_adapt_rgb.py@.PATH_END.py