metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_theory_cmb.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/theory/_theory_cmb.py", "type": "Python" }
from scipy.interpolate import interp1d from scipy.integrate import quad from hazma.cmb import vx_cmb, f_eff_g, f_eff_ep, p_ann_planck_temp_pol import numpy as np class TheoryCMB: def cmb_limit(self, x_kd=1.0e-4, p_ann=p_ann_planck_temp_pol): r""" Computes the CMB limit on <sigma v>. This...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@theory@_theory_cmb.py@.PATH_END.py
{ "filename": "generic.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/filters/rank/generic.py", "type": "Python" }
""" General Description ------------------- These filters compute the local histogram at each pixel, using a sliding window similar to the method described in [1]_. A histogram is built using a moving window in order to limit redundant computation. The moving window follows a snake-like path: ...--------------------...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@filters@rank@generic.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/insidetextfont/__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...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@insidetextfont@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "carronj/LensIt", "repo_path": "LensIt_extracted/LensIt-master/lensit/sims/__init__.py", "type": "Python" }
carronjREPO_NAMELensItPATH_START.@LensIt_extracted@LensIt-master@lensit@sims@__init__.py@.PATH_END.py
{ "filename": "util_test.py", "repo_name": "aymgal/COOLEST", "repo_path": "COOLEST_extracted/COOLEST-main/test/api/util_test.py", "type": "Python" }
__author__ = 'aymgal' import pytest import numpy as np import numpy.testing as npt from coolest.api import util @pytest.mark.parametrize("field_of_view_x", [[0., 2.], [-1., 1.], [-2., 0.]]) @pytest.mark.parametrize("field_of_view_y", [[0., 2.], [-1., 1.], [-2., 0.]]) @pytest.mark.parametrize("num_pix_x", [10, 11])...
aymgalREPO_NAMECOOLESTPATH_START.@COOLEST_extracted@COOLEST-main@test@api@util_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tomasstolker/species", "repo_path": "species_extracted/species-main/species/__init__.py", "type": "Python" }
from species.core.species_init import SpeciesInit __author__ = "Tomas Stolker" __license__ = "MIT" __version__ = "0.9.0" __maintainer__ = "Tomas Stolker" __email__ = "stolker@strw.leidenuniv.nl" __status__ = "Development"
tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@__init__.py@.PATH_END.py
{ "filename": "_valueminus.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/error_y/_valueminus.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter3d.error_y", **kwargs ): super(ValueminusValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@error_y@_valueminus.py@.PATH_END.py
{ "filename": "test_antenna_uvw_decomposition.py", "repo_name": "ratt-ru/montblanc", "repo_path": "montblanc_extracted/montblanc-master/montblanc/tests/test_antenna_uvw_decomposition.py", "type": "Python" }
import unittest from pprint import pformat from six.moves import range import numpy as np from montblanc.util import antenna_uvw class TestAntennaUvWDecomposition(unittest.TestCase): def test_uvw_antenna(self): na = 17 ntime = 1 # For both auto correlations and without them for ...
ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@tests@test_antenna_uvw_decomposition.py@.PATH_END.py
{ "filename": "widget_bool.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py3/ipywidgets/widgets/widget_bool.py", "type": "Python" }
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Bool class. Represents a boolean using a widget. """ from .widget_description import DescriptionStyle, DescriptionWidget from .widget_core import CoreWidget from .valuewidget import ValueWidget from .widget import...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py3@ipywidgets@widgets@widget_bool.py@.PATH_END.py
{ "filename": "12497_rval_150015.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/M-class/AR_12497/12497_rval_150015.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 2 09:09:21 2023 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "12497" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@M-class@AR_12497@12497_rval_150015.py@.PATH_END.py
{ "filename": "lambertw.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/special/lambertw.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from ._ufuncs import _lambertw def lambertw(z, k=0, tol=1e-8): r""" lambertw(z, k=0, tol=1e-8) Lambert W function. The Lambert W function `W(z)` is defined as the inverse function of ``w * exp(w)``. In other words, the value of ``...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@special@lambertw.py@.PATH_END.py
{ "filename": "PreProcess.py", "repo_name": "sPaMFouR/RedPipe", "repo_path": "RedPipe_extracted/RedPipe-master/preprocess/PreProcess.py", "type": "Python" }
#!/usr/bin/env python # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # # xxxxxxxxxxxxxxxxxxxxxxx------------------------PERFORMS PRE-PROCESSING----------------------xxxxxxxxxxxxxxxxxxxxxxx # # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
sPaMFouRREPO_NAMERedPipePATH_START.@RedPipe_extracted@RedPipe-master@preprocess@PreProcess.py@.PATH_END.py
{ "filename": "file_handling.py", "repo_name": "markusbonse/applefy", "repo_path": "applefy_extracted/applefy-main/applefy/utils/file_handling.py", "type": "Python" }
""" Simple helper functions to handle files. """ import os import json import warnings from typing import List, Dict, Tuple, Union from copy import deepcopy from pathlib import Path import h5py from astropy.io import fits import numpy as np def read_apples_with_apples_root() -> str: """ A simple function wh...
markusbonseREPO_NAMEapplefyPATH_START.@applefy_extracted@applefy-main@applefy@utils@file_handling.py@.PATH_END.py
{ "filename": "conversion.py", "repo_name": "ratt-ru/QuartiCal", "repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/conversion.py", "type": "Python" }
import dask.array as da import numpy as np from quartical.gains.parameterized_gain import ParameterizedGain class Converter(object): def __init__(self, gain_obj): self.parameterized = issubclass(gain_obj.__class__, ParameterizedGain) self.converted_dtype = gain_obj.converted_dtype self.na...
ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@conversion.py@.PATH_END.py
{ "filename": "initialise.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/colorama/initialise.py", "type": "Python" }
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import atexit import contextlib import sys from .ansitowin32 import AnsiToWin32 orig_stdout = None orig_stderr = None wrapped_stdout = None wrapped_stderr = None atexit_done = False def reset_all(): if AnsiToWin32 is not None: # Is...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@colorama@initialise.py@.PATH_END.py
{ "filename": "jla_lite.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/sn/jla_lite.py", "type": "Python" }
from cobaya.likelihoods.base_classes import SN class JLA_lite(SN): r""" Likelihood (marginalized over nuisance parameters) of the JLA type Ia supernova sample \cite{Betoule:2014frx}, based on observations obtained by the SDSS-II and SNLS collaborations. """ pass
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@sn@jla_lite.py@.PATH_END.py
{ "filename": "xcom.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/ixpeobssim/irfgen/xcom.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2017--2019, the ixpeobssim team. # # 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 versio...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@ixpeobssim@irfgen@xcom.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "pmelchior/scarlet", "repo_path": "scarlet_extracted/scarlet-master/README.md", "type": "Markdown" }
[![](https://travis-ci.org/pmelchior/scarlet.svg?branch=master)](https://travis-ci.org/pmelchior/scarlet) [![](https://img.shields.io/github/license/pmelchior/scarlet.svg)](https://github.com/pmelchior/scarlet/blob/master/LICENSE.md) [![DOI](https://img.shields.io/badge/DOI-10.1016%2Fj.ascom.2018.07.001-blue.svg)](http...
pmelchiorREPO_NAMEscarletPATH_START.@scarlet_extracted@scarlet-master@README.md@.PATH_END.py
{ "filename": "sdssTest.py", "repo_name": "AstroVPK/kali", "repo_path": "kali_extracted/kali-master/examples/sdssTest.py", "type": "Python" }
import numpy as np import argparse import os import sys import pdb try: import kali.carma import kali.s82 except ImportError: print 'kali is not setup. Setup kali by sourcing bin/setup.sh' sys.exit(1) parser = argparse.ArgumentParser() parser.add_argument('-pwd', '--pwd', type=str, default=os.path.joi...
AstroVPKREPO_NAMEkaliPATH_START.@kali_extracted@kali-master@examples@sdssTest.py@.PATH_END.py
{ "filename": "_xcalendar.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_xcalendar.py", "type": "Python" }
import _plotly_utils.basevalidators class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="histogram2d", **kwargs): super(XcalendarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_xcalendar.py@.PATH_END.py
{ "filename": "clustering.py", "repo_name": "HETDEX/elixer", "repo_path": "elixer_extracted/elixer-main/elixer/clustering.py", "type": "Python" }
""" Scans elixer h5 file for neighbors with matching emission lines to cluster at a common redshift The intent is largely to resolve redshift mis-classifications as high-z that are actually single emission lines in the outskirts of a bright object where the aperture fails to get significant continuum """ from __futu...
HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@clustering.py@.PATH_END.py
{ "filename": "tfsa-2022-051.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-051.md", "type": "Markdown" }
## TFSA-2022-051: Integer overflow in Grappler cost estimation of crop and resize operation ### CVE Number CVE-2022-23587 ### Impact Under certain scenarios, Grappler component of TensorFlow is vulnerable to an integer overflow during [cost estimation for crop and resize](https://github.com/tensorflow/tensorflow/blob...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-051.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Sampling/__init__.py", "type": "Python" }
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Sampling@__init__.py@.PATH_END.py
{ "filename": "tpu_embedding_v1_checkpoint_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tests/tpu_embedding_v1_checkpoint_test.py", "type": "Python" }
# Copyright 2022 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@tpu@tests@tpu_embedding_v1_checkpoint_test.py@.PATH_END.py
{ "filename": "test_auto_background.py", "repo_name": "JohannesBuchner/BXA", "repo_path": "BXA_extracted/BXA-master/examples/sherpa/test_auto_background.py", "type": "Python" }
import json import numpy as np import sherpa.astro.ui as shp from bxa.sherpa.background.pca import auto_background def test_chandra_pcabkg(): _reset_sherpa() _load_chandra_data(emin=0.5, emax=8) filename = "chandra/179_pcabkg.json" bkgmodel = auto_background(1, max_lines=0) # _save_pca_params(bk...
JohannesBuchnerREPO_NAMEBXAPATH_START.@BXA_extracted@BXA-master@examples@sherpa@test_auto_background.py@.PATH_END.py
{ "filename": "particle_filters.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/particle_filters.py", "type": "Python" }
import copy from contextlib import contextmanager from yt.fields.field_info_container import NullFunc, TranslationFunc from yt.funcs import mylog from yt.utilities.exceptions import YTIllDefinedFilter # One to one mapping filter_registry: dict[str, "ParticleFilter"] = {} class DummyFieldInfo: particle_type = Tr...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@particle_filters.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/legendgrouptitle/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@legendgrouptitle@font@_family.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatterpolar/unselected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolar.unselected" _path_str = "scatterpolar.unselected.marker" _valid_props = {"color...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatterpolar@unselected@_marker.py@.PATH_END.py
{ "filename": "_hovertext.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/_hovertext.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="bar", **kwargs): super(HovertextValidator, 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@bar@_hovertext.py@.PATH_END.py
{ "filename": "_showgrid.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_showgrid.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.geo.lonaxis", **kwargs ): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@geo@lonaxis@_showgrid.py@.PATH_END.py
{ "filename": "params.py", "repo_name": "dtamayo/reboundx", "repo_path": "reboundx_extracted/reboundx-main/reboundx/params.py", "type": "Python" }
import rebound import sys if sys.version_info[:2] >= (3, 8): from collections.abc import MutableMapping else: from collections import MutableMapping from .extras import Param, Node, Force, Operator, Extras, REBX_CTYPES from . import clibreboundx from ctypes import byref, c_double, c_int, c_int32, c_int64, c_uin...
dtamayoREPO_NAMEreboundxPATH_START.@reboundx_extracted@reboundx-main@reboundx@params.py@.PATH_END.py
{ "filename": "test_spectools.py", "repo_name": "danielrd6/ifscube", "repo_path": "ifscube_extracted/ifscube-master/tests/test_spectools.py", "type": "Python" }
import numpy as np from astropy import units from ifscube.elprofile import gauss_vel from ifscube import spectools def test_find_intermediary_value(): x = np.array([0, 1, 2, 3, 4, 5]) y = np.array([10, 20, 30, 40, 50]) xv = spectools.find_intermediary_value(x, y, 31) assert xv == 2.1 def test_veloc...
danielrd6REPO_NAMEifscubePATH_START.@ifscube_extracted@ifscube-master@tests@test_spectools.py@.PATH_END.py
{ "filename": "DcxImagePlugin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/DcxImagePlugin.py", "type": "Python" }
# # The Python Imaging Library. # $Id$ # # DCX file handling # # DCX is a container file format defined by Intel, commonly used # for fax applications. Each DCX file consists of a directory # (a list of file offsets) followed by a set of (usually 1-bit) # PCX files. # # History: # 1995-09-09 fl Created # 1996-03-20 ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@DcxImagePlugin.py@.PATH_END.py
{ "filename": "discrete.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/distributions/discrete.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@pymc@distributions@discrete.py@.PATH_END.py
{ "filename": "test_gaussian.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/infer/autoguide/test_gaussian.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from collections import OrderedDict, namedtuple import pytest import torch import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.infer import SVI, JitTrace_ELBO, Predictive, Trace_ELBO from pyro.infer...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@infer@autoguide@test_gaussian.py@.PATH_END.py
{ "filename": "crosscorrNorm.py", "repo_name": "eogarvin/MLCCS", "repo_path": "MLCCS_extracted/MLCCS-main/ml_spectroscopy/crosscorrNorm.py", "type": "Python" }
import numpy as np from PyAstronomy.pyaC import pyaErrors as PE from PyAstronomy.pyasl import _ic def crosscorrRVnorm(w, f, tw, tf, rvmin, rvmax, drv, mode="doppler", skipedge=0, edgeTapering=None): """ Cross-correlate a spectrum with a template. The algorithm implemented here works as follows: For eac...
eogarvinREPO_NAMEMLCCSPATH_START.@MLCCS_extracted@MLCCS-main@ml_spectroscopy@crosscorrNorm.py@.PATH_END.py
{ "filename": "notebook.py", "repo_name": "ashleychontos/sort-a-survey", "repo_path": "sort-a-survey_extracted/sort-a-survey-main/sortasurvey/notebook.py", "type": "Python" }
import os import numpy as np import pandas as pd import time as clock from tqdm import tqdm pd.set_option('mode.chained_assignment', None) from sortasurvey.sample import Sample from sortasurvey import observing from sortasurvey import utils class Survey: """ Loads in survey information and the vetted survey ...
ashleychontosREPO_NAMEsort-a-surveyPATH_START.@sort-a-survey_extracted@sort-a-survey-main@sortasurvey@notebook.py@.PATH_END.py
{ "filename": "numpy_backend.py", "repo_name": "tslearn-team/tslearn", "repo_path": "tslearn_extracted/tslearn-main/tslearn/backend/numpy_backend.py", "type": "Python" }
"""The Numpy backend. Several backend functions are inspired from a python package about Machine Learning in Riemannian manifolds named geomstats [JMLR:v21:19-027], also implementing several backends. References ---------------- [JMLR:v21:19-027] Nina Miolane, Nicolas Guigui, Alice Le Brigant, Johan Mathe, Benjamin H...
tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@backend@numpy_backend.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "stevecunnington/gridimp", "repo_path": "gridimp_extracted/gridimp-main/scripts/main.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter from astropy import units as u ##### CHANGE THIS TO PIP INSTALL GRIDIMP ############## import sys sys.path.insert(1, '/Users/user/Documents/gridimp/gridimp') sys.path.insert(1, '/users/scunnington/gridimp/gridimp') sys.path.i...
stevecunningtonREPO_NAMEgridimpPATH_START.@gridimp_extracted@gridimp-main@scripts@main.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/erg/satellite/erg/mepi/__init__.py", "type": "Python" }
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@erg@satellite@erg@mepi@__init__.py@.PATH_END.py
{ "filename": "kernels.py", "repo_name": "dfm/george", "repo_path": "george_extracted/george-main/templates/kernels.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = [ "Kernel", "Sum", "Product", {%- for spec in specs %} "{{ spec.name }}", {%- endfor %} ] import numpy as np from .modeling import Model, ModelSet from .metrics import Metric, Subspace from .kernel_interface import Ker...
dfmREPO_NAMEgeorgePATH_START.@george_extracted@george-main@templates@kernels.py@.PATH_END.py
{ "filename": "igimf_epoch_55.py", "repo_name": "juzikong/photGalIMF", "repo_path": "photGalIMF_extracted/photGalIMF-main/simulation_results_from_galaxy_evol/example/igimf_epoch_55.py", "type": "Python" }
# File to define a custom IMF # The return value represents the chosen IMF value for the input mass def custom_imf(mass, time): # there is no time dependence for IGIMF if mass < 0.08: return 0 elif mass < 0.101: return -881912095498.0004 * mass + 126349388048.4443 elif mass < 0.10201: ...
juzikongREPO_NAMEphotGalIMFPATH_START.@photGalIMF_extracted@photGalIMF-main@simulation_results_from_galaxy_evol@example@igimf_epoch_55.py@.PATH_END.py
{ "filename": "lcsftest.py", "repo_name": "lmwalkowicz/Cheetah", "repo_path": "Cheetah_extracted/Cheetah-master/finalcode/lcsftest.py", "type": "Python" }
from numpy import * from lcspot import * from lcsinglefit import * from lcgenerate import * import sys def main(): ntrials = int(sys.argv[1]) isteps = int(sys.argv[2]) nclusters = int(sys.argv[3]) threshratio = float(sys.argv[4]) noisefac = float(sys.argv[5]) for i in range(ntrials): phase, intesit...
lmwalkowiczREPO_NAMECheetahPATH_START.@Cheetah_extracted@Cheetah-master@finalcode@lcsftest.py@.PATH_END.py
{ "filename": "run_sntd_init.py", "repo_name": "jpierel14/sntd", "repo_path": "sntd_extracted/sntd-master/sntd/batch/run_sntd_init.py", "type": "Python" }
import pickle,sys,sntd,os,traceback from optparse import OptionParser from copy import copy import numpy as np njobs=njobsreplace nlcs=nlcsreplace parser = OptionParser() (options,args)=parser.parse_args() batchinitreplace all_dat=pickle.load(open(os.path.join(os.path.abspath(os.path.dirname(__file__)), ...
jpierel14REPO_NAMEsntdPATH_START.@sntd_extracted@sntd-master@sntd@batch@run_sntd_init.py@.PATH_END.py
{ "filename": "_range.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/geo/lataxis/_range.py", "type": "Python" }
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@geo@lataxis@_range.py@.PATH_END.py
{ "filename": "Kramer_1998_raw_to_yaml.py", "repo_name": "NickSwainston/pulsar_spectra", "repo_path": "pulsar_spectra_extracted/pulsar_spectra-main/pulsar_spectra/catalogue_papers/Kramer_1998_raw_to_yaml.py", "type": "Python" }
import json import psrqpy import csv query = psrqpy.QueryATNF(params=['PSRJ', 'NAME', 'PSRB', 'P0']).pandas all_jnames = list(query['PSRJ']) # was converted from image to csv using ABBYY FineReader with open("Kramer_1998_raw.csv") as file: tsv_file = csv.reader(file, delimiter=" ") lines = [] for line in ...
NickSwainstonREPO_NAMEpulsar_spectraPATH_START.@pulsar_spectra_extracted@pulsar_spectra-main@pulsar_spectra@catalogue_papers@Kramer_1998_raw_to_yaml.py@.PATH_END.py
{ "filename": "reports.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py2/_pytest/reports.py", "type": "Python" }
# -*- coding: utf-8 -*- from pprint import pprint import py import six from _pytest._code.code import ExceptionInfo from _pytest._code.code import ReprEntry from _pytest._code.code import ReprEntryNative from _pytest._code.code import ReprExceptionInfo from _pytest._code.code import ReprFileLocation from _pytest._cod...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py2@_pytest@reports.py@.PATH_END.py
{ "filename": "calculate_ska_nz_standalone.py", "repo_name": "philbull/RadioFisher", "repo_path": "RadioFisher_extracted/RadioFisher-master/calculate_ska_nz_standalone.py", "type": "Python" }
#!/usr/bin/python """ Calculate dn/dz for SKA HI galaxy redshift surveys, using dn/dz curves for given flux thresholds (from Mario Santos) and flux scalings with redshift for specific arrays. -- Phil Bull, 2017 """ import numpy as np import pylab as P import scipy.interpolate import scipy.optimize import sys C = 2...
philbullREPO_NAMERadioFisherPATH_START.@RadioFisher_extracted@RadioFisher-master@calculate_ska_nz_standalone.py@.PATH_END.py
{ "filename": "smooth_cal_inspect_2458159.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458159.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Calibration Smoothing Nightly Notebook **Josh Dillon**, Last Revised 12/4/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metr...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458159.ipynb@.PATH_END.py
{ "filename": "ctr__desc__ctrbordertype__supported-cpu.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/ctr__desc__ctrbordertype__supported-cpu.md", "type": "Markdown" }
Supported values for training on CPU: - Uniform
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@ctr__desc__ctrbordertype__supported-cpu.md@.PATH_END.py
{ "filename": "ISSUE_TEMPLATE.md", "repo_name": "ytree-project/ytree", "repo_path": "ytree_extracted/ytree-main/.github/ISSUE_TEMPLATE.md", "type": "Markdown" }
<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** <!--A short 1-2 sentences that succinctly describes the bug--> **Code for reproduction** <!--A minimum code sn...
ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@.github@ISSUE_TEMPLATE.md@.PATH_END.py
{ "filename": "_title.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/colorbar/_title.py", "type": "Python" }
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.TitleValidator): def __init__(self, plotly_name="title", parent_name="heatmap.colorbar", **kwargs): super(TitleValidator, 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@heatmap@colorbar@_title.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/utilities/__init__.py", "type": "Python" }
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@utilities@__init__.py@.PATH_END.py
{ "filename": "oldcylinder.py", "repo_name": "TianlaiProject/tlpipe", "repo_path": "tlpipe_extracted/tlpipe-master/tlpipe/map/drift/telescope/oldcylinder.py", "type": "Python" }
import numpy as np from caput import config from cora.util import coord from drift.core import telescope, visibility class CylinderTelescope(telescope.TransitTelescope): """Common functionality for all Cylinder Telescopes. Attributes ---------- num_cylinders : integer The number of cylind...
TianlaiProjectREPO_NAMEtlpipePATH_START.@tlpipe_extracted@tlpipe-master@tlpipe@map@drift@telescope@oldcylinder.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnelarea/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._text import TextValidator from ._position import PositionValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], [ ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnelarea@title@__init__.py@.PATH_END.py
{ "filename": "_mypath.py", "repo_name": "LSSTDESC/chroma", "repo_path": "chroma_extracted/chroma-master/bin/simulations/_mypath.py", "type": "Python" }
import os, sys thisdir = os.path.dirname(os.path.abspath(__file__)) libdir = os.path.abspath(os.path.join(thisdir, '../../')) if libdir not in sys.path: sys.path.insert(0, libdir)
LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@bin@simulations@_mypath.py@.PATH_END.py
{ "filename": "write_mock_to_disk_singlemet.py", "repo_name": "LSSTDESC/lsstdesc-diffsky", "repo_path": "lsstdesc-diffsky_extracted/lsstdesc-diffsky-main/lsstdesc_diffsky/write_mock_to_disk_singlemet.py", "type": "Python" }
""" write_mock_to_disk.py ===================== Main module for production of mock galaxy catalogs for LSST DESC. """ import gc import os import re import threading import warnings from time import time import h5py import numpy as np import psutil from astropy.cosmology import WMAP7, FlatLambdaCDM from astropy.table i...
LSSTDESCREPO_NAMElsstdesc-diffskyPATH_START.@lsstdesc-diffsky_extracted@lsstdesc-diffsky-main@lsstdesc_diffsky@write_mock_to_disk_singlemet.py@.PATH_END.py
{ "filename": "test_BackgroundSources.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/tests/BackgroundSources/test_BackgroundSources.py", "type": "Python" }
import unittest import os import EXOSIMS import EXOSIMS.Prototypes.BackgroundSources import EXOSIMS.BackgroundSources from EXOSIMS.util.get_module import get_module import pkgutil from tests.TestSupport.Info import resource_path import json from tests.TestSupport.Utilities import RedirectStreams from EXOSIMS.Prototypes...
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@tests@BackgroundSources@test_BackgroundSources.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/hoverlabel/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="icicle.hoverlabel", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@hoverlabel@_bgcolor.py@.PATH_END.py
{ "filename": "_y0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/_y0.py", "type": "Python" }
import _plotly_utils.basevalidators class Y0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="y0", parent_name="bar", **kwargs): super(Y0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=kwargs.pop("ani...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@_y0.py@.PATH_END.py
{ "filename": "ChandrasekharDynamicalFrictionForce.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/potential/ChandrasekharDynamicalFrictionForce.py", "type": "Python" }
############################################################################### # ChandrasekharDynamicalFrictionForce: Class that implements the # Chandrasekhar dynamical friction ############################################################################### import copy import ...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@potential@ChandrasekharDynamicalFrictionForce.py@.PATH_END.py
{ "filename": "dfitpack.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/interpolate/dfitpack.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.interpolate` namespace for importing the functions # included below. from scipy._lib.deprecation import _sub_module_deprecation __all__ = [ # noqa: F822 'bispeu', 'bispev', 'curfit', 'dblint', 'fpchec',...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@interpolate@dfitpack.py@.PATH_END.py
{ "filename": "kmpfit_gausshermite.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/kmpfit_gausshermite.py", "type": "Python" }
#!/usr/bin/env python #------------------------------------------------------------ # Script which demonstrates how to find the best-fit # parameters of a Gauss-Hermite line shape model # # Vog, 26 Mar 2012 #------------------------------------------------------------ import numpy from matplotlib.pyplot import figure,...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@kmpfit_gausshermite.py@.PATH_END.py
{ "filename": "smooth.py", "repo_name": "revoltek/losoto", "repo_path": "losoto_extracted/losoto-master/losoto/operations/smooth.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from losoto.lib_operations import * from losoto._logging import logger as logging logging.debug('Loading SMOOTH module.') def _run_parser(soltab, parser, step): axesToSmooth = parser.getarraystr( step, 'axesToSmooth' ) # no default size = parser.getarrayint( step...
revoltekREPO_NAMElosotoPATH_START.@losoto_extracted@losoto-master@losoto@operations@smooth.py@.PATH_END.py
{ "filename": "download_solo.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/download/download_solo.py", "type": "Python" }
import argparse import logging import os import shutil from datetime import timedelta, datetime from multiprocessing import Pool from urllib.request import urlopen from warnings import simplefilter from random import sample import drms import numpy as np import pandas as pd from astropy import units as u from astropy....
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@download@download_solo.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/timeseries/periodograms/lombscargle/implementations/utils.py", "type": "Python" }
from math import factorial import numpy as np def bitceil(N): """ Find the bit (i.e. power of 2) immediately greater than or equal to N Note: this works for numbers up to 2 ** 64. Roughly equivalent to int(2 ** np.ceil(np.log2(N))). """ return 1 << int(N - 1).bit_length() def extirpolate(x,...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@timeseries@periodograms@lombscargle@implementations@utils.py@.PATH_END.py
{ "filename": "RegexTokenizerOptionsStart.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata_schema_py_generated/RegexTokenizerOptionsStart.md", "type": "Markdown" }
page_type: reference <link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.metadata_schema_py_generated.RegexTokenizerOptionsStart" /> <meta it...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@metadata_schema_py_generated@RegexTokenizerOptionsStart.md@.PATH_END.py
{ "filename": "value_locate.py", "repo_name": "ggmichael/craterstats", "repo_path": "craterstats_extracted/craterstats-main/src/craterstats/gm/idl/value_locate.py", "type": "Python" }
# Copyright (c) 2021, Greg Michael # Licensed under BSD 3-Clause License. See LICENSE.txt for details. import numpy as np def value_locate(x,v): ''' safe replacement for IDL value_locate function :param x: :param v: :return: ''' return np.searchsorted(x,v)-1
ggmichaelREPO_NAMEcraterstatsPATH_START.@craterstats_extracted@craterstats-main@src@craterstats@gm@idl@value_locate.py@.PATH_END.py
{ "filename": "mc_corr_jobs.py", "repo_name": "NoahSailer/MaPar", "repo_path": "MaPar_extracted/MaPar-main/mc_correction/mc_corr_jobs.py", "type": "Python" }
from do_mc_corr import * import sys sys.path.append('../') from globe import NSIDE job = int(sys.argv[1]) # load some masks (which may or may not be used depending on the job) isamp = 1 bdir = '/pscratch/sd/m/mwhite/DESI/MaPar/maps/' lrg_mask = hp.read_map(bdir+f'lrg_s0{isamp}_msk.hpx2048.fits') north = hp....
NoahSailerREPO_NAMEMaParPATH_START.@MaPar_extracted@MaPar-main@mc_correction@mc_corr_jobs.py@.PATH_END.py
{ "filename": "client_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_client_nobatch/client_test.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2018-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_client_nobatch@client_test.py@.PATH_END.py
{ "filename": "runpipe.py", "repo_name": "anchal-009/SAVED21cm", "repo_path": "SAVED21cm_extracted/SAVED21cm-master/src/runpipe.py", "type": "Python" }
import os from src.readset import Modset, Inputs from src.basis import Basis from src.noise import Noise from src.infocrit import InfoCrit from src.extractor import Extractor from src.visuals import Visual class Pipeline: def __init__(self, nu, nLST, ant, path21TS, pathFgTS, obsDate, obsDateTim...
anchal-009REPO_NAMESAVED21cmPATH_START.@SAVED21cm_extracted@SAVED21cm-master@src@runpipe.py@.PATH_END.py
{ "filename": "BlankImage.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/share/scripts/BlankImage.py", "type": "Python" }
# interactively blank portions of an image #x=imlod('Arcade_A_wide_3secHG.fits',0,'Arcade_A','3secHG',1,1,err) #x=imlod('ArcadeAB3comb.fits',0,'Arcade_BC','Blank',1,1,err) import OErr, Image, OWindow, ODisplay, FArray BlankImage = None # Define image Aname = 'Arcade_A'; Aclass='3secHG'; disk = 1; seq = 1; offs = [0,0]...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@share@scripts@BlankImage.py@.PATH_END.py
{ "filename": "stop_connection.py", "repo_name": "HERA-Team/hera_mc", "repo_path": "hera_mc_extracted/hera_mc-main/scripts/stop_connection.py", "type": "Python" }
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2017 the HERA Collaboration # Licensed under the 2-clause BSD license. """ Script to add a general connection to the database. """ from hera_mc import cm_handling, cm_partconnect, cm_utils, mc def query_args(args): """ Gets information...
HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@scripts@stop_connection.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "alisonkyoung1/phantom", "repo_path": "phantom_extracted/phantom-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
alisonkyoung1REPO_NAMEphantomPATH_START.@phantom_extracted@phantom-master@docs@conf.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "jfcrenshaw/aos_notebooks", "repo_path": "aos_notebooks_extracted/aos_notebooks-main/README.md", "type": "Markdown" }
# aos_notebooks Notebooks for AOS
jfcrenshawREPO_NAMEaos_notebooksPATH_START.@aos_notebooks_extracted@aos_notebooks-main@README.md@.PATH_END.py
{ "filename": "example_tess_centroids_simple.ipynb", "repo_name": "stevepur/transit-diffImage", "repo_path": "transit-diffImage_extracted/transit-diffImage-main/examples/example_tess_centroids_simple.ipynb", "type": "Jupyter Notebook" }
```python import matplotlib.pyplot as plt import sys import pickle import numpy as np from transitDiffImage import tessDiffImage, transitCentroids from transitDiffImage import tessprfmodel as tprf import tess_stars2px ``` ```python def quick_flux_centroid(arr, extent, constrain=True): xpix = np.linspace(extent[...
stevepurREPO_NAMEtransit-diffImagePATH_START.@transit-diffImage_extracted@transit-diffImage-main@examples@example_tess_centroids_simple.ipynb@.PATH_END.py
{ "filename": "conf.py", "repo_name": "Jashcraf/poke", "repo_path": "poke_extracted/poke-main/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: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
JashcrafREPO_NAMEpokePATH_START.@poke_extracted@poke-main@docs@conf.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "jakevdp/nfft", "repo_path": "nfft_extracted/nfft-master/nfft/core.py", "type": "Python" }
from __future__ import division import numpy as np from .kernels import KERNELS from .utils import nfft_matrix, fourier_sum, inv_fourier_sum def ndft(x, f_hat): """Compute the non-equispaced direct Fourier transform f_j = \sum_{-N/2 \le k < N/2} \hat{f}_k \exp(-2 \pi i k x_j) Parameters ----------...
jakevdpREPO_NAMEnfftPATH_START.@nfft_extracted@nfft-master@nfft@core.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "npirzkal/GRISM_NIRCAM", "repo_path": "GRISM_NIRCAM_extracted/GRISM_NIRCAM-master/README.md", "type": "Markdown" }
# GRISM_NIRCAM grismconf (https://github.com/npirzkal/GRISMCONF) configuration files for JWST NIRCAM ## Note: ## The V1, V2, and V3 grismconf configuration files are based on pre-launch data and meant to be used for simulations purposes only. They do not reflect the field dependence of the traces, not the sensitivit...
npirzkalREPO_NAMEGRISM_NIRCAMPATH_START.@GRISM_NIRCAM_extracted@GRISM_NIRCAM-master@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/agents/agent_toolkits/gmail/__init__.py", "type": "Python" }
"""Gmail toolkit."""
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@agents@agent_toolkits@gmail@__init__.py@.PATH_END.py
{ "filename": "dosnowballflags.py", "repo_name": "chriswillott/jwst", "repo_path": "jwst_extracted/jwst-master/dosnowballflags.py", "type": "Python" }
#!/usr/bin/env python import numpy as np import os from astropy.io import fits from jwst.datamodels import dqflags from photutils.segmentation import detect_sources from photutils.segmentation import SourceCatalog from copy import deepcopy from skimage.draw import disk def snowballflags(jumpdirfile,filtername,npixf...
chriswillottREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-master@dosnowballflags.py@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="choropleth.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choropleth@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "HR.py", "repo_name": "orlox/mesa_input_data", "repo_path": "mesa_input_data_extracted/mesa_input_data-master/2016_ULX/scripts/che_examples/HR/HR.py", "type": "Python" }
#!/usr/bin/env python from mesa_data import * import matplotlib.pyplot as plt from pylab import * import numpy as np import matplotlib.patheffects as pe params = {'backend': 'pdf', 'figure.figsize': [4.3, 3.0], 'font.family':'serif', 'font.size':10, 'font.serif': 'Times Roman', ...
orloxREPO_NAMEmesa_input_dataPATH_START.@mesa_input_data_extracted@mesa_input_data-master@2016_ULX@scripts@che_examples@HR@HR.py@.PATH_END.py
{ "filename": "test_psfr.py", "repo_name": "sibirrer/psfr", "repo_path": "psfr_extracted/psfr-main/tests/test_psfr.py", "type": "Python" }
#!/usr/bin/env python """Tests for `psfr` package.""" from psfr import psfr from lenstronomy.Util import kernel_util from lenstronomy.Util import util from lenstronomy.LightModel.light_model import LightModel import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import numpy.testing ...
sibirrerREPO_NAMEpsfrPATH_START.@psfr_extracted@psfr-main@tests@test_psfr.py@.PATH_END.py
{ "filename": "test_logging.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/telemetry/test_logging.py", "type": "Python" }
import logging from prefect.telemetry.bootstrap import setup_telemetry from prefect.telemetry.logging import ( add_telemetry_log_handler, get_log_handler, set_log_handler, ) def test_add_telemetry_log_handler_with_handler(enable_telemetry): logger = logging.getLogger("test") initial_handlers = li...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@telemetry@test_logging.py@.PATH_END.py
{ "filename": "tilecov_plus_lyapredict.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/Sandbox/tilecov_plus_lyapredict.py", "type": "Python" }
#copied from https://github.com/desihub/desispec/blob/master/py/desispec/tile_qa_plot.py#L957 #small updates to print basic prediction for lya numbers from desitarget.io import read_targets_in_tiles from desispec.maskbits import fibermask from desispec.io import read_fibermap, findfile from desispec.tsnr import tsnr2_...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@tilecov_plus_lyapredict.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="isosurface.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "_tickangle.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickangle.py", "type": "Python" }
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="bar.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@_tickangle.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._text import TextValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.TextVal...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "ashleychontos/pySYD", "repo_path": "pySYD_extracted/pySYD-master/paper/paper.md", "type": "Markdown" }
--- title: "`pySYD`: Automated measurements of global asteroseismic parameters" tags: - Python - astronomy - stellar astrophysics - asteroseismology - stellar oscillations - fundamental stellar properties - solar-like oscillations - global asteroseismology authors: - name: Ashley Chontos orcid: 0000...
ashleychontosREPO_NAMEpySYDPATH_START.@pySYD_extracted@pySYD-master@paper@paper.md@.PATH_END.py
{ "filename": "B_Model_Tutorial_4_Hidden_Markov_Models.ipynb", "repo_name": "jmschrei/pomegranate", "repo_path": "pomegranate_extracted/pomegranate-master/docs/tutorials/B_Model_Tutorial_4_Hidden_Markov_Models.ipynb", "type": "Jupyter Notebook" }
## Hidden Markov Models author: Jacob Schreiber <br> contact: jmschreiber91@gmail.com Hidden Markov models (HMMs) are a probability distribution over sequences that are made up of two components: a set of probability distributions and a transition matrix (sometimes represented as a graph) describing how sequences can...
jmschreiREPO_NAMEpomegranatePATH_START.@pomegranate_extracted@pomegranate-master@docs@tutorials@B_Model_Tutorial_4_Hidden_Markov_Models.ipynb@.PATH_END.py
{ "filename": "test_ring_slice.py", "repo_name": "wdpozzo/raynest", "repo_path": "raynest_extracted/raynest-main/raynest/tests/test_ring_slice.py", "type": "Python" }
import unittest import numpy as np import raynest.model class RingModel(raynest.model.Model): """ A circular ring in parameter space logZ ~ -2.31836 """ names=['x','y'] bounds=[[-2,2],[-2,2]] data = None analytic_log_Z = -2.31836 @staticmethod def log_likelihood(x): retu...
wdpozzoREPO_NAMEraynestPATH_START.@raynest_extracted@raynest-main@raynest@tests@test_ring_slice.py@.PATH_END.py
{ "filename": "reshape_op_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/array_ops/reshape_op_test.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@kernel_tests@array_ops@reshape_op_test.py@.PATH_END.py
{ "filename": "deconv.py", "repo_name": "HERA-Team/aipy", "repo_path": "aipy_extracted/aipy-main/aipy/deconv.py", "type": "Python" }
""" A module implementing various techniques for deconvolving an image by a kernel. Currently implemented are Clean, Least-Squares, Maximum Entropy, and Annealing. Standard parameters to these functions are: im = image to be deconvolved. ker = kernel to deconvolve by (must be same size as im). mdl = a priori model of...
HERA-TeamREPO_NAMEaipyPATH_START.@aipy_extracted@aipy-main@aipy@deconv.py@.PATH_END.py
{ "filename": "preprocess.py", "repo_name": "adammoss/supernovae", "repo_path": "supernovae_extracted/supernovae-master/preprocess.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import glob import csv import gzip import scipy.interpolate as si from itertools import groupby import random import sys import argparse flux_norm = 1.0 time_norm = 1.0 position_norm = 1.0 grouping = 1 key_types = {'Ia':1, 'II': 2, 'Ibc': 3, 'IIn': 21, 'IIP': 22, 'II...
adammossREPO_NAMEsupernovaePATH_START.@supernovae_extracted@supernovae-master@preprocess.py@.PATH_END.py
{ "filename": "_circle.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/mapbox/layer/_circle.py", "type": "Python" }
import _plotly_utils.basevalidators class CircleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="circle", parent_name="layout.mapbox.layer", **kwargs ): super(CircleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@layer@_circle.py@.PATH_END.py
{ "filename": "tpu_embedding_v2_hd_valid_input_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tests/tpu_embedding_v2_hd_valid_input_test.py", "type": "Python" }
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@tpu@tests@tpu_embedding_v2_hd_valid_input_test.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/ramses/api.py", "type": "Python" }
from . import tests from .data_structures import RAMSESDataset from .definitions import field_aliases from .fields import RAMSESFieldInfo from .io import IOHandlerRAMSES
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@ramses@api.py@.PATH_END.py
{ "filename": "datamodules.py", "repo_name": "devinamhn/RadioGalaxies-BNNs", "repo_path": "RadioGalaxies-BNNs_extracted/RadioGalaxies-BNNs-main/radiogalaxies_bnns/inference/datamodules.py", "type": "Python" }
from pathlib import Path import numpy as np import torch import torchvision.transforms as transforms from torchvision import datasets from torchvision.transforms import InterpolationMode from pytorch_lightning.demos.mnist_datamodule import MNIST from torch.utils.data import DataLoader, random_split from torch.utils.da...
devinamhnREPO_NAMERadioGalaxies-BNNsPATH_START.@RadioGalaxies-BNNs_extracted@RadioGalaxies-BNNs-main@radiogalaxies_bnns@inference@datamodules.py@.PATH_END.py
{ "filename": "test_compose.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/data_objects/tests/test_compose.py", "type": "Python" }
import numpy as np from numpy.testing import assert_array_equal from yt.testing import fake_amr_ds, fake_random_ds from yt.units._numpy_wrapper_functions import uintersect1d from yt.units.yt_array import YTArray def setup_module(): from yt.config import ytcfg ytcfg["yt", "internals", "within_testing"] = Tru...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@data_objects@tests@test_compose.py@.PATH_END.py