metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "subset_mask.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/io/formats/fits/subset_mask.py",
"type": "Python"
} | import os
from collections import OrderedDict
import numpy as np
from astropy.io import fits
from glue.config import subset_mask_importer, subset_mask_exporter
from glue.core.data_factories.fits import is_fits
@subset_mask_importer(label='FITS', extension=['fits', 'fit',
... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@io@formats@fits@subset_mask.py@.PATH_END.py |
{
"filename": "analysis.py",
"repo_name": "mkelley/mskpy",
"repo_path": "mskpy_extracted/mskpy-main/mskpy/image/analysis.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
image.analysis --- Analyze (astronomical) images.
=================================================
.. autosummary::
:toctree: generated/
anphot
apphot
apphot_by_wcs
azavg
azmed
bgfit
bgphot
centroid
find
fwhm
gce... | mkelleyREPO_NAMEmskpyPATH_START.@mskpy_extracted@mskpy-main@mskpy@image@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/validators/icicle/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._visible import VisibleValidator
from ._valuessrc import ValuessrcValidator
from ._values import ValuesValidator
from ._uirevision import UirevisionValidator
from ._uid import UidValidator
from ._ti... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@__init__.py@.PATH_END.py |
{
"filename": "start.md",
"repo_name": "dtamayo/spock",
"repo_path": "spock_extracted/spock-master/docs/start.md",
"type": "Markdown"
} |
# Getting Started
## Installation
SPOCK is compatible with both Linux and Mac.
Install with:
```
pip install spock
```
SPOCK relies on XGBoost, which has installation issues with OpenMP on Mac OSX. If you have problems (https://github.com/dmlc/xgboost/issues/4477), the easiest way is probably to install homebrew,... | dtamayoREPO_NAMEspockPATH_START.@spock_extracted@spock-master@docs@start.md@.PATH_END.py |
{
"filename": "Growth_with_w.ipynb",
"repo_name": "classULDM/class.SFDM",
"repo_path": "class.SFDM_extracted/class.SFDM-master/notebooks/Growth_with_w.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
from scipy import interpolate
```
```python
w0vec = [-0.7, -1.0, -1.3]
wavec = [-0.2,0.0,0.2]
#w0vec = [-1.0]
#wavec = [0.0]
cosmo = {}
for w0 in w0vec:
for wa in wavec:
if w0==-1.0 ... | classULDMREPO_NAMEclass.SFDMPATH_START.@class.SFDM_extracted@class.SFDM-master@notebooks@Growth_with_w.ipynb@.PATH_END.py |
{
"filename": "_namelength.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/hoverlabel/_namelength.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="namelength", parent_name="funnel.hoverlabel", **kwargs
):
super(NamelengthValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@hoverlabel@_namelength.py@.PATH_END.py |
{
"filename": "test_actions.py",
"repo_name": "GalacticDynamics-Oxford/Agama",
"repo_path": "Agama_extracted/Agama-master/py/test_actions.py",
"type": "Python"
} | #!/usr/bin/python
# illustrate the use of different action finders and mappers
import numpy, time
# if the module has been installed to the globally known directory, just import it
try: import agama
except ImportError: # otherwise load the shared library from the parent folder
import sys
sys.path += ['../']
... | GalacticDynamics-OxfordREPO_NAMEAgamaPATH_START.@Agama_extracted@Agama-master@py@test_actions.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/number/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="indicator.number", **kwargs):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@number@_font.py@.PATH_END.py |
{
"filename": "GenerateNodeDistribution2d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/NodeGenerators/GenerateNodeDistribution2d.py",
"type": "Python"
} | from math import *
from NodeGeneratorBase import *
from Spheral import Vector2d, Tensor2d, SymTensor2d, \
rotationMatrix2d, testPointInBox2d
from SpheralTestUtilities import fuzzyEqual
#-------------------------------------------------------------------------------
# Class to generate 2-D node positions.
#-----... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@NodeGenerators@GenerateNodeDistribution2d.py@.PATH_END.py |
{
"filename": "extract_SSP_table.py",
"repo_name": "cespinosa/pyHIIexplorerV2",
"repo_path": "pyHIIexplorerV2_extracted/pyHIIexplorerV2-master/extract_SSP_table.py",
"type": "Python"
} | #!/usr/bin/env python
# ./extract_SSP_table.py /home/espinosa/tmp/seg_Ha_EW.NGC5947.fits.gz /home/espinosa/CALIFA_DATA/eCALIFA/ssp_files/NGC5947.SSP.cube.fits.gz /home/espinosa/CALIFA_DATA/eCALIFA/fe_files/flux_elines.NGC5947.cube.fits.gz /home/espinosa/tmp/
import numpy as np
import logging
import argparse
import ... | cespinosaREPO_NAMEpyHIIexplorerV2PATH_START.@pyHIIexplorerV2_extracted@pyHIIexplorerV2-master@extract_SSP_table.py@.PATH_END.py |
{
"filename": "time_interval_slicers.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/slicers/time_interval_slicers.py",
"type": "Python"
} | """MAF slicers to slice into time intervals based on MJD
Primarily intended for hourglass plots.
"""
# pylint: disable=too-many-arguments
__all__ = (
"TimeIntervalSlicer",
"BlockIntervalSlicer",
"VisitIntervalSlicer",
"SlicerNotSetupError",
)
from collections import defaultdict
# imports
from functo... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@slicers@time_interval_slicers.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/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="surface.colorbar.title.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@title@font@_shadow.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "RobertJaro/InstrumentToInstrument",
"repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/evaluation/soho/__init__.py",
"type": "Python"
} | RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@evaluation@soho@__init__.py@.PATH_END.py | |
{
"filename": "test_mpf.py",
"repo_name": "dstndstn/tractor",
"repo_path": "tractor_extracted/tractor-main/tractor/test_mpf.py",
"type": "Python"
} | from __future__ import print_function
#from tractor.mp_fourier import *
from astrometry.util.miscutils import *
import numpy as np
from scipy.ndimage import correlate1d
import pylab as plt
#from tractor import mp_fourier
import mp_fourier
print('mpf:', dir(mp_fourier))
if False:
F = np.zeros((10,10), np.float32... | dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@tractor@test_mpf.py@.PATH_END.py |
{
"filename": "FragStaff.py",
"repo_name": "wmpg/Supracenter",
"repo_path": "Supracenter_extracted/Supracenter-master/supra/GUI/Dialogs/FragStaff.py",
"type": "Python"
} | import csv
import os
import numpy as np
import matplotlib.pyplot as plt
import pyqtgraph as pg
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from supra.Utils.AngleConv import chauvenet
from supra.Utils.Classes import Position
from supra.GUI.Tools.Theme import theme
from supra.G... | wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@GUI@Dialogs@FragStaff.py@.PATH_END.py |
{
"filename": "add_index.ipynb",
"repo_name": "gomesdasilva/ACTIN2",
"repo_path": "ACTIN2_extracted/ACTIN2-master/docs/_build/html/add_index.ipynb",
"type": "Jupyter Notebook"
} | ## The indices table
All the indices and respective spectral lines information is stored in the indices table file, `actin_table.csv`.
The table can be accessed from ACTIN via:
```python
from actin2 import ACTIN
actin = ACTIN()
actin.IndTable().table
```
<div>
<style scoped>
.dataframe tbody tr th:only-of-... | gomesdasilvaREPO_NAMEACTIN2PATH_START.@ACTIN2_extracted@ACTIN2-master@docs@_build@html@add_index.ipynb@.PATH_END.py |
{
"filename": "win32pdhquery.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/win32/Lib/win32pdhquery.py",
"type": "Python"
} | """
Performance Data Helper (PDH) Query Classes
Wrapper classes for end-users and high-level access to the PDH query
mechanisms. PDH is a win32-specific mechanism for accessing the
performance data made available by the system. The Python for Windows
PDH module does not implement the "Registry" interface, implementi... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@Lib@win32pdhquery.py@.PATH_END.py |
{
"filename": "lhalotree.py",
"repo_name": "illustristng/illustris_python",
"repo_path": "illustris_python_extracted/illustris_python-master/illustris_python/lhalotree.py",
"type": "Python"
} | """ Illustris Simulation: Public Data Release.
lhalotree.py: File I/O related to the LHaloTree merger tree files. """
import numpy as np
import h5py
import six
from .groupcat import gcPath, offsetPath
from os.path import isfile
def treePath(basePath, chunkNum=0):
""" Return absolute path to a LHaloTree HDF5 fil... | illustristngREPO_NAMEillustris_pythonPATH_START.@illustris_python_extracted@illustris_python-master@illustris_python@lhalotree.py@.PATH_END.py |
{
"filename": "test_transforms.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/logprob/test_transforms.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@logprob@test_transforms.py@.PATH_END.py |
{
"filename": "parser.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/PyYAML/py3/yaml/parser.py",
"type": "Python"
} |
# The following YAML grammar is LL(1) and is parsed by a recursive descent
# parser.
#
# stream ::= STREAM-START implicit_document? explicit_document* STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
# block_node_or_inden... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@PyYAML@py3@yaml@parser.py@.PATH_END.py |
{
"filename": "_bgcolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/hoverlabel/_bgcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bgcolor", parent_name="scattergl.hoverlabel", **kwargs
):
super(BgcolorValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@hoverlabel@_bgcolor.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "exoclime/HELIOS",
"repo_path": "HELIOS_extracted/HELIOS-master/source/__init__.py",
"type": "Python"
} | exoclimeREPO_NAMEHELIOSPATH_START.@HELIOS_extracted@HELIOS-master@source@__init__.py@.PATH_END.py | |
{
"filename": "README.md",
"repo_name": "vlas-sokolov/bayesian-ngc1333",
"repo_path": "bayesian-ngc1333_extracted/bayesian-ngc1333-master/README.md",
"type": "Markdown"
} | About
-----
This repository provides the code necessary to reproduce the
nested sampling results on the Green Bank Ammonia Survey ([GAS](https://arxiv.org/abs/1704.06318))
data on NGC 1333 (Sokolov et al. 2020, [ApJL](https://iopscience.iop.org/article/10.3847/2041-8213/ab8018) / [arXiv](https://arxiv.org/abs/2003.076... | vlas-sokolovREPO_NAMEbayesian-ngc1333PATH_START.@bayesian-ngc1333_extracted@bayesian-ngc1333-master@README.md@.PATH_END.py |
{
"filename": "xclass_wrapper.py",
"repo_name": "yqiuu/spectuner",
"repo_path": "spectuner_extracted/spectuner-master/spectuner/xclass_wrapper.py",
"type": "Python"
} | import os
import warnings
import shutil
from collections import defaultdict
from dataclasses import dataclass
from copy import deepcopy
import numpy as np
# Import XCLASS
try:
from xclass import task_myXCLASS
except ImportError:
warnings.warn("XCLASS is not installed.")
def create_molfit_file(fname, mol_nam... | yqiuuREPO_NAMEspectunerPATH_START.@spectuner_extracted@spectuner-master@spectuner@xclass_wrapper.py@.PATH_END.py |
{
"filename": "badass_tools.py",
"repo_name": "remingtonsexton/BADASS3",
"repo_path": "BADASS3_extracted/BADASS3-master/badass_tools/badass_tools.py",
"type": "Python"
} | #!/usr/bin/env python
import numpy as np
import pandas as pd
# Plotting Libraries
import matplotlib.pyplot as plt
plt.style.use('dark_background') # For cool tron-style dark plots
plt.rcParams['text.usetex'] = True
# Basic Libraries
import sys
import os
import natsort
import glob
import copy
# Astropy
from astropy.io ... | remingtonsextonREPO_NAMEBADASS3PATH_START.@BADASS3_extracted@BADASS3-master@badass_tools@badass_tools.py@.PATH_END.py |
{
"filename": "plotter.py",
"repo_name": "ideasrule/platon",
"repo_path": "platon_extracted/platon-master/platon/plotter.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import numpy as np
import corner
from .constants import METRES_TO_UM, BAR_TO_PASCALS, R_jup
from .retrieval_result import RetrievalResult
from . TP_profile import Profile
from . import _cupy_numpy as xp
import dynesty
default_style = ['default',
{ 'font.size': 12,
'xtick.t... | ideasruleREPO_NAMEplatonPATH_START.@platon_extracted@platon-master@platon@plotter.py@.PATH_END.py |
{
"filename": "contributors.md",
"repo_name": "CosmoStat/shapepipe",
"repo_path": "shapepipe_extracted/shapepipe-master/docs/source/contributors.md",
"type": "Markdown"
} | # Contributors
ShapePipe is an open source project and we welcome any
[contributions](contributing.md) that could improve the quality or extend the
possible applications of the package.
Below will list the individuals who have contributed to the development of
ShapePipe so far.
```{figure} https://avatars.githubuser... | CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@docs@source@contributors.md@.PATH_END.py |
{
"filename": "norm_imag.py",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/wrap/curvedsky/norm_imag.py",
"type": "Python"
} | import libcurvedsky
import numpy
def qte(est,lmax,rlmin,rlmax,TB,OCT,OCE,lfac=''):
"""
Normalization of reconstructed imaginary CMB lensing potential and its curl mode from the TE quadratic estimator
Args:
:lmax (*int*): Maximum multipole of output normalization spectrum
:rlmin/rlmax (*int*): Minimum/Ma... | toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@wrap@curvedsky@norm_imag.py@.PATH_END.py |
{
"filename": "mix_up.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/image_preprocessing/mix_up.py",
"type": "Python"
} | from keras.src.api_export import keras_export
from keras.src.layers.preprocessing.image_preprocessing.base_image_preprocessing_layer import ( # noqa: E501
BaseImagePreprocessingLayer,
)
from keras.src.random import SeedGenerator
@keras_export("keras.layers.MixUp")
class MixUp(BaseImagePreprocessingLayer):
""... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@image_preprocessing@mix_up.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "s-ilic/ECLAIR",
"repo_path": "ECLAIR_extracted/ECLAIR-master/likelihoods/BG/H0/R19/__init__.py",
"type": "Python"
} | import numpy as np
### From Riess et al., 1903.07603
class likelihood:
def __init__(self, lkl_input):
self.H0_data = 74.03
self.H0_data_sigma = 1.42
def get_loglike(self, class_input, lkl_input, class_run):
return -0.5 * (class_run.h() * 100 - self.H0_data)**2. / self.H0_data_sigma**2.
| s-ilicREPO_NAMEECLAIRPATH_START.@ECLAIR_extracted@ECLAIR-master@likelihoods@BG@H0@R19@__init__.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "kathrinnp/DarkRayNet",
"repo_path": "DarkRayNet_extracted/DarkRayNet-master/README.md",
"type": "Markdown"
} | # Welcome to the Dark Ray Net
<img src="https://user-images.githubusercontent.com/55040575/125958166-4c48af03-21a2-4371-83bc-fdd346f02b3b.png" width="256">
## A Neural Network Based Simulation Tool for Indirect Dark Matter Searches
The recurrent neural networks (RNNs) provided in this tool can quickly simulate ant... | kathrinnpREPO_NAMEDarkRayNetPATH_START.@DarkRayNet_extracted@DarkRayNet-master@README.md@.PATH_END.py |
{
"filename": "mmagw.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/pipeline/filter/mmagw.py",
"type": "Python"
} | """
mmagw.py
This code checks a batch of alerts against the active GW alerts.
The minmjd,maxmjd are only used during testing.
Usage:
mmagw.py [--minmjd=minmjd]
[--maxmjd=maxmjd]
Options:
--minmjd=minmjd Choose all skymaps older than this MJD
--maxmjd=maxmjd Choose all skymaps younger th... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@pipeline@filter@mmagw.py@.PATH_END.py |
{
"filename": "matfuncs.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/linalg/matfuncs.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.sparse.linalg` namespace for importing the functions
# included below.
import warnings
from . import _matfuncs
__all__ = [ # noqa: F822
'expm', 'inv', 'solve', 'solve_triangular',
'isspmatrix', 'spsolve', 'is_pydat... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@linalg@matfuncs.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/library/cpp/dot_product/README.md",
"type": "Markdown"
} | Библиотека для вычисления скалярного произведения векторов.
=====================================================
Данная библиотека содержит функцию DotProduct, вычисляющую скалярное произведение векторов различных типов.
В отличии от наивной реализации, библиотека использует SSE и работает существенно быстрее. Для ср... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@library@cpp@dot_product@README.md@.PATH_END.py |
{
"filename": "sky.py",
"repo_name": "cmccully/lcogtgemini",
"repo_path": "lcogtgemini_extracted/lcogtgemini-master/lcogtgemini/sky.py",
"type": "Python"
} | import lcogtgemini
from pyraf import iraf
def skysub(scifiles, rawpath):
for f in scifiles:
# sky subtraction
# output has an s prefixed on the front
# This step is currently quite slow for Gemini-South data
iraf.unlearn(iraf.gsskysub)
iraf.gsskysub('t' + f[:-4], long_sample... | cmccullyREPO_NAMElcogtgeminiPATH_START.@lcogtgemini_extracted@lcogtgemini-master@lcogtgemini@sky.py@.PATH_END.py |
{
"filename": "err.py",
"repo_name": "nye17/javelin",
"repo_path": "javelin_extracted/javelin-master/javelin/err.py",
"type": "Python"
} | #Last-modified: 04 Dec 2013 16:21:16
from __future__ import print_function
all = ['InputError', 'UsageError', 'Error']
""" Error handlers.
"""
class Error(Exception):
"""Base class for exceptions in this module."""
pass
class InputError(Error):
"""Exception raised for errors in the input.
Attribut... | nye17REPO_NAMEjavelinPATH_START.@javelin_extracted@javelin-master@javelin@err.py@.PATH_END.py |
{
"filename": "api_eq_method_test.py",
"repo_name": "HajimeKawahara/exojax",
"repo_path": "exojax_extracted/exojax-master/tests/unittests/spec/api/api_eq_method_test.py",
"type": "Python"
} | from exojax.test.emulate_mdb import mock_mdbHitemp, mock_mdbExomol
import copy
def test_eq_Hitemp():
mdb_orig = copy.deepcopy(mock_mdbHitemp(multi_isotope=True))
mdb = mock_mdbHitemp(multi_isotope=True)
assert mdb_orig == mdb
def test_eq_Exomol():
mdb_orig = copy.deepcopy(mock_mdbExomol())
mdb =... | HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@unittests@spec@api@api_eq_method_test.py@.PATH_END.py |
{
"filename": "test_tokenize.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/parso/py3/tests/test_tokenize.py",
"type": "Python"
} | # -*- coding: utf-8 # This file contains Unicode characters.
from textwrap import dedent
import pytest
from parso.utils import split_lines, parse_version_string
from parso.python.token import PythonTokenTypes
from parso.python import tokenize
from parso import parse
from parso.python.tokenize import PythonToken
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@parso@py3@tests@test_tokenize.py@.PATH_END.py |
{
"filename": "_tickangle.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/marker/colorbar/_tickangle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(
self, plotly_name="tickangle", parent_name="histogram.marker.colorbar", **kwargs
):
super(TickangleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@marker@colorbar@_tickangle.py@.PATH_END.py |
{
"filename": "test_ols.py",
"repo_name": "StingraySoftware/stingray",
"repo_path": "stingray_extracted/stingray-main/stingray/pulse/overlapandsave/test_ols.py",
"type": "Python"
} | import pytest
import numpy as np
from scipy.signal import fftconvolve
from .ols import prepareh, olsStep, ols, nextprod
from stingray.utils import fft, fftfreq, fftn, ifftn, HAS_PYFFTW
@pytest.mark.skipif("not HAS_PYFFTW")
def testPyFFTW_complex():
nx = 21
nh = 7
x = np.random.randint(-30, 30, size=(nx, ... | StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@pulse@overlapandsave@test_ols.py@.PATH_END.py |
{
"filename": "NetValidatePasswordPolicy.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/win32/Demos/NetValidatePasswordPolicy.py",
"type": "Python"
} | """A demo of using win32net.NetValidatePasswordPolicy.
Example usage:
% NetValidatePasswordPolicy.py --password=foo change
which might return:
> Result of 'change' validation is 0: The operation completed successfully.
or depending on the policy:
> Result of 'change' validation is 2245: The password does not meet ... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@Demos@NetValidatePasswordPolicy.py@.PATH_END.py |
{
"filename": "PlotRotorient.py",
"repo_name": "simoncasassus/ConeRot",
"repo_path": "ConeRot_extracted/ConeRot-master/RotOrient/PlotRotorient.py",
"type": "Python"
} | import sys
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
#from pylab import *
import matplotlib.colors as colors
import re
from astropy import constants as const
import os
import matplotlib.gridspec as gridspec
HOME=os.environ.get('HOME')
print("HOME: ",HOME)
include_path=HOME+'/common/pytho... | simoncasassusREPO_NAMEConeRotPATH_START.@ConeRot_extracted@ConeRot-master@RotOrient@PlotRotorient.py@.PATH_END.py |
{
"filename": "insolation.py",
"repo_name": "jrenaud90/TidalPy",
"repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/stellar/insolation.py",
"type": "Python"
} | from typing import TYPE_CHECKING
import numpy as np
from scipy.constants import Stefan_Boltzmann as sbc
from scipy.special import ellipe
from TidalPy.utilities.performance.numba import njit
if TYPE_CHECKING:
from TidalPy.utilities.types import FloatArray
# Equilibrium Temperature
# TODO: njit does not like th... | jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@stellar@insolation.py@.PATH_END.py |
{
"filename": "test_base.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/chains/test_base.py",
"type": "Python"
} | """Test logic on base chain class."""
import uuid
from typing import Any, Dict, List, Optional
import pytest
from langchain_core.callbacks.manager import CallbackManagerForChainRun
from langchain_core.memory import BaseMemory
from langchain_core.tracers.context import collect_runs
from langchain.chains.base import C... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@chains@test_base.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "candebellavita/vkompth",
"repo_path": "vkompth_extracted/vkompth-master/vkdualdk/README.md",
"type": "Markdown"
} | # Instructions for Compilation under XSPEC
1) First load HEASOFT (heainit, export, etc...).
2) Edit the Makefile_libs LDFLAGS and LDLIBS variables
to your preferred values (lopenblas, lopenblasp, llapack, etc).
3) Then, run:
```
initpackage vkdualdk lmod_vkdualdk.dat .
cp Makefile_libs Makefile
hmake
```
We use M... | candebellavitaREPO_NAMEvkompthPATH_START.@vkompth_extracted@vkompth-master@vkdualdk@README.md@.PATH_END.py |
{
"filename": "bda.md",
"repo_name": "lofar-astron/DP3",
"repo_path": "DP3_extracted/DP3-master/docs/doxygen/bda.md",
"type": "Markdown"
} | # Baseline Dependent Averaging : Design
## Introduction
Baseline Dependent Averaging(BDA) aims at reducing the amount of data in a
Measurement Set(MS) by averaging measurements that provide similar information.
Shorter baselines can be averaged more in both the time and frequency direction.
## Current situation
- A ... | lofar-astronREPO_NAMEDP3PATH_START.@DP3_extracted@DP3-master@docs@doxygen@bda.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "jiffyclub/palettable",
"repo_path": "palettable_extracted/palettable-master/palettable/plotly/test/__init__.py",
"type": "Python"
} | jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@palettable@plotly@test@__init__.py@.PATH_END.py | |
{
"filename": "_symbol.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/marker/_symbol.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="symbol", parent_name="scattergeo.marker", **kwargs):
super(SymbolValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@marker@_symbol.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "21cmfast/21cmEMU",
"repo_path": "21cmEMU_extracted/21cmEMU-main/src/py21cmemu/__init__.py",
"type": "Python"
} | """21cmEMU: An emulator of 21cmFAST summaries."""
__version__ = "1.0.8"
from .emulator import Emulator
from .get_emulator import get_emu_data
from .inputs import DefaultEmulatorInput
from .inputs import RadioEmulatorInput
from .outputs import EmulatorOutput
from .outputs import RawEmulatorOutput
from .properties impor... | 21cmfastREPO_NAME21cmEMUPATH_START.@21cmEMU_extracted@21cmEMU-main@src@py21cmemu@__init__.py@.PATH_END.py |
{
"filename": "version.py",
"repo_name": "paulo-herrera/PyEVTK",
"repo_path": "PyEVTK_extracted/PyEVTK-master/evtk/version.py",
"type": "Python"
} | ######################################################################################
# MIT License
#
# Copyright (c) 2010-2024 Paulo A. Herrera
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Sof... | paulo-herreraREPO_NAMEPyEVTKPATH_START.@PyEVTK_extracted@PyEVTK-master@evtk@version.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "rzellem/EXOTIC",
"repo_path": "EXOTIC_extracted/EXOTIC-main/setup.py",
"type": "Python"
} | #! /usr/bin/env python3
# ##############################################################################
# SETUPTOOLS PLACEHOLDER
# NOTE: This file supports editable-mode installs using pip3, e.g. 'pip install -e'.
# It also support building zip-only based source distributions.
# ############################### I... | rzellemREPO_NAMEEXOTICPATH_START.@EXOTIC_extracted@EXOTIC-main@setup.py@.PATH_END.py |
{
"filename": "_find_tempo2.py",
"repo_name": "vallis/libstempo",
"repo_path": "libstempo_extracted/libstempo-master/libstempo/_find_tempo2.py",
"type": "Python"
} | import logging
import os
import subprocess
import warnings
from pathlib import Path
logger = logging.getLogger(__name__)
RUNTIME_DIRS = ("atmosphere", "clock", "earth", "ephemeris", "observatory", "solarWindModel")
HOME = os.getenv("HOME")
def find_tempo2_runtime():
"""
Attempt to find TEMPO2 runtime if TEM... | vallisREPO_NAMElibstempoPATH_START.@libstempo_extracted@libstempo-master@libstempo@_find_tempo2.py@.PATH_END.py |
{
"filename": "plot_timertree.py",
"repo_name": "wokast/PyCactus",
"repo_path": "PyCactus_extracted/PyCactus-master/SimRep/bin/plot_timertree.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from simrep.stdplot import *
import numpy as np
def plot_times(tree, fdir, fname, fmts, title='Everything'):
if not tree: return
data = [(f,n) for n,(f,c) in tree.items()]
data = sorted(data)
times = np.array([c[0] for c in data])
labels = [c[1][-40:] ... | wokastREPO_NAMEPyCactusPATH_START.@PyCactus_extracted@PyCactus-master@SimRep@bin@plot_timertree.py@.PATH_END.py |
{
"filename": "time_gyro_posterior.py",
"repo_name": "lgbouma/gyro-interp",
"repo_path": "gyro-interp_extracted/gyro-interp-main/tests/time_gyro_posterior.py",
"type": "Python"
} | """
When run on a standard MacBook, this test shows:
401 ages, N=256 grid:
* gyro_age_posterior takes 4 seconds.
* _agethreaded_gyro_age_posterior takes 4 seconds.
401 ages, N=512 grid:
* gyro_age_posterior takes 10 seconds.
* _agethreaded_gyro_age_posterior takes 6 seconds.
1001 ages, N=256 grid:
... | lgboumaREPO_NAMEgyro-interpPATH_START.@gyro-interp_extracted@gyro-interp-main@tests@time_gyro_posterior.py@.PATH_END.py |
{
"filename": "figures.ipynb",
"repo_name": "deepsphere/deepsphere-cosmo-tf1",
"repo_path": "deepsphere-cosmo-tf1_extracted/deepsphere-cosmo-tf1-master/figures.ipynb",
"type": "Jupyter Notebook"
} | # [DeepSphere]: a spherical convolutional neural network
[DeepSphere]: https://github.com/SwissDataScienceCenter/DeepSphere
[Nathanaël Perraudin](https://perraudin.info), [Michaël Defferrard](http://deff.ch), Tomasz Kacprzak, Raphael Sgier
# Figures for the paper
```python
%load_ext autoreload
%autoreload 2
%matplo... | deepsphereREPO_NAMEdeepsphere-cosmo-tf1PATH_START.@deepsphere-cosmo-tf1_extracted@deepsphere-cosmo-tf1-master@figures.ipynb@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="shadowsrc",
parent_name="scattermapbox.hoverlabel.font",
**kwargs,
):
super(ShadowsrcValidator, self).__init__(
plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "compute_threepoint_correlation_for_HOWLS.py",
"repo_name": "sheydenreich/threepoint",
"repo_path": "threepoint_extracted/threepoint-main/python_scripts/compute_threepoint_correlation_for_HOWLS.py",
"type": "Python"
} | import numpy as np
import sys
from tqdm import tqdm
import multiprocessing.managers
from multiprocessing import Pool
from astropy.io import fits
import os
import treecorr
from time import time
class MyManager(multiprocessing.managers.BaseManager):
pass
MyManager.register('np_zeros', np.zeros, multiprocessing.manag... | sheydenreichREPO_NAMEthreepointPATH_START.@threepoint_extracted@threepoint-main@python_scripts@compute_threepoint_correlation_for_HOWLS.py@.PATH_END.py |
{
"filename": "core_mp.py",
"repo_name": "astronomical-data-processing/RAPP",
"repo_path": "RAPP_extracted/RAPP-master/module/core_mp.py",
"type": "Python"
} | # -*- coding:utf-8 -*-
# pylint:disable=maybe-no-member
# pylint:disable=invalid-unary-operand-type
# Robust Automated Photometry Pipeline for Blurred Images
# https://ui.adsabs.harvard.edu/abs/2020PASP..132g5001H/abstract
import csv
import multiprocessing as mp
import os
from glob import glob
import numpy as np
impo... | astronomical-data-processingREPO_NAMERAPPPATH_START.@RAPP_extracted@RAPP-master@module@core_mp.py@.PATH_END.py |
{
"filename": "collect_results.py",
"repo_name": "j-faria/kima",
"repo_path": "kima_extracted/kima-master/celerite/paper/figures/collect_results.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import json
macros_fn = "examples-macros.tex"
open(macros_fn, "w").close()
roman = ["i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix", "x"]
stats_rows = []
for i, example in enumerate(["simulated/correct", "simulated/... | j-fariaREPO_NAMEkimaPATH_START.@kima_extracted@kima-master@celerite@paper@figures@collect_results.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "astropenguin/ndradex",
"repo_path": "ndradex_extracted/ndradex-main/ndradex/io.py",
"type": "Python"
} | __all__ = ["save_dataset", "load_dataset"]
# standard library
from pathlib import Path
from typing import Union
# dependencies
import xarray as xr
# type hints
PathLike = Union[Path, str]
def save_dataset(dataset: xr.Dataset, path: PathLike) -> None:
"""Save an xarray Dataset to a netCDF."""
dataset.to_... | astropenguinREPO_NAMEndradexPATH_START.@ndradex_extracted@ndradex-main@ndradex@io.py@.PATH_END.py |
{
"filename": "IptcImagePlugin.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/IptcImagePlugin.py",
"type": "Python"
} | #
# The Python Imaging Library.
# $Id$
#
# IPTC/NAA file handling
#
# history:
# 1995-10-01 fl Created
# 1998-03-09 fl Cleaned up and added to PIL
# 2002-06-18 fl Added getiptcinfo helper
#
# Copyright (c) Secret Labs AB 1997-2002.
# Copyright (c) Fredrik Lundh 1995.
#
# See the README file for information on usa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@IptcImagePlugin.py@.PATH_END.py |
{
"filename": "chain_plot.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Plots/chain_plot.py",
"type": "Python"
} | import copy
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import make_axes_locatable
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
def plot_chain_list(chain_list, index=0, num_average=100):
"""Plots the output of a chain of samples (M... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Plots@chain_plot.py@.PATH_END.py |
{
"filename": "demo_lenspyx.ipynb",
"repo_name": "carronj/lenspyx",
"repo_path": "lenspyx_extracted/lenspyx-master/examples/demo_lenspyx.ipynb",
"type": "Jupyter Notebook"
} | # demo_lenspyx
This notebook shows how to generate lensed CMB maps with DUCC-based lenspyx on pixelized skies ([this paper](https://arxiv.org/abs/2304.10431)).
The map constructions in this notebook should take $\mathcal O$(seconds) on a modern laptop.
We test here
lenspyx.alm2lenmap, lenspyx.alm2lenmap_spin, l... | carronjREPO_NAMElenspyxPATH_START.@lenspyx_extracted@lenspyx-master@examples@demo_lenspyx.ipynb@.PATH_END.py |
{
"filename": "ExtractionPlotter.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/pylinex/hdf5/ExtractionPlotter.py",
"type": "Python"
} | """
File: pylinex/hdf5/ExtractionPlotter.py
Author: Keith Tauscher
Date: 20 Sep 2017
Description: File containing class which, given the string name of an hdf5
file, reads in results from an Extractor object defined in the
pylinex.fitter module.
"""
import os
import numpy as np
import matplot... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@pylinex@hdf5@ExtractionPlotter.py@.PATH_END.py |
{
"filename": "test_beutler.py",
"repo_name": "halomod/halomod",
"repo_path": "halomod_extracted/halomod-main/tests/test_beutler.py",
"type": "Python"
} | """
Direct tests of the halo model code against known values from Beutler+2013, with
intermediate data provided by David Palomara using his own halo model code.
"""
from __future__ import annotations
from pathlib import Path
import numpy as np
import pytest
from halomod.integrate_corr import ProjectedCF
pytestmark... | halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@tests@test_beutler.py@.PATH_END.py |
{
"filename": "radex.py",
"repo_name": "thomaswilliamsastro/ndradex",
"repo_path": "ndradex_extracted/ndradex-master/ndradexhyperfine/radex.py",
"type": "Python"
} | __all__ = []
# standard library
from logging import getLogger
from pathlib import Path
from subprocess import PIPE
from subprocess import run as sprun
from subprocess import CalledProcessError, TimeoutExpired
# dependencies
import ndradexhyperfine
# constants
N_VARS = 10
ERROR_OUTPUT = ("NaN",) * N_VARS
logger ... | thomaswilliamsastroREPO_NAMEndradexPATH_START.@ndradex_extracted@ndradex-master@ndradexhyperfine@radex.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "astroweaver/the_farmer",
"repo_path": "the_farmer_extracted/the_farmer-master/README.md",
"type": "Markdown"
} | ### Welcome to The Farmer's documentation!
**The Farmer** is a suite of photometry routines geared towards deep, multi-wavelength galaxy surveys. By fitting simple parametric surface brightness profiles provided by The Tractor ([Lang et al. 2016](https://ui.adsabs.harvard.edu/abs/2016ascl.soft04008L/abstract)), The Fa... | astroweaverREPO_NAMEthe_farmerPATH_START.@the_farmer_extracted@the_farmer-master@README.md@.PATH_END.py |
{
"filename": "data_inspect_2458048.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/data_inspect/data_inspect_2458048.ipynb",
"type": "Jupyter Notebook"
} | ```python
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import matplotlib.patches as mpatches
import matplotlib.gridspec as gridspec
import numpy as np
from pyuvdata import UVCal, UVData
import os
import sys
import glob
import uvtools as uvt
from astropy.time import ... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@data_inspect@data_inspect_2458048.ipynb@.PATH_END.py |
{
"filename": "_soliditysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/pattern/_soliditysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="soliditysrc", parent_name="barpolar.marker.pattern", **kwargs
):
super(SoliditysrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@pattern@_soliditysrc.py@.PATH_END.py |
{
"filename": "lscpsfdef.py",
"repo_name": "LCOGT/lcogtsnpipe",
"repo_path": "lcogtsnpipe_extracted/lcogtsnpipe-master/trunk/src/lsc/lscpsfdef.py",
"type": "Python"
} | # ###############################################################
# EC 2012 Feb 20
# modified by SV for lsc
################################################################
import os, subprocess
from pyraf import iraf
from astropy.io import fits
import lsc
import re
import traceback
import numpy as np
iraf.noao(_do... | LCOGTREPO_NAMElcogtsnpipePATH_START.@lcogtsnpipe_extracted@lcogtsnpipe-master@trunk@src@lsc@lscpsfdef.py@.PATH_END.py |
{
"filename": "completer.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/packages/vaex-ui/vaex/ui/completer.py",
"type": "Python"
} | __author__ = 'maartenbreddels'
import string
import astropy.io.votable.ucd
import astropy.units
import logging
from vaex.ui.qt import *
# from astropy.utils import data
import astropy.utils.data
# astropy.utils.data
import numpy as np
logger = logging.getLogger("vaex.ui.completer")
# based on http://stackoverflow.com... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ui@vaex@ui@completer.py@.PATH_END.py |
{
"filename": "marks.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/core/marks.py",
"type": "Python"
} | import numpy as np
from astropy import units as u
from bqplot import LinearScale
from bqplot.marks import Lines, Label, Scatter
from glue.core import HubListener
from specutils import Spectrum1D
from jdaviz.core.events import GlobalDisplayUnitChanged
from jdaviz.core.events import (SliceToolStateMessage, LineIdentify... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@core@marks.py@.PATH_END.py |
{
"filename": "plot_sparse_coding.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/examples/decomposition/plot_sparse_coding.py",
"type": "Python"
} | """
===========================================
Sparse coding with a precomputed dictionary
===========================================
Transform a signal as a sparse combination of Ricker wavelets. This example
visually compares different sparse coding methods using the
:class:`~sklearn.decomposition.SparseCoder` est... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@decomposition@plot_sparse_coding.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "sdss/idlspec2d",
"repo_path": "idlspec2d_extracted/idlspec2d-master/python/boss_drp/__init__.py",
"type": "Python"
} | #import subprocess
#import os
#from pkg_resources import resource_filename
from sdsstools import get_package_version
#from sdsstools import get_config, Configuration
import os
import numpy as np
import warnings
__version__ = get_package_version(__file__, 'boss_drp') or 'dev'
try:
daily_dir = os.getenv('DAILY_D... | sdssREPO_NAMEidlspec2dPATH_START.@idlspec2d_extracted@idlspec2d-master@python@boss_drp@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/celery_tasks/__init__.py",
"type": "Python"
} | import os
from celery import Celery
from ..quicklook.obsset_ql import quicklook_func
default_broker = 'pyamqp://guest@localhost//'
broker = os.environ.get('CELERY_BROKER', default_broker)
# app = Celery('tasks', broker='pyamqp://guest@localhost//')
app = Celery('tasks', broker=broker, backend='rpc://')
@app.task
d... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@celery_tasks@__init__.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/references/detection/README.md",
"type": "Markdown"
} | # Object detection reference training scripts
This folder contains reference training scripts for object detection.
They serve as a log of how to train specific models, to provide baseline
training and evaluation scripts to quickly bootstrap research.
To execute the example commands below you must install the followi... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@detection@README.md@.PATH_END.py |
{
"filename": "XAFS_Processing_wx.ipynb",
"repo_name": "xraypy/xraylarch",
"repo_path": "xraylarch_extracted/xraylarch-master/examples/Jupyter/XAFS_Processing_wx.ipynb",
"type": "Jupyter Notebook"
} | ## XAFS Data Processing (wxPython)
This example shows how to use Larch from Python/Jupyter for basic XAFS data processing:
1. read data from an Athena Project File
2. do XAFS background subtraction with autobk()
3. do XAFS Fourier transform with xfft()
In this version, plotting will be done with wxPython, whic... | xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@examples@Jupyter@XAFS_Processing_wx.ipynb@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/marker/line/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self, plotly_name="coloraxis", parent_name="scatterpolar.marker.line", **kwargs
):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@marker@line@_coloraxis.py@.PATH_END.py |
{
"filename": "convert_v01_to_v02.py",
"repo_name": "andycasey/smhr",
"repo_path": "smhr_extracted/smhr-master/scripts/convert_v01_to_v02.py",
"type": "Python"
} | import sys
from smh import legacy
if __name__=="__main__":
fname_in = sys.argv[1]
fname_out = sys.argv[2]
legacy.convert_v0_1_to_v0_2(fname_in, fname_out)
| andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@scripts@convert_v01_to_v02.py@.PATH_END.py |
{
"filename": "test_updates.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/variational/test_updates.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@variational@test_updates.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "sambit-giri/tools21cm",
"repo_path": "tools21cm_extracted/tools21cm-master/paper/README.md",
"type": "Markdown"
} | # Paper submission
Tools21cm paper for submission to the [Journal of Open Source Science](https://joss.theoj.org/).
[Paper submission instructions](https://joss.readthedocs.io/en/latest/submitting.html) -
this link also includes formatting instructions.
[Review criteria](https://joss.readthedocs.io/en/latest/review_... | sambit-giriREPO_NAMEtools21cmPATH_START.@tools21cm_extracted@tools21cm-master@paper@README.md@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "clwainwright/CosmoTransitions",
"repo_path": "CosmoTransitions_extracted/CosmoTransitions-master/setup.py",
"type": "Python"
} | from setuptools import setup
setup(
name="cosmoTransitions",
version="2.0.7",
packages=['cosmoTransitions', 'cosmoTransitions.examples'],
package_dir={'cosmoTransitions.examples': 'examples'},
description=(
"A package for analyzing finite or zero-temperature cosmological "
"phase tr... | clwainwrightREPO_NAMECosmoTransitionsPATH_START.@CosmoTransitions_extracted@CosmoTransitions-master@setup.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/legendgrouptitle/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="text", parent_name="histogram.legendgrouptitle", **kwargs
):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@legendgrouptitle@_text.py@.PATH_END.py |
{
"filename": "create_nzp_files.py",
"repo_name": "DaneSpaeth/pyoscillot",
"repo_path": "pyoscillot_extracted/pyoscillot-main/pyoscillot/create_nzp_files.py",
"type": "Python"
} | import pandas as pd
from pathlib import Path
import numpy as np
def read_in_rvs(file):
""" Read in the rvs for the file. Return as pandas DataFrame."""
bjd = []
rvc = []
rvce = []
drift = []
drifte = []
rv = []
rve = []
berv = []
sadrift = []
with open(file, "r") as f:
... | DaneSpaethREPO_NAMEpyoscillotPATH_START.@pyoscillot_extracted@pyoscillot-main@pyoscillot@create_nzp_files.py@.PATH_END.py |
{
"filename": "w.py",
"repo_name": "cmbant/CosmoMC",
"repo_path": "CosmoMC_extracted/CosmoMC-master/batch1/outputs/w.py",
"type": "Python"
} | import planckStyle as s
g=s.plotter
g.settings.setWithSubplotSize(3.5)
g.settings.lab_fontsize=10
g.settings.legend_frac_subplot_margin=-0.02
g.settings.legend_fontsize = 9
labels=[s.WP+'+BAO',s.WP+'+Union2.1',s.WP+'+SNLS',s.WP]
roots=['base_w_planck_lowl_lowLike_BAO', 'base_w_planck_lowl_lowLike_Union2','base_w_pla... | cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@batch1@outputs@w.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "hruedisser/3DCOREweb",
"repo_path": "3DCOREweb_extracted/3DCOREweb-main/src/coreweb/model.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""model.py
"""
import datetime
from typing import Any, Callable, Optional, Sequence, Tuple, Union
import numba
import numpy as np
from heliosat.util import sanitize_dt
from numba import guvectorize
from .rotqs import generate_quaternions
class SimulationBlackBox(object):
"""Simulatio... | hruedisserREPO_NAME3DCOREwebPATH_START.@3DCOREweb_extracted@3DCOREweb-main@src@coreweb@model.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/marker/colorbar/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="y", parent_name="scattercarpet.marker.colorbar", **kwargs
):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@marker@colorbar@_y.py@.PATH_END.py |
{
"filename": "2023_01_31_110543_f98ae6d8e2cc_work_queue_data_migration.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2023_01_31_110543_f98ae6d8e2cc_work_queue_data_migration.py",
"type": "Python"
} | """Work queue data migration
Revision ID: f98ae6d8e2cc
Revises: 0a1250a5aa25
Create Date: 2023-01-31 11:05:43.356002
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "f98ae6d8e2cc"
down_revision = "0a1250a5aa25"
branch_labels = None
depends_on = None
def upgra... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2023_01_31_110543_f98ae6d8e2cc_work_queue_data_migration.py@.PATH_END.py |
{
"filename": "test_kkr.py",
"repo_name": "PyEllips/pyElli",
"repo_path": "pyElli_extracted/pyElli-master/tests/test_kkr.py",
"type": "Python"
} | """Test Kramers Kronig relations"""
import elli
import numpy as np
from elli.kkr import im2re, im2re_reciprocal
from numpy.testing import assert_array_almost_equal
def test_tauc_lorentz():
"""Test whether the kkr reproduces the analytical expression of Tauc-Lorentz"""
lbda = np.linspace(1e-2, 2000, 2000)
... | PyEllipsREPO_NAMEpyElliPATH_START.@pyElli_extracted@pyElli-master@tests@test_kkr.py@.PATH_END.py |
{
"filename": "copy_injection_recovery.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_NRTv2/injection_97/copy_injection_recovery.py",
"type": "Python"
} | """
Idea: try different learning rate schemes to try and fix the injections
"""
import psutil
p = psutil.Process()
p.cpu_affinity([0])
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "3"
os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10"
import numpy as np
import argparse
# Regular imports
import argparse
import cop... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_NRTv2@injection_97@copy_injection_recovery.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "woodml/MOLUSC",
"repo_path": "MOLUSC_extracted/MOLUSC-main/README.md",
"type": "Markdown"
} | # MOLUSC
MOLUSC (Multi Observational Limits on Unseen Stellar Companions) is a python tool for determining constraints on possible stellar companions to a target star by combining RV, High Resolution Imaging and Gaia data.
## Purpose
The goal of MOLUSC is to generate realistic binary probabilities based on non-detecti... | woodmlREPO_NAMEMOLUSCPATH_START.@MOLUSC_extracted@MOLUSC-main@README.md@.PATH_END.py |
{
"filename": "finite_difference.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/BSSN/Psi4Cartesianvalidation/finite_difference.py",
"type": "Python"
} | ../../finite_difference.py | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@BSSN@Psi4Cartesianvalidation@finite_difference.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/visualization/__init__.py",
"type": "Python"
} | from keras.src.visualization import draw_bounding_boxes
from keras.src.visualization import plot_image_gallery
| keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@visualization@__init__.py@.PATH_END.py |
{
"filename": "types.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/click/py3/click/types.py",
"type": "Python"
} | import os
import stat
import sys
import typing as t
from datetime import datetime
from gettext import gettext as _
from gettext import ngettext
from ._compat import _get_argv_encoding
from ._compat import open_stream
from .exceptions import BadParameter
from .utils import format_filename
from .utils import LazyFile
fr... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@click@py3@click@types.py@.PATH_END.py |
{
"filename": "tags.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/third_party/xla/build_tools/lint/tags.py",
"type": "Python"
} | # Copyright 2024 The OpenXLA 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@third_party@xla@build_tools@lint@tags.py@.PATH_END.py |
{
"filename": "one_k.ipynb",
"repo_name": "wlxu/RelicClass",
"repo_path": "RelicClass_extracted/RelicClass-master/notebooks/one_k.ipynb",
"type": "Jupyter Notebook"
} | ```python
# import necessary modules
# uncomment to get plots displayed in notebook
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
from scipy.optimize import fsolve
from scipy.interpolate import interp1d
import math
```
```python
# esthetic definitions... | wlxuREPO_NAMERelicClassPATH_START.@RelicClass_extracted@RelicClass-master@notebooks@one_k.ipynb@.PATH_END.py |
{
"filename": "MIMAS.py",
"repo_name": "PaulHancock/Aegean",
"repo_path": "Aegean_extracted/Aegean-main/AegeanTools/MIMAS.py",
"type": "Python"
} | #! /usr/bin/env python
"""
MIMAS - The Multi-resolution Image Mask for Aegean Software
TODO: Write an in/out reader for MOC formats described by
http://arxiv.org/abs/1505.02937
"""
import logging
import os
import re
import astropy.units as u
import healpy as hp
import numpy as np
from astropy.coordinates import Angl... | PaulHancockREPO_NAMEAegeanPATH_START.@Aegean_extracted@Aegean-main@AegeanTools@MIMAS.py@.PATH_END.py |
{
"filename": "_zhoverformat.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/_zhoverformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="zhoverformat", parent_name="heatmap", **kwargs):
super(ZhoverformatValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@_zhoverformat.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "arviz-devs/arviz",
"repo_path": "arviz_extracted/arviz-main/arviz/stats/__init__.py",
"type": "Python"
} | # pylint: disable=wildcard-import
"""Statistical tests and diagnostics for ArviZ."""
from .density_utils import *
from .diagnostics import *
from .stats import *
from .stats import _calculate_ics
from .stats_refitting import *
from .stats_utils import *
__all__ = [
"apply_test_function",
"bfmi",
"compare",... | arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@stats@__init__.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/title/font/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self,
plotly_name="weight",
parent_name="layout.scene.xaxis.title.font",
**kwargs,
):
super(WeightValidator, self).__init__(
plotly_name=p... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@title@font@_weight.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.