metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "tools.py",
"repo_name": "s-ilic/ECLAIR",
"repo_path": "ECLAIR_extracted/ECLAIR-master/likelihoods/CMB/Planck/PR4/hillipop_TTTEEE/tools.py",
"type": "Python"
} | # ------------------------------------------------------------------------------------------------
# Hillipop External Tools
# ------------------------------------------------------------------------------------------------
import os
import astropy.io.fits as fits
import numpy as np
import scipy.ndimage as nd
from num... | s-ilicREPO_NAMEECLAIRPATH_START.@ECLAIR_extracted@ECLAIR-master@likelihoods@CMB@Planck@PR4@hillipop_TTTEEE@tools.py@.PATH_END.py |
{
"filename": "t-test.md",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/doc/unconverted/python/t-test.md",
"type": "Markdown"
} | ---
jupyter:
jupytext:
notebook_metadata_filter: all
text_representation:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.1
kernelspec:
display_name: Python 2
language: python
name: python2
plotly:
description: Learn how to perform a... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@unconverted@python@t-test.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/packages/vaex-jupyter/vaex/jupyter/vendor/__init__.py",
"type": "Python"
} | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-jupyter@vaex@jupyter@vendor@__init__.py@.PATH_END.py | |
{
"filename": "evaluation.py",
"repo_name": "DLR-RM/stable-baselines3",
"repo_path": "stable-baselines3_extracted/stable-baselines3-master/stable_baselines3/common/evaluation.py",
"type": "Python"
} | import warnings
from typing import Any, Callable, Optional, Union
import gymnasium as gym
import numpy as np
from stable_baselines3.common import type_aliases
from stable_baselines3.common.vec_env import DummyVecEnv, VecEnv, VecMonitor, is_vecenv_wrapped
def evaluate_policy(
model: "type_aliases.PolicyPredictor... | DLR-RMREPO_NAMEstable-baselines3PATH_START.@stable-baselines3_extracted@stable-baselines3-master@stable_baselines3@common@evaluation.py@.PATH_END.py |
{
"filename": "test_output.py",
"repo_name": "rmjarvis/Piff",
"repo_path": "Piff_extracted/Piff-main/tests/test_output.py",
"type": "Python"
} | # Copyright (c) 2016 by Mike Jarvis and the other collaborators on GitHub at
# https://github.com/rmjarvis/Piff All rights reserved.
#
# Piff is free software: Redistribution and use in source and binary forms
# with or without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redist... | rmjarvisREPO_NAMEPiffPATH_START.@Piff_extracted@Piff-main@tests@test_output.py@.PATH_END.py |
{
"filename": "test_simulations_rt1d_const_flux.py",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/tests/test_simulations_rt1d_const_flux.py",
"type": "Python"
} | """
test_const_ionization.py
Author: Jordan Mirocha
Affiliation: University of Colorado at Boulder
Created on: Thu Oct 16 14:46:48 MDT 2014
Description:
"""
import ares
import numpy as np
from ares.physics.CrossSections import PhotoIonizationCrossSection as sigma
s_per_yr = ares.physics.Constants.s_per_yr
pars =... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@test_simulations_rt1d_const_flux.py@.PATH_END.py |
{
"filename": "_reversescale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/line/_reversescale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="reversescale", parent_name="bar.marker.line", **kwargs
):
super(ReversescaleValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@line@_reversescale.py@.PATH_END.py |
{
"filename": "xla_metadata_test.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/tests/xla_metadata_test.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
#
# 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@tests@xla_metadata_test.py@.PATH_END.py |
{
"filename": "_tickfont.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/carpet/aaxis/_tickfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet.aaxis"
_path_str = "carpet.aaxis.tickfont"
_valid_props = {
"color",
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@carpet@aaxis@_tickfont.py@.PATH_END.py |
{
"filename": "test_svc.py",
"repo_name": "spicy-oil/hfs_fit",
"repo_path": "hfs_fit_extracted/hfs_fit-master/tests/test_svc.py",
"type": "Python"
} | """Integration tests for the service as a whole."""
import os
from unittest.mock import patch
from numpy import testing
from hfs_fit import hfs
<<<<<<< HEAD
@patch('hfs_fit.hfs_fit.get_user_levels')
@patch('hfs_fit.hfs_fit.get_user_wavenumber')
@patch('hfs_fit.hfs_fit.get_user_noise')
=======
@patch('hfs_fit.get_us... | spicy-oilREPO_NAMEhfs_fitPATH_START.@hfs_fit_extracted@hfs_fit-master@tests@test_svc.py@.PATH_END.py |
{
"filename": "geometry.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/util/+tools/+math/+geometry/geometry.md",
"type": "Markdown"
} | # Overview
# Usage
# Notes
# Known Issues
# See Also
| EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@util@+tools@+math@+geometry@geometry.md@.PATH_END.py |
{
"filename": "_idssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/_idssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="idssrc", parent_name="densitymapbox", **kwargs):
super(IdssrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@_idssrc.py@.PATH_END.py |
{
"filename": "rates_only_mle.py",
"repo_name": "Swift-BAT/NITRATES",
"repo_path": "NITRATES_extracted/NITRATES-main/nitrates/archive/rates_only_mle.py",
"type": "Python"
} | import numpy as np
from astropy.io import fits
from astropy.table import Table, vstack
from scipy import optimize, stats
import argparse
import os
from ..lib.logllh_ebins_funcs import get_cnt_ebins_normed, log_pois_prob
from ..response.ray_trace_funcs import ray_trace_square
from ..lib.drm_funcs import get_ebin_ind_ed... | Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@archive@rates_only_mle.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "AndrewAnnex/SpiceyPy",
"repo_path": "SpiceyPy_extracted/SpiceyPy-main/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and con... | AndrewAnnexREPO_NAMESpiceyPyPATH_START.@SpiceyPy_extracted@SpiceyPy-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "cheblib.py",
"repo_name": "venkateshgopinath/FAlCon-DNS",
"repo_path": "FAlCon-DNS_extracted/FAlCon-DNS-main/python/annulus/cheblib.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import glob, os
import numpy as np
from scipy.fftpack import dct, idct, fft, ifft
def chebgrid(nr, a, b):
"""
This function defines a Gauss-Lobatto grid from a to b.
>>> r_icb = 0.5 ; r_cmb = 1.5; n_r_max=65
>>> rr = chebgrid(n_r_max, r_icb, r_cmb)
:param nr: number of rad... | venkateshgopinathREPO_NAMEFAlCon-DNSPATH_START.@FAlCon-DNS_extracted@FAlCon-DNS-main@python@annulus@cheblib.py@.PATH_END.py |
{
"filename": "context.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/tests/unit/services/externalBrokers/context.py",
"type": "Python"
} | """Import at the start of tests so that imported packages get resolved properly.
"""
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../common')))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../common/src')))
sys.path.in... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@services@externalBrokers@context.py@.PATH_END.py |
{
"filename": "nn.py",
"repo_name": "probabilists/lampe",
"repo_path": "lampe_extracted/lampe-master/lampe/nn.py",
"type": "Python"
} | r"""Neural networks, layers and modules."""
__all__ = ["MLP", "ResMLP"]
import torch.nn as nn
from torch import Tensor
from typing import Sequence
from zuko.nn import MLP
class Residual(nn.Module):
r"""Creates a residual block from a non-linear function :math:`f`.
.. math:: y = x + f(x)
Arguments:
... | probabilistsREPO_NAMElampePATH_START.@lampe_extracted@lampe-master@lampe@nn.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "bd-j/prospector",
"repo_path": "prospector_extracted/prospector-main/prospect/fitting/__init__.py",
"type": "Python"
} | from .ensemble import run_emcee_sampler, restart_emcee_sampler
from .minimizer import reinitialize
from .nested import run_nested_sampler
from .fitting import fit_model, lnprobfn, run_minimize
__all__ = ["fit_model", "lnprobfn",
# below should all be removed/deprecated
"run_emcee_sampler", "resta... | bd-jREPO_NAMEprospectorPATH_START.@prospector_extracted@prospector-main@prospect@fitting@__init__.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/carpet/aaxis/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet.aaxis"
_path_str = "carpet.aaxis.title"
_valid_props = {"font", "offset", "text"}
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@carpet@aaxis@_title.py@.PATH_END.py |
{
"filename": "run.py",
"repo_name": "ratt-ru/Stimela-classic",
"repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/cargo/cab/casa47_applycal/src/run.py",
"type": "Python"
} | import os
import sys
import logging
import Crasa.Crasa as crasa
import yaml
import glob
import shutil
CONFIG = os.environ["CONFIG"]
INPUT = os.environ["INPUT"]
OUTPUT = os.environ["OUTPUT"]
MSDIR = os.environ["MSDIR"]
with open(CONFIG, "r") as _std:
cab = yaml.safe_load(_std)
junk = cab["junk"]
args = {}
for par... | ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@cargo@cab@casa47_applycal@src@run.py@.PATH_END.py |
{
"filename": "_xanchor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/colorbar/_xanchor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="xanchor", parent_name="streamtube.colorbar", **kwargs
):
super(XanchorValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@colorbar@_xanchor.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "Jammy2211/PyAutoLens",
"repo_path": "PyAutoLens_extracted/PyAutoLens-main/autolens/point/__init__.py",
"type": "Python"
} | Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@autolens@point@__init__.py@.PATH_END.py | |
{
"filename": "fernandes_2019_broken_powerlaw.py",
"repo_name": "GijsMulders/epos",
"repo_path": "epos_extracted/epos-master/EPOS/scriptdir/papers/fernandes_2019_broken_powerlaw.py",
"type": "Python"
} | #! /usr/bin/env ipython
'''
This script is meant to reproduce some of the results/figures from
Fernandes et al. 2019 (AJ submitted), in particular the 3 and 4 parameter
solutions in Table 1 and 2 and Figure 4, (9), and 10
Text output will appear in the terminal.
Symmetric:
./paper_fernandes_2019_broken_powerlaw.py ... | GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@scriptdir@papers@fernandes_2019_broken_powerlaw.py@.PATH_END.py |
{
"filename": "analyze.py",
"repo_name": "jmd-dk/concept",
"repo_path": "concept_extracted/concept-master/test/fluid_pressure/analyze.py",
"type": "Python"
} | # This file has to be run in pure Python mode!
# Imports from the CO𝘕CEPT code
from commons import *
from snapshot import load
import species
plt = get_matplotlib().pyplot
# Absolute path and name of this test
this_dir = os.path.dirname(os.path.realpath(__file__))
this_test = os.path.basename(os.path.dirname(this_d... | jmd-dkREPO_NAMEconceptPATH_START.@concept_extracted@concept-master@test@fluid_pressure@analyze.py@.PATH_END.py |
{
"filename": "multinest.py",
"repo_name": "vallis/libstempo",
"repo_path": "libstempo_extracted/libstempo-master/libstempo/multinest.py",
"type": "Python"
} | import math
import os
import re
from ctypes import CFUNCTYPE, POINTER, c_bool, c_double, c_int, c_void_p, cdll, create_string_buffer
import numpy as N
from numpy.ctypeslib import as_array
# don't bother with parsing error
try:
lib = cdll.LoadLibrary("libnest3.so")
except:
lib = cdll.LoadLibrary(os.path.dirnam... | vallisREPO_NAMElibstempoPATH_START.@libstempo_extracted@libstempo-master@libstempo@multinest.py@.PATH_END.py |
{
"filename": "xcode.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/styles/xcode.py",
"type": "Python"
} | """
pygments.styles.xcode
~~~~~~~~~~~~~~~~~~~~~
Style similar to the `Xcode` default theme.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Er... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@styles@xcode.py@.PATH_END.py |
{
"filename": "test_spherical_convolution.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/layers/tests/test_spherical_convolution.py",
"type": "Python"
} | import pytest
import torch
from tltorch import FactorizedTensor
from ..spherical_convolution import SphericalConv
from ..spherical_convolution import SHT
@pytest.mark.parametrize('factorization', ['ComplexDense', 'ComplexCP', 'ComplexTucker', 'ComplexTT'])
@pytest.mark.parametrize('implementation', ['factorized', 'rec... | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@layers@tests@test_spherical_convolution.py@.PATH_END.py |
{
"filename": "download_sdo_jsoc.py",
"repo_name": "RobertJaro/InstrumentToInstrument",
"repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/download/download_sdo_jsoc.py",
"type": "Python"
} | import argparse
import glob
import os
import shutil
from datetime import timedelta, datetime
import drms
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
parser = argparse.ArgumentParser(description='Download SDO data from JSOC')
parser.add_argument('--download_dir', type=str, help='... | RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@download@download_sdo_jsoc.py@.PATH_END.py |
{
"filename": "test_nirspec.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/extract_2d/tests/test_nirspec.py",
"type": "Python"
} | import numpy as np
import pytest
from astropy.io import fits
from astropy.table import Table
from stdatamodels.jwst.datamodels import ImageModel, CubeModel, MultiSlitModel, SlitModel
from jwst.assign_wcs import AssignWcsStep
from jwst.extract_2d.extract_2d_step import Extract2dStep
# WCS keywords, borrowed from NIRC... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@extract_2d@tests@test_nirspec.py@.PATH_END.py |
{
"filename": "computeOccurrence-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_kic/.ipynb_checkpoints/computeOccurrence-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import requests
import pandas as pd
from astropy.io import fits
from cStringIO import StringIO
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gamma
from scipy.optimize import minimize
from scipy.interpolate import RectBivariateSpline
import emcee
import corner
import scip... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_kic@.ipynb_checkpoints@computeOccurrence-checkpoint.ipynb@.PATH_END.py |
{
"filename": "runatm.py",
"repo_name": "dzesmin/TEA",
"repo_path": "TEA_extracted/TEA-master/tea/runatm.py",
"type": "Python"
} | #! /usr/bin/env python
############################# BEGIN FRONTMATTER ################################
# #
# TEA - calculates Thermochemical Equilibrium Abundances of chemical species #
# ... | dzesminREPO_NAMETEAPATH_START.@TEA_extracted@TEA-master@tea@runatm.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/marker/line/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._widthsrc import WidthsrcValidator
from ._width import WidthValidator
from ._reversescale import ReversescaleValidator
from ._colorsrc import ColorsrcValidator
from ._colorscale import ColorscaleValidat... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@marker@line@__init__.py@.PATH_END.py |
{
"filename": "_opacity.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/_opacity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacityValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="opacity", parent_name="violin", **kwargs):
super(OpacityValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@_opacity.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="streamtube.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/contour/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="volume.contour", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@contour@_color.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/legend/title/font/__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@layout@legend@title@font@__init__.py@.PATH_END.py |
{
"filename": "_ticktext.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/colorbar/_ticktext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self, plotly_name="ticktext", parent_name="isosurface.colorbar", **kwargs
):
super(TicktextValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@colorbar@_ticktext.py@.PATH_END.py |
{
"filename": "run_cosmotest.py",
"repo_name": "phirling/pyc2ray",
"repo_path": "pyc2ray_extracted/pyc2ray-main/test/archive/244Mpc_test/run_cosmotest.py",
"type": "Python"
} | import sys
sys.path.append("../../")
import numpy as np, time
import pyc2ray as pc2r
from pyc2ray.utils.other_utils import get_redshifts_from_output
from astropy import units as u
# ======================================================================
# Example 2 for pyc2ray: Cosmological simulation from N-body
# ===... | phirlingREPO_NAMEpyc2rayPATH_START.@pyc2ray_extracted@pyc2ray-main@test@archive@244Mpc_test@run_cosmotest.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/setup/README.md",
"type": "Markdown"
} | # APERO setup
For full details see | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@setup@README.md@.PATH_END.py |
{
"filename": "tracer_model.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/ImSim/tracer_model.py",
"type": "Python"
} | from lenstronomy.ImSim.image_model import ImageModel
from lenstronomy.LightModel.light_model import LightModel
from lenstronomy.LensModel.lens_model import LensModel
from lenstronomy.ImSim.image2source_mapping import Image2SourceMapping
from lenstronomy.Util import util
import numpy as np
class TracerModelSource(Imag... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@ImSim@tracer_model.py@.PATH_END.py |
{
"filename": "_ticklabelstep.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_ticklabelstep.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self,
plotly_name="ticklabelstep",
parent_name="scattergeo.marker.colorbar",
**kwargs,
):
super(TicklabelstepValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@colorbar@_ticklabelstep.py@.PATH_END.py |
{
"filename": "SymTensor.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/Geometry/SymTensor.py",
"type": "Python"
} | from PYB11Generator import *
#-------------------------------------------------------------------------------
# SymTensor (rank 2) template
#-------------------------------------------------------------------------------
@PYB11template("ndim")
class SymTensor:
"Spheral geometric symmetric tensor (rank 2: %(ndim)sx... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Geometry@SymTensor.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/lightposition/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="z", parent_name="cone.lightposition", **kwargs):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@lightposition@_z.py@.PATH_END.py |
{
"filename": "painter.py",
"repo_name": "rainwoodman/gaepsi2",
"repo_path": "gaepsi2_extracted/gaepsi2-master/gaepsi2/painter.py",
"type": "Python"
} | from . import _painter
import sharedmem
import numpy
def paint(pos, sml, data, shape, mask=None, np=0):
""" Use SPH kernel to splat particles to an image.
Parameters
----------
pos : array_like
(..., >2) position of particles. Only two first
column is used. In device c... | rainwoodmanREPO_NAMEgaepsi2PATH_START.@gaepsi2_extracted@gaepsi2-master@gaepsi2@painter.py@.PATH_END.py |
{
"filename": "modern_treasury.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/document_loaders/modern_treasury.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import ModernTreasuryLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional i... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@document_loaders@modern_treasury.py@.PATH_END.py |
{
"filename": "_basic.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/fft/_basic.py",
"type": "Python"
} | from scipy._lib.uarray import generate_multimethod, Dispatchable
import numpy as np
def _x_replacer(args, kwargs, dispatchables):
"""
uarray argument replacer to replace the transform input array (``x``)
"""
if len(args) > 0:
return (dispatchables[0],) + args[1:], kwargs
kw = kwargs.copy()... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@fft@_basic.py@.PATH_END.py |
{
"filename": "test_model.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/arima/tests/test_model.py",
"type": "Python"
} | """
Tests for ARIMA model.
Tests are primarily limited to checking that the model is constructed correctly
and that it is calling the appropriate parameter estimators correctly. Tests of
correctness of parameter estimation routines are left to the individual
estimators' test functions.
Author: Chad Fulton
License: BS... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@arima@tests@test_model.py@.PATH_END.py |
{
"filename": "utility_functions.py",
"repo_name": "eogarvin/MLCCS",
"repo_path": "MLCCS_extracted/MLCCS-main/ml_spectroscopy/utility_functions.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 13 09:49:10 2021
@author: emily
"""
## LIBRARIES
import numpy as np
import pandas as pd
from PyAstronomy import pyasl
from math import sqrt
from scipy.stats import t
# My modules
from ml_spectroscopy.config import path_init
from ml_spectroscopy.crosscorrNorm import cro... | eogarvinREPO_NAMEMLCCSPATH_START.@MLCCS_extracted@MLCCS-main@ml_spectroscopy@utility_functions.py@.PATH_END.py |
{
"filename": "test_red_corr_metrics.ipynb",
"repo_name": "HERA-Team/hera_qm",
"repo_path": "hera_qm_extracted/hera_qm-main/hera_qm/scripts/test_red_corr_metrics.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib notebook
import numpy as np
from hera_cal import omni, utils
reload(utils)
import hera_qm.ant_metrics as ant_metrics
reload(ant_metrics)
from hera_cal.data import DATA_PATH
from hera_cal.redcal import get_pos_reds
import sys
from pyuvdata import UVData
```
```python
def red_corr_metrics(data, po... | HERA-TeamREPO_NAMEhera_qmPATH_START.@hera_qm_extracted@hera_qm-main@hera_qm@scripts@test_red_corr_metrics.ipynb@.PATH_END.py |
{
"filename": "baby_agi.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/cookbook/baby_agi.ipynb",
"type": "Jupyter Notebook"
} | # BabyAGI User Guide
This notebook demonstrates how to implement [BabyAGI](https://github.com/yoheinakajima/babyagi/tree/main) by [Yohei Nakajima](https://twitter.com/yoheinakajima). BabyAGI is an AI agent that can generate and pretend to execute tasks based on a given objective.
This guide will help you understand t... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@baby_agi.ipynb@.PATH_END.py |
{
"filename": "parser.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/rat/parser.py",
"type": "Python"
} | '''Code for parsing ROOT-style selector strings, as are used in TTree::Draw.'''
import operator
import itertools
def unpack_attributes(identifier):
'''Converts an identifier string into a list of attribute parts.
>>> unpack_attributes('mc.numPE')
['mc', 'numPE']
>>> unpack_attributes('mc.particle.pos.... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@rat@parser.py@.PATH_END.py |
{
"filename": "test_subhalo.py",
"repo_name": "Jammy2211/PyAutoLens",
"repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/lens/test_subhalo.py",
"type": "Python"
} | import autofit as af
import autolens as al
# def test__detection_array_from():
# samples_list = [
# [
# [
# af.mock.MockSamples(log_likelihood_list=[1.0]),
# af.mock.MockSamples(log_likelihood_list=[2.0]),
# ],
# [
# af.mo... | Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@lens@test_subhalo.py@.PATH_END.py |
{
"filename": "MultiplePlotAxes.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/MultiplePlotAxes.py",
"type": "Python"
} | """
Demonstrates a way to put multiple axes around a single plot.
(This will eventually become a built-in feature of PlotItem)
"""
import pyqtgraph as pg
pg.mkQApp()
pw = pg.PlotWidget()
pw.show()
pw.setWindowTitle('pyqtgraph example: MultiplePlotAxes')
p1 = pw.plotItem
p1.setLabels(left='axis 1')
## create a ne... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@MultiplePlotAxes.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "kimakan/FaintCOS",
"repo_path": "FaintCOS_extracted/FaintCOS-master/README.md",
"type": "Markdown"
} | FaintCOS: Improved background subtraction and co-adding code for CALCOS
Authors: Kirill Makan, Gabor Worseck
We used the following version of the software
- python 3.7.3 with astropy 4.0.1, scipy 1.3.1, numpy 1.17.3
- CALCOS 3.3.9
- GCC 7.4.0 (required for the calculation of the Feldman & Cousins uncertainties, se... | kimakanREPO_NAMEFaintCOSPATH_START.@FaintCOS_extracted@FaintCOS-master@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/astro/tests/__init__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2018-2020)
#
# This file is part of GWpy.
#
# GWpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@astro@tests@__init__.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/contours/y/project/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="z", parent_name="surface.contours.y.project", **kwargs
):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@contours@y@project@_z.py@.PATH_END.py |
{
"filename": "_gridcolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/caxis/_gridcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="gridcolor", parent_name="layout.ternary.caxis", **kwargs
):
super(GridcolorValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@caxis@_gridcolor.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/textfont/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="scattercarpet.textfont", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@textfont@_shadow.py@.PATH_END.py |
{
"filename": "7DT_Routine.py",
"repo_name": "SilverRon/gppy",
"repo_path": "gppy_extracted/gppy-main/7DT_Routine.py",
"type": "Python"
} | # %% [markdown]
# # IMSNG_Rougine.ipynb
# - Automatically Process the image data from GECKO facilities and search for transients in the subtracted images with `gpPy`
# - Author: Gregory S.H. Paek (23.04.24)
# %% [markdown]
# ## Library
# %%
from __future__ import print_function, division, absolute_import
import os, s... | SilverRonREPO_NAMEgppyPATH_START.@gppy_extracted@gppy-main@7DT_Routine.py@.PATH_END.py |
{
"filename": "timeline.py",
"repo_name": "subisarkar/JexoSim",
"repo_path": "JexoSim_extracted/JexoSim-master/jexosim/modules/timeline.py",
"type": "Python"
} | """
JexoSim
2.0
Timeline module
v1.0
"""
import numpy as np
from astropy import units as u
from jexosim.lib.jexosim_lib import jexosim_msg
def run(opt):
planet = opt.planet
opt.T14 = planet.T14
opt.time_at_transit = opt.T14*(0.5+ opt.observation.obs_frac_t14_pre_transit.val )
opt.frame_time =... | subisarkarREPO_NAMEJexoSimPATH_START.@JexoSim_extracted@JexoSim-master@jexosim@modules@timeline.py@.PATH_END.py |
{
"filename": "add_linsys_par.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/mock_tools/add_linsys_par.py",
"type": "Python"
} | #standard python
import sys
import os
import shutil
import unittest
from datetime import datetime
import json
import numpy as np
import fitsio
import glob
import argparse
from astropy.table import Table,join,unique,vstack
from matplotlib import pyplot as plt
import LSS.main.cattools as ct
import LSS.common_tools as com... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@mock_tools@add_linsys_par.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/shape/label/font/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="layout.shape.label.font", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@shape@label@font@_variant.py@.PATH_END.py |
{
"filename": "lightcones.py",
"repo_name": "21cmfast/21cmFAST",
"repo_path": "21cmFAST_extracted/21cmFAST-master/src/py21cmfast/lightcones.py",
"type": "Python"
} | """A module for classes that create lightcone slices from Coeval objects."""
from __future__ import annotations
import attr
import numpy as np
from abc import ABC, abstractmethod
from astropy.cosmology import FLRW, z_at_value
from astropy.units import MHz, Mpc, Quantity, pixel, pixel_scale
from cosmotile import (
... | 21cmfastREPO_NAME21cmFASTPATH_START.@21cmFAST_extracted@21cmFAST-master@src@py21cmfast@lightcones.py@.PATH_END.py |
{
"filename": "T04CompareModels.py",
"repo_name": "nu-radio/NuRadioMC",
"repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/SignalGen/tests/T04CompareModels.py",
"type": "Python"
} | import NuRadioMC.SignalGen.askaryan as ask
from NuRadioReco.utilities import units
import numpy as np
import matplotlib.pyplot as plt
from radiotools import plthelpers as php
import logging
logging.basicConfig(level=logging.INFO)
interp_factor = 20
# HAD for different viewing angles
E = 1 * units.EeV
shower_type = "HA... | nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@SignalGen@tests@T04CompareModels.py@.PATH_END.py |
{
"filename": "io_names_client.py",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/qa/L0_libtorch_io_names/io_names_client.py",
"type": "Python"
} | #!/usr/bin/python
# Copyright 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# n... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_libtorch_io_names@io_names_client.py@.PATH_END.py |
{
"filename": "smooth_cal_inspect_2458086.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458086.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Calibration Smoothing Nightly Notebook
**Josh Dillon**, Last Revised 12/4/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal, abscal, utils
from hera_cal.smooth_cal import build_time_blacklist
from hera_qm.metrics_io import load_metr... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458086.ipynb@.PATH_END.py |
{
"filename": "test_rc.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/plot/tests/test_rc.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Cardiff University (2018-2021)
#
# This file is part of GWpy.
#
# GWpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@plot@tests@test_rc.py@.PATH_END.py |
{
"filename": "lumfn.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/lumfn.py",
"type": "Python"
} | import fitsio
import subprocess
import astropy.io.fits as fits
import numpy as np
from astropy.table import Table
from cosmo import volcom
def multifield_lumfn(lumfn_list, ext=None, weight=None):
if ext is None:
tables = [Table.read(x) for x in lumfn_list]
else:
... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@lumfn.py@.PATH_END.py |
{
"filename": "hdf5_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/tests/hdf5_test.py",
"type": "Python"
} | from pathlib import Path
import fsspec.implementations.memory
from dask.utils import tmpdir
import vaex
from vaex.dataframe import DataFrameLocal
DATA_PATH = Path(__file__).parent / 'data'
def test_hdf5_with_alias(tmpdir):
df = vaex.from_dict({'X-1': [1], '#': [2]})
path = DATA_PATH / 'with_alias.hdf5'
... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@hdf5_test.py@.PATH_END.py |
{
"filename": "_ohlc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/template/data/_ohlc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OhlcValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="ohlc", parent_name="layout.template.data", **kwargs
):
super(OhlcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@template@data@_ohlc.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="choropleth.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
{
"filename": "conservative_viscosity_update.md",
"repo_name": "rometsch/fargocpt",
"repo_path": "fargocpt_extracted/fargocpt-master/docs_source/source/Numerics/conservative_viscosity_update.md",
"type": "Markdown"
} | # Conservative form
Baruteau 2008 writes the viscosity updates as:
## Radial velocity
$\frac{\partial \Sigma v_r}{\partial \mathrm{d}t} = \frac{1}{r}[\frac{\partial (r \tau_{rr})}{\partial r} + \frac{\partial (\tau_{r\varphi})}{\partial \varphi} - \tau_{\varphi \varphi}]$
Looking at the $r$ part, the non-cons... | rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@docs_source@source@Numerics@conservative_viscosity_update.md@.PATH_END.py |
{
"filename": "_svds_doc.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/_eigen/_svds_doc.py",
"type": "Python"
} | def _svds_arpack_doc(A, k=6, ncv=None, tol=0, which='LM', v0=None,
maxiter=None, return_singular_vectors=True,
solver='arpack', rng=None):
"""
Partial singular value decomposition of a sparse matrix using ARPACK.
Compute the largest or smallest `k` singular values ... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@_eigen@_svds_doc.py@.PATH_END.py |
{
"filename": "reconstruction_bump.ipynb",
"repo_name": "Magritte-code/pomme",
"repo_path": "pomme_extracted/pomme-main/docs/src/examples/spherical/reconstruction_bump.ipynb",
"type": "Jupyter Notebook"
} | # Reconstruction - spherical model
---
```python
import matplotlib.pyplot as plt
import numpy as np
import torch
import copy
from astropy import units, constants
from pomme.model import TensorModel, SphericalModel
from pomme.loss import Loss, diff_loss
from pomme.plot import plot_cube_2D
from pomme... | Magritte-codeREPO_NAMEpommePATH_START.@pomme_extracted@pomme-main@docs@src@examples@spherical@reconstruction_bump.ipynb@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/athena/io.py",
"type": "Python"
} | import numpy as np
from yt.funcs import mylog
from yt.utilities.io_handler import BaseIOHandler
from .data_structures import chk23
float_size = {"float": np.dtype(">f4").itemsize, "double": np.dtype(">f8").itemsize}
axis_list = ["_x", "_y", "_z"]
class IOHandlerAthena(BaseIOHandler):
_dataset_type = "athena"
... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@athena@io.py@.PATH_END.py |
{
"filename": "microlensing_compare.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/run_comparison/microlensing_compare.py",
"type": "Python"
} | import glob
import os
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import rubin_sim.maf.db as db
import rubin_sim.maf.metric_bundles as metricBundles
def microlensing_fom(
save_folder,
result_db_path,
metric_data_path,
figsize=None,
figure_name="microlensing_fom",
):
... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@run_comparison@microlensing_compare.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "lsst-ts/ts_wep",
"repo_path": "ts_wep_extracted/ts_wep-main/doc/conf.py",
"type": "Python"
} | """Sphinx configuration file for an LSST stack package.
This configuration only affects single-package Sphinx documentation builds.
"""
import lsst.ts.wep
from documenteer.conf.pipelinespkg import *
project = "ts_wep"
html_theme_options["logotext"] = project
html_title = project
html_short_title = project
doxylink =... | lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@doc@conf.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "bek0s/gbkfit",
"repo_path": "gbkfit_extracted/gbkfit-master/docs/source/conf.py",
"type": "Python"
} | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | bek0sREPO_NAMEgbkfitPATH_START.@gbkfit_extracted@gbkfit-master@docs@source@conf.py@.PATH_END.py |
{
"filename": "realtransforms.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/fftpack/realtransforms.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.fftpack` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = [ # noqa: F822
'dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn'
]
def... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@fftpack@realtransforms.py@.PATH_END.py |
{
"filename": "_dy.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_dy.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DyValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="dy", parent_name="box", **kwargs):
super(DyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_dy.py@.PATH_END.py |
{
"filename": "computeOccurrence_totalReliability-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaselineSC0p9/.ipynb_checkpoints/computeOccurrence_totalReliability-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import requests
import pandas as pd
from astropy.io import fits
from cStringIO import StringIO
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gamma
from scipy.optimize import minimize
from scipy.interpolate import RectBivariateSpline
import emcee
import corner
import scip... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaselineSC0p9@.ipynb_checkpoints@computeOccurrence_totalReliability-checkpoint.ipynb@.PATH_END.py |
{
"filename": "test_pipelines.py",
"repo_name": "lsst/cp_verify",
"repo_path": "cp_verify_extracted/cp_verify-main/tests/test_pipelines.py",
"type": "Python"
} | #!/usr/bin/env python
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation... | lsstREPO_NAMEcp_verifyPATH_START.@cp_verify_extracted@cp_verify-main@tests@test_pipelines.py@.PATH_END.py |
{
"filename": "run_pipelines.py",
"repo_name": "ucberkeleyseti/turbo_seti",
"repo_path": "turbo_seti_extracted/turbo_seti-master/turbo_seti/find_event/run_pipelines.py",
"type": "Python"
} | """
Main program module for executable plotSETI.
Facilitates the automation of 2 large functions:
find_event_pipline()
plot_event_pipline()
"""
import sys
import os
import glob
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import matplotlib
from blimpy import __version__ as BLIMPY_VERSION
f... | ucberkeleysetiREPO_NAMEturbo_setiPATH_START.@turbo_seti_extracted@turbo_seti-master@turbo_seti@find_event@run_pipelines.py@.PATH_END.py |
{
"filename": "installation.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/installation.md",
"type": "Markdown"
} | # Installation
Component-specific information:
- [{{ python-package }} installation](python-installation.md)
- [{{ catboost-spark }} installation](spark-installation.md)
- [{{ r-package }} installation](r-installation.md)
- [Command-line version binary](cli-installation.md)
[Build from source](build-from-source.md)
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@installation.md@.PATH_END.py |
{
"filename": "index.md",
"repo_name": "Schwarzam/splusdata",
"repo_path": "splusdata_extracted/splusdata-master/docs/index.md",
"type": "Markdown"
} | This site contains the project documentation for the
`splusdata` package, that is a python package created to get S-PLUS data.
More info at [splus.cloud](https://splus.cloud).
## Table Of Contents
1. [Examples](examples.md)
2. [Main Usage](splusdata.md)
Quickly find what you're looking for depending on
your use ca... | SchwarzamREPO_NAMEsplusdataPATH_START.@splusdata_extracted@splusdata-master@docs@index.md@.PATH_END.py |
{
"filename": "_ypad.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/colorbar/_ypad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="ypad", parent_name="treemap.marker.colorbar", **kwargs
):
super(YpadValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@colorbar@_ypad.py@.PATH_END.py |
{
"filename": "_k.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/mesh3d/_k.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class KValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="k", parent_name="mesh3d", **kwargs):
super(KValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwar... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@mesh3d@_k.py@.PATH_END.py |
{
"filename": "catboost.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/packages/vaex-ml/vaex/ml/catboost.py",
"type": "Python"
} | import base64
import tempfile
import traitlets
import vaex
import vaex.serialize
from . import state
from . import generate
import numpy as np
import catboost
@vaex.serialize.register
@generate.register
class CatBoostModel(state.HasState):
'''The CatBoost algorithm.
This class provides an interface to the ... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ml@vaex@ml@catboost.py@.PATH_END.py |
{
"filename": "Components.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/GalfitModule/Classes/Components.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
import sys
from os.path import join as pj
from os.path import exists
import subprocess
from copy import deepcopy
from IPython import get_ipython
from astropy.io import fits
import warnings
import pandas as pd
import numpy as np
# In[2]:
# For debugging pu... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@GalfitModule@Classes@Components.py@.PATH_END.py |
{
"filename": "settings_tutorial.py",
"repo_name": "ageller/firefly",
"repo_path": "firefly_extracted/firefly-main/src/firefly/ntbks/py_conversions/settings_tutorial.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# `firefly/ntbks/settings_tutorial.ipynb`
# In[1]:
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
from IPython.display import YouTubeVideo
# A recording of this jupyter notebook in action is available at:
# In[2]:
You... | agellerREPO_NAMEfireflyPATH_START.@firefly_extracted@firefly-main@src@firefly@ntbks@py_conversions@settings_tutorial.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatter/_legendgrouptitle.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Legendgrouptitle(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter"
_path_str = "scatter.legendgrouptitle"
_valid_props = {"font", "text"}
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "fgmc_functions.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/pycbc/population/fgmc_functions.py",
"type": "Python"
} | # Copyright (C) 2021 Thomas Dent
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
"""
A set of helper functions for ev... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@population@fgmc_functions.py@.PATH_END.py |
{
"filename": "ephemeris.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/twins/ephemeris.py",
"type": "Python"
} | from .load import load
# This routine was moved out of __init__.py. Please see that file for previous revision history.
def ephemeris(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='or',
prefix='',
suffix='',
get_support_data=False,
varformat=None,
... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@twins@ephemeris.py@.PATH_END.py |
{
"filename": "_internals.py",
"repo_name": "peppedilillo/mescal",
"repo_path": "mescal_extracted/mescal-main/source/cli/beaupy/_internals.py",
"type": "Python"
} | """
Copyright (c) 2022 Peter Vyboch
Copyright (c) 2018 Hans Schülein
Code from userpetereon@github's Beaupy (thanks).
https://github.com/petereon/beaupy
A copy of the license file has been attached in the `licenses' folder.
Introduced small changes to allow passing of console object and redistribution.
~Peppe
----
... | peppedililloREPO_NAMEmescalPATH_START.@mescal_extracted@mescal-main@source@cli@beaupy@_internals.py@.PATH_END.py |
{
"filename": "test_util.py",
"repo_name": "tomasstolker/species",
"repo_path": "species_extracted/species-main/species/util/test_util.py",
"type": "Python"
} | """
Utility functions for running the unit tests.
"""
import os
def create_config(test_path):
"""
Function for creating a configuration file in the test folder.
Parameters
----------
test_path : str
Folder where the unit tests are located.
Returns
-------
NoneType
No... | tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@util@test_util.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/README.md",
"type": "Markdown"
} | # The yt Project
[](https://pypi.org/project/yt)
[](https://pypi.org/project/yt/)
[](http://yt-project.org/docs/dev/)
[![Users... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@README.md@.PATH_END.py |
{
"filename": "_ticklabelposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/_ticklabelposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticklabelposition", parent_name="surface.colorbar", **kwargs
):
super(TicklabelpositionValidator, self).__init__(
plotly_name=plo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@_ticklabelposition.py@.PATH_END.py |
{
"filename": "tools.py",
"repo_name": "geodynamics/burnman",
"repo_path": "burnman_extracted/burnman-main/contrib/anisotropic_eos/tools.py",
"type": "Python"
} | import numpy as np
from tabulate import tabulate
def print_table_for_mineral_constants(mineral, indices):
constants = []
for i, j in indices:
constants.append(mineral.anisotropic_params["c"][i - 1, j - 1, :, :])
constants = np.array(constants)
mn_pairs = []
for n in range(constants.shape... | geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@contrib@anisotropic_eos@tools.py@.PATH_END.py |
{
"filename": "_spikecolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/_spikecolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="spikecolor", parent_name="layout.yaxis", **kwargs):
super(SpikecolorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@_spikecolor.py@.PATH_END.py |
{
"filename": "rfs.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/psp/rfs.py",
"type": "Python"
} | import cdflib
def rfs_variables_to_load(files):
"""
This function finds a list of variables to load
from the RFS files (essentially the same behavior
as the IDL code).
"""
out = []
if len(files) == 0:
return []
# the variables should be the same across all files
file = file... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@psp@rfs.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.