metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "recipe_definitions.py",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/apero/core/instruments/default/recipe_definitions.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
APERO Recipe definitions for NO INSTRUMENT
Created on 2018-10-31 at 18:06
@author: cook
"""
from apero import lang
from apero.base import base
from apero.core.constants import path_definitions
from apero.core.utils import drs_recipe
# ================================... | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@core@instruments@default@recipe_definitions.py@.PATH_END.py |
{
"filename": "TODO.md",
"repo_name": "D4san/MultiREx-public",
"repo_path": "MultiREx-public_extracted/MultiREx-public-main/dev/TODO.md",
"type": "Markdown"
} | # MultiREx
## Planetary transmission spectra generator
### To Do list
This is a list (a very incomplete one) with some of the features awaiting to be incorporated in `MultiREx`:
- Implement a mechanism to generate properties of the system that are physically or statistically dependent (see https://github.com/D4san/Mu... | D4sanREPO_NAMEMultiREx-publicPATH_START.@MultiREx-public_extracted@MultiREx-public-main@dev@TODO.md@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/src/peft/tuners/fourierft/model.py",
"type": "Python"
} | # Copyright 2024-present the HuggingFace Inc. team.
#
# 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... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@src@peft@tuners@fourierft@model.py@.PATH_END.py |
{
"filename": "funcs.py",
"repo_name": "MazinLab/MKIDGen3",
"repo_path": "MKIDGen3_extracted/MKIDGen3-main/mkidgen3/funcs.py",
"type": "Python"
} | import numpy as np
from mkidgen3.system_parameters import ADC_DAC_INTERFACE_WORD_LENGTH, DAC_RESOLUTION, DAC_LUT_SIZE, N_CHANNELS, \
SYSTEM_BANDWIDTH, IF_ATTN_STEP, ADC_MAX_V, PHASE_FRACTIONAL_BITS
from typing import Iterable
from mkidgen3.util import ensure_array_or_scalar
import numpy.typing as nt
def convert_... | MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@mkidgen3@funcs.py@.PATH_END.py |
{
"filename": "Actions.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Plex/Actions.py",
"type": "Python"
} | # cython: auto_pickle=False
#=======================================================================
#
# Python Lexical Analyser
#
# Actions for use in token specifications
#
#=======================================================================
class Action(object):
def perform(self, token_stream, text):
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Plex@Actions.py@.PATH_END.py |
{
"filename": "de.py",
"repo_name": "ja-vazquez/SimpleMC",
"repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/analyzers/emcee/moves/de.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import numpy as np
from .red_blue import RedBlueMove
__all__ = ["DEMove"]
class DEMove(RedBlueMove):
r"""A proposal using differential evolution.
This `Differential evolution proposal
<http://www.stat.columbia.edu/~gelman/stuff_for_blog/cajo.pdf>`_ is
implemented following ... | ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@analyzers@emcee@moves@de.py@.PATH_END.py |
{
"filename": "sdi.py",
"repo_name": "PynPoint/PynPoint",
"repo_path": "PynPoint_extracted/PynPoint-main/pynpoint/util/sdi.py",
"type": "Python"
} | """
Functions for spectral differential imaging.
"""
import numpy as np
from typeguard import typechecked
from pynpoint.util.image import scale_image, shift_image
@typechecked
def sdi_scaling(image_in: np.ndarray,
scaling: np.ndarray) -> np.ndarray:
"""
Function to rescale the images by th... | PynPointREPO_NAMEPynPointPATH_START.@PynPoint_extracted@PynPoint-main@pynpoint@util@sdi.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._size import SizeValidator
from ._family import FamilyValidator
from ._color import ColorValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__,
[],
["._siz... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@colorbar@tickfont@__init__.py@.PATH_END.py |
{
"filename": "Rate_of_Early_Flash_SNe.ipynb",
"repo_name": "adamamiller/ztf_early_Ia_2018",
"repo_path": "ztf_early_Ia_2018_extracted/ztf_early_Ia_2018-master/playground/Rate_of_Early_Flash_SNe.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, FixedLocator
from matplotlib.gridspec import GridSpec
import glob
from statsmodels.stats.proportion import proportion_confint
from dust_extinction.dust import extinction_cal
```
```python
... | adamamillerREPO_NAMEztf_early_Ia_2018PATH_START.@ztf_early_Ia_2018_extracted@ztf_early_Ia_2018-master@playground@Rate_of_Early_Flash_SNe.ipynb@.PATH_END.py |
{
"filename": "compare_tworuns.py",
"repo_name": "dh4gan/grapus",
"repo_path": "grapus_extracted/grapus-master/plot/compare_tworuns.py",
"type": "Python"
} | # Written 09/03/2017 by dh4gan
# Compares the output from two runs of grapus v3.0 (nbody calculations)
# Makes scatter plots and histograms
import numpy as np
import matplotlib.pyplot as plt
import filefinder as ff
from os.path import splitext as ext
from io_grapus import ninitialcol,nfinalcol, initialcoldict,finalcol... | dh4ganREPO_NAMEgrapusPATH_START.@grapus_extracted@grapus-master@plot@compare_tworuns.py@.PATH_END.py |
{
"filename": "material.py",
"repo_name": "CaymanUnterborn/ExoPlex",
"repo_path": "ExoPlex_extracted/ExoPlex-master/ExoPlex/burnman/classes/material.py",
"type": "Python"
} | from __future__ import print_function
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU
# GPL v2 or later.
import numpy as np
from copy import deepcopy
from ..utils.math import bracket
... | CaymanUnterbornREPO_NAMEExoPlexPATH_START.@ExoPlex_extracted@ExoPlex-master@ExoPlex@burnman@classes@material.py@.PATH_END.py |
{
"filename": "string_breaker.py",
"repo_name": "creaneroDIAS/beamModelTester",
"repo_path": "beamModelTester_extracted/beamModelTester-master/WIP/string_breaker.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 01 15:59:21 2018
@author: User
"""
def break_str(test_str,length_limit=80):
out_str=test_str
test_len_c=len(test_str)
if test_len_c > length_limit:
test_list=test_str.split()
test_len_w=len(test_list)
break_point = test_len_w/2
... | creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@WIP@string_breaker.py@.PATH_END.py |
{
"filename": "use_case_15_emcee_simple_PSPL.py",
"repo_name": "rpoleski/MulensModel",
"repo_path": "MulensModel_extracted/MulensModel-master/examples/use_cases/use_case_15_emcee_simple_PSPL.py",
"type": "Python"
} | """
Use Case 15: Fit a point lens event with emcee.
"""
import numpy as np
import emcee
import os
import MulensModel as mm
def lnlike(theta, event, parameters_to_fit):
"""likelihood function """
for key, val in enumerate(parameters_to_fit):
setattr(event.model.parameters, val, theta[key])
return ... | rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@examples@use_cases@use_case_15_emcee_simple_PSPL.py@.PATH_END.py |
{
"filename": "_buttons.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_buttons.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="buttons", parent_name="layout.xaxis.rangeselector", **kwargs
):
super(ButtonsValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@rangeselector@_buttons.py@.PATH_END.py |
{
"filename": "_pattern.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/rangebreak/_pattern.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="pattern", parent_name="layout.xaxis.rangebreak", **kwargs
):
super(PatternValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@rangebreak@_pattern.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="volume", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@_text.py@.PATH_END.py |
{
"filename": "base_pooling.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/pooling/base_pooling.py",
"type": "Python"
} | from keras.src import backend
from keras.src import ops
from keras.src.layers.input_spec import InputSpec
from keras.src.layers.layer import Layer
from keras.src.ops.operation_utils import compute_pooling_output_shape
from keras.src.utils import argument_validation
class BasePooling(Layer):
"""Base pooling layer.... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@pooling@base_pooling.py@.PATH_END.py |
{
"filename": "test_util.py",
"repo_name": "tardis-sn/tardis",
"repo_path": "tardis_extracted/tardis-main/tardis/tests/test_util.py",
"type": "Python"
} | import pytest
import numpy as np
import numpy.testing as npt
import os
from astropy import units as u
from io import StringIO
from tardis.util.base import (
MalformedSpeciesError,
MalformedElementSymbolError,
MalformedQuantityError,
int_to_roman,
roman_to_int,
calculate_luminosity,
create_s... | tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@tests@test_util.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/io/votable/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package reads and writes data formats used by the Virtual
Observatory (VO) initiative, particularly the VOTable XML format.
"""
from astropy import config as _config
from .exceptions import (
IOWarning,
UnimplementedWarning,
VOTableC... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@votable@__init__.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/sankey/node/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._namelengthsrc import NamelengthsrcValidator
from ._namelength import NamelengthValidator
from ._font import FontValidator
from ._bordercolorsrc import BordercolorsrcValidator
from ._bordercolor import ... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@node@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "test_vos_catalog.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/vo_conesearch/tests/test_vos_catalog.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for VO Service Catalog.
.. note::
``vos_catalog`` convenience functions are indirectly tested in
Cone Search tests.
"""
# STDLIB
import os
# THIRD-PARTY
import pytest
# ASTROPY
from astropy.utils.data import get_pkg_data_filename
# ... | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@vo_conesearch@tests@test_vos_catalog.py@.PATH_END.py |
{
"filename": "physical_model.py",
"repo_name": "jkrogager/VoigtFit",
"repo_path": "VoigtFit_extracted/VoigtFit-master/scripts/physical_model.py",
"type": "Python"
} | # -*- coding: UTF-8 -*-
__author__ = 'Jens-Kristian Krogager'
import numpy as np
import VoigtFit
def print_T_model_pars(dataset, filename=None):
"""Print the turbulence and T parameters for physical model."""
N_comp = len(dataset.components.values()[0])
print("")
print(u" No: Temperature [K] ... | jkrogagerREPO_NAMEVoigtFitPATH_START.@VoigtFit_extracted@VoigtFit-master@scripts@physical_model.py@.PATH_END.py |
{
"filename": "_thicknessmode.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_thicknessmode.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="thicknessmode",
parent_name="funnel.marker.colorbar",
**kwargs,
):
super(ThicknessmodeValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@marker@colorbar@_thicknessmode.py@.PATH_END.py |
{
"filename": "cambPlots.py",
"repo_name": "CosmicFish/CosmicFish",
"repo_path": "CosmicFish_extracted/CosmicFish-master/camb/eftcamb/python/cambPlots.py",
"type": "Python"
} | # Handy routines from plotting CAMB/CAMB_sources outputs
# See covCompare.py for sample script to plot outs
from pylab import *
import numpy as np
def_colors = ['b', 'r', 'm', 'c', 'g', 'k', 'y', '0.25', '0.75']
def saveCls(f, ls, vecs):
np.savetxt(f, hstack([ls.reshape(-1, 1) ] + [x.reshape(-1, 1) for x in vecs... | CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@camb@eftcamb@python@cambPlots.py@.PATH_END.py |
{
"filename": "TensorCRKSPHViscosityInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/ArtificialViscosity/TensorCRKSPHViscosityInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "ArtificialViscosity/TensorCRKSPHViscosity.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
template... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@ArtificialViscosity@TensorCRKSPHViscosityInst.cc.py@.PATH_END.py |
{
"filename": "elliptic.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/mpmath/py3/mpmath/functions/elliptic.py",
"type": "Python"
} | r"""
Elliptic functions historically comprise the elliptic integrals
and their inverses, and originate from the problem of computing the
arc length of an ellipse. From a more modern point of view,
an elliptic function is defined as a doubly periodic function, i.e.
a function which satisfies
.. math ::
f(z + 2 \om... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@mpmath@py3@mpmath@functions@elliptic.py@.PATH_END.py |
{
"filename": "_enabled.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="enabled",
parent_name="layout.ternary.caxis.tickformatstop",
**kwargs
):
super(EnabledValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@caxis@tickformatstop@_enabled.py@.PATH_END.py |
{
"filename": "_hovertemplatesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnelarea/_hovertemplatesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="hovertemplatesrc", parent_name="funnelarea", **kwargs
):
super(HovertemplatesrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnelarea@_hovertemplatesrc.py@.PATH_END.py |
{
"filename": "polar.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/projections/polar.py",
"type": "Python"
} | import math
import types
import numpy as np
import matplotlib as mpl
from matplotlib import _api, cbook
from matplotlib.axes import Axes
import matplotlib.axis as maxis
import matplotlib.markers as mmarkers
import matplotlib.patches as mpatches
from matplotlib.path import Path
import matplotlib.ticker as mticker
impo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@projections@polar.py@.PATH_END.py |
{
"filename": "_bounds.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/map/_bounds.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BoundsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="bounds", parent_name="layout.map", **kwargs):
super(BoundsValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@map@_bounds.py@.PATH_END.py |
{
"filename": "test_lancedb.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/vectorstores/test_lancedb.py",
"type": "Python"
} | from typing import Any
import pytest
from langchain_community.vectorstores import LanceDB
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
def import_lancedb() -> Any:
try:
import lancedb
except ImportError as e:
raise ImportError(
"Could not import... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@vectorstores@test_lancedb.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "nanograv/PINT",
"repo_path": "PINT_extracted/PINT-master/src/pint/extern/__init__.py",
"type": "Python"
} | # __init__.py for pint/extern
"""External/third-party modules that are distributed with PINT."""
from . import _version
__version__ = _version.get_versions()["version"]
| nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@extern@__init__.py@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "jolideco/jolideco",
"repo_path": "jolideco_extracted/jolideco-main/jolideco/conftest.py",
"type": "Python"
} | """Configure Test Suite.
This file is used to configure the behavior of pytest when using the Astropy
test infrastructure. It needs to live inside the package in order for it to
get picked up when running the tests inside an interpreter using
`jolideco.test()`.
"""
import os
try:
from pytest_astropy_header.disp... | jolidecoREPO_NAMEjolidecoPATH_START.@jolideco_extracted@jolideco-main@jolideco@conftest.py@.PATH_END.py |
{
"filename": "_tickformatstopdefaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/cone/colorbar/_tickformatstopdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="tickformatstopdefaults",
parent_name="cone.colorbar",
**kwargs
):
super(TickformatstopdefaultsValidator, self).__i... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@cone@colorbar@_tickformatstopdefaults.py@.PATH_END.py |
{
"filename": "stats.py",
"repo_name": "nickhand/pyRSD",
"repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsdfit/analysis/stats.py",
"type": "Python"
} | from ... import numpy as np
from .. import logging
from . import tools
logger = logging.getLogger('rsdfit.analyze')
logger.addHandler(logging.NullHandler())
def gelman_rubin_convergence(chains):
"""
Return the Gelman-Rubin convergence parameter
"""
Nchains = len(chains)
n, ndim = chains[0].shape
... | nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsdfit@analysis@stats.py@.PATH_END.py |
{
"filename": "_volume.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/data/_volume.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VolumeValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="volume", parent_name="layout.template.data", **kwargs
):
super(VolumeValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@template@data@_volume.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/__init__.py",
"type": "Python"
} | """
NumPy
=====
Provides
1. An array object of arbitrary homogeneous items
2. Fast mathematical operations over arrays
3. Linear Algebra, Fourier Transforms, Random Number Generation
How to use the documentation
----------------------------
Documentation is available in two forms: docstrings provided
with the c... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@__init__.py@.PATH_END.py |
{
"filename": "plotter.py",
"repo_name": "cylammarco/WDPhotTools",
"repo_path": "WDPhotTools_extracted/WDPhotTools-main/src/WDPhotTools/plotter.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Some plotting functions"""
import os
import numpy as np
from matplotlib import pyplot as plt
from .atmosphere_model_reader import AtmosphereModelReader
from .cooling_model_reader import CoolingModelReader
class DummyAtm:
"""dummy class to load atmosphere reade... | cylammarcoREPO_NAMEWDPhotToolsPATH_START.@WDPhotTools_extracted@WDPhotTools-main@src@WDPhotTools@plotter.py@.PATH_END.py |
{
"filename": "stratsi_pert.py",
"repo_name": "minkailin/stratsi",
"repo_path": "stratsi_extracted/stratsi-master/discussion_visc2/stratsi_pert.py",
"type": "Python"
} | """
stratified linear analysis of the streaming instability
"""
from stratsi_params import *
from eigenproblem import Eigenproblem
'''
output control
'''
nz_out = nz_vert
out_scale= nz_out/nz_waves
'''
read in background vertical profiles of vgx, vgy, vdx, vdy
'''
horiz_eqm = h5py.File('./eqm_horiz.h5', 'r')
zax... | minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@discussion_visc2@stratsi_pert.py@.PATH_END.py |
{
"filename": "run_derived_pipeline_phangs-alma.py",
"repo_name": "akleroy/phangs_imaging_scripts",
"repo_path": "phangs_imaging_scripts_extracted/phangs_imaging_scripts-master/run_derived_pipeline_phangs-alma.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Run this script OUTSIDE CASA in an environment that has astropy,
# spectral-cube, scipy, and numpy.
#
##############################################################################
# Load routines, change directory, initialize handlers
#######################################################... | akleroyREPO_NAMEphangs_imaging_scriptsPATH_START.@phangs_imaging_scripts_extracted@phangs_imaging_scripts-master@run_derived_pipeline_phangs-alma.py@.PATH_END.py |
{
"filename": "_showexponent.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sunburst/marker/colorbar/_showexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showexponent",
parent_name="sunburst.marker.colorbar",
**kwargs
):
super(ShowexponentValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sunburst@marker@colorbar@_showexponent.py@.PATH_END.py |
{
"filename": "CHANGELOG.md",
"repo_name": "HERA-Team/hera_mc",
"repo_path": "hera_mc_extracted/hera_mc-main/CHANGELOG.md",
"type": "Markdown"
} | # Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- The new `correlator_file_queues` and `correlator_file_eod` tables to track the
internal file handling in the correlator and the handoff to RTP.
- A new `hera_auto_spectrum` table to hold the full autocorrelati... | HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@CHANGELOG.md@.PATH_END.py |
{
"filename": "EDI_Vetter.py",
"repo_name": "jonzink/EDI-Vetter",
"repo_path": "EDI-Vetter_extracted/EDI-Vetter-master/EDI_Vetter.py",
"type": "Python"
} | #!/usr/bin/python
### EDI-Vetter - Created by Jon Zink ###
### Devolped on python 3.7.1 ###
### If you make use of this code, please cite: ###
### J. K. Zink et al. 2020
import copy
import numpy as np
import pandas as pd
from numpy import ma
import terra.tfind as tfind
import terra.tval as tval
import terra.prepr... | jonzinkREPO_NAMEEDI-VetterPATH_START.@EDI-Vetter_extracted@EDI-Vetter-master@EDI_Vetter.py@.PATH_END.py |
{
"filename": "test_de_snooker.py",
"repo_name": "igomezv/simplemc_tests",
"repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/analyzers/emcee/tests/integration/test_de_snooker.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from emcee import moves
from .test_proposal import _test_normal, _test_uniform
__all__ = ["test_normal_de_snooker", "test_uniform_de_snooker"]
def test_normal_de_snooker(**kwargs):
kwargs["nsteps"] = 4000
_test_normal(moves.DESnookerMove(), **kwargs)
def test_uniform_de_snooker(**... | igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@analyzers@emcee@tests@integration@test_de_snooker.py@.PATH_END.py |
{
"filename": "_ids.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/_ids.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="ids", parent_name="violin", **kwargs):
super(IdsValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@_ids.py@.PATH_END.py |
{
"filename": "xrfi_revamp_2018.ipynb",
"repo_name": "HERA-Team/hera_qm",
"repo_path": "hera_qm_extracted/hera_qm-main/hera_qm/scripts/xrfi_revamp_2018.ipynb",
"type": "Jupyter Notebook"
} | # The Great XRFI Revamp of 2018
### Adam Beardsley
```python
%matplotlib notebook
import numpy as np
from hera_qm import UVFlag
from hera_qm import xrfi
from pyuvdata import UVData
from pyuvdata import UVCal
import matplotlib.pyplot as plt
import os
from hera_qm.data import DATA_PATH
import hera_qm.utils as qm_util... | HERA-TeamREPO_NAMEhera_qmPATH_START.@hera_qm_extracted@hera_qm-main@hera_qm@scripts@xrfi_revamp_2018.ipynb@.PATH_END.py |
{
"filename": "sdp_pools_source.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/regtest/sdp_pools_source.py",
"type": "Python"
} | # #############################################################
# Setup a base class and instantiate it in order to provide the
# SDP pool lists for test parametrization.
# #############################################################
import os
from jwst.regtest.regtestdata import RegtestData
class SDPPoolsSource(Re... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@regtest@sdp_pools_source.py@.PATH_END.py |
{
"filename": "regression_metrics_test.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/metrics/regression_metrics_test.py",
"type": "Python"
} | import numpy as np
from absl.testing import parameterized
from keras.src import testing
from keras.src.metrics import regression_metrics as metrics
class MeanSquaredErrorTest(testing.TestCase):
def test_config(self):
# TODO
pass
def test_unweighted(self):
mse_obj = metrics.MeanSquare... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@metrics@regression_metrics_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/Pythonwin/pywin/mfc/__init__.py",
"type": "Python"
} | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@Pythonwin@pywin@mfc@__init__.py@.PATH_END.py | |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._colorbar import ColorBar
from ._line import Line
from ._pattern import Pattern
from . import colorbar
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = rela... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@bar@marker@__init__.py@.PATH_END.py |
{
"filename": "chain.md",
"repo_name": "Samreay/ChainConsumer",
"repo_path": "ChainConsumer_extracted/ChainConsumer-master/docs/api/chain.md",
"type": "Markdown"
} | # ::: chainconsumer.Chain | SamreayREPO_NAMEChainConsumerPATH_START.@ChainConsumer_extracted@ChainConsumer-master@docs@api@chain.md@.PATH_END.py |
{
"filename": "quick_prim.py",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/quicklook/src/quick_prim.py",
"type": "Python"
} | # Standard dependencies
import configparser
import numpy as np
import traceback
# Pipeline dependencies
from kpfpipe.logger import start_logger
from kpfpipe.primitives.level0 import KPF0_Primitive
from kpfpipe.models.level0 import KPF0
# External dependencies
from keckdrpframework.models.action import Action
from kec... | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@quicklook@src@quick_prim.py@.PATH_END.py |
{
"filename": "_pocketfft.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/fft/_pocketfft.py",
"type": "Python"
} | """
Discrete Fourier Transforms
Routines in this module:
fft(a, n=None, axis=-1, norm="backward")
ifft(a, n=None, axis=-1, norm="backward")
rfft(a, n=None, axis=-1, norm="backward")
irfft(a, n=None, axis=-1, norm="backward")
hfft(a, n=None, axis=-1, norm="backward")
ihfft(a, n=None, axis=-1, norm="backward")
fftn(a, ... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@fft@_pocketfft.py@.PATH_END.py |
{
"filename": "test_bimod_cens_fithelp.py",
"repo_name": "ArgonneCPAC/diffmah",
"repo_path": "diffmah_extracted/diffmah-main/diffmah/diffmahpop_kernels/tests/test_bimod_cens_fithelp.py",
"type": "Python"
} | """
"""
import numpy as np
from jax import random as jran
from ... import diffmah_kernels
from .. import bimod_cens_fithelp
from .. import bimod_censat_params as dpp
def test_loss_grads():
ran_key = jran.key(0)
t_obs = 10.0
t_0 = 13.0
lgt0 = np.log10(t_0)
tarr = np.linspace(0.1, t_obs, 100)
... | ArgonneCPACREPO_NAMEdiffmahPATH_START.@diffmah_extracted@diffmah-main@diffmah@diffmahpop_kernels@tests@test_bimod_cens_fithelp.py@.PATH_END.py |
{
"filename": "test_multiv_dc.py",
"repo_name": "NannyML/nannyml",
"repo_path": "nannyml_extracted/nannyml-main/tests/drift/test_multiv_dc.py",
"type": "Python"
} | # Author: Niels Nuyttens <niels@nannyml.com>
# Author: Nikolaos Perrakis <nikos@nannyml.com>
#
# License: Apache Software License 2.0
"""Tests for Multivariate Domain Classifier package."""
from typing import Tuple
import pandas as pd
import pytest
from nannyml.datasets import load_synthetic_car_loan_datas... | NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@tests@drift@test_multiv_dc.py@.PATH_END.py |
{
"filename": "input.py",
"repo_name": "oscaribv/exotrending",
"repo_path": "exotrending_extracted/exotrending-master/input.py",
"type": "Python"
} | #Input file
#the name of the file with the light curve data
lc_file='warm_jupiter.dat'
#Flag to indicate if we want a plot with the seaborn library
#is_seaborn = True
#Ephemeris
#Period
P = 28.38229
#Epoch of first transit
T0 = 2492.81705
#Transit duration in days
ttran = 5.0/24.0
#out of transit duration in days
to... | oscaribvREPO_NAMEexotrendingPATH_START.@exotrending_extracted@exotrending-master@input.py@.PATH_END.py |
{
"filename": "exceptions.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-kubernetes/prefect_kubernetes/exceptions.py",
"type": "Python"
} | """Module to define common exceptions within `prefect_kubernetes`."""
from kubernetes_asyncio.client.exceptions import ApiException, OpenApiException
class KubernetesJobDefinitionError(OpenApiException):
"""An exception for when a Kubernetes job definition is invalid."""
class KubernetesJobFailedError(OpenApiE... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-kubernetes@prefect_kubernetes@exceptions.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/xdata/kurucz91/README.md",
"type": "Markdown"
} | # Kurucz Models
This directory contains the Kurucz Stellar models in an ascii format suitable for use
in Python. They are included here mainly as an example, and in order to allow for
regression testing. In particular, the models are fairly coarse in terms of their
wavelength resolution.
Larger grids of models ar... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@xdata@kurucz91@README.md@.PATH_END.py |
{
"filename": "test_utils.py",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/hazma/form_factors/vector/test_utils.py",
"type": "Python"
} | """Utilities for testing form factors."""
# pylint: disable=too-few-public-methods,invalid-name,too-many-instance-attributes
import json
import pathlib
from dataclasses import dataclass, field, fields
from hazma.form_factors.vector import VectorFormFactorCouplings
DATA_DIR = pathlib.Path(__file__).parent.joinpath("... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@form_factors@vector@test_utils.py@.PATH_END.py |
{
"filename": "_colorssrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/_colorssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="colorssrc", parent_name="icicle.marker", **kwargs):
super(ColorssrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@_colorssrc.py@.PATH_END.py |
{
"filename": "_legendrank.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/_legendrank.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="legendrank", parent_name="sunburst", **kwargs):
super(LegendrankValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@_legendrank.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "saberyoung/haffet",
"repo_path": "haffet_extracted/haffet-master/sdapy/engines/__init__.py",
"type": "Python"
} | """Initilization modules."""
import os
import numpy as np
path = os.path.dirname(os.path.abspath(__file__))
__all__ = []
for model in [
f for f in os.listdir(path)
if f.endswith('.py') and not f.startswith('__')
]:
__all__.append(model[:-3])
from .multiband_early import *
from .multiband_main ... | saberyoungREPO_NAMEhaffetPATH_START.@haffet_extracted@haffet-master@sdapy@engines@__init__.py@.PATH_END.py |
{
"filename": "ad_checkpoint.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/ad_checkpoint.py",
"type": "Python"
} | # Copyright 2021 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@ad_checkpoint.py@.PATH_END.py |
{
"filename": "misc.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/flash/misc.py",
"type": "Python"
} | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@flash@misc.py@.PATH_END.py | |
{
"filename": "_shadowsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="shadowsrc",
parent_name="scatterpolargl.hoverlabel.font",
**kwargs,
):
super(ShadowsrcValidator, self).__init__(
plotly_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "_dtick.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/colorbar/_dtick.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="dtick", parent_name="mesh3d.colorbar", **kwargs):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@colorbar@_dtick.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/aspectratio/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="z", parent_name="layout.scene.aspectratio", **kwargs
):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@aspectratio@_z.py@.PATH_END.py |
{
"filename": "rejection_test.py",
"repo_name": "Zstone19/pypetal",
"repo_path": "pypetal_extracted/pypetal-main/tests/test_drw_rej/rejection_test.py",
"type": "Python"
} | import os
import shutil
import unittest
import numpy as np
from scipy.interpolate import interp1d
import pypetal.pipeline as pl
class TestLoad(unittest.TestCase):
def setUp(self):
main_dir = 'examples/dat/javelin_'
self.filenames = [main_dir + 'continuum.dat', main_dir + 'yelm.dat', main_dir + ... | Zstone19REPO_NAMEpypetalPATH_START.@pypetal_extracted@pypetal-main@tests@test_drw_rej@rejection_test.py@.PATH_END.py |
{
"filename": "task.py",
"repo_name": "ExObsSim/ExoRad2-public",
"repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/exorad/tasks/task.py",
"type": "Python"
} | from abc import ABCMeta
from abc import abstractmethod
from exorad.log.logger import Logger
class Task(Logger):
"""
Base class for tasks.
"""
__metaclass__ = ABCMeta
_output = None
_task_input = None
_task_params = None
@abstractmethod
def __init__(self):
"""
Cl... | ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@exorad@tasks@task.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/importlib-metadata/py3/importlib_metadata/compat/__init__.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@importlib-metadata@py3@importlib_metadata@compat@__init__.py@.PATH_END.py | |
{
"filename": "_version.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/lib/_version.py",
"type": "Python"
} | """Utility to compare (NumPy) version strings.
The NumpyVersion class allows properly comparing numpy version strings.
The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.
"""
from __future__ import division, absolute_import, pri... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@lib@_version.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/examples/beta/README.md",
"type": "Markdown"
} | ### beta
This directory contains parameter files which are relevant to
the on-going development of Python and/or models being worked on
by the developers of Python for science.
The models here are really for internal communication between the
developers. They may generate erors. They should not be used as
a basis ... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@examples@beta@README.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/tools/evaluation/tasks/ios/README.md",
"type": "Markdown"
} | # TFLite iOS evaluation app.
## Description
An iOS app to evaluate TFLite models. This is mainly for running different
evaluation tasks on iOS. Right now it only supports evaluating the inference
difference between cpu and delegates.
The app reads evaluation parameters from a JSON file named
`evaluation_params.json`... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@tools@evaluation@tasks@ios@README.md@.PATH_END.py |
{
"filename": "test_filesystems.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/tests/test_filesystems.py",
"type": "Python"
} | import os
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Tuple
import pytest
import prefect
from prefect.filesystems import (
LocalFileSystem,
RemoteFileSystem,
)
from prefect.testing.utilities import MagicMock
from prefect.utilities.filesystem import tmpchdir
TEST_PROJEC... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test_filesystems.py@.PATH_END.py |
{
"filename": "trt_mode_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/compiler/tensorrt/test/trt_mode_test.py",
"type": "Python"
} | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@compiler@tensorrt@test@trt_mode_test.py@.PATH_END.py |
{
"filename": "convert_msys_paths_to_win_paths.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/ci/utilities/convert_msys_paths_to_win_paths.py",
"type": "Python"
} | # Copyright 2024 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@ci@utilities@convert_msys_paths_to_win_paths.py@.PATH_END.py |
{
"filename": "link.py",
"repo_name": "pynbody/tangos",
"repo_path": "tangos_extracted/tangos-master/tangos/core/halo_data/link.py",
"type": "Python"
} | from sqlalchemy import Column, ForeignKey, Integer
from sqlalchemy.orm import Session, backref, relationship
from ...config import DOUBLE_PRECISION
from .. import Base, creator
from ..dictionary import DictionaryItem
from ..halo import SimulationObjectBase
class HaloLink(Base):
__tablename__ = 'halolink'
id... | pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@core@halo_data@link.py@.PATH_END.py |
{
"filename": "XID+IR_SED_Analysis.ipynb",
"repo_name": "H-E-L-P/XID_plus",
"repo_path": "XID_plus_extracted/XID_plus-master/docs/build/html/notebooks/examples/XID+IR_SED_Analysis.ipynb",
"type": "Jupyter Notebook"
} | # XID+IR_SED_Analysis
This notebook takes the posterior of the XID+IR_SED run and examines outputs with some useful visualisation
```python
from astropy.io import ascii, fits
import pylab as plt
%matplotlib inline
from astropy import wcs
import numpy as np
import xidplus
from xidplus import moc_routines
import pick... | H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@html@notebooks@examples@XID+IR_SED_Analysis.ipynb@.PATH_END.py |
{
"filename": "cosmo_inference_cmass_nrun.py",
"repo_name": "florpi/sunbird",
"repo_path": "sunbird_extracted/sunbird-main/paper_figures/boss/cosmo_inference_cmass_nrun.py",
"type": "Python"
} | """
Figure 6: extended-LCDM (left panel)
"""
from getdist import plots, MCSamples
from getdist.mcsamples import loadMCSamples
import pandas as pd
from pathlib import Path
import numpy as np
import matplotlib.pyplot as plt
import argparse
plt.style.use(['stylelib/science.mplstyle', 'stylelib/retro.mplstyle'])
colors = ... | florpiREPO_NAMEsunbirdPATH_START.@sunbird_extracted@sunbird-main@paper_figures@boss@cosmo_inference_cmass_nrun.py@.PATH_END.py |
{
"filename": "gui_main.py",
"repo_name": "daniel-muthukrishna/astrodash",
"repo_path": "astrodash_extracted/astrodash-master/astrodash/gui_main.py",
"type": "Python"
} | import os
import sys
import numpy as np
from PyQt5 import QtWidgets
from PyQt5.QtCore import QThread, pyqtSignal
import pyqtgraph as pg
from astrodash.design import Ui_MainWindow
from astrodash.restore_model import LoadInputSpectra, BestTypesListSingleRedshift, get_training_parameters, \
classification_split
from a... | daniel-muthukrishnaREPO_NAMEastrodashPATH_START.@astrodash_extracted@astrodash-master@astrodash@gui_main.py@.PATH_END.py |
{
"filename": "pca.py",
"repo_name": "jakevdp/wpca",
"repo_path": "wpca_extracted/wpca-master/wpca/pca.py",
"type": "Python"
} | import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.utils.validation import check_array
class PCA(BaseEstimator, TransformerMixin):
"""Principal Component Analysis
This is a standard Principal Component Analysis implementation
based on the Singular Value Decompositio... | jakevdpREPO_NAMEwpcaPATH_START.@wpca_extracted@wpca-master@wpca@pca.py@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showticksuffix", parent_name="layout.ternary.aaxis", **kwargs
):
super(ShowticksuffixValidator, self).__init__(
plotly_name=plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@_showticksuffix.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/vsa/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
VSA Image and Catalog Query Tool
--------------------------------
.. topic:: Revision History
Refactored using common API as a part of Google Summer of Code 2013.
Modified for VSA by @eztean
:Originally contributed by:
Thomas Rob... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@vsa@__init__.py@.PATH_END.py |
{
"filename": "ompi_cluster.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/clusters/ompi_cluster.py",
"type": "Python"
} | # Copyright 2023 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@clusters@ompi_cluster.py@.PATH_END.py |
{
"filename": "_bgcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/pattern/_bgcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bgcolor", parent_name="barpolar.marker.pattern", **kwargs
):
super(BgcolorValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@pattern@_bgcolor.py@.PATH_END.py |
{
"filename": "test_frbsurveys.py",
"repo_name": "FRBs/FRB",
"repo_path": "FRB_extracted/FRB-main/frb/tests/test_frbsurveys.py",
"type": "Python"
} | # Module to run tests on surveys
# Most of these are *not* done with Travis yet
# TEST_UNICODE_LITERALS
import astropy
import pytest
import os, warnings
from astropy.table import Table
from astropy.coordinates import SkyCoord
from astropy import units
from astropy.io.fits.hdu.image import PrimaryHDU
from frb.survey... | FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@frb@tests@test_frbsurveys.py@.PATH_END.py |
{
"filename": "test_model_sets.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/modeling/tests/test_model_sets.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests model set evaluation and fitting for some common use cases.
"""
import numpy as np
# pylint: disable=invalid-name
import pytest
from numpy.testing import assert_allclose
from astropy.modeling.core import Model
from astropy.modeling... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@modeling@tests@test_model_sets.py@.PATH_END.py |
{
"filename": "metadata_utils.py",
"repo_name": "jiwoncpark/baobab",
"repo_path": "baobab_extracted/baobab-master/baobab/sim_utils/metadata_utils.py",
"type": "Python"
} | import numpy as np
from ast import literal_eval
import fnmatch
import lenstronomy.Util.param_util as param_util
__all__ = ['add_qphi_columns', 'add_g1g2_columns', 'add_gamma_psi_ext_columns', 'add_relative_src_offset', 'get_kwargs_src_light', 'get_kwargs_lens_light', 'get_kwargs_ps', 'get_kwargs_lens_mass', 'get_kwargs... | jiwoncparkREPO_NAMEbaobabPATH_START.@baobab_extracted@baobab-master@baobab@sim_utils@metadata_utils.py@.PATH_END.py |
{
"filename": "GenerateIC_for_3DSphericalGlassMaking.py",
"repo_name": "eltevo/steps",
"repo_path": "steps_extracted/steps-master/tools/GenerateIC_for_3DSphericalGlassMaking/GenerateIC_for_3DSphericalGlassMaking.py",
"type": "Python"
} | #!/usr/bin/env python3
#*******************************************************************************#
# GenerateIC_for_3DSphericalGlassMaking.py - IC generator for StePS glasses #
# STEreographically Projected cosmological Simulations #
# Copyright (C) 2018-2022 Gabor Racz ... | eltevoREPO_NAMEstepsPATH_START.@steps_extracted@steps-master@tools@GenerateIC_for_3DSphericalGlassMaking@GenerateIC_for_3DSphericalGlassMaking.py@.PATH_END.py |
{
"filename": "_startlinewidth.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/_startlinewidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="startlinewidth", parent_name="carpet.baxis", **kwargs
):
super(StartlinewidthValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@baxis@_startlinewidth.py@.PATH_END.py |
{
"filename": "_direct_py.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/optimize/_direct_py.py",
"type": "Python"
} | from typing import ( # noqa: UP035
Any, Callable, Iterable
)
import numpy as np
from scipy.optimize import OptimizeResult
from ._constraints import old_bound_to_new, Bounds
from ._direct import direct as _direct # type: ignore
__all__ = ['direct']
ERROR_MESSAGES = (
"Number of function evaluations done is ... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@optimize@_direct_py.py@.PATH_END.py |
{
"filename": "flasher_spectrum.py",
"repo_name": "claudiok/clsim",
"repo_path": "clsim_extracted/clsim-master/resources/plots/flasher_spectrum.py",
"type": "Python"
} | #!/usr/bin/env python
from __future__ import print_function
import math
import numpy
import matplotlib
matplotlib.use("PDF")
fig_size = [8.3,11.7] # din A4
params = {'backend': 'pdf',
'axes.labelsize': 10,
'text.fontsize': 10,
'legend.fontsize': 10,
'xtick.labelsize': 8,
'yti... | claudiokREPO_NAMEclsimPATH_START.@clsim_extracted@clsim-master@resources@plots@flasher_spectrum.py@.PATH_END.py |
{
"filename": "desy5.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/sn/desy5.py",
"type": "Python"
} | from .pantheonplus import PantheonPlus
class DESy5(PantheonPlus):
"""
Likelihood for DES-Y5 type Ia supernovae sample.
Reference
---------
https://arxiv.org/abs/2401.02929
"""
def configure(self):
self.pre_vars = self.mag_err ** 2
def _read_data_file(self, data_file):
... | ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@sn@desy5.py@.PATH_END.py |
{
"filename": "vol-xrb-abar.py",
"repo_name": "AMReX-Astro/Castro",
"repo_path": "Castro_extracted/Castro-main/Exec/science/flame_wave/analysis/vis_3d/vol-xrb-abar.py",
"type": "Python"
} | #!/usr/bin/env python
import sys
import matplotlib
import numpy as np
import yt
from yt.frontends.boxlib.api import CastroDataset
from yt.units import cm
#from yt.visualization.volume_rendering.render_source import VolumeSource
from yt.visualization.volume_rendering.api import Scene, create_volume_source
matplotlib... | AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@flame_wave@analysis@vis_3d@vol-xrb-abar.py@.PATH_END.py |
{
"filename": "prep_cmap_data.py",
"repo_name": "1313e/CMasher",
"repo_path": "CMasher_extracted/CMasher-master/src/cmasher/colormaps/prep_cmap_data.py",
"type": "Python"
} | import shutil
import sys
from itertools import zip_longest
from pathlib import Path
from textwrap import dedent
import matplotlib.pyplot as plt
import numpy as np
import viscm
from matplotlib.colors import TwoSlopeNorm, to_hex
from cmasher.app_usage import update_tableau_pref_file
from cmasher.cm import cmap_cd
from ... | 1313eREPO_NAMECMasherPATH_START.@CMasher_extracted@CMasher-master@src@cmasher@colormaps@prep_cmap_data.py@.PATH_END.py |
{
"filename": "patches.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/patches.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import map, zip
import math
import warnings
import numpy as np
import matplotlib as mpl
from . import artist, cbook, colors, docstring, lines as mlines, tra... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@patches.py@.PATH_END.py |
{
"filename": "cat_shela.py",
"repo_name": "HETDEX/elixer",
"repo_path": "elixer_extracted/elixer-main/elixer/cat_shela.py",
"type": "Python"
} | from __future__ import print_function
try:
from elixer import global_config as G
from elixer import science_image
from elixer import cat_base
from elixer import match_summary
from elixer import line_prob
from elixer import utilities
from elixer import spectrum_utilities as SU
except:
im... | HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@cat_shela.py@.PATH_END.py |
{
"filename": "gainsols.py",
"repo_name": "ratt-ru/CubiCal",
"repo_path": "CubiCal_extracted/CubiCal-master/cubical/plots/gainsols.py",
"type": "Python"
} | #!/usr/bin/env python
from __future__ import print_function
from cubical.tools import logger
from collections import OrderedDict
import matplotlib.patches as mpatches
from pylab import *
import re, fnmatch
import warnings
import numpy as np
import math
log = logger.getLogger("gain_plots")
class PlotLimits(object):
... | ratt-ruREPO_NAMECubiCalPATH_START.@CubiCal_extracted@CubiCal-master@cubical@plots@gainsols.py@.PATH_END.py |
{
"filename": "cotrans_lib.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/cotrans_tools/cotrans_lib.py",
"type": "Python"
} | """
Functions for coordinate transformations.
Contains trasformations from/to the following coordinate systems:
GSE, GSM, SM, GEI, GEO, MAG, J2000
Times are in Unix seconds for consistency.
Notes
-----
These functions are in cotrans_lib.pro of IDL SPEDAS.
For a comparison to IDL, see: http://spedas.org/wiki/index.ph... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@cotrans_tools@cotrans_lib.py@.PATH_END.py |
{
"filename": "legacy_pima_indian.py",
"repo_name": "astro-informatics/harmonic",
"repo_path": "harmonic_extracted/harmonic-main/examples/legacy_pima_indian.py",
"type": "Python"
} | import numpy as np
import emcee
import time
import harmonic as hm
def ln_likelihood(y, theta, x):
"""Compute log_e of Pima Indian likelihood.
Args:
y: Vector of diabetes incidence (1=diabetes, 0=no diabetes).
theta: Vector of parameter variables associated with covariates x.
x: Vec... | astro-informaticsREPO_NAMEharmonicPATH_START.@harmonic_extracted@harmonic-main@examples@legacy_pima_indian.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.