metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@tickfont@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/radialaxis/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._visible import VisibleValidator from ._ticksuffix import TicksuffixValidator from ._tickorientation import TickorientationValidator from ._ticklen import TicklenValidator from ._tickcolor import TickcolorValidator from ._showticklabels import Show...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@radialaxis@__init__.py@.PATH_END.py
{ "filename": "rotate.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/command/rotate.py", "type": "Python" }
from __future__ import annotations from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, ke...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@command@rotate.py@.PATH_END.py
{ "filename": "_exponentformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmap/colorbar/_exponentformat.py", "type": "Python" }
import _plotly_utils.basevalidators class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="choroplethmap.colorbar", **kwargs, ): super(ExponentformatValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmap@colorbar@_exponentformat.py@.PATH_END.py
{ "filename": "redshift.ipynb", "repo_name": "PolymathicAI/AstroCLIP", "repo_path": "AstroCLIP_extracted/AstroCLIP-main/downstream_tasks/property_estimation/redshift.ipynb", "type": "Jupyter Notebook" }
```python import os, sys import numpy as np import torch from astropy.table import Table from sklearn.preprocessing import StandardScaler sys.path.append("../..") from astroclip.env import format_with_env from property_utils.models import few_shot, zero_shot from property_utils.plotting import plot_scatter ASTROCLIP...
PolymathicAIREPO_NAMEAstroCLIPPATH_START.@AstroCLIP_extracted@AstroCLIP-main@downstream_tasks@property_estimation@redshift.ipynb@.PATH_END.py
{ "filename": "test_outputs.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/adaptahop/tests/test_outputs.py", "type": "Python" }
""" AdaptaHOP frontend tests """ import numpy as np import pytest from yt.frontends.adaptahop.data_structures import AdaptaHOPDataset from yt.testing import requires_file from yt.utilities.answer_testing.framework import data_dir_load r0 = "output_00080/info_00080.txt" brick_old = "output_00080_halos/tree_bricks0...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@adaptahop@tests@test_outputs.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/hoverlabel/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@hoverlabel@font@__init__.py@.PATH_END.py
{ "filename": "_rbf.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/interpolate/_rbf.py", "type": "Python" }
"""rbf - Radial basis functions for interpolation/smoothing scattered N-D data. Written by John Travers <jtravs@gmail.com>, February 2007 Based closely on Matlab code by Alex Chirokov Additional, large, improvements by Robert Hetland Some additional alterations by Travis Oliphant Interpolation with multi-dimensional t...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@interpolate@_rbf.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/gdf/api.py", "type": "Python" }
from . import tests from .data_structures import GDFDataset, GDFGrid, GDFHierarchy from .fields import GDFFieldInfo from .io import IOHandlerGDFHDF5 add_gdf_field = GDFFieldInfo.add_field
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@gdf@api.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "litebird/litebird_sim", "repo_path": "litebird_sim_extracted/litebird_sim-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...
litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@docs@source@conf.py@.PATH_END.py
{ "filename": "glitch.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/src/pint/models/glitch.py", "type": "Python" }
"""Pulsar timing glitches.""" import astropy.units as u import numpy as np from loguru import logger as log from pint.models.parameter import prefixParameter from pint.models.timing_model import PhaseComponent from pint.utils import split_prefixed_name from pint.exceptions import MissingParameter class Glitch(Phas...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@models@glitch.py@.PATH_END.py
{ "filename": "_unselected.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram/_unselected.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "histogram" _path_str = "histogram.unselected" _valid_props = {"marker", "textfont"} ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram@_unselected.py@.PATH_END.py
{ "filename": "test_treefarm.py", "repo_name": "ytree-project/ytree", "repo_path": "ytree_extracted/ytree-main/tests/frontends/test_treefarm.py", "type": "Python" }
from ytree.frontends.treefarm import \ TreeFarmArbor from ytree.utilities.testing import \ ArborTest, \ TempDirTest class TreeFarmArborDescendentsTest(TempDirTest, ArborTest): arbor_type = TreeFarmArbor test_filename = "tree_farm/tree_farm_descendents/fof_subhalo_tab_000.0.h5" num_data_files = ...
ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@tests@frontends@test_treefarm.py@.PATH_END.py
{ "filename": "copy_script.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/JS_estimate/GW170817_TaylorF2/varied_runs/outdir/54005/copy_script.py", "type": "Python" }
import psutil p = psutil.Process() p.cpu_affinity([0]) import os os.environ["CUDA_VISIBLE_DEVICES"] = "3" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10" from jimgw.jim import Jim from jimgw.single_event.detector import H1, L1, V1 from jimgw.single_event.likelihood import HeterodynedTransientLikelihoodFD from ji...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@JS_estimate@GW170817_TaylorF2@varied_runs@outdir@54005@copy_script.py@.PATH_END.py
{ "filename": "test_bleien7m.py", "repo_name": "cosmo-ethz/hide", "repo_path": "hide_extracted/hide-master/test/test_bleien7m.py", "type": "Python" }
# HIDE 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. # # HIDE is distributed in the hope that it will be useful, # but WITHOUT ANY ...
cosmo-ethzREPO_NAMEhidePATH_START.@hide_extracted@hide-master@test@test_bleien7m.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/scatter/textfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter.textfont", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@textfont@_variantsrc.py@.PATH_END.py
{ "filename": "_torch_function_helpers.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/tv_tensors/_torch_function_helpers.py", "type": "Python" }
import torch _TORCHFUNCTION_SUBCLASS = False class _ReturnTypeCM: def __init__(self, to_restore): self.to_restore = to_restore def __enter__(self): return self def __exit__(self, *args): global _TORCHFUNCTION_SUBCLASS _TORCHFUNCTION_SUBCLASS = self.to_restore def set_r...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@tv_tensors@_torch_function_helpers.py@.PATH_END.py
{ "filename": "citations.py", "repo_name": "lgrcia/prose", "repo_path": "prose_extracted/prose-main/prose/citations.py", "type": "Python" }
import astropy citations = { "numpy": """ @Article{numpy, title = {Array programming with {NumPy}}, author = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J. van der Walt and Ralf Gommers and Pauli Virtanen and David Cournapeau and Eric Wieser and Julian Taylor and Sebastian B...
lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@prose@citations.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "Varnani/pywd2015-qt5", "repo_path": "pywd2015-qt5_extracted/pywd2015-qt5-master/README.md", "type": "Markdown" }
# PyWD2015-Qt5 A Qt5 GUI written in Python for Wilson - Devinney eclipsing binary modeling software. IMPORTANT NOTE: TESS bandpass was added to PyWD2015. However, users must get updated atmosphere and limb darkening files from https://faculty.fiu.edu/~vanhamme/wdfiles/lcdc-datafiles-2019.tar.gz in order to run PyWD201...
VarnaniREPO_NAMEpywd2015-qt5PATH_START.@pywd2015-qt5_extracted@pywd2015-qt5-master@README.md@.PATH_END.py
{ "filename": "dynesty.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/utils/dynesty.py", "type": "Python" }
import pdspy.modeling as modeling import dynesty.plotting as dyplot import matplotlib.pyplot as plt import scipy.stats import scipy.integrate import pickle import numpy # Define a likelihood function. def lnlike(p, visibilities, images, spectra, parameters, plot, \ model="flared", ncpus=1, ncpus_highmass=1, w...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@utils@dynesty.py@.PATH_END.py
{ "filename": "index.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_internal/models/index.py", "type": "Python" }
from pip._vendor.six.moves.urllib import parse as urllib_parse class PackageIndex(object): """Represents a Package Index and provides easier access to endpoints """ def __init__(self, url, file_storage_domain): # type: (str, str) -> None super(PackageIndex, self).__init__() self.u...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_internal@models@index.py@.PATH_END.py
{ "filename": "amazon_api_gateway.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/llms/amazon_api_gateway.ipynb", "type": "Jupyter Notebook" }
# Amazon API Gateway >[Amazon API Gateway](https://aws.amazon.com/api-gateway/) is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any >scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your bac...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@llms@amazon_api_gateway.ipynb@.PATH_END.py
{ "filename": "test_outputs.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/gadget/tests/test_outputs.py", "type": "Python" }
import os import shutil import tempfile from collections import OrderedDict from itertools import product import yt from yt.frontends.gadget.api import GadgetDataset, GadgetHDF5Dataset from yt.frontends.gadget.testing import fake_gadget_binary from yt.testing import ( ParticleSelectionComparison, assert_allclo...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@gadget@tests@test_outputs.py@.PATH_END.py
{ "filename": "uGMRT_cal.py", "repo_name": "revoltek/LiLF", "repo_path": "LiLF_extracted/LiLF-master/pipelines/deprecated/uGMRT_cal.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Pipeline to run on the calibrator observation. # It isolates various systematic effects and # prepare them for the transfer to the target field. import sys, os, glob, re import numpy as np ######################################################## from LiLF import lib_ms...
revoltekREPO_NAMELiLFPATH_START.@LiLF_extracted@LiLF-master@pipelines@deprecated@uGMRT_cal.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/delta/decreasing/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._symbol import SymbolValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._symbol...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@delta@decreasing@__init__.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "dylancromer/ostrich", "repo_path": "ostrich_extracted/ostrich-main/setup.py", "type": "Python" }
from distutils.core import setup setup(name='ostrich', version='0.1', py_modules=['ostrich'], )
dylancromerREPO_NAMEostrichPATH_START.@ostrich_extracted@ostrich-main@setup.py@.PATH_END.py
{ "filename": "_asrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/_asrc.py", "type": "Python" }
import _plotly_utils.basevalidators class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="asrc", parent_name="contourcarpet", **kwargs): super(AsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@_asrc.py@.PATH_END.py
{ "filename": "ucbadmit.py", "repo_name": "pyro-ppl/numpyro", "repo_path": "numpyro_extracted/numpyro-master/examples/ucbadmit.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 """ Example: Generalized Linear Mixed Models ======================================== The UCBadmit data is sourced from the study [1] of gender biased in graduate admissions at UC Berkeley in Fall 1973: .. table:: UCBadmit dataset ...
pyro-pplREPO_NAMEnumpyroPATH_START.@numpyro_extracted@numpyro-master@examples@ucbadmit.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@contourcarpet@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._text import TextValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.TextVal...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "_decomp.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/linalg/_decomp.py", "type": "Python" }
# # Author: Pearu Peterson, March 2002 # # additions by Travis Oliphant, March 2002 # additions by Eric Jones, June 2002 # additions by Johannes Loehnert, June 2006 # additions by Bart Vandereycken, June 2006 # additions by Andrew D Straw, May 2007 # additions by Tiziano Zito, November 2008 # # April 2010: Functio...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@linalg@_decomp.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/tests/__init__.py", "type": "Python" }
"""Tests."""
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@tests@__init__.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatter/selected/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter.selected" _path_str = "scatter.selected.textfont" _valid_props = {"color"} # ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter@selected@_textfont.py@.PATH_END.py
{ "filename": "batching.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/interpreters/batching.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...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@interpreters@batching.py@.PATH_END.py
{ "filename": "Horizons_notes.md", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/documents/Horizons_notes.md", "type": "Markdown" }
# Notes on output format from JPL Horizons ### HORIZONS OUTPUT FILE: Prior to 1962, times are UT1. Dates thereafter are UTC. Any 'b' symbol in the 1st-column denotes a B.C. date. First-column blank (" ") denotes an A.D. date. Calendar dates prior to 1582-Oct-15 are in the Julian calendar system. Later calendar dates...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@documents@Horizons_notes.md@.PATH_END.py
{ "filename": "CODE_OF_CONDUCT.md", "repo_name": "EhsanGharibNezhad/TelescopeML", "repo_path": "TelescopeML_extracted/TelescopeML-main/CODE_OF_CONDUCT.md", "type": "Markdown" }
# Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level o...
EhsanGharibNezhadREPO_NAMETelescopeMLPATH_START.@TelescopeML_extracted@TelescopeML-main@CODE_OF_CONDUCT.md@.PATH_END.py
{ "filename": "all_plots.py", "repo_name": "alercebroker/ATAT", "repo_path": "ATAT_extracted/ATAT-main/plots/all_plots.py", "type": "Python" }
import os import numpy as np from . import plot_hist as hplot from . import plot_scatter as splot from . import reconstruction_plots as recplot import umap from sklearn.decomposition import PCA ###################### Plot histograms ###################### def plot_hist_1d(key, metrics_ext, config, folder_root): sav...
alercebrokerREPO_NAMEATATPATH_START.@ATAT_extracted@ATAT-main@plots@all_plots.py@.PATH_END.py
{ "filename": "resample_numba.py", "repo_name": "gbrammer/msaexp", "repo_path": "msaexp_extracted/msaexp-main/msaexp/resample_numba.py", "type": "Python" }
import numpy as np from numba import jit from math import erf, pow as _pow __all__ = [ "simpson", "trapz", "trapz_dx", "resample_template_numba", "sample_gaussian_line_numba", "pixel_integrated_gaussian_numba", "compute_igm", "calzetti2000_alambda", "calzetti2000_attenuation", "...
gbrammerREPO_NAMEmsaexpPATH_START.@msaexp_extracted@msaexp-main@msaexp@resample_numba.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/tests/__init__.py", "type": "Python" }
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/template/data/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._waterfall import WaterfallValidator from ._volume import VolumeValidator from ._violin import ViolinValidator from ._treemap import TreemapValidator from ._table import TableValidator from ._surface import SurfaceValidator from ._sunburst impo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@template@data@__init__.py@.PATH_END.py
{ "filename": "_xaxis.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_xaxis.py", "type": "Python" }
import _plotly_utils.basevalidators class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="funnel", **kwargs): super(XaxisValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, df...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@_xaxis.py@.PATH_END.py
{ "filename": "state.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/emcee_ES/state.py", "type": "Python" }
# -*- coding: utf-8 -*- from copy import deepcopy import numpy as np __all__ = ["State"] class State(object): """The state of the ensemble during an MCMC run For backwards compatibility, this will unpack into ``coords, log_prob, (blobs), random_state`` when iterated over (where ``blobs`` will only be ...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@emcee_ES@state.py@.PATH_END.py
{ "filename": "_tracerefminus.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/error_z/_tracerefminus.py", "type": "Python" }
import _plotly_utils.basevalidators class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter3d.error_z", **kwargs ): super(TracerefminusValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@error_z@_tracerefminus.py@.PATH_END.py
{ "filename": "zzmass_estimator.py", "repo_name": "tcollett/LensPop", "repo_path": "LensPop_extracted/LensPop-master/stellarpop/zzmass_estimator.py", "type": "Python" }
from stellarpop.estimator import Estimator class MassEstimator(Estimator): """ An object used to determine estimates of stellar masses. This inherits from the base class NestedSampler, although this functionality is not necessary for simple MCMC chains. """ def __init__(self,priors,dat...
tcollettREPO_NAMELensPopPATH_START.@LensPop_extracted@LensPop-master@stellarpop@zzmass_estimator.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/box/README.md", "type": "Markdown" }
This package has moved! https://github.com/langchain-ai/langchain-box/tree/main/libs/box
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@box@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "nbellomo/Multi_CLASS", "repo_path": "Multi_CLASS_extracted/Multi_CLASS-master/external_Pk/README.md", "type": "Markdown" }
The `external_Pk` mode ====================== * Author: Jesus Torrado (torradocacho [@] lorentz.leidenuniv.nl) * Date: 2013-12-20 Introduction ------------ This mode allows for an arbitrary primordial spectrum `P(k)` to be calculated by an external command and passed to CLASS. That external command may be anythin...
nbellomoREPO_NAMEMulti_CLASSPATH_START.@Multi_CLASS_extracted@Multi_CLASS-master@external_Pk@README.md@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/line/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatter3d.marker.line", **kwargs ): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@line@_cmax.py@.PATH_END.py
{ "filename": "doccer.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/misc/doccer.py", "type": "Python" }
import warnings warnings.warn( "scipy.misc.doccer is deprecated and will be removed in 2.0.0", DeprecationWarning, stacklevel=2 )
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@misc@doccer.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/core/data_factories/__init__.py", "type": "Python" }
from .astropy_table import * # noqa from .dendrogram import * # noqa from .excel import * # noqa from .fits import * # noqa from .hdf5 import * # noqa from .helpers import * # noqa from .image import * # noqa from .numpy import * # noqa from .pandas import * # noqa from .tables import * # noqa
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@core@data_factories@__init__.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/outsidetextfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.outsidetextfont", **kwargs ): super(WeightValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@outsidetextfont@_weight.py@.PATH_END.py
{ "filename": "client_component_subscribe.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/docs/code/client_component_subscribe.py", "type": "Python" }
from autobahn.twisted.component import Component, run from autobahn.twisted.util import sleep from twisted.internet.defer import inlineCallbacks import os url = os.environ.get('CBURL', u'ws://localhost:8080/ws') realmvalue = os.environ.get('CBREALM', u'realm1') component = Component(transports=url, realm=realmvalue) ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs@code@client_component_subscribe.py@.PATH_END.py
{ "filename": "example_models.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/modeling/tests/example_models.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Here are all the test parameters and values for the each `~astropy.modeling.FittableModel` defined. There is a dictionary for 1D and a dictionary for 2D models. Explanation of keywords of the dictionaries: "parameters" : list or dict Model parame...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@modeling@tests@example_models.py@.PATH_END.py
{ "filename": "qa_sources.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/qa_sources.ipynb", "type": "Jupyter Notebook" }
# How to get your RAG application to return sources Often in [Q&A](/docs/concepts/rag/) applications it's important to show users the sources that were used to generate the answer. The simplest way to do this is for the chain to return the Documents that were retrieved in each generation. We'll work off of the Q&A ap...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@qa_sources.ipynb@.PATH_END.py
{ "filename": "MOFF_FX_performance_profiling_shell_script_generator.py", "repo_name": "epic-astronomy/EPIC", "repo_path": "EPIC_extracted/EPIC-master/main/MOFF_FX_performance_profiling_shell_script_generator.py", "type": "Python" }
import numpy as NP import antenna_array as AA import my_DSP_modules as DSP nruns = 4 nts = 8 * NP.arange(1,5) # half the number of frequency channels niter = 4 * NP.arange(1,4) xmax = [None, None, None, None, None, None] ymax = [None, None, None, None, None, None] # xmax = [62.5, 125.0, 250.0, 500.0] # ymax = [62.5, ...
epic-astronomyREPO_NAMEEPICPATH_START.@EPIC_extracted@EPIC-master@main@MOFF_FX_performance_profiling_shell_script_generator.py@.PATH_END.py
{ "filename": "FLAG_casa_restore_flag_table.py", "repo_name": "IanHeywood/oxkat", "repo_path": "oxkat_extracted/oxkat-master/oxkat/FLAG_casa_restore_flag_table.py", "type": "Python" }
# ian.heywood@physics.ox.ac.uk # # set versionname=... on command line call to CASA # can also specify csv mslist=...,... otherwise project_info.p will be # used and the operation will proceed on all available target Measurement Sets # import os import sys execfile('oxkat/casa_read_project_info.py') mslist = Fa...
IanHeywoodREPO_NAMEoxkatPATH_START.@oxkat_extracted@oxkat-master@oxkat@FLAG_casa_restore_flag_table.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/marker/colorbar/_title.py", "type": "Python" }
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(TitleValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@marker@colorbar@_title.py@.PATH_END.py
{ "filename": "_x0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_x0.py", "type": "Python" }
import _plotly_utils.basevalidators class X0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="x0", parent_name="funnel", **kwargs): super(X0Validator, 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@funnel@_x0.py@.PATH_END.py
{ "filename": "_tickformatstopdefaults.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattercarpet.marker.colorbar", **kwargs, ): super(TickformatstopdefaultsVal...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@marker@colorbar@_tickformatstopdefaults.py@.PATH_END.py
{ "filename": "test_radial_bkg.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_radial_bkg.py", "type": "Python" }
# Copyright (C) 2022, the ixpeobssim team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distrib...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@tests@test_radial_bkg.py@.PATH_END.py
{ "filename": "12017_rval_150010.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/X-class/AR_12017/12017_rval_150010.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 8 20:08:10 2023 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "12017" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@X-class@AR_12017@12017_rval_150010.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "nickhand/pyRSD", "repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsdfit/theory/base.py", "type": "Python" }
from pyRSD.rsdfit.parameters import Parameter, ParameterSet from pyRSD.rsd._cache import Property from pyRSD.rsd.transfers import WindowFunctionTransfer, gridded_transfers from pyRSD.rsdfit.theory import decorators from scipy.interpolate import InterpolatedUnivariateSpline as spline import numpy as np import xarray as...
nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsdfit@theory@base.py@.PATH_END.py
{ "filename": "variablelib.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/nnx/variablelib.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@flax@nnx@variablelib.py@.PATH_END.py
{ "filename": "setup_db.py", "repo_name": "andycasey/ges-idr5", "repo_path": "ges-idr5_extracted/ges-idr5-master/scripts/setup_db.py", "type": "Python" }
#!/usr/bin/python """ Create database for the fifth internal data release of the Gaia-ESO Survey. """ import logging import numpy as np import psycopg2 as pg import yaml from glob import glob # For fake data generation import os from astropy.io import fits from code import GESDatabase db_filename = "db.yaml" nod...
andycaseyREPO_NAMEges-idr5PATH_START.@ges-idr5_extracted@ges-idr5-master@scripts@setup_db.py@.PATH_END.py
{ "filename": "dothefit.py", "repo_name": "Grillard/GalfitPyWrap", "repo_path": "GalfitPyWrap_extracted/GalfitPyWrap-master/examples/galfit_example/dothefit.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import GalfitPyWrap ''' This example reproduces the galfit distributed test. It uses the gal.fits and the psf.fits files. ''' #Define the model (as in galfit example): model=[{ 0: 'sersic', # object type 1: '48.5180 51.2800 1 1', # position...
GrillardREPO_NAMEGalfitPyWrapPATH_START.@GalfitPyWrap_extracted@GalfitPyWrap-master@examples@galfit_example@dothefit.py@.PATH_END.py
{ "filename": "gain_estimation.ipynb", "repo_name": "cta-observatory/cta-lstchain", "repo_path": "cta-lstchain_extracted/cta-lstchain-main/notebooks/gain_estimation.ipynb", "type": "Jupyter Notebook" }
# This is a notebook for PMT gain estimation from calibration events - Calculate pedestal RMS - Load pedestal data and perform R0 correction - Check pedestal distribution and get RMS - Analyze flat-fielding events - Choose data to be used - Briefly look at an event. - Check waveforms after R...
cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@notebooks@gain_estimation.ipynb@.PATH_END.py
{ "filename": "limb_darkening_test.py", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/tests/unittests/spec/stars/limb_darkening_test.py", "type": "Python" }
from exojax.spec.limb_darkening import ld_kipping import pytest def test_ld_kipping(): u1,u2=ld_kipping(0.5,0.5) assert u1 == pytest.approx(0.70710677) assert u2 == pytest.approx(0.0) if __name__ == "__main__": test_ld_kipping()
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@unittests@spec@stars@limb_darkening_test.py@.PATH_END.py
{ "filename": "clipping.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/src/eureka/lib/clipping.py", "type": "Python" }
import numpy as np from scipy.special import erf from astropy.modeling.models import Gaussian1D, custom_model from astropy.modeling.fitting import LevMarLSQFitter from astropy.convolution import Box1DKernel, convolve from astropy.stats import sigma_clip __all__ = ['clip_outliers', 'gauss_removal'] def clip_outliers(...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@lib@clipping.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "sterinaldi/figaro", "repo_path": "figaro_extracted/figaro-main/README.md", "type": "Markdown" }
# [FIGARO - Fast Inference for GW Astronomy, Research & Observations](https://www.youtube.com/watch?v=uJeJ4YiVFz8) FIGARO is an inference code designed to estimate multivariate probability densities given samples from an unknown distribution using a Dirichlet Process Gaussian Mixture Model (DPGMM) as nonparameteric mo...
sterinaldiREPO_NAMEfigaroPATH_START.@figaro_extracted@figaro-main@README.md@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/waterfall/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="width", parent_name="waterfall", **kwargs): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@waterfall@_width.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2d/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="histogram2d.stream", **kwargs ): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2d@stream@_maxpoints.py@.PATH_END.py
{ "filename": "plots.py", "repo_name": "hpparvi/opents", "repo_path": "opents_extracted/opents-master/src/plots.py", "type": "Python" }
# OpenTS: Open exoplanet transit search pipeline. # Copyright (C) 2015-2020 Hannu Parviainen # # 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 yo...
hpparviREPO_NAMEopentsPATH_START.@opents_extracted@opents-master@src@plots.py@.PATH_END.py
{ "filename": "video.py", "repo_name": "junyanz/BicycleGAN", "repo_path": "BicycleGAN_extracted/BicycleGAN-master/video.py", "type": "Python" }
from options.video_options import VideoOptions from data import create_dataset from models import create_model from itertools import islice from util import util import numpy as np import moviepy.editor import os import torch def get_random_z(opt): z_samples = np.random.normal(0, 1, (opt.n_samples + 1, opt.nz)) ...
junyanzREPO_NAMEBicycleGANPATH_START.@BicycleGAN_extracted@BicycleGAN-master@video.py@.PATH_END.py
{ "filename": "sim.py", "repo_name": "jiayindong/obliquity", "repo_path": "obliquity_extracted/obliquity-main/src/scripts/sim.py", "type": "Python" }
import paths import os from pathlib import Path os.environ["PATH"] += os.pathsep + str(Path.home() / "bin") import subprocess import sys import pymc as pm import arviz as az import pytensor.tensor as at import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy.integrate as integrate from s...
jiayindongREPO_NAMEobliquityPATH_START.@obliquity_extracted@obliquity-main@src@scripts@sim.py@.PATH_END.py
{ "filename": "getWFC3Bandpass.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/getWFC3Bandpass.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@getWFC3Bandpass.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/scattergeo/textfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattergeo.textfont", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@textfont@_variantsrc.py@.PATH_END.py
{ "filename": "paper_mag_prior.py", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/papers/171020/paper_mag_prior.py", "type": "Python" }
import numpy as np from scipy import interpolate def main(): file1 = open('zpriors_added.csv', 'r') Lines = file1.readlines() rmags=[] ras=[] decs=[] zs=[] for line in Lines: words=line.split(',') rmag=words[15] gal=words[0] rmags.append(float(rmag)) ...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@171020@paper_mag_prior.py@.PATH_END.py
{ "filename": "_stylesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/hoverlabel/font/_stylesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattergeo.hoverlabel.font", **kwargs ): super(StylesrcValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@hoverlabel@font@_stylesrc.py@.PATH_END.py
{ "filename": "sfr.py", "repo_name": "jan-rybizki/Chempy", "repo_path": "Chempy_extracted/Chempy-master/Chempy/sfr.py", "type": "Python" }
import numpy as np class SFR(object): ''' The SFR class holds the star formation history and the time-steps of Chempy ''' def __init__(self,start,end,time_steps): ''' Upon initialization the time steps need to be provided INPUT: start = beginning of the simulation end = end of the simulation ...
jan-rybizkiREPO_NAMEChempyPATH_START.@Chempy_extracted@Chempy-master@Chempy@sfr.py@.PATH_END.py
{ "filename": "test_t_sne.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/manifold/tests/test_t_sne.py", "type": "Python" }
import sys from io import StringIO import numpy as np import pytest import scipy.sparse as sp from numpy.testing import assert_allclose from scipy.optimize import check_grad from scipy.spatial.distance import pdist, squareform from sklearn import config_context from sklearn.datasets import make_blobs # mypy error: M...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@manifold@tests@test_t_sne.py@.PATH_END.py
{ "filename": "_shadowsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pointcloud/hoverlabel/font/_shadowsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="pointcloud.hoverlabel.font", **kwargs, ): super(ShadowsrcValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pointcloud@hoverlabel@font@_shadowsrc.py@.PATH_END.py
{ "filename": "_opacitysrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/_opacitysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="barpolar.marker", **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@marker@_opacitysrc.py@.PATH_END.py
{ "filename": "test_edmcmc.ipynb", "repo_name": "avanderburg/edmcmc", "repo_path": "edmcmc_extracted/edmcmc-main/test_edmcmc.ipynb", "type": "Jupyter Notebook" }
This notebook gives an overview of EDMCMC, or Easy Differential Evolution Markov Chain Monte Carlo (MCMC), a routine for parameter inference using the differential evolution MCMC alvorithm of ter Braak (2006), available at http://dx.doi.org/10.1007/s11222-006-8769-1. It includes basic usage examples and demonstrations ...
avanderburgREPO_NAMEedmcmcPATH_START.@edmcmc_extracted@edmcmc-main@test_edmcmc.ipynb@.PATH_END.py
{ "filename": "_reversescale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/_reversescale.py", "type": "Python" }
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="treemap.marker", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@_reversescale.py@.PATH_END.py
{ "filename": "primitives_preprocess.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/primitives_preprocess.py", "type": "Python" }
# # gemini_python # # primitives_preprocess.py # ------------------------------------------------------------------------------ import datetime import math from collections import defaultdict from copy...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@primitives_preprocess.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/__init__.py", "type": "Python" }
from statsmodels.tools._test_runner import PytestTester test = PytestTester()
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@__init__.py@.PATH_END.py
{ "filename": "_models.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/odr/_models.py", "type": "Python" }
""" Collection of Model instances for use with the odrpack fitting package. """ import numpy as np from scipy.odr._odrpack import Model __all__ = ['Model', 'exponential', 'multilinear', 'unilinear', 'quadratic', 'polynomial'] def _lin_fcn(B, x): a, b = B[0], B[1:] b.shape = (b.shape[0], 1) re...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@odr@_models.py@.PATH_END.py
{ "filename": "_ticks.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_ticks.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="parcoords.line.colorbar", **kwargs ): super(TicksValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_ticks.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/__init__.py", "type": "Python" }
""" SciPy: A scientific computing package for Python ================================================ Documentation is available in the docstrings and online at https://docs.scipy.org. Subpackages ----------- Using any of these subpackages requires an explicit import. For example, ``import scipy.cluster``. :: clus...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@__init__.py@.PATH_END.py
{ "filename": "convert_to_npy.py", "repo_name": "lsstdesc/sn_pipe", "repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/postprocessing/convert_to_npy.py", "type": "Python" }
import numpy as np from sn_tools.sn_io import convert_save import os from optparse import OptionParser parser = OptionParser() parser.add_option("--dbName", type="str", default='alt_sched', help="db name [%default]") parser.add_option("--dbDir", type="str", default='', help="db dir [%default]") pars...
lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@postprocessing@convert_to_npy.py@.PATH_END.py
{ "filename": "redshift_error_QSO.py", "repo_name": "Andrei-EPFL/generate_survey_mocks", "repo_path": "generate_survey_mocks_extracted/generate_survey_mocks-main/redshift_error_QSO.py", "type": "Python" }
#Author Shadab Alam, Nov 2021, To add redshift errors to QSOs import numpy as np def red_err_multi_gaussian(amps=np.array([1.0]), sigmas=np.array([500]), plots=False): '''build the distribution of redshift error you can give as many component as you like the sum of amps should be 1''' assert(np.abs(a...
Andrei-EPFLREPO_NAMEgenerate_survey_mocksPATH_START.@generate_survey_mocks_extracted@generate_survey_mocks-main@redshift_error_QSO.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tuoyl/tat-pulsar", "repo_path": "tat-pulsar_extracted/tat-pulsar-master/tatpulsar/__init__.py", "type": "Python" }
tuoylREPO_NAMEtat-pulsarPATH_START.@tat-pulsar_extracted@tat-pulsar-master@tatpulsar@__init__.py@.PATH_END.py
{ "filename": "TUI_cosmo.py", "repo_name": "astrom-tom/SPARTAN", "repo_path": "SPARTAN_extracted/SPARTAN-master/spartan/TUI_cosmo.py", "type": "Python" }
''' ############################ ##### ##### The Spartan Project ##### R. THOMAS ##### 2016 ##### ##### File of the cosmo ##### page TUI ##### ########################### @License: GPL licence - see LICENCE.txt ''' ####Third party## import npyscreen ################# class Cosmo_win: """ Th...
astrom-tomREPO_NAMESPARTANPATH_START.@SPARTAN_extracted@SPARTAN-master@spartan@TUI_cosmo.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/annotation/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.scene.annotation", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@annotation@_width.py@.PATH_END.py
{ "filename": "pantheonplusshoes.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/sn/pantheonplusshoes.py", "type": "Python" }
from .pantheonplus import PantheonPlus class PantheonPlusShoes(PantheonPlus): """ Likelihood for Pantheon+ (with SH0ES) type Ia supernovae sample. Reference --------- https://arxiv.org/abs/2202.04077 """ def configure(self): self._apply_mask((self.zcmb > 0.01) | self.is_calibrato...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@sn@pantheonplusshoes.py@.PATH_END.py
{ "filename": "test_simulator.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/tests/distributions/test_simulator.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@distributions@test_simulator.py@.PATH_END.py
{ "filename": "psf.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/tractor/psf.py", "type": "Python" }
from __future__ import print_function from __future__ import division import sys import functools import numpy as np from tractor.image import Image from tractor.pointsource import PointSource from tractor.wcs import PixPos from tractor.brightness import Flux from tractor.engine import Tractor from tractor.patch imp...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@tractor@psf.py@.PATH_END.py
{ "filename": "Units.ipynb", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/ipython_examples/Units.ipynb", "type": "Jupyter Notebook" }
# Unit convenience functions For convenience, REBOUND offers simple functionality for converting units. One implicitly sets the units for the simulation through the values used for the initial conditions, but one has to set the appropriate value for the gravitational constant `G`, and sometimes it is convenient to ge...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@ipython_examples@Units.ipynb@.PATH_END.py
{ "filename": "polyml.py", "repo_name": "COSMOGRAIL/PyCS", "repo_path": "PyCS_extracted/PyCS-master/pycs/gen/polyml.py", "type": "Python" }
""" One season -- one microlensing This potentially allows to optimize one season after the other, thus reducing the number of simultaneous parameters, but of course you can still choose to optimize evrything at once (when using dispersion). When using a spline fit, optimizing a polynom corresponds to weighted to line...
COSMOGRAILREPO_NAMEPyCSPATH_START.@PyCS_extracted@PyCS-master@pycs@gen@polyml.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/newshape/label/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.newshape.label.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@newshape@label@font@_style.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="sunburst.marker.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@marker@colorbar@_tickvals.py@.PATH_END.py