metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "utils_plotting.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/real_events/utils_plotting.py",
"type": "Python"
} | import os
import argparse
import matplotlib.pyplot as plt
import json
import numpy as np
import jax.numpy as jnp
from jimgw.single_event.detector import Detector
from jimgw.single_event.likelihood import SingleEventLiklihood, HeterodynedTransientLikelihoodFD
import corner
import jax
from jaxtyping import Array, Float
... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@real_events@utils_plotting.py@.PATH_END.py |
{
"filename": "Double.py",
"repo_name": "ACS-Community/ACS",
"repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/src/ACSImpl/Double.py",
"type": "Python"
} | # @(#) $Id: Double.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $
#
# Copyright (C) 2001
# Associated Universities, Inc. Washington DC, USA.
#
# Produced for the ALMA project
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as publi... | ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@src@ACSImpl@Double.py@.PATH_END.py |
{
"filename": "simulate.py",
"repo_name": "aburgasser/splat",
"repo_path": "splat_extracted/splat-main/splat/simulate.py",
"type": "Python"
} | from __future__ import print_function, division
# imports: internal
import copy
import glob
import os
import requests
import time
# imports: external
from astropy import units as u
from astropy.coordinates import SkyCoord
import astropy.constants as constants
from astropy.cosmology import Planck15, z_at_value
from as... | aburgasserREPO_NAMEsplatPATH_START.@splat_extracted@splat-main@splat@simulate.py@.PATH_END.py |
{
"filename": "error.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/com/win32comext/axscript/client/error.py",
"type": "Python"
} | """Exception and error handling.
This contains the core exceptions that the implementations should raise
as well as the IActiveScriptError interface code.
"""
from __future__ import annotations
import re
import traceback
import warnings
from types import TracebackType
from typing import TYPE_CHECKING
import pythonc... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@com@win32comext@axscript@client@error.py@.PATH_END.py |
{
"filename": "SPT_ACT_summer_school_2024_candl_colab.ipynb",
"repo_name": "Lbalkenhol/candl",
"repo_path": "candl_extracted/candl-main/notebooks/SPT_ACT_summer_school_2024/SPT_ACT_summer_school_2024_candl_colab.ipynb",
"type": "Jupyter Notebook"
} | <a href="https://colab.research.google.com/github/Lbalkenhol/candl/blob/main/notebooks/SPT_ACT_summer_school_2024/SPT_ACT_summer_school_2024_candl_colab.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<p align="center">
<img src="https://raw.githu... | LbalkenholREPO_NAMEcandlPATH_START.@candl_extracted@candl-main@notebooks@SPT_ACT_summer_school_2024@SPT_ACT_summer_school_2024_candl_colab.ipynb@.PATH_END.py |
{
"filename": "nmf.py",
"repo_name": "gbrammer/eazy-py",
"repo_path": "eazy-py_extracted/eazy-py-master/scripts/nmf.py",
"type": "Python"
} | def build_matrices():
"""
Build matrices for Blanton & Roweis optimization
"""
#import unicorn
import numpy as np
#import br07
import glob
#from threedhst import catIO
import matplotlib.pyplot as plt
from astropy.table import Table
import eazy
from eazy.utils i... | gbrammerREPO_NAMEeazy-pyPATH_START.@eazy-py_extracted@eazy-py-master@scripts@nmf.py@.PATH_END.py |
{
"filename": "test_multi_plane.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_MultiPlane/test_multi_plane.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy.testing as npt
import numpy as np
import pytest
import unittest
from astropy.cosmology import FlatwCDM
from lenstronomy.LensModel.MultiPlane.multi_plane import MultiPlane
from lenstronomy.LensModel.MultiPlane.multi_plane_base import MultiPlaneBase
from lenstronomy.LensModel.lens_mo... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_MultiPlane@test_multi_plane.py@.PATH_END.py |
{
"filename": "Blend.py",
"repo_name": "alejandrobll/py-sphviewer",
"repo_path": "py-sphviewer_extracted/py-sphviewer-master/sphviewer/tools/Blend.py",
"type": "Python"
} | #This file is part of Py-SPHViewer
#<Py-SPHVIewer is a framework for rendering particles in Python
#using the SPH interpolation scheme.>
#Copyright (C) <2013> <Alejandro Benitez Llambay>
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as pub... | alejandrobllREPO_NAMEpy-sphviewerPATH_START.@py-sphviewer_extracted@py-sphviewer-master@sphviewer@tools@Blend.py@.PATH_END.py |
{
"filename": "red_corr.py",
"repo_name": "Morisset/PyNeb_devel",
"repo_path": "PyNeb_devel_extracted/PyNeb_devel-master/pyneb/extinction/red_corr.py",
"type": "Python"
} | import numpy as np
import pyneb as pn
if pn.config.INSTALLED['plt']:
import matplotlib.pyplot as plt
if pn.config.INSTALLED['scipy']:
from scipy import interpolate
from ..utils.misc import ROOT_DIR
def my_X2(wave, params=[5000., 1., 2., 3.]):
return params[1] * (wave / params[0]) + params[2] * (wave / pa... | MorissetREPO_NAMEPyNeb_develPATH_START.@PyNeb_devel_extracted@PyNeb_devel-master@pyneb@extinction@red_corr.py@.PATH_END.py |
{
"filename": "profile_plotter.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/visualization/profile_plotter.py",
"type": "Python"
} | import base64
import os
from functools import wraps
from typing import TYPE_CHECKING, Any
import matplotlib
import numpy as np
from more_itertools.more import always_iterable, unzip
from yt._maintenance.ipython_compat import IS_IPYTHON
from yt._typing import FieldKey
from yt.data_objects.profiles import create_profil... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@profile_plotter.py@.PATH_END.py |
{
"filename": "_tickformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/gauge/axis/_tickformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickformat", parent_name="indicator.gauge.axis", **kwargs
):
super(TickformatValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@gauge@axis@_tickformat.py@.PATH_END.py |
{
"filename": "Basu_2016_raw_to_yaml.py",
"repo_name": "NickSwainston/pulsar_spectra",
"repo_path": "pulsar_spectra_extracted/pulsar_spectra-main/pulsar_spectra/catalogue_papers/Basu_2016_raw_to_yaml.py",
"type": "Python"
} | import json
with open("Basu_2016_raw.txt", "r") as raw_file:
lines = raw_file.readlines()
print(lines)
pulsar = "J1803-2137"
pulsar_dict = {pulsar: {
"Frequency MHz":[],
"Bandwidth MHz":[],
"Flux Density mJy":[],
"Flux Density error mJy":[]
}}
for row in lines:
row = row.replace(" ± ", "±"... | NickSwainstonREPO_NAMEpulsar_spectraPATH_START.@pulsar_spectra_extracted@pulsar_spectra-main@pulsar_spectra@catalogue_papers@Basu_2016_raw_to_yaml.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showtickprefix",
parent_name="layout.smith.imaginaryaxis",
**kwargs,
):
super(ShowtickprefixValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@imaginaryaxis@_showtickprefix.py@.PATH_END.py |
{
"filename": "STATUS.md",
"repo_name": "litebird/litebird_sim",
"repo_path": "litebird_sim_extracted/litebird_sim-master/STATUS.md",
"type": "Markdown"
} | # Implementation status
This document details the list of simulation modules that the
Simulation Team plans to implement in `litebird_sim`.
## List of modules
| Module | Status | Priority | Notes | Links ... | litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@STATUS.md@.PATH_END.py |
{
"filename": "AlignDOT.py",
"repo_name": "sPaMFouR/RedPipe",
"repo_path": "RedPipe_extracted/RedPipe-master/photometry/AlignDOT.py",
"type": "Python"
} | #!/usr/bin/env python
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #
# xxxxxxxxxxxxxxxxxxxxxx----------------------------IMAGE ALIGNMENT---------------------------xxxxxxxxxxxxxxxxxxxxxxx #
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... | sPaMFouRREPO_NAMERedPipePATH_START.@RedPipe_extracted@RedPipe-master@photometry@AlignDOT.py@.PATH_END.py |
{
"filename": "angular.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/pycbc/inference/jump/angular.py",
"type": "Python"
} | # Copyright (C) 2020 Collin Capano
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in t... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@inference@jump@angular.py@.PATH_END.py |
{
"filename": "_util.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/PIL/_util.py",
"type": "Python"
} | import os
if bytes is str:
def isStringType(t):
return isinstance(t, basestring)
def isPath(f):
return isinstance(f, basestring)
else:
def isStringType(t):
return isinstance(t, str)
def isPath(f):
return isinstance(f, (bytes, str))
# Checks if an object is a string, ... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@PIL@_util.py@.PATH_END.py |
{
"filename": "Download_images.ipynb",
"repo_name": "aabdurrouf/piXedfit",
"repo_path": "piXedfit_extracted/piXedfit-main/examples/Download_images.ipynb",
"type": "Jupyter Notebook"
} | ## Downloading imaging Data
This tutorial demonstrates how to automatically download imaging data from GALEX, SDSS, 2MASS, and WISE using some function in the `piXedfit_images` module. These functions are written by Han Tang Lin (Tyler https://github.com/Tylerastro).
```python
from astropy.coordinates import SkyCo... | aabdurroufREPO_NAMEpiXedfitPATH_START.@piXedfit_extracted@piXedfit-main@examples@Download_images.ipynb@.PATH_END.py |
{
"filename": "_row.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/domain/_row.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class RowValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="row", parent_name="parcats.domain", **kwargs):
super(RowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@domain@_row.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ishivvers/TheKastShiv",
"repo_path": "TheKastShiv_extracted/TheKastShiv-master/tools/__init__.py",
"type": "Python"
} | ishivversREPO_NAMETheKastShivPATH_START.@TheKastShiv_extracted@TheKastShiv-master@tools@__init__.py@.PATH_END.py | |
{
"filename": "tool_with_candidate.py",
"repo_name": "franpoz/SHERLOCK",
"repo_path": "SHERLOCK_extracted/SHERLOCK-master/sherlockpipe/loading/tool_with_candidate.py",
"type": "Python"
} | import logging
import foldedleastsquares
import numpy as np
from lcbuilder.helper import LcbuilderHelper
class ToolWithCandidate:
"""
Base class to be extended by tools that process candidates information.
"""
def __init__(self, is_candidate_from_search, candidates_df) -> None:
super().__ini... | franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@sherlockpipe@loading@tool_with_candidate.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/colorbar/tickfont/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="cone.colorbar.tickfont", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@colorbar@tickfont@_variant.py@.PATH_END.py |
{
"filename": "epoch_iterator_test.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/trainers/epoch_iterator_test.py",
"type": "Python"
} | import numpy as np
import pytest
import tensorflow as tf
from absl.testing import parameterized
from keras.src import backend
from keras.src import testing
from keras.src.trainers import data_adapters
from keras.src.trainers import epoch_iterator
class TestEpochIterator(testing.TestCase):
@parameterized.named_pa... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@trainers@epoch_iterator_test.py@.PATH_END.py |
{
"filename": "test_logm0_pop_bimod.py",
"repo_name": "ArgonneCPAC/diffmah",
"repo_path": "diffmah_extracted/diffmah-main/diffmah/diffmahpop_kernels/bimod_logm0_kernels/tests/test_logm0_pop_bimod.py",
"type": "Python"
} | """
"""
import numpy as np
from jax import random as jran
from .. import logm0_pop_bimod as m0pop
TOL = 1e-2
def test_param_u_param_names_propagate_properly():
gen = zip(
m0pop.DEFAULT_LOGM0POP_U_PARAMS._fields,
m0pop.DEFAULT_LOGM0POP_PARAMS._fields,
)
for u_key, key in gen:
ass... | ArgonneCPACREPO_NAMEdiffmahPATH_START.@diffmah_extracted@diffmah-main@diffmah@diffmahpop_kernels@bimod_logm0_kernels@tests@test_logm0_pop_bimod.py@.PATH_END.py |
{
"filename": "lane_emden.py",
"repo_name": "minkailin/stratsi",
"repo_path": "stratsi_extracted/stratsi-master/dedalus_repo/examples/bvp/1d_lane_emden/lane_emden.py",
"type": "Python"
} | """
Dedalus script for the Lane-Emden equation.
This is a 1D script and should be ran serially. It should converge within
roughly a dozen iterations, and should take under a minute to run.
In astrophysics, the Lane–Emden equation is a dimensionless form of Poisson's
equation for the gravitational potential of a Newt... | minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@dedalus_repo@examples@bvp@1d_lane_emden@lane_emden.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "Cosmoglobe/zodipy",
"repo_path": "zodipy_extracted/zodipy-main/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and con... | CosmoglobeREPO_NAMEzodipyPATH_START.@zodipy_extracted@zodipy-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "ant_metrics_run.py",
"repo_name": "HERA-Team/hera_qm",
"repo_path": "hera_qm_extracted/hera_qm-main/hera_qm/scripts/ant_metrics_run.py",
"type": "Python"
} | #!/usr/bin/env python
# Copyright (c) 2019 the HERA Project
# Licensed under the MIT License
from hera_qm import utils
from hera_qm import ant_metrics
import sys
def main():
ap = utils.get_metrics_ArgumentParser('ant_metrics')
args = ap.parse_args()
history = ' '.join(sys.argv)
ant_metrics.ant_metrics... | HERA-TeamREPO_NAMEhera_qmPATH_START.@hera_qm_extracted@hera_qm-main@hera_qm@scripts@ant_metrics_run.py@.PATH_END.py |
{
"filename": "02-Creating_MOCs_from_astropy_regions.ipynb",
"repo_name": "cds-astro/mocpy",
"repo_path": "mocpy_extracted/mocpy-master/notebooks/02-Creating_MOCs_from_astropy_regions.ipynb",
"type": "Jupyter Notebook"
} | ```python
import matplotlib.pyplot as plt
import regions
from astropy import units as u
from astropy.coordinates import SkyCoord
from mocpy import MOC
```
# Creating MOCs out of [astropy-regions](https://github.com/astropy/regions).
The supported astropy regions are:
- regions.CircleSkyRegion
- regions.CircleAnnulusS... | cds-astroREPO_NAMEmocpyPATH_START.@mocpy_extracted@mocpy-master@notebooks@02-Creating_MOCs_from_astropy_regions.ipynb@.PATH_END.py |
{
"filename": "sort_refined_ids_recursive.py",
"repo_name": "fmihpc/vlasiator",
"repo_path": "vlasiator_extracted/vlasiator-master/mini-apps/simple-grid-test/sort_refined_ids_recursive.py",
"type": "Python"
} | import numpy as np
import pdb
import time
def findParent(id, gridSize, debug):
nIndicesInRefLvl = list()
for refLvl in np.arange(1,10):
nIndicesInRefLvl.append(gridSize * 2 ** ((refLvl - 1) * 3))
for i in np.arange(len(nIndicesInRefLvl)):
if id <= sum(nIndicesInRefLvl[:i+1]):
... | fmihpcREPO_NAMEvlasiatorPATH_START.@vlasiator_extracted@vlasiator-master@mini-apps@simple-grid-test@sort_refined_ids_recursive.py@.PATH_END.py |
{
"filename": "sortedlist.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/sortedcontainers/py2/sortedcontainers/sortedlist.py",
"type": "Python"
} | """Sorted List
==============
:doc:`Sorted Containers<index>` is an Apache2 licensed Python sorted
collections library, written in pure-Python, and fast as C-extensions. The
:doc:`introduction<introduction>` is the best way to get started.
Sorted list implementations:
.. currentmodule:: sortedcontainers
* :class:`S... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@sortedcontainers@py2@sortedcontainers@sortedlist.py@.PATH_END.py |
{
"filename": "citation.md",
"repo_name": "PabloVD/HAYASHI",
"repo_path": "HAYASHI_extracted/HAYASHI-master/docs/citation.md",
"type": "Markdown"
} | # Citation
If you use the code, please link [the Github repository](https://github.com/PabloVD/HAYASHI), and cite [arXiv:2209.01305](https://arxiv.org/abs/2209.01305) and the DOI [10.5281/zenodo.7044255](https://doi.org/10.5281/zenodo.7044255). | PabloVDREPO_NAMEHAYASHIPATH_START.@HAYASHI_extracted@HAYASHI-master@docs@citation.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "lucatelli/morphen",
"repo_path": "morphen_extracted/morphen-main/image_decomposition/README.md",
"type": "Markdown"
} | # Image Fitting Decomposition
***DOCUMENTATION UNDER DEVELOPMENT***
## Introduction
The `morphen` package provides a set of tools to perform image fitting decomposition,
which uses the Sérsic function to model the surface brightness distribution of a source.
The Sérsic modeling within `morphen` is semi-automated and... | lucatelliREPO_NAMEmorphenPATH_START.@morphen_extracted@morphen-main@image_decomposition@README.md@.PATH_END.py |
{
"filename": "test_compmixin.py",
"repo_name": "iraf-community/pyraf",
"repo_path": "pyraf_extracted/pyraf-main/pyraf/tools/tests/test_compmixin.py",
"type": "Python"
} | import pytest
from ..compmixin import ComparableMixin
class SimpleStr(ComparableMixin):
def __init__(self, v):
self.val = str(v) # all input turned to string
def __str__(self):
return str(self.val)
def _cmpkey(self):
return self.val
class AnyType(ComparableMixin):
def __i... | iraf-communityREPO_NAMEpyrafPATH_START.@pyraf_extracted@pyraf-main@pyraf@tools@tests@test_compmixin.py@.PATH_END.py |
{
"filename": "_add_newdocs.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/special/_add_newdocs.py",
"type": "Python"
} | # Docstrings for generated ufuncs
#
# The syntax is designed to look like the function add_newdoc is being
# called from numpy.lib, but in this file add_newdoc puts the
# docstrings in a dictionary. This dictionary is used in
# _generate_pyx.py to generate the docstrings for the ufuncs in
# scipy.special at the C level... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@_add_newdocs.py@.PATH_END.py |
{
"filename": "grpc_debug_test_server.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/debug/lib/grpc_debug_test_server.py",
"type": "Python"
} | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@debug@lib@grpc_debug_test_server.py@.PATH_END.py |
{
"filename": "timeline.py",
"repo_name": "spacetelescope/calcos",
"repo_path": "calcos_extracted/calcos-master/calcos/timeline.py",
"type": "Python"
} | from __future__ import absolute_import, division # confidence unknown
import math
import os
import numpy as np
import astropy.io.fits as fits
from . import cosutil
from . import dispersion
from . import orbit
from . import ccos
from .calcosparam import * # parameter definitions
DIST_SUN = 149597870.691 ... | spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@calcos@timeline.py@.PATH_END.py |
{
"filename": "copy_injection_recovery.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_TF2/injection_73/copy_injection_recovery.py",
"type": "Python"
} | import os
os.environ['CUDA_VISIBLE_DEVICES'] = "2"
os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.1"
import numpy as np
import argparse
# The following is needed on CIT cluster to avoid an obscure Python error
import psutil
p = psutil.Process()
p.cpu_affinity([0])
# Regular imports
import argparse
import copy
impor... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_TF2@injection_73@copy_injection_recovery.py@.PATH_END.py |
{
"filename": "bench_chisq_grid_WLSFitter.py",
"repo_name": "nanograv/PINT",
"repo_path": "PINT_extracted/PINT-master/profiling/bench_chisq_grid_WLSFitter.py",
"type": "Python"
} | #!/usr/bin/env python
import pint.toa
import pint.models
import pint.fitter
from pint.gridutils import grid_chisq
import numpy as np
import astropy.units as u
# Get .tim file and par file from here:
# curl -O https://data.nanograv.org/static/data/J0740+6620.cfr+19.tim
# curl -O https://data.nanograv.org/static/data/J... | nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@profiling@bench_chisq_grid_WLSFitter.py@.PATH_END.py |
{
"filename": "_ticks.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/gauge/axis/_ticks.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticks", parent_name="indicator.gauge.axis", **kwargs
):
super(TicksValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@gauge@axis@_ticks.py@.PATH_END.py |
{
"filename": "ragged_concat_op_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/ragged_concat_op_test.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@ragged@ragged_concat_op_test.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/colorbar/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showtickprefix", parent_name="bar.marker.colorbar", **kwargs
):
super(ShowtickprefixValidator, self).__init__(
plotly_name=plotly_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@colorbar@_showtickprefix.py@.PATH_END.py |
{
"filename": "_types.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/jsonschema/py3/jsonschema/_types.py",
"type": "Python"
} | import numbers
from pyrsistent import pmap
import attr
from jsonschema.compat import int_types, str_types
from jsonschema.exceptions import UndefinedTypeCheck
def is_array(checker, instance):
return isinstance(instance, list)
def is_bool(checker, instance):
return isinstance(instance, bool)
def is_integ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jsonschema@py3@jsonschema@_types.py@.PATH_END.py |
{
"filename": "ScienceCamera.py",
"repo_name": "jacotay7/pyRTC",
"repo_path": "pyRTC_extracted/pyRTC-main/pyRTC/ScienceCamera.py",
"type": "Python"
} | """
Science Camera Superclass
"""
from pyRTC.Pipeline import ImageSHM
from pyRTC.pyRTCComponent import *
from pyRTC.utils import *
import numpy as np
import matplotlib.pyplot as plt
class ScienceCamera(pyRTCComponent):
"""
A pyRTCComponent which represents a Science Camera. This is a general class which is
... | jacotay7REPO_NAMEpyRTCPATH_START.@pyRTC_extracted@pyRTC-main@pyRTC@ScienceCamera.py@.PATH_END.py |
{
"filename": "pk_data_2d_eBOSS_broadband_test.py",
"repo_name": "Samreay/Barry",
"repo_path": "Barry_extracted/Barry-master/config/examples/pk_data_2d_eBOSS_broadband_test.py",
"type": "Python"
} | import sys
sys.path.append("..")
sys.path.append("../..")
from barry.samplers import NautilusSampler
from barry.config import setup
from barry.models import PowerBeutler2017
from barry.datasets.dataset_power_spectrum import PowerSpectrum_eBOSS_LRGpCMASS
from barry.fitter import Fitter
import numpy as np
import pandas ... | SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@config@examples@pk_data_2d_eBOSS_broadband_test.py@.PATH_END.py |
{
"filename": "compaq.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/distutils/fcompiler/compaq.py",
"type": "Python"
} |
#http://www.compaq.com/fortran/docs/
import os
import sys
from numpy.distutils.fcompiler import FCompiler
from distutils.errors import DistutilsPlatformError
compilers = ['CompaqFCompiler']
if os.name != 'posix' or sys.platform[:6] == 'cygwin' :
# Otherwise we'd get a false positive on posix systems with
# c... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@distutils@fcompiler@compaq.py@.PATH_END.py |
{
"filename": "_bordercolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/hoverlabel/_bordercolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bordercolor", parent_name="surface.hoverlabel", **kwargs
):
super(BordercolorValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@hoverlabel@_bordercolor.py@.PATH_END.py |
{
"filename": "test_fruitbat_regression.py",
"repo_name": "abatten/fruitbat",
"repo_path": "fruitbat_extracted/fruitbat-master/fruitbat/tests/test_fruitbat_regression.py",
"type": "Python"
} | """
test_fruitbat_regression.py
This test suite if for testing previously known bugs.
"""
import numpy as np
from fruitbat import Frb, methods, table
def test_create_custom_method():
"""
This bug was found when creating a custon method,
using calc_redshift wouldn't return any value.
"""
def si... | abattenREPO_NAMEfruitbatPATH_START.@fruitbat_extracted@fruitbat-master@fruitbat@tests@test_fruitbat_regression.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/updatemenu/font/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="weight", parent_name="layout.updatemenu.font", **kwargs
):
super(WeightValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@updatemenu@font@_weight.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/textfont/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._weight import WeightValidator
from ._variant import VariantValidator
from ._textcase import TextcaseValidator
from ._style import StyleValidator
from ._size import SizeValidator
from ._shadow impor... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@textfont@__init__.py@.PATH_END.py |
{
"filename": "elastic_vector_search.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/elastic_vector_search.py",
"type": "Python"
} | from __future__ import annotations
import uuid
import warnings
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
List,
Mapping,
Optional,
Tuple,
Union,
)
from langchain_core._api import deprecated
from langchain_core.documents import Document
from langchain_core.embeddings i... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@elastic_vector_search.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/batches/__init__.py",
"type": "Python"
} | from .altaz_batch import *
from .col_map_dict import *
from .common import *
from .ddf_batch import *
from .filterchange_batch import *
from .glance_batch import *
from .hourglass_batch import *
from .info_batch import *
from .metadata_batch import *
from .moving_objects_batch import *
from .openshutter_batch import *
... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@batches@__init__.py@.PATH_END.py |
{
"filename": "channelanalysis_alpha.py",
"repo_name": "jinshisai/SLAM",
"repo_path": "SLAM_extracted/SLAM-main/dev/channelanalysis_alpha.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Created By : Yusuke Aso
# Created Date: 2022 Jan 27
# version = alpha
# ---------------------------------------------------------------------------
"""
This script derives the 2D central position at each velocity ch... | jinshisaiREPO_NAMESLAMPATH_START.@SLAM_extracted@SLAM-main@dev@channelanalysis_alpha.py@.PATH_END.py |
{
"filename": "incremental_pca.py",
"repo_name": "rapidsai/cuml",
"repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/decomposition/incremental_pca.py",
"type": "Python"
} | #
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
#
# 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... | rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@decomposition@incremental_pca.py@.PATH_END.py |
{
"filename": "simultaneous_order_fitting.py",
"repo_name": "afeinstein20/nirhiss",
"repo_path": "nirhiss_extracted/nirhiss-main/src/nirhiss/simultaneous_order_fitting.py",
"type": "Python"
} | import numpy as np
import scipy.optimize as so
import pyximport
import itertools
pyximport.install()
from .niriss_cython import (build_gaussian_images, build_moffat_images)
__all__ = ['fit_orders_fast', 'fit_orders']
def fit_orders(data, tab):
"""
Creates a 2D image optimized to fit the data. Currently
r... | afeinstein20REPO_NAMEnirhissPATH_START.@nirhiss_extracted@nirhiss-main@src@nirhiss@simultaneous_order_fitting.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "sblunt/orbitize",
"repo_path": "orbitize_extracted/orbitize-main/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and con... | sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "gce_failure_handler_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/failure_handling/gce_failure_handler_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 applicable ... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@distribute@failure_handling@gce_failure_handler_test.py@.PATH_END.py |
{
"filename": "extraction.py",
"repo_name": "b-biswas/MADNESS",
"repo_path": "MADNESS_extracted/MADNESS-main/madness_deblender/extraction.py",
"type": "Python"
} | """Extract cutouts from large fields."""
import logging
import numpy as np
logging.basicConfig(format="%(message)s", level=logging.INFO)
LOG = logging.getLogger(__name__)
def extract_cutouts(
field_image,
pos,
distances_to_center=False,
cutout_size=41,
channel_last=False,
):
"""Extract the... | b-biswasREPO_NAMEMADNESSPATH_START.@MADNESS_extracted@MADNESS-main@madness_deblender@extraction.py@.PATH_END.py |
{
"filename": "_gridwidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/caxis/_gridwidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="gridwidth", parent_name="layout.ternary.caxis", **kwargs
):
super(GridwidthValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@caxis@_gridwidth.py@.PATH_END.py |
{
"filename": "sky_survey.py",
"repo_name": "deepskies/deeplenstronomy",
"repo_path": "deeplenstronomy_extracted/deeplenstronomy-master/exploded_setup_old/SkySurveyModel/sky_survey.py",
"type": "Python"
} | import numpy as np
import os
import yaml
from scipy.stats import norm
pdfs_dir = os.path.join(os.path.dirname(__file__), '../../config_files/2dpdfs')
characteristics_dir = os.path.join(os.path.dirname(__file__),
'../../config_files/survey_characteristics')
class StochasticNoise(obj... | deepskiesREPO_NAMEdeeplenstronomyPATH_START.@deeplenstronomy_extracted@deeplenstronomy-master@exploded_setup_old@SkySurveyModel@sky_survey.py@.PATH_END.py |
{
"filename": "controller.py",
"repo_name": "dmlc/xgboost",
"repo_path": "xgboost_extracted/xgboost-master/demo/nvflare/vertical/custom/controller.py",
"type": "Python"
} | """
Example of training controller with NVFlare
===========================================
"""
import multiprocessing
from nvflare.apis.client import Client
from nvflare.apis.fl_context import FLContext
from nvflare.apis.impl.controller import Controller, Task
from nvflare.apis.shareable import Shareable
from nvflare... | dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@demo@nvflare@vertical@custom@controller.py@.PATH_END.py |
{
"filename": "_ysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/_ysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="ysrc", parent_name="mesh3d", **kwargs):
super(YsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=k... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@_ysrc.py@.PATH_END.py |
{
"filename": "_cone.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/_cone.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ConeValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="cone", parent_name="", **kwargs):
super(ConeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_class_s... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@_cone.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/retrievers/document_compressors/__init__.py",
"type": "Python"
} | import importlib
from typing import Any
from langchain.retrievers.document_compressors.base import DocumentCompressorPipeline
from langchain.retrievers.document_compressors.chain_extract import (
LLMChainExtractor,
)
from langchain.retrievers.document_compressors.chain_filter import (
LLMChainFilter,
)
from la... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@retrievers@document_compressors@__init__.py@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="name", parent_name="waterfall", **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@_name.py@.PATH_END.py |
{
"filename": "lens_EB-iter-forecast.ipynb",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/example/curvedsky_reconstruction/lens_EB-iter-forecast.ipynb",
"type": "Jupyter Notebook"
} | # A reconstruction nosie dependence on CMB white noise level
This code compute normalization and power spectrum of quadratic estiamtors with varying CMB noise level
```python
# external
import numpy as np
from matplotlib.pyplot import *
# from cmblensplus/wrap/
import basic
import curvedsky as cs
# from cmblensplus/u... | toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@example@curvedsky_reconstruction@lens_EB-iter-forecast.ipynb@.PATH_END.py |
{
"filename": "RedistributeNodes.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/Distributed/RedistributeNodes.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# RedistributeNodes
#-------------------------------------------------------------------------------
from PYB11Generator import *
@PYB11template("Dimension")
class RedistributeNodes:
"""RedistributeNodes -- An abstract base class for ... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Distributed@RedistributeNodes.py@.PATH_END.py |
{
"filename": "photometry.py",
"repo_name": "galsci/pysm",
"repo_path": "pysm_extracted/pysm-main/src/pysm3/utils/photometry.py",
"type": "Python"
} | import healpy as hp
import numpy as np
def car_aperture_photometry(
thumbs, aperture_radius, annulus_width=None, modrmap=None, pixsizemap=None
):
"""
Flux from aperture photometry.
from https://github.com/msyriac/orphics/blob/master/orphics/maps.py
Parameters
----------
thumb : ndmap
... | galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@src@pysm3@utils@photometry.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "1054/Crab.Toolkit.michi2",
"repo_path": "Crab.Toolkit.michi2_extracted/Crab.Toolkit.michi2-master/README.md",
"type": "Markdown"
} | # Crab.Toolkit.michi2
This is a _Crab_ toolkit for minimumizing chi2 for any 1D model fit, for example, galaxy SED fitting, molecular line ladder fitting.
# Usage for SED Fitting #
## SED Fitting ##
Our SED fitting contains 5 components (or any number of components): BC03, AGN, DL07 warm and cold and radio. The rad... | 1054REPO_NAMECrab.Toolkit.michi2PATH_START.@Crab.Toolkit.michi2_extracted@Crab.Toolkit.michi2-master@README.md@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scattercarpet/_line.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattercarpet"
_path_str = "scattercarpet.line"
_valid_props = {"color", "dash", "shape", "smo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scattercarpet@_line.py@.PATH_END.py |
{
"filename": "image.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/cairosvg_ES/image.py",
"type": "Python"
} | """
Images manager.
"""
import os.path
from io import BytesIO
from PIL import Image, ImageOps
from .helpers import node_format, preserve_ratio, size
from .parser import Tree
from .surface import cairo
from .url import parse_url
IMAGE_RENDERING = {
'optimizeQuality': cairo.FILTER_BEST,
'optimizeSpeed': cair... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@cairosvg_ES@image.py@.PATH_END.py |
{
"filename": "_ticktext.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self,
plotly_name="ticktext",
parent_name="scatterpolar.marker.colorbar",
**kwargs,
):
super(TicktextValidator, self).__init__(
plotly... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@_ticktext.py@.PATH_END.py |
{
"filename": "reverse_precompute_grid.py",
"repo_name": "HajimeKawahara/exojax",
"repo_path": "exojax_extracted/exojax-master/tests/endtoend/reverse/reverse_precompute_grid.py",
"type": "Python"
} | """ Reverse modeling of Methane emission spectrum using PreMODIT, precomputation of F0 grids
"""
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import matplotlib.pyplot as plt
from jax import random
import jax.numpy as jnp
from jax import vmap
import pandas as pd
import pkg_resources
from exojax.spec.atmrt... | HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@endtoend@reverse@reverse_precompute_grid.py@.PATH_END.py |
{
"filename": "utilities.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/workers/utilities.py",
"type": "Python"
} | from copy import deepcopy
from logging import getLogger
from typing import Any, Dict, List, Optional
from prefect.client.collections import get_collections_metadata_client
from prefect.logging.loggers import get_logger
from prefect.settings import PREFECT_DEBUG_MODE
from prefect.workers.base import BaseWorker
async ... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@workers@utilities.py@.PATH_END.py |
{
"filename": "stratsi_eqm.py",
"repo_name": "minkailin/stratsi",
"repo_path": "stratsi_extracted/stratsi-master/caseA_stokes0.1/no_osc_filter_kx1e4/stratsi_eqm.py",
"type": "Python"
} | """
stratified streaming instability
equilibrium vertical profiles of horizontal velocities
"""
'''
import parameters and functions
'''
from stratsi_params import *
'''
process command line arguements
'''
parser = argparse.ArgumentParser()
parser.add_argument("--xlim", "-xl", nargs='*', help="set horizontal axis r... | minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@caseA_stokes0.1@no_osc_filter_kx1e4@stratsi_eqm.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pynbody/tangos",
"repo_path": "tangos_extracted/tangos-master/tangos/properties/__init__.py",
"type": "Python"
} | import functools
import importlib
import os
import sys
import warnings
from importlib.metadata import entry_points
import numpy as np
from .. import input_handlers, parallel_tasks
from ..log import logger
from ..util import timing_monitor
class PropertyCalculationMetaClass(type):
# Present to register new subcl... | pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@properties@__init__.py@.PATH_END.py |
{
"filename": "__main__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/testing/__main__.py",
"type": "Python"
} | if __name__ == '__main__':
from IPython.testing import iptestcontroller
iptestcontroller.main()
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@testing@__main__.py@.PATH_END.py |
{
"filename": "_cmax.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_cmax.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CmaxValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="cmax", parent_name="volume", **kwargs):
super(CmaxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_cmax.py@.PATH_END.py |
{
"filename": "templates.py",
"repo_name": "dylancromer/maszcal",
"repo_path": "maszcal_extracted/maszcal-main/spec/data/templates.py",
"type": "Python"
} | import pytest
import numpy as np
from maszcal.data.templates import WeakLensingData
def describe_weak_lensing_data():
def describe___init__():
@pytest.fixture
def wl_data():
return WeakLensingData(
radial_coordinates=np.logspace(-1, 1, 10),
redshifts=n... | dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@spec@data@templates.py@.PATH_END.py |
{
"filename": "attribute_quantity.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/examples/quantity/attribute_quantity.py",
"type": "Python"
} | """
File: examples/quantity/AttributeQuantity.py
Author: Keith Tauscher
Date: 10 Sep 2017
Description: Example showing how the AttributeQuantity class. Basically, it
defers the calling of an attribute/property until desired but
still encodes what will be called.
"""
from pylinex import Attrib... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@quantity@attribute_quantity.py@.PATH_END.py |
{
"filename": "_linepositionsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/candlestick/hoverlabel/font/_linepositionsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="linepositionsrc",
parent_name="candlestick.hoverlabel.font",
**kwargs,
):
super(LinepositionsrcValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@candlestick@hoverlabel@font@_linepositionsrc.py@.PATH_END.py |
{
"filename": "ACSPerfReportGen.py",
"repo_name": "ACS-Community/ACS",
"repo_path": "ACS_extracted/ACS-master/Benchmark/analyzer/src/ACSPerfReportGen.py",
"type": "Python"
} | #!/usr/bin/env python
#------------------------------------------------------------------------------
# @(#) $Id: ACSPerfReportGen.py,v 1.3 2004/10/15 22:16:35 dfugate Exp $
#
# ALMA - Atacama Large Millimiter Array
# (c) Associated Universities, Inc. Washington DC, USA, 2001
# (c) European Southern Observator... | ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@Benchmark@analyzer@src@ACSPerfReportGen.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "Gravity-Spy/gravityspy-ligo-pipeline",
"repo_path": "gravityspy-ligo-pipeline_extracted/gravityspy-ligo-pipeline-main/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# gravityspy_ligo documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 21 14:05:08 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | Gravity-SpyREPO_NAMEgravityspy-ligo-pipelinePATH_START.@gravityspy-ligo-pipeline_extracted@gravityspy-ligo-pipeline-main@docs@conf.py@.PATH_END.py |
{
"filename": "2023_01_31_133052_2a88656f4a23_clean_up_work_queue_migration.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2023_01_31_133052_2a88656f4a23_clean_up_work_queue_migration.py",
"type": "Python"
} | """Clean up work queue migration
Revision ID: 2a88656f4a23
Revises: f98ae6d8e2cc
Create Date: 2023-01-31 13:30:52.172981
"""
import sqlalchemy as sa
from alembic import op
import prefect
# revision identifiers, used by Alembic.
revision = "2a88656f4a23"
down_revision = "f98ae6d8e2cc"
branch_labels = None
depends_o... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2023_01_31_133052_2a88656f4a23_clean_up_work_queue_migration.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/title/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="volume.colorbar.title.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@colorbar@title@font@_shadow.py@.PATH_END.py |
{
"filename": "custom_agent_with_plugin_retrieval_using_plugnplai.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/cookbook/custom_agent_with_plugin_retrieval_using_plugnplai.ipynb",
"type": "Jupyter Notebook"
} | # Plug-and-Plai
This notebook builds upon the idea of [plugin retrieval](./custom_agent_with_plugin_retrieval.html), but pulls all tools from `plugnplai` - a directory of AI Plugins.
## Set up environment
Do necessary imports, etc.
Install plugnplai lib to get a list of active plugins from https://plugplai.com dire... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@custom_agent_with_plugin_retrieval_using_plugnplai.ipynb@.PATH_END.py |
{
"filename": "test_image_orientation_corrector.py",
"repo_name": "GeminiDRSoftware/MAROONXDR",
"repo_path": "MAROONXDR_extracted/MAROONXDR-main/maroonxdr/maroonx/tests/image/test_image_orientation_corrector.py",
"type": "Python"
} | import logging
import pytest
import astrodata
import numpy as np
from copy import deepcopy
import maroonx_instruments
from maroonxdr.maroonx.primitives_maroonx import MAROONX
@pytest.mark.parametrize("filename",["20200911T214124Z_DFFFD_r_0000.fits"])
def test_correctImageOrientation_does_not_change_red_frames(caplog,... | GeminiDRSoftwareREPO_NAMEMAROONXDRPATH_START.@MAROONXDR_extracted@MAROONXDR-main@maroonxdr@maroonx@tests@image@test_image_orientation_corrector.py@.PATH_END.py |
{
"filename": "_minexponent.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_minexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="minexponent",
parent_name="barpolar.marker.colorbar",
**kwargs,
):
super(MinexponentValidator, self).__init__(
plot... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@marker@colorbar@_minexponent.py@.PATH_END.py |
{
"filename": "1-concepts.ipynb",
"repo_name": "pmelchior/scarlet",
"repo_path": "scarlet_extracted/scarlet-master/docs/1-concepts.ipynb",
"type": "Jupyter Notebook"
} | # Core Concepts
The purpose of this guide is to explain the core concepts of *scarlet*, how they are used and how they can be extended and customized for more specialized science cases.
Other resources are:
1. Our [Quickstart Guide](0-quickstart.rst) shows a typical *scarlet* session.
2. The [API Documentation](api/... | pmelchiorREPO_NAMEscarletPATH_START.@scarlet_extracted@scarlet-master@docs@1-concepts.ipynb@.PATH_END.py |
{
"filename": "mock_survey.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/mock_survey.py",
"type": "Python"
} | """
create a mock redshift survey given a mock with galaxy positions and velocities.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from scipy.interpolate import interp1d
from astropy import cosmology
from astropy.constants import c # the speed of light
__... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@mock_survey.py@.PATH_END.py |
{
"filename": "_scene.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/_scene.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Scene(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.scene"
_valid_props = {
"annotationdefaults",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@_scene.py@.PATH_END.py |
{
"filename": "nn.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/ops/nn.py",
"type": "Python"
} | """Commonly-used neural network operations not included in NumPy."""
import warnings
from keras.src import backend
from keras.src.api_export import keras_export
from keras.src.backend import KerasTensor
from keras.src.backend import any_symbolic_tensors
from keras.src.backend import standardize_data_format
from keras... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@ops@nn.py@.PATH_END.py |
{
"filename": "process_fast_bs_measurement.py",
"repo_name": "sjforeman/bskit",
"repo_path": "bskit_extracted/bskit-master/scripts/process/process_fast_bs_measurement.py",
"type": "Python"
} | """Combine files of bispectrum binning info and unnormalized bispectrum values.
The most efficient way to measure the bispectrum on several snapshots is to
first compute the binning info (mean k_i values per bin, and number of triangles
per bin) a single time for a given box size and binning scheme, and then, for
each... | sjforemanREPO_NAMEbskitPATH_START.@bskit_extracted@bskit-master@scripts@process@process_fast_bs_measurement.py@.PATH_END.py |
{
"filename": "demo_gen_pupil_LUVOIR_A_final.py",
"repo_name": "ajeldorado/falco-python",
"repo_path": "falco-python_extracted/falco-python-master/examples/demo_gen_pupil_LUVOIR_A_final.py",
"type": "Python"
} | import sys
sys.path.insert(0, "../")
import falco
import numpy as np
import matplotlib.pyplot as plt
inputs = {}
inputs["Nbeam"] = 1000
inputs["magfacD"] = 1.
inputs["wStrut"] = 0.01
pupil = falco.mask.falco_gen_pupil_LUVOIR_A_final(inputs)
plt.imshow(pupil); plt.colorbar(); plt.pause(0.1)
plt.imshow(pupil[1::,1::... | ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@examples@demo_gen_pupil_LUVOIR_A_final.py@.PATH_END.py |
{
"filename": "test_output.py",
"repo_name": "minkailin/stratsi",
"repo_path": "stratsi_extracted/stratsi-master/dedalus_repo/dedalus/tests/test_output.py",
"type": "Python"
} | """
Test 1D IVP with various timesteppers.
"""
import pytest
import numpy as np
import functools
from dedalus import public as de
from dedalus.tools import post
import shutil
import h5py
def bench_wrapper(test):
@functools.wraps(test)
def wrapper(benchmark, *args, **kw):
benchmark.pedantic(test, args... | minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@dedalus_repo@dedalus@tests@test_output.py@.PATH_END.py |
{
"filename": "09-ELiXer_Line_Classification.ipynb",
"repo_name": "HETDEX/hetdex_api",
"repo_path": "hetdex_api_extracted/hetdex_api-master/notebooks/api-notebooks/09-ELiXer_Line_Classification.ipynb",
"type": "Jupyter Notebook"
} | # Example - using ELiXer classify API to calculate P(LAE)/P(OII
This API is fairly limited in this version. You are responsible for determining on your own the key parameters. A future version of ELiXer will provide additional APIs to facilitate this.
In short, however, you might typically take the wave, flux, and f... | HETDEXREPO_NAMEhetdex_apiPATH_START.@hetdex_api_extracted@hetdex_api-master@notebooks@api-notebooks@09-ELiXer_Line_Classification.ipynb@.PATH_END.py |
{
"filename": "test_kcorrect.py",
"repo_name": "blanton144/kcorrect",
"repo_path": "kcorrect_extracted/kcorrect-main/tests/kcorrect/test_kcorrect.py",
"type": "Python"
} | import pytest
import os
import numpy as np
import kcorrect.kcorrect
def test_kcorrect_fit_coeffs():
"""Test fitting of SED (does not test quantatively)"""
responses = ['sdss_u0', 'sdss_g0', 'sdss_r0', 'sdss_i0', 'sdss_z0',
'wise_w1']
kc = kcorrect.kcorrect.Kcorrect(responses=responses,
... | blanton144REPO_NAMEkcorrectPATH_START.@kcorrect_extracted@kcorrect-main@tests@kcorrect@test_kcorrect.py@.PATH_END.py |
{
"filename": "plot_soundwave.py",
"repo_name": "Schulik/aiolos",
"repo_path": "aiolos_extracted/aiolos-main/test_files/plot_soundwave.py",
"type": "Python"
} | #!/usr/bin/python3
import sys, os
import numpy as np
import matplotlib.pyplot as plt
from load_aiolos import load_aiolos_snap, load_aiolos_params
def get_data(DIR):
Ns = [32, 64, 128, 256, 512]
L1s = []
for N in Ns:
IC_file = DIR + 'output_soundwave_{}_H2'.format(N) + '_t0.dat'
IC = loa... | SchulikREPO_NAMEaiolosPATH_START.@aiolos_extracted@aiolos-main@test_files@plot_soundwave.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gnirs/recipes/sq/__init__.py",
"type": "Python"
} | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gnirs@recipes@sq@__init__.py@.PATH_END.py | |
{
"filename": "BADASS3_ifu_MUSE-checkpoint.ipynb",
"repo_name": "remingtonsexton/BADASS3",
"repo_path": "BADASS3_extracted/BADASS3-master/example_notebooks/.ipynb_checkpoints/BADASS3_ifu_MUSE-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ## Bayesian AGN Decomposition Analysis for SDSS Spectra (BADASS)
### Example: MUSE IFU Cube
#### Remington O. Sexton$^{1}$, Sara M. Doan$^{2}$, William Matzko$^{2}$ Michael A. Reefe$^{2}$,
$^{1}$United States Naval Observatory, $^{2}$George Mason University
```python
import glob
import time
import natsort
from IP... | remingtonsextonREPO_NAMEBADASS3PATH_START.@BADASS3_extracted@BADASS3-master@example_notebooks@.ipynb_checkpoints@BADASS3_ifu_MUSE-checkpoint.ipynb@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcats/tickfont/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="textcase", parent_name="parcats.tickfont", **kwargs
):
super(TextcaseValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcats@tickfont@_textcase.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.