metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "lensing.ipynb", "repo_name": "glass-dev/glass", "repo_path": "glass_extracted/glass-main/examples/1-basic/lensing.ipynb", "type": "Jupyter Notebook" }
# Weak lensing This example computes weak lensing maps (convergence and shear) for a redshift distribution of sources. The lensing is simulated by a line of sight integration of the matter fields. ## Setup Simulate the matter fields, and use them to iteratively compute the lensing fields. To obtain the effective in...
glass-devREPO_NAMEglassPATH_START.@glass_extracted@glass-main@examples@1-basic@lensing.ipynb@.PATH_END.py
{ "filename": "_outlinewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/colorbar/_outlinewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="contour.colorbar", **kwargs ): super(OutlinewidthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@colorbar@_outlinewidth.py@.PATH_END.py
{ "filename": "test_optimal_extraction.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/tests/regression/test_optimal_extraction.py", "type": "Python" }
import pytest from dotenv import load_dotenv from astropy.io import fits import numpy as np from modules.spectral_extraction.src.alg import SpectralExtractionAlg import configparser import os load_dotenv() result_data = os.getenv('KPFPIPE_TEST_DATA') + '/optimal_extraction_test/for_pytest/paras_' # result_data = '/Use...
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@tests@regression@test_optimal_extraction.py@.PATH_END.py
{ "filename": "svar_model.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/vector_ar/svar_model.py", "type": "Python" }
""" Vector Autoregression (VAR) processes References ---------- Lütkepohl (2005) New Introduction to Multiple Time Series Analysis """ import numpy as np import numpy.linalg as npl from numpy.linalg import slogdet from statsmodels.tools.decorators import deprecated_alias from statsmodels.tools.numdiff import approx_f...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@vector_ar@svar_model.py@.PATH_END.py
{ "filename": "command.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-core/py3/jupyter_core/command.py", "type": "Python" }
# PYTHON_ARGCOMPLETE_OK """The root `jupyter` command. This does nothing other than dispatch to subcommands or output path info. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import annotations import argparse import errno import json import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-core@py3@jupyter_core@command.py@.PATH_END.py
{ "filename": "hla_flag_filter.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/haputils/hla_flag_filter.py", "type": "Python" }
#!/usr/bin/env python # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 ai : """Identify and flag sources as either stellar sources, extended sources or anomalous sources Anomalous sources fall into several categories: - Saturated sources: the pixel values in the cores of these sources are maxed out at the detect...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@haputils@hla_flag_filter.py@.PATH_END.py
{ "filename": "exvar.py", "repo_name": "StingraySoftware/HENDRICS", "repo_path": "HENDRICS_extracted/HENDRICS-main/hendrics/exvar.py", "type": "Python" }
"""Created on Thu Aug 17 08:55:47 2017. @author: marta """ from stingray.utils import excess_variance from astropy import log from .base import hen_root from .io import load_lcurve, save_as_qdp def fvar(lc): return excess_variance(lc, normalization="fvar") def excvar_none(lc): return excess_variance(lc,...
StingraySoftwareREPO_NAMEHENDRICSPATH_START.@HENDRICS_extracted@HENDRICS-main@hendrics@exvar.py@.PATH_END.py
{ "filename": "_compat.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/setuptools/_vendor/packaging/_compat.py", "type": "Python" }
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import sys PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@setuptools@_vendor@packaging@_compat.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "jmd-dk/concept", "repo_path": "concept_extracted/concept-master/README.md", "type": "Markdown" }
## CO*N*CEPT <img align="right" src="https://github.com/jmd-dk/concept/workflows/build/badge.svg"/> &nbsp; <a href="https://github.com/jmd-dk/concept/tree/v1.0.1/">:rocket:</a> &nbsp; <a href="https://github.com/jmd-dk/concept/tree/v1.0.1/">Latest release: 1.0.1</a> \ &nbsp; <a href="https://jmd-dk.github.io/concept...
jmd-dkREPO_NAMEconceptPATH_START.@concept_extracted@concept-master@README.md@.PATH_END.py
{ "filename": "analysis.ipynb", "repo_name": "tanner-trickle/EXCEED-DM", "repo_path": "EXCEED-DM_extracted/EXCEED-DM-main/examples/5/analysis.ipynb", "type": "Jupyter Notebook" }
# Example 5 Analysis We will plot the rate binned in energy deposition, showing that it reproduces the sum of examples 1-4 in a single calculation. ## Packages ```python import numpy as np # some personal preferences for nice plots %run "../../utilities/output_parser/plotter.ipynb" # helpful functions for process...
tanner-trickleREPO_NAMEEXCEED-DMPATH_START.@EXCEED-DM_extracted@EXCEED-DM-main@examples@5@analysis.ipynb@.PATH_END.py
{ "filename": "utils.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/setuptools/_vendor/packaging/utils.py", "type": "Python" }
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import re from .version import InvalidVersion, Version _canonicalize_re...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@setuptools@_vendor@packaging@utils.py@.PATH_END.py
{ "filename": "test_layers.py", "repo_name": "legacysurvey/imagine", "repo_path": "imagine_extracted/imagine-main/map/test_layers.py", "type": "Python" }
test_layers = [] test_cats = [] test_ccds = [] test_layers.append(('ibis-color', "IBIS color (HSC)")) test_layers.append(('ibis-color-ls', "IBIS color (LS)")) test_layers.append(('ibis-m411', "IBIS M411")) test_layers.append(('ibis-m464', "IBIS M464")) test_layers.append(('cfht-cosmos-cahk', "CFHT CaH+K images")) te...
legacysurveyREPO_NAMEimaginePATH_START.@imagine_extracted@imagine-main@map@test_layers.py@.PATH_END.py
{ "filename": "_labelformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/contours/_labelformat.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="labelformat", parent_name="contourcarpet.contours", **kwargs ): super(LabelformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@contours@_labelformat.py@.PATH_END.py
{ "filename": "all_outputs.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/outputs/all_outputs.py", "type": "Python" }
# Regression test for all output types # # Runs Orszag Tang vortex test, restarting the job twice and making history (hst), # formatted table (.tab), VTK, and HDF5 (if available) outputs. Then reads last # version of each file to make sure output data is correct # Modules import logging import numpy as np import sys ...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@outputs@all_outputs.py@.PATH_END.py
{ "filename": "test_isna.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_isna.py", "type": "Python" }
""" We also test Series.notna in this file. """ import numpy as np from pandas import ( Period, Series, ) import pandas._testing as tm class TestIsna: def test_isna_period_dtype(self): # GH#13737 ser = Series([Period("2011-01", freq="M"), Period("NaT", freq="M")]) expected = Ser...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_isna.py@.PATH_END.py
{ "filename": "cli__logging-level__intro.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/cli__logging-level__intro.md", "type": "Markdown" }
The logging level to output to stdout.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@cli__logging-level__intro.md@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattercarpet.marker.colorbar", **kwargs, ): super(BorderwidthValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@marker@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "catalog.py", "repo_name": "snad-space/ztf-viewer", "repo_path": "ztf-viewer_extracted/ztf-viewer-master/ztf_viewer/catalogs/snad/catalog.py", "type": "Python" }
import email.utils import importlib.resources from datetime import datetime, timedelta from io import BytesIO import requests from astropy.coordinates import Angle, SkyCoord from astropy.io import ascii from ztf_viewer.catalogs.snad import data from ztf_viewer.exceptions import NotFound class _SnadCatalog: url ...
snad-spaceREPO_NAMEztf-viewerPATH_START.@ztf-viewer_extracted@ztf-viewer-master@ztf_viewer@catalogs@snad@catalog.py@.PATH_END.py
{ "filename": "_lataxis.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Lataxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.lataxis" _valid_props = { "dtick", "...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@geo@_lataxis.py@.PATH_END.py
{ "filename": "example_GridSelection_for_HSC.ipynb", "repo_name": "LSSTDESC/rail", "repo_path": "rail_extracted/rail-main/examples/creation_examples/example_GridSelection_for_HSC.ipynb", "type": "Jupyter Notebook" }
# GridSelection Degrader to Emulate HSC Training Samples last run successfully: April 26, 2023 The GridSelection degrader can be used to model the spectroscopic success rates in training sets based on real data. Given a 2-dimensional grid of spec-z success ratio as a function of two variables (often magnitude or col...
LSSTDESCREPO_NAMErailPATH_START.@rail_extracted@rail-main@examples@creation_examples@example_GridSelection_for_HSC.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/instrument/__init__.py", "type": "Python" }
from .atmosphere import get_atmosphere_profile_functions from .camera import CameraDescription, CameraGeometry, CameraReadout, PixelShape from .guess import guess_telescope from .optics import FocalLengthKind, OpticsDescription, ReflectorShape, SizeType from .subarray import SubarrayDescription, UnknownTelescopeID from...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@instrument@__init__.py@.PATH_END.py
{ "filename": "zeros.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/optimize/zeros.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import warnings from collections import namedtuple from . import _zeros import numpy as np _iter = 100 _xtol = 2e-12 _rtol = 4 * np.finfo(float).eps __all__ = ['newton', 'bisect', 'ridder', 'brentq', 'brenth', 'toms748', 'RootResults'] _ECONVERGED = ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@optimize@zeros.py@.PATH_END.py
{ "filename": "check_wavelength_reduction.py", "repo_name": "grzeimann/Panacea", "repo_path": "Panacea_extracted/Panacea-master/check_wavelength_reduction.py", "type": "Python" }
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Feb 4 08:43:49 2019 @author: gregz """ import glob import numpy as np import sys import os.path as op from astropy.io import fits from astropy.table import Table from bokeh.layouts import column from bokeh.models import ColumnDataSource, RangeTool fr...
grzeimannREPO_NAMEPanaceaPATH_START.@Panacea_extracted@Panacea-master@check_wavelength_reduction.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="ohlc.stream", **kwargs): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@stream@_maxpoints.py@.PATH_END.py
{ "filename": "_ticktext.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/caxis/_ticktext.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.ternary.caxis", **kwargs ): super(TicktextValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@caxis@_ticktext.py@.PATH_END.py
{ "filename": "_gb.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py3/sklearn/ensemble/_gb.py", "type": "Python" }
"""Gradient Boosted Regression Trees. This module contains methods for fitting gradient boosted regression trees for both classification and regression. The module structure is the following: - The ``BaseGradientBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regressi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py3@sklearn@ensemble@_gb.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/colorbar/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="y", parent_name="histogram2d.colorbar", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@colorbar@_y.py@.PATH_END.py
{ "filename": "Hydrostatic-1d.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Hydro/RayleighTaylor/Hydrostatic-1d.py", "type": "Python" }
#------------------------------------------------------------------------------- # This is a test of maintaining hydrostatic equilibrium with constant boundaries, # akin to how we handle the Rayleigh-Taylor problem. #------------------------------------------------------------------------------- import shutil from math...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Hydro@RayleighTaylor@Hydrostatic-1d.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/PyYAML/py2/yaml/__init__.py", "type": "Python" }
from error import * from tokens import * from events import * from nodes import * from loader import * from dumper import * __version__ = '5.4.1' try: from cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False #------------------------------------------------------------...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@PyYAML@py2@yaml@__init__.py@.PATH_END.py
{ "filename": "_dx.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_dx.py", "type": "Python" }
import _plotly_utils.basevalidators class DxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="dx", parent_name="box", **kwargs): super(DxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs....
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_dx.py@.PATH_END.py
{ "filename": "residuals.py", "repo_name": "scottransom/presto", "repo_path": "presto_extracted/presto-master/python/presto/residuals.py", "type": "Python" }
from builtins import range from builtins import object import struct import numpy as Num # # From the TEMPO Documentation: # # The file resid2.tmp contains residuals, etc. in inary format. # Each record contains eight real*8 values: # --TOA (MJD, referenced to solar system barycenter) # --Postfit residu...
scottransomREPO_NAMEprestoPATH_START.@presto_extracted@presto-master@python@presto@residuals.py@.PATH_END.py
{ "filename": "units.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/units.py", "type": "Python" }
"""Define custom AstroPy units commonly used by the Kepler/TESS community.""" from astropy import units as u __all__ = ["ppt", "ppm"] ppt = u.def_unit(["ppt", "parts per thousand"], u.Unit(1e-3)) ppm = u.def_unit(["ppm", "parts per million"], u.Unit(1e-6)) u.add_enabled_units([ppt, ppm])
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@units.py@.PATH_END.py
{ "filename": "container_instance.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-azure/prefect_azure/workers/container_instance.py", "type": "Python" }
""" Module containing the Azure Container Instances worker used for executing flow runs in ACI containers. To start an ACI worker, run the following command: ```bash prefect worker start --pool 'my-work-pool' --type azure-container-instance ``` Replace `my-work-pool` with the name of the work pool you want the worke...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-azure@prefect_azure@workers@container_instance.py@.PATH_END.py
{ "filename": "objects.Plot.theme.ipynb", "repo_name": "mwaskom/seaborn", "repo_path": "seaborn_extracted/seaborn-master/doc/_docstrings/objects.Plot.theme.ipynb", "type": "Jupyter Notebook" }
```python import seaborn.objects as so from seaborn import load_dataset anscombe = load_dataset("anscombe") ``` The default theme uses the same parameters as :func:`seaborn.set_theme` with no additional arguments: ```python p = ( so.Plot(anscombe, "x", "y", color="dataset") .facet("dataset", wrap=2) .add(s...
mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@doc@_docstrings@objects.Plot.theme.ipynb@.PATH_END.py
{ "filename": "ellipsoids.py", "repo_name": "cvxopt/cvxopt", "repo_path": "cvxopt_extracted/cvxopt-master/examples/book/chap8/ellipsoids.py", "type": "Python" }
# Figures 8.3 and 8.4, pages 412 and 416. # Ellipsoidal approximations. from math import log, pi from cvxopt import blas, lapack, solvers, matrix, sqrt, mul, cos, sin #solvers.options['show_progress'] = False try: import pylab except ImportError: pylab_installed = False else: pylab_installed = True # Extreme points ...
cvxoptREPO_NAMEcvxoptPATH_START.@cvxopt_extracted@cvxopt-master@examples@book@chap8@ellipsoids.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/pallas/utils.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@pallas@utils.py@.PATH_END.py
{ "filename": "func.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/colocated_python/func.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...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@colocated_python@func.py@.PATH_END.py
{ "filename": "refCatalogInterface.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/python/lsst/ts/wep/task/refCatalogInterface.py", "type": "Python" }
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@python@lsst@ts@wep@task@refCatalogInterface.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/astro/darkmatter/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Dark matter spatial and spectral models.""" from gammapy.modeling.models import SPECTRAL_MODEL_REGISTRY from .profiles import ( BurkertProfile, DMProfile, EinastoProfile, IsothermalProfile, MooreProfile, NFWProfile, ZhaoProfi...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@astro@darkmatter@__init__.py@.PATH_END.py
{ "filename": "item_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/grappler/item_test.py", "type": "Python" }
# Copyright 2017 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@grappler@item_test.py@.PATH_END.py
{ "filename": "make_fibersim_summary.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/scripts/make_fibersim_summary.py", "type": "Python" }
import numpy as np import os tracers = ['QSO'] for tp in tracers: path = "/global/cfs/cdirs/desi/users/akrolew/summary/"+tp + "/" #path of text files concatenated_text = '' for file_name in os.listdir(path): if file_name.endswith('.txt'): if os.path.getmtime(os.path.join(path, file_name...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@make_fibersim_summary.py@.PATH_END.py
{ "filename": "06a. Hidden Set Results (one-vs-rest).ipynb", "repo_name": "sidchaini/LightCurveDistanceClassification", "repo_path": "LightCurveDistanceClassification_extracted/LightCurveDistanceClassification-main/notebooks/06. Hidden Set Results/06a. Hidden Set Results (one-vs-rest).ipynb", "type": "Jupyter N...
### 0. Prereqs ```python import numpy as np import pandas as pd from tqdm.auto import tqdm import matplotlib.pyplot as plt import seaborn as sns from mlxtend.feature_selection import ( SequentialFeatureSelector, ) from mlxtend.evaluate import feature_importance_permutation from mlxtend.plotting import plot_sequen...
sidchainiREPO_NAMELightCurveDistanceClassificationPATH_START.@LightCurveDistanceClassification_extracted@LightCurveDistanceClassification-main@notebooks@06. Hidden Set Results@06a. Hidden Set Results (one-vs-rest).ipynb@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/textfont/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="icicle.textfont", **kwargs): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@textfont@_sizesrc.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/hoverlabel/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.hoverlabel.font", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@hoverlabel@font@_textcase.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/geo/domain/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.geo.domain", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@geo@domain@_x.py@.PATH_END.py
{ "filename": "_map.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/_map.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Map(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.map" _valid_props = { "bearing", "bounds", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@_map.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattermapbox.marker", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@_colorscale.py@.PATH_END.py
{ "filename": "_selected.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatter/_selected.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter" _path_str = "scatter.selected" _valid_props = {"marker", "textfont"} # marke...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatter@_selected.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/mapbox/layer/symbol/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._textposition import TextpositionValidator from ._textfont import TextfontValidator from ._text import TextValidator from ._placement import PlacementValidator from ._iconsize import IconsizeValidator ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@mapbox@layer@symbol@__init__.py@.PATH_END.py
{ "filename": "lookup_ops.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/experimental/ops/lookup_ops.py", "type": "Python" }
# Copyright 2017 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@data@experimental@ops@lookup_ops.py@.PATH_END.py
{ "filename": "test_constitutional_ai.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/chains/test_constitutional_ai.py", "type": "Python" }
"""Unit tests for the Constitutional AI chain.""" from langchain.chains.constitutional_ai.base import ConstitutionalChain TEXT_ONE = """ This text is bad. Revision request: Make it better. Revision:""" TEXT_TWO = """ This text is bad.\n\n""" TEXT_THREE = """ This text is bad. Revision request: Make it better. R...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@chains@test_constitutional_ai.py@.PATH_END.py
{ "filename": "FindFile.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/Kit/acsutilpy/src/AcsutilPy/FindFile.py", "type": "Python" }
# @(#) $Id: FindFile.py,v 1.6 2009/10/27 11:04:21 agrimstrup Exp $ # # ALMA - Atacama Large Millimiter Array # (c) Associated Universities, Inc. Washington DC, USA, 2001 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All righ...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@Kit@acsutilpy@src@AcsutilPy@FindFile.py@.PATH_END.py
{ "filename": "creategrids.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/sed/creategrids.py", "type": "Python" }
""" Create photometric and spectral grid. It is possible to run this module from the terminal, e.g., to generate a limb darkening grid. All input is automatically processed, so there are a few tweaks you need to take into account when supplying parameters. Some of them are explained in the L{ivs.aux.argkwargparser} mo...
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@sed@creategrids.py@.PATH_END.py
{ "filename": "misc.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/utils/misc.py", "type": "Python" }
import queue import string from functools import partial, reduce from echo.callback_container import CallbackContainer __all__ = ['DeferredMethod', 'nonpartial', 'lookup_class', 'as_variable_name', 'as_list', 'file_format', 'CallbackMixin', 'PropertySetMixin', 'Pointer', 'common_prefix', 'queue...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@utils@misc.py@.PATH_END.py
{ "filename": "tpu_embedding_v2_invalid_input_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tests/tpu_embedding_v2_invalid_input_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@tpu@tests@tpu_embedding_v2_invalid_input_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "brinckmann/montepython_public", "repo_path": "montepython_public_extracted/montepython_public-master/montepython/likelihoods/Planck_highl_TT/__init__.py", "type": "Python" }
from montepython.likelihood_class import Likelihood_clik class Planck_highl_TT(Likelihood_clik): pass
brinckmannREPO_NAMEmontepython_publicPATH_START.@montepython_public_extracted@montepython_public-master@montepython@likelihoods@Planck_highl_TT@__init__.py@.PATH_END.py
{ "filename": "compression_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/experimental/kernel_tests/compression_ops_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@data@experimental@kernel_tests@compression_ops_test.py@.PATH_END.py
{ "filename": "xata.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/vectorstores/xata.ipynb", "type": "Jupyter Notebook" }
# Xata > [Xata](https://xata.io) is a serverless data platform, based on PostgreSQL. It provides a Python SDK for interacting with your database, and a UI for managing your data. > Xata has a native vector type, which can be added to any table, and supports similarity search. LangChain inserts vectors directly to Xata...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@vectorstores@xata.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/python/openai/README.md", "type": "Markdown" }
<!-- # Copyright (c) 2024, NVIDIA CORPORATION. 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 # notice, this list of conditi...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@python@openai@README.md@.PATH_END.py
{ "filename": "json_to_kafka.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/utility/DP03/json_to_kafka.py", "type": "Python" }
import os, sys, json, io, gzip import fastavro from confluent_kafka import Producer, KafkaError if __name__ == '__main__': if len(sys.argv) >= 3: datadir = sys.argv[1] topic = sys.argv[2] else: print('Usage: json_to_kafka.py <dataset> <topic>') sys.exit() # schemafile = 'd...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@utility@DP03@json_to_kafka.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@hoverlabel@font@_familysrc.py@.PATH_END.py
{ "filename": "test_neutrino_scanner.py", "repo_name": "desy-multimessenger/nuztf", "repo_path": "nuztf_extracted/nuztf-main/tests/test_neutrino_scanner.py", "type": "Python" }
import logging import unittest import numpy as np from astropy.coordinates import Distance from astropy.time import Time from nuztf.ampel_api import ampel_api_catalog from nuztf.base_scanner import cosmo from nuztf.cat_match import query_ned_for_z from nuztf.neutrino_scanner import NeutrinoScanner class TestNeutrin...
desy-multimessengerREPO_NAMEnuztfPATH_START.@nuztf_extracted@nuztf-main@tests@test_neutrino_scanner.py@.PATH_END.py
{ "filename": "_texttemplate.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/_texttemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scattermapbox", **kwargs ): super(TexttemplateValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@_texttemplate.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="volume.colorbar", **kwargs ): super(BorderwidthValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "ddp_limits.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/ddp_limits.py", "type": "Python" }
import os import sys import argparse import numpy as np import matplotlib.pyplot as plt import cosmo as cosmo import astropy.io.fits as fits from astropy.table import Table from smith_kcorr import GAMA_KCorrection, GAMA_KCorrection_color from rest_gmr import smith_res...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@ddp_limits.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "candebellavita/vkompth", "repo_path": "vkompth_extracted/vkompth-master/vkompthdl/README.md", "type": "Markdown" }
# Instructions for Compilation under XSPEC 1) First load HEASOFT (heainit, export, etc...). 2) Edit the Makefile_libs LDFLAGS and LDLIBS variables to your preferred values (lopenblas, lopenblasp, llapack, etc). 3) Then, run: ``` initpackage vkompthdl lmod_vkompthdl.dat . cp Makefile_libs Makefile hmake ``` We use...
candebellavitaREPO_NAMEvkompthPATH_START.@vkompth_extracted@vkompth-master@vkompthdl@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "kammerje/spaceKLIP", "repo_path": "spaceKLIP_extracted/spaceKLIP-main/spaceKLIP/resources/PCEs/__init__.py", "type": "Python" }
kammerjeREPO_NAMEspaceKLIPPATH_START.@spaceKLIP_extracted@spaceKLIP-main@spaceKLIP@resources@PCEs@__init__.py@.PATH_END.py
{ "filename": "length.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/util/svg/length.py", "type": "Python" }
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import re import math...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@util@svg@length.py@.PATH_END.py
{ "filename": "auxiliary.py", "repo_name": "janosch314/GWFish", "repo_path": "GWFish_extracted/GWFish-main/GWFish/modules/auxiliary.py", "type": "Python" }
import scipy.optimize as optimize import numpy as np from astropy.cosmology import FlatLambdaCDM cosmo = FlatLambdaCDM(H0=69.6, Om0=0.286) import GWFish.modules.detection as det import GWFish.modules.constants as cst def from_mChirp_q_to_m1_m2(mChirp, q): """ Compute the transformation from mChirp, q to m1, ...
janosch314REPO_NAMEGWFishPATH_START.@GWFish_extracted@GWFish-main@GWFish@modules@auxiliary.py@.PATH_END.py
{ "filename": "_legendgroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/_legendgroup.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="funnelarea", **kwargs): super(LegendgroupValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@_legendgroup.py@.PATH_END.py
{ "filename": "FFT.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/python/FFT.py", "type": "Python" }
""" FFT Class for use with Obit in python. Before performing an FFT, an FFT object must first be created. This is of the form:: >>> fft = FFT.FFT(name, dir, type, rank, dim) where name is an arbitrary name for the object dir is the direction 1 => OBIT_FFT_Forward(R2C), 2 => OBIT_FFT_Reverse(C2R) type is the ...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@python@FFT.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/datasets/co2/__init__.py", "type": "Python" }
__all__ = ["load", "load_pandas", "COPYRIGHT", "TITLE", "SOURCE", "DESCRSHORT", "DESCRLONG", "NOTE"] from .data import ( load, load_pandas, COPYRIGHT, TITLE, SOURCE, DESCRSHORT, DESCRLONG, NOTE)
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@datasets@co2@__init__.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="surface.colorbar", **kwargs ): super(ShowticklabelsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "_colorbar.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/_colorbar.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="histogram2dcontour", **kwargs ): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, paren...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@_colorbar.py@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sunburst.outsidetextfont", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@outsidetextfont@_variantsrc.py@.PATH_END.py
{ "filename": "Part1-Detector1.ipynb", "repo_name": "spacetelescope/jwebbinar_prep", "repo_path": "jwebbinar_prep_extracted/jwebbinar_prep-main/jwebbinar29/Part1-Detector1.ipynb", "type": "Jupyter Notebook" }
<img style="float: center;" src='https://github.com/STScI-MIRI/MRS-ExampleNB/raw/main/assets/banner1.png' alt="stsci_logo" width="1000px"/> # TSO JWebbinar Notebook 1: Downloading and Calibrating `uncal` TSO Products ----- **Author**: Néstor Espinoza | AURA Assistant Astronomer | Mission Scientist for Exoplanet Scie...
spacetelescopeREPO_NAMEjwebbinar_prepPATH_START.@jwebbinar_prep_extracted@jwebbinar_prep-main@jwebbinar29@Part1-Detector1.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/io/arff/tests/__init__.py", "type": "Python" }
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@io@arff@tests@__init__.py@.PATH_END.py
{ "filename": "subfindhdf_test.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/tests/subfindhdf_test.py", "type": "Python" }
import warnings import numpy as np import numpy.testing as npt import pytest import pynbody import pynbody.test_utils # load Alan Duffy's module from https://bitbucket.org/astroduff/pyreadgadget from pynbody.test_utils.pyread_gadget_hdf5 import pyread_gadget_hdf5 @pytest.fixture(scope='module', autouse=True) def g...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@tests@subfindhdf_test.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(ThicknessValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@_thickness.py@.PATH_END.py
{ "filename": "TestVisitor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Compiler/Tests/TestVisitor.py", "type": "Python" }
from Cython.Compiler.ModuleNode import ModuleNode from Cython.Compiler.Symtab import ModuleScope from Cython.TestUtils import TransformTest from Cython.Compiler.Visitor import MethodDispatcherTransform from Cython.Compiler.ParseTreeTransforms import ( NormalizeTree, AnalyseDeclarationsTransform, AnalyseExpressi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Compiler@Tests@TestVisitor.py@.PATH_END.py
{ "filename": "2pt_model.py", "repo_name": "federicomarulli/CosmoBolognaLib", "repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/Examples/clustering/codes/2pt_model.py", "type": "Python" }
# ===================================================================================== # Example code: how to compute power spectrum and two-point correlation function models # ===================================================================================== # import Python modules for scientific computing and p...
federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@Examples@clustering@codes@2pt_model.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "adrn/thejoker", "repo_path": "thejoker_extracted/thejoker-main/thejoker/utils.py", "type": "Python" }
"""Miscellaneous utilities""" import contextlib import inspect import os from functools import wraps from tempfile import NamedTemporaryFile import astropy.units as u import h5py import numpy as np import pytensor import tables as tb from astropy.io.misc.hdf5 import meta_path from astropy.table.meta import get_header...
adrnREPO_NAMEthejokerPATH_START.@thejoker_extracted@thejoker-main@thejoker@utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/matplotlylib/__init__.py", "type": "Python" }
""" matplotlylib ============ This module converts matplotlib figure objects into JSON structures which can be understood and visualized by Plotly. Most of the functionality should be accessed through the parent directory's 'tools' module or 'plotly' package. """ from __future__ import absolute_import from plotly.m...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@matplotlylib@__init__.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-databricks/tests/conftest.py", "type": "Python" }
import pytest from prefect.testing.utilities import prefect_test_harness @pytest.fixture(scope="session", autouse=True) def prefect_db(): """ Sets up test harness for temporary DB during test runs. """ with prefect_test_harness(): yield
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-databricks@tests@conftest.py@.PATH_END.py
{ "filename": "appdata.py", "repo_name": "ivkram/specvizitor", "repo_path": "specvizitor_extracted/specvizitor-main/specvizitor/appdata.py", "type": "Python" }
from dataclasses import dataclass import logging import pathlib from .io.catalog import Catalog from .io.inspection_data import InspectionData logger = logging.getLogger(__name__) @dataclass class AppData: output_path: pathlib.Path | None = None # the path to the output (a.k.a. inspection) file cat: Catal...
ivkramREPO_NAMEspecvizitorPATH_START.@specvizitor_extracted@specvizitor-main@specvizitor@appdata.py@.PATH_END.py
{ "filename": "1_Spectroscopy.ipynb", "repo_name": "natashabatalha/picaso", "repo_path": "picaso_extracted/picaso-master/docs/notebooks/workshops/SaganSchool2021/1_Spectroscopy.ipynb", "type": "Jupyter Notebook" }
# Intuition Building: Young Planet Spectroscopy What you will learn 1. What do formation models predict for the effective temperatures of young planets across different masses? 2. Given identical mass and age, what might two different formation scenarios lead the spectra to look like? 3. How do we dissect spectrosc...
natashabatalhaREPO_NAMEpicasoPATH_START.@picaso_extracted@picaso-master@docs@notebooks@workshops@SaganSchool2021@1_Spectroscopy.ipynb@.PATH_END.py
{ "filename": "write_jk2020_config.py", "repo_name": "Goobley/DexRT", "repo_path": "DexRT_extracted/DexRT-main/write_jk2020_config.py", "type": "Python" }
from dexrt_py.dexrt.config_schemas.dexrt import DexrtNonLteConfig, AtomicModelConfig, DexrtLteConfig, DexrtSystemConfig from dexrt_py.dexrt.write_config import write_config if __name__ == "__main__": step_idx = 550 config_sparse = DexrtNonLteConfig( atmos_path=f"jk2020{step_idx:04d}_dex.nc", ou...
GoobleyREPO_NAMEDexRTPATH_START.@DexRT_extracted@DexRT-main@write_jk2020_config.py@.PATH_END.py
{ "filename": "curvedsky.py", "repo_name": "simonsobs/pixell", "repo_path": "pixell_extracted/pixell-master/pixell/curvedsky.py", "type": "Python" }
"""This module provides functions for taking into account the curvature of the full sky.""" from __future__ import print_function, division import numpy as np, os, warnings from . import enmap, powspec, wcsutils, utils, bunch from . import cmisc # Initialize DUCC's thread num variable from OMP's if it's not already se...
simonsobsREPO_NAMEpixellPATH_START.@pixell_extracted@pixell-master@pixell@curvedsky.py@.PATH_END.py
{ "filename": "equilibria1d.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/plasma/equilibria1d.py", "type": "Python" }
"""Functionality for representing one-dimensional equilibria.""" __all__ = ["HarrisSheet"] import astropy.constants as const import astropy.units as u import numpy as np from plasmapy.utils.decorators.validators import validate_quantities class HarrisSheet: r""" Define a Harris Sheet Equilibrium. Magn...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@plasma@equilibria1d.py@.PATH_END.py
{ "filename": "sources.py", "repo_name": "bd-j/forcepho", "repo_path": "forcepho_extracted/forcepho-main/forcepho/sources.py", "type": "Python" }
# -*- coding: utf-8 -*- """sources.py Module for objects describing individual sources and collections of sources (Scenes) """ import numpy as np from scipy.interpolate import SmoothBivariateSpline, RectBivariateSpline import warnings try: import h5py except(ImportError): warnings.warn("h5py could not be imp...
bd-jREPO_NAMEforcephoPATH_START.@forcepho_extracted@forcepho-main@forcepho@sources.py@.PATH_END.py
{ "filename": "mobilenet_v3.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/applications/mobilenet_v3.py", "type": "Python" }
import warnings from keras.src import backend from keras.src import layers from keras.src.api_export import keras_export from keras.src.applications import imagenet_utils from keras.src.models import Functional from keras.src.ops import operation_utils from keras.src.utils import file_utils BASE_WEIGHT_PATH = ( "...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@applications@mobilenet_v3.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "LoganAMorrison/blackthorn", "repo_path": "blackthorn_extracted/blackthorn-master/old/README.md", "type": "Markdown" }
# blackthorn Project for computing spectra from right-handed neutrino decays. Uses a C++ backend with python bindings via `pybind11`.
LoganAMorrisonREPO_NAMEblackthornPATH_START.@blackthorn_extracted@blackthorn-master@old@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/hoverlabel/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import BordercolorValidator from ._bgcolorsrc import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.tickfont" _valid_props = ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@polar@radialaxis@_tickfont.py@.PATH_END.py
{ "filename": "fftfit.py", "repo_name": "StingraySoftware/stingray", "repo_path": "stingray_extracted/stingray-main/stingray/pulse/fftfit.py", "type": "Python" }
import numpy as np from scipy.optimize import minimize, brentq def _find_delay_with_ccf(amp, pha): """Measure a phase shift between pulsed profile and template. Let P = F(p), S = F(t), where p and t are the pulse profile and the template and F indicates the Fourier transform The shift between p and t...
StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@pulse@fftfit.py@.PATH_END.py
{ "filename": "TODO.md", "repo_name": "guillochon/MOSFiT", "repo_path": "MOSFiT_extracted/MOSFiT-master/TODO.md", "type": "Markdown" }
Engines - [ ] `Jet` - [x] `CSM` - [ ] `Nuclear` Transforms - [ ] `Viscosity` - [ ] `Reprocessing` SEDs - [x] `Extinction` - [ ] `MultiBlackbody` - [ ] `SpectrumBased` - [ ] `Line` Optimization - [ ] Cythonize bottlenecks - [ ] Load-balance fracking Input - [ ] Local modules - [ ] Non-JSON data (CDS tables, flat fil...
guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@TODO.md@.PATH_END.py
{ "filename": "test_model_regression.py", "repo_name": "sxs-collaboration/gwsurrogate", "repo_path": "gwsurrogate_extracted/gwsurrogate-master/test/test_model_regression.py", "type": "Python" }
""" Test every gwsurrogate model. Each model should test the following at a small handful of parameter values: * all modes * summation of all modes * each of the two above, for dimensionless and physical waveforms Running this script as a regression test (with pytest) will download regression data from Dropbox. R...
sxs-collaborationREPO_NAMEgwsurrogatePATH_START.@gwsurrogate_extracted@gwsurrogate-master@test@test_model_regression.py@.PATH_END.py
{ "filename": "_grid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/_grid.py", "type": "Python" }
import _plotly_utils.basevalidators class GridValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="grid", parent_name="layout", **kwargs): super(GridValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@_grid.py@.PATH_END.py
{ "filename": "count_rows.py", "repo_name": "mjuric/lsd", "repo_path": "lsd_extracted/lsd-master/src/examples/count_rows.py", "type": "Python" }
#!/usr/bin/env python from lsd import DB def row_counter_kernel(qresult): for rows in qresult: yield len(rows) db = DB('db') query = db.query("SELECT obj_id FROM ps1_obj, sdss") total = 0 for subtotal in query.execute([row_counter_kernel]): total += subtotal print "The total number of rows returned by the quer...
mjuricREPO_NAMElsdPATH_START.@lsd_extracted@lsd-master@src@examples@count_rows.py@.PATH_END.py
{ "filename": "pgvecto_rs.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/vectorstores/pgvecto_rs.ipynb", "type": "Jupyter Notebook" }
# PGVecto.rs This notebook shows how to use functionality related to the Postgres vector database ([pgvecto.rs](https://github.com/tensorchord/pgvecto.rs)). ```python %pip install "pgvecto_rs[sdk]" langchain-community ``` ```python from typing import List from langchain_community.document_loaders import TextLoade...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@vectorstores@pgvecto_rs.ipynb@.PATH_END.py