metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "__init__.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/signal/tests/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018-2020) # # This file is part of GWpy. # # GWpy 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)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@signal@tests@__init__.py@.PATH_END.py
{ "filename": "carma_fit.py", "repo_name": "ywx649999311/EzTao", "repo_path": "EzTao_extracted/EzTao-master/src/eztao/ts/carma_fit.py", "type": "Python" }
""" A collection of functions to fit/analyze time series using CARMA models. """ import numpy as np from scipy.optimize import minimize from scipy.stats import median_abs_deviation as mad import celerite from celerite import GP from eztao.carma.CARMATerm import DRW_term, DHO_term, CARMA_term from functools import part...
ywx649999311REPO_NAMEEzTaoPATH_START.@EzTao_extracted@EzTao-master@src@eztao@ts@carma_fit.py@.PATH_END.py
{ "filename": "fitters.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/fitting/fitters.py", "type": "Python" }
""" - todo - remove old unused fitters """ __all__ = ['Fitter', 'CoellipFitter', 'PSFFluxFitter'] import logging from .leastsqbound import run_leastsq from .. import gmix from ..defaults import DEFAULT_LM_PARS from .results import FitModel, CoellipFitModel, PSFFluxFitModel LOGGER = logging.getLogger(__name__) c...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@fitting@fitters.py@.PATH_END.py
{ "filename": "hankel_transform_of_cosmo_power.ipynb", "repo_name": "steven-murray/powerbox", "repo_path": "powerbox_extracted/powerbox-main/devel/hankel_transform_of_cosmo_power.ipynb", "type": "Jupyter Notebook" }
```python from hankel import SymmetricFourierTransform from scipy.interpolate import InterpolatedUnivariateSpline as spline from hmf import Transfer import numpy as np import matplotlib.pyplot as plt from powerbox import PowerBox, get_power, LogNormalPowerBox from numpy.fft import fftn,ifftn,ifftshift,fftshift,fftfreq ...
steven-murrayREPO_NAMEpowerboxPATH_START.@powerbox_extracted@powerbox-main@devel@hankel_transform_of_cosmo_power.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "tdaylan/pcat", "repo_path": "pcat_extracted/pcat-master/README.md", "type": "Markdown" }
# PCAT (Probabilistic Cataloger) PCAT is a transdimensional, hierarchical, and Bayesian framework to sample from the posterior probability distribution of a metamodel (union of models with different dimensionality) given some Poisson-distributed data. In addition to its previous use in the literature to sample from ...
tdaylanREPO_NAMEpcatPATH_START.@pcat_extracted@pcat-master@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/docs/README.md", "type": "Markdown" }
# Building Documentation ## Building locally: #### [Build and install cuML](../BUILD.md) #### Generate the docs ```bash bash build.sh cppdocs pydocs ``` #### Once the process finishes, documentation can be found in build/html ```bash xdg-open build/html/api.html ```
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@docs@README.md@.PATH_END.py
{ "filename": "Fig.6,7,&9.ipynb", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/markov_chain_monte_carlo/Fig.6,7,&9.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import corner import matplotlib.pyplot as plt import matplotlib.lines as mlines ``` # Fig.6 ```python flatchainpl_1 = np.loadtxt('sampler/mcmc_sampler_vol_co_20000_1.txt') flatchainpl_2 = np.loadtxt('sampler/mcmc_sampler_vol_co_20000_2.txt') flatchainpl_3 = np.loadtxt('sampler/mcmc_sampl...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@markov_chain_monte_carlo@Fig.6,7,&9.ipynb@.PATH_END.py
{ "filename": "ii_minus_projected.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/ia_correlations/ii_minus_projected.py", "type": "Python" }
r""" Module containing the `~halotools.mock_observables.alignments.ii_minus_projected` function used to calculate the projected intrinsic ellipticity-ellipticity (II) correlation """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from math import pi from .alignm...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@ia_correlations@ii_minus_projected.py@.PATH_END.py
{ "filename": "_ysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/_ysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="bar", **kwargs): super(YsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@_ysrc.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "nhurleywalker/GPMTransient", "repo_path": "GPMTransient_extracted/GPMTransient-main/predict_pulses/README.md", "type": "Markdown" }
# Predicting future TOAs The following recipe can be used to generate TOAs between "now" (e.g. MJD 60066) and "some time in the future" (e.g. 60310). The TOAs are written out in the TEMPO2 format of a `.tim` file. The final steps (`cat` and `pintk`) are just to make sure that the predicted TOAs are sensible, i.e. cons...
nhurleywalkerREPO_NAMEGPMTransientPATH_START.@GPMTransient_extracted@GPMTransient-main@predict_pulses@README.md@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/scene/yaxis/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene.yaxis" _path_str = "layout.scene.yaxis.tickfont" _valid_props = { ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@scene@yaxis@_tickfont.py@.PATH_END.py
{ "filename": "test_harnesses.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/internal_test_util/test_harnesses.py", "type": "Python" }
# Copyright 2020 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@internal_test_util@test_harnesses.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/textfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.textfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@textfont@_family.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/colorbar/title/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choropleth.colorbar.title", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@colorbar@title@_font.py@.PATH_END.py
{ "filename": "particle.py", "repo_name": "icecube/TauRunner", "repo_path": "TauRunner_extracted/TauRunner-master/taurunner/particle/particle.py", "type": "Python" }
import numpy as np import proposal as pp import sys from typing import Union from ..utils import units from ..body import Body from ..track import Track from ..cross_sections import CrossSections from .utils import * ISOSCALAR_MASS = ((0.9382720813+0.9395654133)/2.) * units.GeV EMIN = 1e9 # minimum energy allowed i...
icecubeREPO_NAMETauRunnerPATH_START.@TauRunner_extracted@TauRunner-master@taurunner@particle@particle.py@.PATH_END.py
{ "filename": "test_child_analysis.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/aggregator/test_child_analysis.py", "type": "Python" }
from pathlib import Path import pytest from autofit import SearchOutput from autofit.aggregator import Aggregator import autofit as af @pytest.fixture(name="directory") def make_directory(): return Path(__file__).parent @pytest.fixture(name="search_output") def make_search_output(directory): return Search...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@aggregator@test_child_analysis.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._hoverlabel import Hoverlabel from ._legendgrouptitle import Legendgrouptitle from ._line import Line from ._marker import Marker from ._selected import Selected from ._stream import Stream from...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattercarpet@__init__.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/zaxis/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.zaxis", **kwargs): super(Tick0Validator, 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@scene@zaxis@_tick0.py@.PATH_END.py
{ "filename": "models.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/net/models.py", "type": "Python" }
from __future__ import print_function from __future__ import absolute_import import os import itertools from urllib.request import urlopen from django.db import models from django.db.models import Q from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsRetur...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@net@models.py@.PATH_END.py
{ "filename": "test_vizier_cs.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/mivot/tests/test_vizier_cs.py", "type": "Python" }
''' The first service in operation the annotates query responses in the fly is Vizier https://cds/viz-bin/mivotconesearch/VizierParams Data are mapped o the EPochPropagtion model as it is implemented in the current code. This test case is based on 2 VOTables: - The Vizier native (vizier_cs_withname.xml) where all ATTR...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@mivot@tests@test_vizier_cs.py@.PATH_END.py
{ "filename": "test_coordinate_links.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/core/tests/test_coordinate_links.py", "type": "Python" }
import numpy as np from numpy.testing import assert_allclose from glue.tests.helpers import requires_astropy, ASTROPY_INSTALLED from .. import Data, DataCollection from ..coordinates import IdentityCoordinates, coordinates_from_header from ..link_helpers import LinkSame from glue.core.coordinate_helpers import depend...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@core@tests@test_coordinate_links.py@.PATH_END.py
{ "filename": "CODE_OF_CONDUCT.md", "repo_name": "1313e/CMasher", "repo_path": "CMasher_extracted/CMasher-master/.github/CODE_OF_CONDUCT.md", "type": "Markdown" }
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex ch...
1313eREPO_NAMECMasherPATH_START.@CMasher_extracted@CMasher-master@.github@CODE_OF_CONDUCT.md@.PATH_END.py
{ "filename": "frequency_normalization.ipynb", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/SignalGen/tests/frequency_normalization.ipynb", "type": "Jupyter Notebook" }
# Test of correct frequency normalization ```python %matplotlib inline import numpy as np from NuRadioMC.utilities import fft from NuRadioMC.utilities import units import NuRadioMC.SignalGen.RalstonBuniy.askaryan_module as AskaryanModule ``` the fft utility module implements a real fft with a normalization so that ...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@SignalGen@tests@frequency_normalization.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/table/header/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._valuessrc import ValuessrcValidator from ._values import ValuesValidator from ._suffixsrc import SuffixsrcValidator from ._suffix import SuffixValidator from ._prefixsrc import PrefixsrcValidator from ._prefix import PrefixValidator from ._lin...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@table@header@__init__.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatterpolargl.marker.colorbar.title", **kwargs, ): super(SideValidator, self).__init__( plotly_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@colorbar@title@_side.py@.PATH_END.py
{ "filename": "test_beams.py", "repo_name": "HERA-Team/matvis", "repo_path": "matvis_extracted/matvis-main/tests/test_beams.py", "type": "Python" }
"""Test that pixel and analytic beams are properly aligned.""" import pytest import copy import numpy as np from pytest_lazy_fixtures import lf from pyuvdata import UVBeam from pyuvdata.analytic_beam import AnalyticBeam, GaussianBeam from pyuvdata.beam_interface import BeamInterface from pyuvdata.utils.pol import pol...
HERA-TeamREPO_NAMEmatvisPATH_START.@matvis_extracted@matvis-main@tests@test_beams.py@.PATH_END.py
{ "filename": "antenna.py", "repo_name": "RadioAstronomySoftwareGroup/pyuvdata", "repo_path": "pyuvdata_extracted/pyuvdata-main/src/pyuvdata/utils/antenna.py", "type": "Python" }
# Copyright (c) 2024 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Utilities for antennas.""" import numpy as np from . import tools def _select_antenna_helper( *, antenna_names, antenna_nums, tel_ant_names, tel_ant_nums, obj_ant_array ): if antenna_names is not None: i...
RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@src@pyuvdata@utils@antenna.py@.PATH_END.py
{ "filename": "tools.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/tools.py", "type": "Python" }
from glue_jupyter.bqplot.profile import BqplotProfileView from jdaviz.core.tools import SinglePixelRegion from jdaviz.core.marks import PluginLine __all__ = ['ProfileFromCube'] class ProfileFromCube(SinglePixelRegion): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self....
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@tools.py@.PATH_END.py
{ "filename": "mvf_read_benchmark.py", "repo_name": "ska-sa/katdal", "repo_path": "katdal_extracted/katdal-master/scripts/mvf_read_benchmark.py", "type": "Python" }
#!/usr/bin/env python ################################################################################ # Copyright (c) 2018-2021,2023, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a co...
ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@scripts@mvf_read_benchmark.py@.PATH_END.py
{ "filename": "units.py", "repo_name": "adrn/thejoker", "repo_path": "thejoker_extracted/thejoker-main/thejoker/units.py", "type": "Python" }
"""Originally from the exoplanet project""" __all__ = ["with_unit", "has_unit", "to_unit"] from pytensor.tensor import as_tensor_variable UNIT_ATTR_NAME = "__tensor_unit__" def with_unit(obj, unit): """Decorate a tensor with Astropy units Parameters ---------- obj The tensor object uni...
adrnREPO_NAMEthejokerPATH_START.@thejoker_extracted@thejoker-main@thejoker@units.py@.PATH_END.py
{ "filename": "group.py", "repo_name": "lwang-astro/PeTar", "repo_path": "PeTar_extracted/PeTar-master/tools/analysis/group.py", "type": "Python" }
import collections from .base import * from .data import * class BinaryTreeSDAR(DictNpArrayMix): """ Binary tree data output from SDAR Keys: (class members) semi (1D): semi-major axis ecc (1D): eccentricity incline (1D): inclination rot_horizon (1D): frame rotational angle in ...
lwang-astroREPO_NAMEPeTarPATH_START.@PeTar_extracted@PeTar-master@tools@analysis@group.py@.PATH_END.py
{ "filename": "redspec.py", "repo_name": "soar-telescope/goodman_pipeline", "repo_path": "goodman_pipeline_extracted/goodman_pipeline-main/goodman_pipeline/spectroscopy/redspec.py", "type": "Python" }
#!/usr/bin/env python2 # -*- coding: utf8 -*- """Pipeline for Goodman High Troughput Spectrograph spectra Extraction. This program finds reduced images, i.e. trimmed, bias subtracted, flat fielded, etc. that match the ``<pattern>`` in the source folder, then classify them in two groups: Science or Lamps. For science i...
soar-telescopeREPO_NAMEgoodman_pipelinePATH_START.@goodman_pipeline_extracted@goodman_pipeline-main@goodman_pipeline@spectroscopy@redspec.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="surface", **kwargs): super(OpacityValidator, 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@surface@_opacity.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "HERA-Team/hera_pspec", "repo_path": "hera_pspec_extracted/hera_pspec-main/hera_pspec/tests/test_utils.py", "type": "Python" }
import unittest import pytest import numpy as np import os, sys, copy from hera_pspec.data import DATA_PATH from .. import utils, testing, pspecbeam from collections import OrderedDict as odict from pyuvdata import UVData from hera_cal import redcal def test_cov(): # load another data file uvd = UVData() ...
HERA-TeamREPO_NAMEhera_pspecPATH_START.@hera_pspec_extracted@hera_pspec-main@hera_pspec@tests@test_utils.py@.PATH_END.py
{ "filename": "measure_Pk1D.py", "repo_name": "igmhub/LyaCoLoRe", "repo_path": "LyaCoLoRe_extracted/LyaCoLoRe-master/scripts/measure_Pk1D.py", "type": "Python" }
#!/usr/bin/env python import numpy as np from astropy.io import fits import matplotlib.pyplot as plt import matplotlib.ticker from multiprocessing import Pool import multiprocessing import sys import time import os import argparse import matplotlib.patches as mpatches from lyacolore import Pk1D, tuning, utils ######...
igmhubREPO_NAMELyaCoLoRePATH_START.@LyaCoLoRe_extracted@LyaCoLoRe-master@scripts@measure_Pk1D.py@.PATH_END.py
{ "filename": "abscal_inspect_2458205.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458205.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Absolute Calibration Nightly Notebook **Josh Dillon**, Last Revised 9/23/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_metri...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458205.ipynb@.PATH_END.py
{ "filename": "test_lineprofiles.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/mangadap/tests/test_lineprofiles.py", "type": "Python" }
from IPython import embed import numpy from scipy import special from matplotlib import pyplot import astropy.constants from mangadap.util.sampling import spectrum_velocity_scale, spectral_coordinate_step from mangadap.util.lineprofiles import FFTGaussianLSF from mangadap.proc import ppxffit def pixelated_gaussia...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@mangadap@tests@test_lineprofiles.py@.PATH_END.py
{ "filename": "rs_utilities.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/recipe_system/utils/rs_utilities.py", "type": "Python" }
""" Set of functions in support of the recipe_system. """ import sys import errno import itertools import traceback from os import makedirs from os.path import join def log_traceback(log): exc_type, exc_value, exc_traceback = sys.exc_info() tblist = traceback.format_exception(exc_type, exc_value, exc_traceba...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@recipe_system@utils@rs_utilities.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distPareto/getParetoLogCDF/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import glob import sys linewidth = 2 fontsize = 17 marker ={ "CK" : "-" , "IK" : "." , "RK" : "-" } xlab = { "CK" : "X ( real/imaginary components )" , "IK" : "X ( integer-valued )" ,...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distPareto@getParetoLogCDF@main.py@.PATH_END.py
{ "filename": "checkpolconvert.py", "repo_name": "marti-vidal-i/PolConvert", "repo_path": "PolConvert_extracted/PolConvert-main/PP/checkpolconvert.py", "type": "Python" }
#!/usr/bin/python # # Copyright (c) Ivan Marti-Vidal 2015-2023, University of Valencia (Spain) # and Geoffrey Crew 2015-2023, Massachusetts Institute of Technology # # Script to check polconvert QA2 tables. Optionally, it can # slice out a time-restricted version of the main tables. # # Py2/3 compatible via pyth...
marti-vidal-iREPO_NAMEPolConvertPATH_START.@PolConvert_extracted@PolConvert-main@PP@checkpolconvert.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "kbwestfall/NIRVANA", "repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/data/util.py", "type": "Python" }
""" Provides a random set of utility methods. .. include:: ../include/links.rst """ import warnings from IPython import embed import numpy as np from scipy import sparse, linalg, stats, special, ndimage, spatial # Only used for debugging... from matplotlib import pyplot from astropy.stats import sigma_clip from .....
kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@data@util.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ellawang44/Breidablik", "repo_path": "Breidablik_extracted/Breidablik-master/breidablik/analysis/__init__.py", "type": "Python" }
__all__ = ["read", "tools", "format_read"]
ellawang44REPO_NAMEBreidablikPATH_START.@Breidablik_extracted@Breidablik-master@breidablik@analysis@__init__.py@.PATH_END.py
{ "filename": "genNetCDF.py", "repo_name": "aasensio/hazel", "repo_path": "hazel_extracted/hazel-master/pyRoutines/genNetCDF.py", "type": "Python" }
import numpy as np from scipy.io import netcdf def genNetCDF(wavelength, stI, stQ, stU, stV, sigmaI, sigmaQ, sigmaU, sigmaV, boundary, height, obsTheta, obsGamma, mask, pars, normalization, outputFile): """ This routine generates a NetCDF file with the observations ready for Hazel-MPI Args: wa...
aasensioREPO_NAMEhazelPATH_START.@hazel_extracted@hazel-master@pyRoutines@genNetCDF.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/funnelarea/legendgrouptitle/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="funnelarea.legendgrouptitle", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@legendgrouptitle@_font.py@.PATH_END.py
{ "filename": "cond_v2.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/cond_v2.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@ops@cond_v2.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "MWATelescope/Birli", "repo_path": "Birli_extracted/Birli-main/tests/data/__init__.py", "type": "Python" }
MWATelescopeREPO_NAMEBirliPATH_START.@Birli_extracted@Birli-main@tests@data@__init__.py@.PATH_END.py
{ "filename": "tcpserver.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/tornado/tornado-4/tornado/tcpserver.py", "type": "Python" }
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@tornado@tornado-4@tornado@tcpserver.py@.PATH_END.py
{ "filename": "plot_sgd_loss_functions.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/linear_model/plot_sgd_loss_functions.py", "type": "Python" }
""" ========================== SGD: convex loss functions ========================== A plot that compares the various convex loss functions supported by :class:`~sklearn.linear_model.SGDClassifier` . """ # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import matplotlib.pyplot as plt i...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@linear_model@plot_sgd_loss_functions.py@.PATH_END.py
{ "filename": "_show.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/caps/y/_show.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.caps.y", **kwargs): super(ShowValidator, 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@isosurface@caps@y@_show.py@.PATH_END.py
{ "filename": "getter.py", "repo_name": "nikhil-sarin/redback", "repo_path": "redback_extracted/redback-master/redback/get_data/getter.py", "type": "Python" }
import pandas as pd class DataGetter(object): """ """ def __init__(self, transient: str, transient_type: str) -> None: self.transient = transient self.transient_type = transient_type def get_data(self) -> pd.DataFrame: """Downloads the raw data and produces a processed .csv file....
nikhil-sarinREPO_NAMEredbackPATH_START.@redback_extracted@redback-master@redback@get_data@getter.py@.PATH_END.py
{ "filename": "tls.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/tls.py", "type": "Python" }
""" pygments.lexers.tls ~~~~~~~~~~~~~~~~~~~ Lexers for the TLS presentation language. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, words from pygments.token import Comment, Operator,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@tls.py@.PATH_END.py
{ "filename": "pickle_handshake.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/barry/data/desi_lightcone_mocks_recon/pickle_handshake.py", "type": "Python" }
import pickle import pandas as pd import numpy as np import os def getxi(loc): df = pd.read_csv(loc, comment="#", skiprows=0, delim_whitespace=True, names=["s", "xi0", "xi2", "xi4"], header=None) print(df) mask = df["s"] <= 205.0 masked = df.loc[mask, ["s", "xi0", "xi2", "xi4"]] return masked.asty...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@data@desi_lightcone_mocks_recon@pickle_handshake.py@.PATH_END.py
{ "filename": "build_canonical.py", "repo_name": "COINtoolbox/ActSNClass", "repo_path": "ActSNClass_extracted/ActSNClass-master/actsnclass/scripts/build_canonical.py", "type": "Python" }
# Copyright 2019 snactclass software # Author: Emille E. O. Ishida # Based on initial prototype developed by the CRP #4 team # # created on 11 August 2019 # # Licensed GNU General Public License v3.0; # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # ...
COINtoolboxREPO_NAMEActSNClassPATH_START.@ActSNClass_extracted@ActSNClass-master@actsnclass@scripts@build_canonical.py@.PATH_END.py
{ "filename": "test_abc.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_abc.py", "type": "Python" }
from numpy.testing import assert_ import numbers import numpy as np from numpy._core.numerictypes import sctypes class TestABC: def test_abstract(self): assert_(issubclass(np.number, numbers.Number)) assert_(issubclass(np.inexact, numbers.Complex)) assert_(issubclass(np.complexfloating, ...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_abc.py@.PATH_END.py
{ "filename": "test_kdeoth.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/stats/tests/test_kdeoth.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from scipy import stats import numpy as np from numpy.testing import (assert_almost_equal, assert_, assert_array_almost_equal, assert_array_almost_equal_nulp) from pytest import raises as assert_raises def test_kde_1d(): #some basic tests compa...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@stats@tests@test_kdeoth.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "simonsobs/apluggy", "repo_path": "apluggy_extracted/apluggy-main/README.md", "type": "Markdown" }
# apluggy [![PyPI - Version](https://img.shields.io/pypi/v/apluggy.svg)](https://pypi.org/project/apluggy) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apluggy.svg)](https://pypi.org/project/apluggy) [![Test Status](https://github.com/simonsobs/apluggy/actions/workflows/unit-test.yml/badge.svg)](h...
simonsobsREPO_NAMEapluggyPATH_START.@apluggy_extracted@apluggy-main@README.md@.PATH_END.py
{ "filename": "classes.py", "repo_name": "simonsobs/mnms", "repo_path": "mnms_extracted/mnms-main/mnms/classes.py", "type": "Python" }
# These are the implemented noise model classes. They exist in the abstract # in our minds, but the code is sliced into many levels of modules, classes # etc, so we need to use a keyword that will track them across the repo. ### CONTRIBUTORS MAY ADD TO REGISTERED_CLASSES ### REGISTERED_CLASSES = ['Tiled', 'Wavelet', '...
simonsobsREPO_NAMEmnmsPATH_START.@mnms_extracted@mnms-main@mnms@classes.py@.PATH_END.py
{ "filename": "gammainc_asy.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/special/_precompute/gammainc_asy.py", "type": "Python" }
""" Precompute coefficients of Temme's asymptotic expansion for gammainc. This takes about 8 hours to run on a 2.3 GHz Macbook Pro with 4GB ram. Sources: [1] NIST, "Digital Library of Mathematical Functions", https://dlmf.nist.gov/ """ import os from scipy.special._precompute.utils import lagrange_inversion try...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@_precompute@gammainc_asy.py@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="layout.yaxis", **kwargs): super(TickmodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@_tickmode.py@.PATH_END.py
{ "filename": "_start.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/xbins/_start.py", "type": "Python" }
import _plotly_utils.basevalidators class StartValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="start", parent_name="histogram2dcontour.xbins", **kwargs ): super(StartValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@xbins@_start.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/outsidetextfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.outsidetextfont", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@outsidetextfont@_variant.py@.PATH_END.py
{ "filename": "convolved_extended_source.py", "repo_name": "threeML/hawc_hal", "repo_path": "hawc_hal_extracted/hawc_hal-master/hawc_hal/convolved_source/convolved_extended_source.py", "type": "Python" }
from __future__ import division from builtins import zip from past.utils import old_div from builtins import object import numpy as np from astromodels import use_astromodels_memoization from threeML.io.logging import setup_logger log = setup_logger(__name__) log.propagate = False def _select_with_wrap_around(arr, s...
threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@hawc_hal@convolved_source@convolved_extended_source.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/_colorscale.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Colorscale(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.colorscale" _valid_props = {"diverging", "sequential", "s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@_colorscale.py@.PATH_END.py
{ "filename": "test_arithmetic.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/scalar/interval/test_arithmetic.py", "type": "Python" }
from datetime import timedelta import numpy as np import pytest from pandas import ( Interval, Timedelta, Timestamp, ) import pandas._testing as tm class TestIntervalArithmetic: def test_interval_add(self, closed): interval = Interval(0, 1, closed=closed) expected = Interval(1, 2, cl...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@scalar@interval@test_arithmetic.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="volume.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "TestDataBase.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/unit/DataBase/TestDataBase.py", "type": "Python" }
from Spheral import * from SpheralTestUtilities import * ################################################################################ n1 = 10 n2 = 20 n3 = 30 m1 = 1.0 m2 = 2.0 m3 = 3.0 rho1 = 1.0 rho2 = 2.0 rho3 = 3.0 eps1 = 10.0 eps2 = 20.0 eps3 = 30.0 v1 = Vector1d(1.0) v2 = Vector1d(-1.0) v3 = Vector1d(2.0)...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@DataBase@TestDataBase.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/scatterternary/unselected/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._textfont import TextfontValidator from ._marker import MarkerValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@unselected@__init__.py@.PATH_END.py
{ "filename": "examples.py", "repo_name": "yabebalFantaye/MCEvidence", "repo_path": "MCEvidence_extracted/MCEvidence-master/examples.py", "type": "Python" }
''' Collection of codes that can be used to test the MCEvidence code. The examples below demostrate the validitiy of MCEvidence for three MCMC samplers: * Gibbs Sampling * PyStan NUT sampler * EMCEE sampler Two types of likelihood surface is considered * Gaussian Linear Model - 3 dimensions * N-dimensional Gaussian...
yabebalFantayeREPO_NAMEMCEvidencePATH_START.@MCEvidence_extracted@MCEvidence-master@examples.py@.PATH_END.py
{ "filename": "a370cats.ipynb", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/doc/source/_static/a370cats.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline ``` ```python from grale.all_nb import * from astropy.io import fits from astropy import wcs renderers.setDefaultMassRenderer(None) ``` Set 'threads' as default renderer for lensplane and mass density Set default angular unit in plotting to arcsec Set feedback style to 'note...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@doc@source@_static@a370cats.ipynb@.PATH_END.py
{ "filename": "pipeline_base.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/core/pipeline_base.py", "type": "Python" }
"""The base class for all objects in the MayaVi pipeline. This class basically abstracts out the common parts of the pipeline interface. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005-2020, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import List,...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@core@pipeline_base.py@.PATH_END.py
{ "filename": "implicit_relative.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/test-projects/tree-project/imports/implicit_relative.py", "type": "Python" }
from shared_libs.bar import get_bar from shared_libs.foo import get_foo def foobar(): assert callable(get_foo), f"Expected callable, got {get_foo!r}" assert callable(get_bar), f"Expected callable, got {get_bar!r}" return get_foo() + get_bar()
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test-projects@tree-project@imports@implicit_relative.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.xaxis.rangeselector", **kwargs, ): super(BorderwidthValidator, self).__init__( pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@rangeselector@_borderwidth.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "ML4GW/aframe", "repo_path": "aframe_extracted/aframe-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...
ML4GWREPO_NAMEaframePATH_START.@aframe_extracted@aframe-main@docs@conf.py@.PATH_END.py
{ "filename": "floating_axes.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/axes_grid/floating_axes.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals) from mpl_toolkits.axisartist.floating_axes import *
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@axes_grid@floating_axes.py@.PATH_END.py
{ "filename": "whichdict.py", "repo_name": "Michalychforever/CLASS-PT", "repo_path": "CLASS-PT_extracted/CLASS-PT-master/ORTHOGONAL_NG_matrices/computation_of_matrices/matter_mu_powers/whichdict.py", "type": "Python" }
#--> vd2_f1.txt, vd2_f2.txt, dd2_f1.txt, vv4_f2.txt, vv4_f3.txt, vd4_f2.txt, vv6_f3.txt #-) vv4, f = 3 is [ 1 ] of vd2, f = 2 importdict={"1":"vd2_f1.txt","2":"vd2_f2.txt","3":"dd2_f1.txt","4":"vv4_f2.txt","5":"vd4_f2.txt","6":"vv6_f3.txt"}
MichalychforeverREPO_NAMECLASS-PTPATH_START.@CLASS-PT_extracted@CLASS-PT-master@ORTHOGONAL_NG_matrices@computation_of_matrices@matter_mu_powers@whichdict.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/pooling/__init__.py", "type": "Python" }
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@pooling@__init__.py@.PATH_END.py
{ "filename": "load_tools.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/agent_toolkits/load_tools.py", "type": "Python" }
# flake8: noqa """Tools provide access to various resources and services. LangChain has a large ecosystem of integrations with various external resources like local and remote file systems, APIs and databases. These integrations allow developers to create versatile applications that combine the power of LLMs with the...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@agent_toolkits@load_tools.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "chriswillott/jwst", "repo_path": "jwst_extracted/jwst-master/columnjump/setup.py", "type": "Python" }
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="columnjump", # Replace with your own username version="1.1.0", author="Chris Willott", author_email="chriswillott1@gmail.com", description="Fix column jumps for JWST NIRI...
chriswillottREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-master@columnjump@setup.py@.PATH_END.py
{ "filename": "nn_impl_distribute.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/nn_impl_distribute.py", "type": "Python" }
# Copyright 2023 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@ops@nn_impl_distribute.py@.PATH_END.py
{ "filename": "_split.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/model_selection/_split.py", "type": "Python" }
""" The :mod:`sklearn.model_selection._split` module includes classes and functions to split the data based on a preset strategy. """ # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import numbers import warnings from abc import ABCMeta, abstractmethod from collections import defaultdic...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@model_selection@_split.py@.PATH_END.py
{ "filename": "slugify.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/utilities/slugify.py", "type": "Python" }
# Allows prefect to be used side-by-side with unicode-slugify # See https://github.com/PrefectHQ/prefect/issues/6945 from slugify import slugify __all__ = ["slugify"]
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@utilities@slugify.py@.PATH_END.py
{ "filename": "run_first_look.py", "repo_name": "GBTAmmoniaSurvey/GAS", "repo_path": "GAS_extracted/GAS-master/GAS/run_first_look.py", "type": "Python" }
import os import textwrap import warnings import numpy as np from astropy.table import Table, join import astropy.units as u from spectral_cube import SpectralCube from pyspeckit.spectrum.models.ammonia_constants import voff_lines_dict from skimage.morphology import disk,erosion from . import first_look from . import g...
GBTAmmoniaSurveyREPO_NAMEGASPATH_START.@GAS_extracted@GAS-master@GAS@run_first_look.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "Michalychforever/AsPy", "repo_path": "AsPy_extracted/AsPy-master/README.md", "type": "Markdown" }
# AsPy This code computes the determinants of aspherical fluctuations on the spherical collapse background. There are 3 codes in total: * det_master.py - computes the determinant in the EdS universe for all orbital numbers except for l=1. * dipole_IR_master.py - computes the determinant in the dipole sector, which ...
MichalychforeverREPO_NAMEAsPyPATH_START.@AsPy_extracted@AsPy-master@README.md@.PATH_END.py
{ "filename": "tests_io.py", "repo_name": "arjunsavel/SImMER", "repo_path": "SImMER_extracted/SImMER-main/src/simmer/tests/tests_io.py", "type": "Python" }
""" isort:skip_file """ import yaml import unittest from shutil import copyfile import os import pandas as pd import numpy as np import astropy.io.fits as pyfits import simmer.add_dark_exp as ad import simmer.schemas.custom_validator as validator import simmer.schemas.read_yml as read import simmer.insts as i imp...
arjunsavelREPO_NAMESImMERPATH_START.@SImMER_extracted@SImMER-main@src@simmer@tests@tests_io.py@.PATH_END.py
{ "filename": "test_stdout.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/callbacks/test_stdout.py", "type": "Python" }
from typing import Any, Dict, List, Optional import pytest from langchain.callbacks import StdOutCallbackHandler from langchain.chains.base import CallbackManagerForChainRun, Chain class FakeChain(Chain): """Fake chain class for testing purposes.""" be_correct: bool = True the_input_keys: List[str] = [...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@callbacks@test_stdout.py@.PATH_END.py
{ "filename": "fix_pms_outliers.py", "repo_name": "astro-datalab/nsc", "repo_path": "nsc_extracted/nsc-master/python/nsc/fix_pms_outliers.py", "type": "Python" }
#!/usr/bin/env python # Update measurement catalogs using the broken up measid/objectid lists # from nsc_instcal_combine_breakup_idstr.py import os import sys import numpy as np import shutil import time from dlnpyutils import utils as dln, coords, db from astropy.table import Table from astropy.io import fits import...
astro-datalabREPO_NAMEnscPATH_START.@nsc_extracted@nsc-master@python@nsc@fix_pms_outliers.py@.PATH_END.py
{ "filename": "notebook.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/tools/notebook.py", "type": "Python" }
"""Functionality to display Mayavi scenes inside Jupyter notebooks. """ import base64 from itertools import count from tvtk.api import tvtk from tvtk.common import configure_input from mayavi.core.scene import Scene _registry = dict() _backend = None _counter = count() def register_backend(name, klass): globa...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@tools@notebook.py@.PATH_END.py
{ "filename": "Database.ipynb", "repo_name": "FRBs/FRB", "repo_path": "FRB_extracted/FRB-main/docs/nb/Database.ipynb", "type": "Jupyter Notebook" }
# Database v0 -- Developing ```python # imports from importlib import reload import numpy as np import pandas as pd from astropy import units from astropy.table import Table from frb import frb from frb.galaxies import frbgalaxy ``` WARNING: UnitsWarning: 'km/s/Mpc' contains multiple slashes, which is dis...
FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@docs@nb@Database.ipynb@.PATH_END.py
{ "filename": "RVFitter.py", "repo_name": "WolfXeHD/RVFitter", "repo_path": "RVFitter_extracted/RVFitter-master/RVFitter/RVFitter.py", "type": "Python" }
import copy import os import pickle import lmfit import matplotlib.pyplot as plt import numpy as np import pandas as pd from RVFitter.Line import Line from RVFitter.Star import Star # TODO: add a unique identifier for a line which can be used as key for parameters class RVFitter(object): """Docstring for RVFit...
WolfXeHDREPO_NAMERVFitterPATH_START.@RVFitter_extracted@RVFitter-master@RVFitter@RVFitter.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.marker.colorbar.title" _path_str = "scatter3d.marker.colorbar.title.font" _valid_pro...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter3d@marker@colorbar@title@_font.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/realaxis/tickfont/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): super(TextcaseValidator, self).__init__( plo...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@realaxis@tickfont@_textcase.py@.PATH_END.py
{ "filename": "ACCEL_sift_old.py", "repo_name": "qianlivan/RPPPS", "repo_path": "RPPPS_extracted/RPPPS-master/ACCEL_sift_old.py", "type": "Python" }
import sifting, re, glob # Note: You will almost certainly want to adjust # the following variables for your particular search # glob for ACCEL files globaccel = "*ACCEL_*0" # glob for .inf files globinf = "*DM*.inf" # In how many DMs must a candidate be detected to be considered "good" #min_num_DMs = 2 #pzc ...
qianlivanREPO_NAMERPPPSPATH_START.@RPPPS_extracted@RPPPS-master@ACCEL_sift_old.py@.PATH_END.py
{ "filename": "test_general.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/tests/utils/test_general.py", "type": "Python" }
#!/usr/bin/env python # encoding: utf-8 """ test_general.py Created by José Sánchez-Gallego on 7 Apr 2016. Licensed under a 3-clause BSD license. Revision history: 7 Apr 2016 J. Sánchez-Gallego Initial version 15 Jun 2016 B. Andrews Converted to pytest """ from __future__ import division from _...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@tests@utils@test_general.py@.PATH_END.py
{ "filename": "angles.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/coordinates/angles.py", "type": "Python" }
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the fundamental classes used for representing coordinates in astropy. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import math from colle...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@coordinates@angles.py@.PATH_END.py
{ "filename": "listwise_rerank.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/retrievers/document_compressors/listwise_rerank.py", "type": "Python" }
"""Filter that uses an LLM to rerank documents listwise and select top-k.""" from typing import Any, Dict, List, Optional, Sequence from langchain_core.callbacks import Callbacks from langchain_core.documents import BaseDocumentCompressor, Document from langchain_core.language_models import BaseLanguageModel from lan...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@retrievers@document_compressors@listwise_rerank.py@.PATH_END.py
{ "filename": "time_integration.py", "repo_name": "oliverphilcox/ChempyMulti", "repo_path": "ChempyMulti_extracted/ChempyMulti-master/Chempy/time_integration.py", "type": "Python" }
import numpy as np class ABUNDANCE_MATRIX(object): ''' This class contains all information necessary to characterize the chemical evolution of the open-box one-zone Chempy model. It calculates the mass flow between the different components. And can advance the chemical evolution when the enrichment f...
oliverphilcoxREPO_NAMEChempyMultiPATH_START.@ChempyMulti_extracted@ChempyMulti-master@Chempy@time_integration.py@.PATH_END.py
{ "filename": "readers.py", "repo_name": "dvallesp/ASOHF", "repo_path": "ASOHF_extracted/ASOHF-master/tools/readers.py", "type": "Python" }
import os, sys, numpy as np from cython_fortran_file import FortranFile as FF def read_families(it, path='', output_format='dictionaries', output_redshift=False, min_mass=None, exclude_subhaloes=False): ''' Reads the families files, containing the halo catalogue. Can be outputted as a lis...
dvallespREPO_NAMEASOHFPATH_START.@ASOHF_extracted@ASOHF-master@tools@readers.py@.PATH_END.py
{ "filename": "functions.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/mpmath/py3/mpmath/functions/functions.py", "type": "Python" }
from ..libmp.backend import xrange class SpecialFunctions(object): """ This class implements special functions using high-level code. Elementary and some other functions (e.g. gamma function, basecase hypergeometric series) are assumed to be predefined by the context as "builtins" or "low-level" f...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@mpmath@py3@mpmath@functions@functions.py@.PATH_END.py
{ "filename": "Misc.py", "repo_name": "wmpg/WesternMeteorPyLib", "repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/Utils/Misc.py", "type": "Python" }
from __future__ import print_function, division, absolute_import import numpy as np def valueFormat(value_format, value, unc_format, unc, std_name, multi=None, deg=False, callable_val=None, \ callable_ci=None): """ Returns the formatted value with an uncertanty an confidence interval, if the uncertanty is gi...
wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@Utils@Misc.py@.PATH_END.py
{ "filename": "abstract_serial_dome.py", "repo_name": "panoptes/POCS", "repo_path": "POCS_extracted/POCS-main/src/panoptes/pocs/dome/abstract_serial_dome.py", "type": "Python" }
from panoptes.pocs import dome from panoptes.utils import error from panoptes.utils import rs232 class AbstractSerialDome(dome.AbstractDome): """Abstract base class for controlling a dome via a serial connection. Takes care of a single thing: configuring the connection to the device. """ def __init_...
panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@src@panoptes@pocs@dome@abstract_serial_dome.py@.PATH_END.py