metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "__main__.py", "repo_name": "simonsobs/BBPower", "repo_path": "BBPower_extracted/BBPower-main/bbpower/__main__.py", "type": "Python" }
# This file must exist with these contents from . import * if __name__ == '__main__': PipelineStage.main()
simonsobsREPO_NAMEBBPowerPATH_START.@BBPower_extracted@BBPower-main@bbpower@__main__.py@.PATH_END.py
{ "filename": "clone.py", "repo_name": "EigenDev/simbi", "repo_path": "simbi_extracted/simbi-main/simbi/clone.py", "type": "Python" }
import sys from pathlib import Path setup_clone = """# Auto-generate setup script template to quickly get up # and running with the code! All @simbi_property types # that have a default type can be removed completely if # one does not plan on changing any of these fields from simbi import ( BaseConfig, Dyn...
EigenDevREPO_NAMEsimbiPATH_START.@simbi_extracted@simbi-main@simbi@clone.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/chimera/tests/__init__.py", "type": "Python" }
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@chimera@tests@__init__.py@.PATH_END.py
{ "filename": "cmd_data.py", "repo_name": "i4Ds/sdo-cli", "repo_path": "sdo-cli_extracted/sdo-cli-main/src/sdo/cmd/cmd_data.py", "type": "Python" }
import click from sdo.cmd.data import cmd_download from sdo.cmd.data import cmd_patch from sdo.cmd.data import cmd_resize @click.group("data") def cli(): pass cli.add_command(cmd_download.download) cli.add_command(cmd_patch.patch) cli.add_command(cmd_resize.resize)
i4DsREPO_NAMEsdo-cliPATH_START.@sdo-cli_extracted@sdo-cli-main@src@sdo@cmd@cmd_data.py@.PATH_END.py
{ "filename": "test_ai21.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/llms/test_ai21.py", "type": "Python" }
"""Test AI21 llm""" from typing import cast from pydantic import SecretStr from pytest import CaptureFixture, MonkeyPatch from langchain_community.llms.ai21 import AI21 def test_api_key_is_secret_string() -> None: llm = AI21(ai21_api_key="secret-api-key") # type: ignore[arg-type] assert isinstance(llm.ai2...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@llms@test_ai21.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/openai/tests/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@openai@tests@__init__.py@.PATH_END.py
{ "filename": "plot_human_mitosis.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/doc/examples/applications/plot_human_mitosis.py", "type": "Python" }
""" ================================ Segment human cells (in mitosis) ================================ In this example, we analyze a microscopy image of human cells. We use data provided by Jason Moffat [1]_ through `CellProfiler <https://cellprofiler.org/examples/#human-cells>`_. .. [1] Moffat J, Grueneberg DA, Yang...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@examples@applications@plot_human_mitosis.py@.PATH_END.py
{ "filename": "ostr.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/ostr.md", "type": "Markdown" }
# Object importance {% include [object-importance-object-importance__intro](../_includes/work_src/reusage-common-phrases/object-importance__intro.md) %} ## {{ fit__ostr__ostr_type__PerPool }} {#oi__average} The average of scores of objects from the training dataset for every object from the input dataset. ## {{ ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@ostr.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/chardet/cli/__init__.py", "type": "Python" }
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@chardet@cli@__init__.py@.PATH_END.py
{ "filename": "radlite.py", "repo_name": "pontoppi/radlite", "repo_path": "radlite_extracted/radlite-master/pyradlite/pyradlite/radlite.py", "type": "Python" }
##FILE: Radlite ##PURPOSE: Contains the classes RadliteModel() and RadliteSpectrum(). ##Below Section: IMPORT necessary packages import astropy.constants as const from exutils import func_timer from datetime import datetime as dater import json import matplotlib.pyplot as plt import multiprocessing as mp import numpy...
pontoppiREPO_NAMEradlitePATH_START.@radlite_extracted@radlite-master@pyradlite@pyradlite@radlite.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/densitymap/hoverlabel/font/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): super(VariantsrcValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@hoverlabel@font@_variantsrc.py@.PATH_END.py
{ "filename": "determinism.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/matplotlib/testing/determinism.py", "type": "Python" }
""" Provides utilities to test output reproducibility. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import io import os import re import sys from subprocess import check_output import pytest import matplotlib from matplotlib import pypl...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@testing@determinism.py@.PATH_END.py
{ "filename": "primitives_f2.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/f2/primitives_f2.py", "type": "Python" }
# # gemini_python # # primitives_f2.py # ------------------------------------------------------------------------------ import numpy as np from gempy.gemini import gemini_tools as gt from gemp...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@f2@primitives_f2.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="heatmapgl.colorbar", **kwargs): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@colorbar@_tick0.py@.PATH_END.py
{ "filename": "organizer.py", "repo_name": "jkrogager/PyNOT", "repo_path": "PyNOT_extracted/PyNOT-master/pynot/data/organizer.py", "type": "Python" }
# -*- coding: UTF-8 -*- from collections import defaultdict import numpy as np import os import sys from glob import glob from astropy.io import fits from astropy.io.fits.file import AstropyUserWarning from astropy.time import Time import warnings import re from pynot import instrument from pynot.fitsio import verify...
jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@data@organizer.py@.PATH_END.py
{ "filename": "_gridwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/_gridwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="gridwidth", parent_name="layout.yaxis", **kwargs): super(GridwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@_gridwidth.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/library/cpp/diff/README.md", "type": "Markdown" }
Note: underlying algorithm `library/cpp/lcs` has complexity of O(r log n) by time and O(r) of additional memory, where r is the number of pairs (i, j) for which S1[i] = S2[j]. When comparing file with itself (or with little modifications) it becomes quadratic on the number of occurences of the most frequent line.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@library@cpp@diff@README.md@.PATH_END.py
{ "filename": "layer.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/layer.py", "type": "Python" }
"""Layer is an Operation with state. Takes care of: - Weights / variables (and tracking thereof) - deferred build - trainable argument value inference - masking - autocasting And some more magic: - add_loss - metric tracking - RNG seed tracking - activity regularization """ import collections import inspect import...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@layer.py@.PATH_END.py
{ "filename": "metadata.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/io/metadata.py", "type": "Python" }
""" Management of CTAO Reference Metadata. Definitions from :cite:`ctao-top-level-data-model`. This information is required to be attached to the header of any files generated. The class Reference collects all required reference metadata, and can be turned into a flat dictionary. The user should try to fill out all f...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@io@metadata.py@.PATH_END.py
{ "filename": "CHANGES.md", "repo_name": "gmbrandt/xwavecal", "repo_path": "xwavecal_extracted/xwavecal-main/CHANGES.md", "type": "Markdown" }
0.1.13 (2020-05-21) ------------------- - Fixed a bug in misc_utils.py that caused find_peaks() to crash when it tried to refine an empty set of features. 0.1.11 (2020-05-21) ------------------- - Limited the number of lines to try to pair during overlap fitting (to 20 from blue and 15 from the red side). This address...
gmbrandtREPO_NAMExwavecalPATH_START.@xwavecal_extracted@xwavecal-main@CHANGES.md@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "SterlingYM/astroPIPS", "repo_path": "astroPIPS_extracted/astroPIPS-master/tests/test_utils.py", "type": "Python" }
import unittest import numpy as np import PIPS class TestLPP(unittest.TestCase): def test_data_readin_LPP_regression_x(self): """ Regression test against previously read-in LPP data. """ data = PIPS.data_readin_LPP('PIPS/resources/sample_RRL/005.dat',filter='V') ...
SterlingYMREPO_NAMEastroPIPSPATH_START.@astroPIPS_extracted@astroPIPS-master@tests@test_utils.py@.PATH_END.py
{ "filename": "com_motion.py", "repo_name": "moble/scri", "repo_path": "scri_extracted/scri-main/scri/SpEC/com_motion.py", "type": "Python" }
#!/usr/bin/env python # Copyright (c) 2020, Michael Boyle # See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE> """Script and/or library to calculate optimal translation and boost from Horizons.h5 See docstrings below for more detail. To use this function from another scr...
mobleREPO_NAMEscriPATH_START.@scri_extracted@scri-main@scri@SpEC@com_motion.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "AndrewAnnex/SpiceyPy", "repo_path": "SpiceyPy_extracted/SpiceyPy-main/joss/paper.md", "type": "Markdown" }
--- title: 'SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit' tags: - Python - SPICE - ephemeris - geometry - navigation - spacecraft - planets authors: - name: Andrew M. Annex orcid: 0000-0002-0253-2313 affiliation: 1 - name: Ben Pearson affiliation: 2 - name: Benoît Seignovert or...
AndrewAnnexREPO_NAMESpiceyPyPATH_START.@SpiceyPy_extracted@SpiceyPy-main@joss@paper.md@.PATH_END.py
{ "filename": "grid_SAM.py", "repo_name": "JWST-ERS1386-AMI/SAMpy", "repo_path": "SAMpy_extracted/SAMpy-main/SAMpy/grid_SAM.py", "type": "Python" }
import sys from emcee.utils import MPIPool from emcee import PTSampler,EnsembleSampler import emcee import os from numpy import random import time import astropy.io.fits as pyfits import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import griddata from ipywidgets import IntProgress from IPython....
JWST-ERS1386-AMIREPO_NAMESAMpyPATH_START.@SAMpy_extracted@SAMpy-main@SAMpy@grid_SAM.py@.PATH_END.py
{ "filename": "qhull.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/spatial/qhull.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.spatial` namespace for importing the functions # included below. import warnings from . import _qhull __all__ = [ # noqa: F822 'ConvexHull', 'Delaunay', 'HalfspaceIntersection', 'QhullError', 'Voronoi',...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@spatial@qhull.py@.PATH_END.py
{ "filename": "FAQ.md", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/docs-old/pages/about/FAQ.md", "type": "Markdown" }
title: FAQ toc: [Documentation, FAQ] # FAQ Frequently asked questions with Crossbar.io, Autobahn and WAMP. * [The WAMP ecosystem](#the-wamp-ecosystem) + [What is the relationship between WAMP, Autobahn and Crossbar.io?](#what-is-the-relationship-between-wamp,-autobahn-and-crossbar.io?) + [What is WAMP?](#what-...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs-old@pages@about@FAQ.md@.PATH_END.py
{ "filename": "run_min.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/docs/src_examples/quickstart/run_min.py", "type": "Python" }
updated_info_minimizer, minimizer = run(info, minimize=True) # To get the maximum-a-posteriori: print(minimizer.products()["minimum"])
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@docs@src_examples@quickstart@run_min.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pyro-ppl/numpyro", "repo_path": "numpyro_extracted/numpyro-master/numpyro/compat/__init__.py", "type": "Python" }
pyro-pplREPO_NAMEnumpyroPATH_START.@numpyro_extracted@numpyro-master@numpyro@compat@__init__.py@.PATH_END.py
{ "filename": "_customdatasrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/_customdatasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scatter3d", **kwargs): super(CustomdatasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@_customdatasrc.py@.PATH_END.py
{ "filename": "test_regression.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/graphical/gaussian/test_regression.py", "type": "Python" }
import dill import autofit as af import autofit.graphical as ep from test_autofit.graphical.gaussian.model import Gaussian, Analysis def test_pickle(): prior_model = af.Model( Gaussian ) analysis_factor = ep.AnalysisFactor( prior_model, analysis=Analysis( x=1, ...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@graphical@gaussian@test_regression.py@.PATH_END.py
{ "filename": "_hovertextsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/_hovertextsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="ohlc", **kwargs): super(HovertextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@_hovertextsrc.py@.PATH_END.py
{ "filename": "test_dedispersion.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/tests/test_dedispersion.py", "type": "Python" }
""" Unit test for the lsl.misc.dedispersion module. """ import os import time import warnings import unittest import numpy as np from lsl.misc import dedispersion __version__ = "0.1" __author__ = "Jayce Dowell" class dedispersion_tests(unittest.TestCase): """A unittest.TestCase collection of unit tests for...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_dedispersion.py@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "histogram2dcontour.colorbar" _path_str = "histogram2dcontour.colorbar.tickfont" _valid_pro...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@histogram2dcontour@colorbar@_tickfont.py@.PATH_END.py
{ "filename": "mdrzobjects.py", "repo_name": "spacetelescope/stsdas_stripped", "repo_path": "stsdas_stripped_extracted/stsdas_stripped-master/stsdas/pkg/analysis/slitless/axe/axesrc/mdrzobjects.py", "type": "Python" }
""" $Revision: 1.3 $ $Date: 2010/04/28 06:42:43 $ Author: Martin Kuemmel (mkuemmel@stecf.org) Affiliation: Space Telescope - European Coordinating Facility WWW: http://www.stecf.org/software/slitless_software/axe/ """ from __future__ import absolute_import, print_function __author__ = "Martin Kuemmel <mkuemmel@eso.org...
spacetelescopeREPO_NAMEstsdas_strippedPATH_START.@stsdas_stripped_extracted@stsdas_stripped-master@stsdas@pkg@analysis@slitless@axe@axesrc@mdrzobjects.py@.PATH_END.py
{ "filename": "Forward_modeling_using_the_DIT_Cross_Section_for_methane.ipynb", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/documents/tutorials/Forward_modeling_using_the_DIT_Cross_Section_for_methane.ipynb", "type": "Jupyter Notebook" }
# Forward Modeling of an Emission Spectrum using the DIT Cross Section ```python from exojax.spec import rtransfer as rt from exojax.spec import dit from exojax.spec import lpf ``` ```python #ATMOSPHERE NP=100 T0=1295.0 #K Parr, dParr, k=rt.pressu...
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@documents@tutorials@Forward_modeling_using_the_DIT_Cross_Section_for_methane.ipynb@.PATH_END.py
{ "filename": "plot_phi2.py", "repo_name": "igomezv/simplemc_tests", "repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/plots/plot_phi2.py", "type": "Python" }
#!/usr/bin/env python #Error bars mainly got from table 3, #http://arxiv.org/pdf/1108.2635v1.pdf #and MGS paper import sys sys.path = ["Models", "Cosmo"] + sys.path from PhiCDMCosmology import PhiCosmology from LCDMCosmology import LCDMCosmology from ParamDefs import * import matplotlib.pyplot as plt import pylab i...
igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@plots@plot_phi2.py@.PATH_END.py
{ "filename": "planet.py", "repo_name": "ExoSim/ExoSimPublic", "repo_path": "ExoSimPublic_extracted/ExoSimPublic-master/exosim/classes/planet.py", "type": "Python" }
import os import numpy as np from ..classes import sed from ..lib import occultquad from ..lib.exolib import exosim_error from ..lib.exolib import exosim_msg import quantities as aq import multiprocessing from pytransit import QuadraticModel class Planet(object): """ Instantiate a Planet class Attribu...
ExoSimREPO_NAMEExoSimPublicPATH_START.@ExoSimPublic_extracted@ExoSimPublic-master@exosim@classes@planet.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/notebooks/README.md", "type": "Markdown" }
# `notebooks/` This directory contains jupyter notebooks and python scripts used to make plots for our papers. For example, `hazma_paper/` contains all the plots linked to under the figures in our code release paper. ## Decay Spectra The `decay_spectra` directory contains notebooks illustrating how the spectra from ...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@notebooks@README.md@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/_textfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="treemap", **kwargs): super(TextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@_textfont.py@.PATH_END.py
{ "filename": "add_pulsar.py", "repo_name": "plazar/TOASTER", "repo_path": "TOASTER_extracted/TOASTER-master/toolkit/pulsars/add_pulsar.py", "type": "Python" }
#!/usr/bin/env python """Script to add pulsars (and aliases) to the toaster database. """ import os.path import sys import traceback import copy import shlex from toaster import utils from toaster import database from toaster import errors from toaster.utils import notify from toaster.utils import cache SHORTNAME = '...
plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@toolkit@pulsars@add_pulsar.py@.PATH_END.py
{ "filename": "gcd_to_txt.py", "repo_name": "icecube/toise", "repo_path": "toise_extracted/toise-main/resources/scripts/data prep/gcd_to_txt.py", "type": "Python" }
#!/usr/bin/env python from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("gcd_file") parser.add_argument("text_file") args = parser.parse_args() import numpy from icecube import dataio, icetray f = dataio.I3File(args.gcd_file) fr = f.pop_frame(icetray.I3Frame.Geometry) f.close() geo ...
icecubeREPO_NAMEtoisePATH_START.@toise_extracted@toise-main@resources@scripts@data prep@gcd_to_txt.py@.PATH_END.py
{ "filename": "mode.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/pulse/mode.py", "type": "Python" }
import numpy as np from . transform import PulsationModeProperties from .. import utils, const as c, units from .. logger import getLogger from .. import settings logger = getLogger('pulse.mode') class PulsationMode(object): """ Pulsation mode data container. """ MANDATORY_KWARGS = ["l", "m", "ampli...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@pulse@mode.py@.PATH_END.py
{ "filename": "metrics.py", "repo_name": "utsav-akhaury/understanding-unets", "repo_path": "understanding-unets_extracted/understanding-unets-master/learning_wavelets/utils/metrics.py", "type": "Python" }
import bm3d import numpy as np import tensorflow.keras.backend as K from tqdm import tqdm_notebook from ..evaluate import Metrics from ..keras_utils.load_model import unpack_model from ..wavelet_denoising import wavelet_denoising_pysap def metrics_from_ds(ds, with_shape=True, name=None, **net_params): model = un...
utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@learning_wavelets@utils@metrics.py@.PATH_END.py
{ "filename": "chainconfig.md", "repo_name": "Samreay/ChainConsumer", "repo_path": "ChainConsumer_extracted/ChainConsumer-master/docs/api/chainconfig.md", "type": "Markdown" }
# ::: chainconsumer.ChainConfig
SamreayREPO_NAMEChainConsumerPATH_START.@ChainConsumer_extracted@ChainConsumer-master@docs@api@chainconfig.md@.PATH_END.py
{ "filename": "reference_distribution_infrastructure_tests.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/tests/test_generation/reference_distribution_infrastructure_tests.py", "type": "Python" }
# Note: this file is to be run locally, not on CI. It is only for tests of the # reference distribution *infrastructure*; unit tests of SciPy distributions # do not go here. import numpy as np import pytest from scipy import stats from numpy.testing import assert_allclose import scipy.stats.tests.test_generation.refe...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@tests@test_generation@reference_distribution_infrastructure_tests.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/annotation/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.annotation.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@annotation@font@_size.py@.PATH_END.py
{ "filename": "data_inspect_2458187.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/data_inspect/data_inspect_2458187.ipynb", "type": "Jupyter Notebook" }
```python import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import matplotlib.patches as mpatches import matplotlib.gridspec as gridspec import numpy as np from pyuvdata import UVCal, UVData import os import sys import glob import uvtools as uvt from astropy.time import ...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@data_inspect@data_inspect_2458187.ipynb@.PATH_END.py
{ "filename": "run_timing_tests.py", "repo_name": "LSSTDESC/Imsim", "repo_path": "Imsim_extracted/Imsim-main/tests/performance/run_timing_tests.py", "type": "Python" }
""" Run the timing tests comparing the sky background with bundled and unbundled photons and for a single star with and without the sensor model enabled and write the output to files for plotting. """ import sys import desc.imsim from timing_tests import sky_bg_timing, StarTimer, instcat seed = 1001 print("sky bg tim...
LSSTDESCREPO_NAMEImsimPATH_START.@Imsim_extracted@Imsim-main@tests@performance@run_timing_tests.py@.PATH_END.py
{ "filename": "generate_mask.py", "repo_name": "mommermi/cloudynight", "repo_path": "cloudynight_extracted/cloudynight-master/scripts/generate_mask.py", "type": "Python" }
""" Licensed under a 3-clause BSD style license - see LICENSE.rst This script creates a mask image that can be used to mask the local horizon in allsky camera images. If you want to use masking, which is highly recommended, use this script first! (c) 2020, Michael Mommert (mommermiscience@gmail.com) """ import cloud...
mommermiREPO_NAMEcloudynightPATH_START.@cloudynight_extracted@cloudynight-master@scripts@generate_mask.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@coloraxis@colorbar@title@font@_size.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/annotation/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.annotation", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@annotation@_font.py@.PATH_END.py
{ "filename": "test_stellar_estimators.py", "repo_name": "KeplerGO/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/tests/seismology/test_stellar_estimators.py", "type": "Python" }
from astropy import units as u import numpy as np from uncertainties import ufloat from lightkurve.seismology.stellar_estimators import ( NUMAX_SOL, DELTANU_SOL, TEFF_SOL, G_SOL, estimate_radius, estimate_mass, estimate_logg, ) cM = ufloat(1.30, 0.09) cR = ufloat(9.91, 0.24) clogg = ufloa...
KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@tests@seismology@test_stellar_estimators.py@.PATH_END.py
{ "filename": "CGCG453.py", "repo_name": "bronreichardtchu/koffee", "repo_path": "koffee_extracted/koffee-main/galaxy_info/CGCG453.py", "type": "Python" }
""" NAME: CGCG453.py AUTHOR: Bronwyn Reichardt Chu Swinburne 2021 EMAIL: <breichardtchu@swin.edu.au> PURPOSE: Keeps the info for CGCG453 Written on MacOS Mojave 10.14.5, with Python 3.7 """ cgcg453_red = { #'data_filepath' : '/Users/breichardtchu/Documents/data/cgcg453-062/cgcg453_red_test_data_broad_re...
bronreichardtchuREPO_NAMEkoffeePATH_START.@koffee_extracted@koffee-main@galaxy_info@CGCG453.py@.PATH_END.py
{ "filename": "delaunay3d.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/filters/delaunay3d.py", "type": "Python" }
# Author: Prabhu Ramachandran <prabhu_r at users dot sf dot net> # Copyright (c) 2006, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Instance from tvtk.api import tvtk # Local imports from mayavi.filters.filter_base import FilterBase from mayavi.core.pipeline_info import Pi...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@filters@delaunay3d.py@.PATH_END.py
{ "filename": "pill.py", "repo_name": "fraserw/TRIPPy", "repo_path": "TRIPPy_extracted/TRIPPy-master/trippy/pill.py", "type": "Python" }
#! /usr/bin/env python from __future__ import print_function, division from collections import namedtuple """ Copyright (C) 2016 Wesley Fraser 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, eithe...
fraserwREPO_NAMETRIPPyPATH_START.@TRIPPy_extracted@TRIPPy-master@trippy@pill.py@.PATH_END.py
{ "filename": "computeHugoniot.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Material/computeHugoniot.py", "type": "Python" }
#------------------------------------------------------------------------------- # Compute Hugoniot shock jump values for the given equation of state based on an # initial (density, energy, upiston) state. upiston can be a single value or # a numpy array. # Arguments: # eos: the equation of state to profile # ...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Material@computeHugoniot.py@.PATH_END.py
{ "filename": "go_funcs_U.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/benchmarks/benchmarks/go_benchmark_functions/go_funcs_U.py", "type": "Python" }
from numpy import abs, sin, cos, pi, sqrt from .go_benchmark import Benchmark class Ursem01(Benchmark): r""" Ursem 1 objective function. This class defines the Ursem 1 [1]_ global optimization problem. This is a unimodal minimization problem defined as follows: .. math:: f_{\text{Ursem...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@benchmarks@benchmarks@go_benchmark_functions@go_funcs_U.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "gbrammer/eazy-py", "repo_path": "eazy-py_extracted/eazy-py-master/eazy/tests/test_utils.py", "type": "Python" }
import numpy as np from .. import utils def test_milky_way(): """ Test that milky way extinction is avaliable """ import astropy.units as u f99 = utils.GalacticExtinction(EBV=1./3.1, Rv=3.1) # Out of range, test that at least run _ = f99(10) _ = f99(5.e4) _ = f99(10.e4) ...
gbrammerREPO_NAMEeazy-pyPATH_START.@eazy-py_extracted@eazy-py-master@eazy@tests@test_utils.py@.PATH_END.py
{ "filename": "_cliponaxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/_cliponaxis.py", "type": "Python" }
import _plotly_utils.basevalidators class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="bar", **kwargs): super(CliponaxisValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@_cliponaxis.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "ML4GW/aframe", "repo_path": "aframe_extracted/aframe-main/projects/data/data/fetch/main.py", "type": "Python" }
import logging import os from jsonargparse import ArgumentParser from data.fetch.fetch import fetch parser = ArgumentParser() parser.add_function_arguments(fetch) parser.add_argument("--output_directory", "-o", type=str) parser.add_argument("--prefix", "-p", type=str, default="background") def main(args=None): ...
ML4GWREPO_NAMEaframePATH_START.@aframe_extracted@aframe-main@projects@data@data@fetch@main.py@.PATH_END.py
{ "filename": "_dtype_ctypes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/_dtype_ctypes.py", "type": "Python" }
""" Conversion from ctypes to dtype. In an ideal world, we could achieve this through the PEP3118 buffer protocol, something like:: def dtype_from_ctypes_type(t): # needed to ensure that the shape of `t` is within memoryview.format class DummyStruct(ctypes.Structure): _fields_ = [('a',...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@_dtype_ctypes.py@.PATH_END.py
{ "filename": "mergers.py", "repo_name": "pynbody/tangos", "repo_path": "tangos_extracted/tangos-master/tangos/examples/mergers.py", "type": "Python" }
import numpy as np import tangos as db import tangos.relation_finding def get_mergers_of_major_progenitor(input_halo): """Given a halo, return the redshifts and ratios of all mergers on the major progenitor branch :parameter input_halo - the halo to consider the history of :type input_halo tangos.core.S...
pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@examples@mergers.py@.PATH_END.py
{ "filename": "_common.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/python-dateutil/py2/dateutil/_common.py", "type": "Python" }
""" Common code used in multiple modules. """ class weekday(object): __slots__ = ["weekday", "n"] def __init__(self, weekday, n=None): self.weekday = weekday self.n = n def __call__(self, n): if n == self.n: return self else: return self.__class__(...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@python-dateutil@py2@dateutil@_common.py@.PATH_END.py
{ "filename": "specpolflux.py", "repo_name": "saltastro/polsalt", "repo_path": "polsalt_extracted/polsalt-master/scripts/specpolflux.py", "type": "Python" }
""" specpolflux in current directory, save fluxcal table for flux standards in ec* files if an appropriate fluxcal file now exists, apply to listed _stokes.fits files """ import os import sys import glob import copy import shutil import inspect import numpy as np from astropy.io import fits as pyfits from astropy...
saltastroREPO_NAMEpolsaltPATH_START.@polsalt_extracted@polsalt-master@scripts@specpolflux.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "remingtonsexton/BADASS3", "repo_path": "BADASS3_extracted/BADASS3-master/README.md", "type": "Markdown" }
![BADASS logo](https://github.com/remingtonsexton/BADASS3/blob/master/figures/BADASS2_logo.gif) ## New in Version 10.2.0 * New line and configuration testing framework. See [Line Testing and Options](#line-testing-and-options). * Line component options. See [Line Component Options](#line-component-options). * Improv...
remingtonsextonREPO_NAMEBADASS3PATH_START.@BADASS3_extracted@BADASS3-master@README.md@.PATH_END.py
{ "filename": "point_source_tests.py", "repo_name": "swagnercarena/paltas", "repo_path": "paltas_extracted/paltas-main/test/point_source_tests.py", "type": "Python" }
import numpy as np import unittest from paltas.PointSource.point_source_base import PointSourceBase from paltas.PointSource.single_point_source import SinglePointSource from lenstronomy.LensModel.lens_model import LensModel from lenstronomy.LightModel.light_model import LightModel from lenstronomy.PointSource.point_sou...
swagnercarenaREPO_NAMEpaltasPATH_START.@paltas_extracted@paltas-main@test@point_source_tests.py@.PATH_END.py
{ "filename": "absorption_spectrum.py", "repo_name": "trident-project/trident", "repo_path": "trident_extracted/trident-main/trident/absorption_spectrum/absorption_spectrum.py", "type": "Python" }
""" AbsorptionSpectrum class and member functions. """ #----------------------------------------------------------------------------- # Copyright (c) 2013-2017, yt Development Team. # Copyright (c) 2017, Trident Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is i...
trident-projectREPO_NAMEtridentPATH_START.@trident_extracted@trident-main@trident@absorption_spectrum@absorption_spectrum.py@.PATH_END.py
{ "filename": "_textcasesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/violin/hoverlabel/font/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="violin.hoverlabel.font", **kwargs ): super(TextcasesrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@violin@hoverlabel@font@_textcasesrc.py@.PATH_END.py
{ "filename": "plot_repeaters.py", "repo_name": "HeRTA/FRBSTATS", "repo_path": "FRBSTATS_extracted/FRBSTATS-main/figs/repeaters/plot_repeaters.py", "type": "Python" }
import sys import json from csv import reader import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt ### Set MPL plot parameters # Selectable SVG text plt.rcParams['svg.fonttype'] = 'none' # Use TeX plt.rcParams['text.usetex'] = True # Set figsize plt.rcParams["figure.figsize"] = (24,12) plt.rc...
HeRTAREPO_NAMEFRBSTATSPATH_START.@FRBSTATS_extracted@FRBSTATS-main@figs@repeaters@plot_repeaters.py@.PATH_END.py
{ "filename": "importstring.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/traitlets/py2/traitlets/utils/importstring.py", "type": "Python" }
# encoding: utf-8 """ A simple utility to import something by its string name. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from ipython_genutils.py3compat import cast_bytes_py2 from six import string_types def import_item(name): """Import and return ``b...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@traitlets@py2@traitlets@utils@importstring.py@.PATH_END.py
{ "filename": "data.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/python-package/xgboost/spark/data.py", "type": "Python" }
# pylint: disable=protected-access """Utilities for processing spark partitions.""" from collections import defaultdict, namedtuple from typing import Any, Callable, Dict, Iterator, List, Optional, Sequence, Tuple, Union import numpy as np import pandas as pd from scipy.sparse import csr_matrix from .._typing import ...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@python-package@xgboost@spark@data.py@.PATH_END.py
{ "filename": "output.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/vector_ar/output.py", "type": "Python" }
from statsmodels.compat.python import lzip from io import StringIO import numpy as np from statsmodels.iolib import SimpleTable mat = np.array _default_table_fmt = dict( empty_cell = '', colsep=' ', row_pre = '', row_post = '', table_dec_above='=', table_dec_below='=', header_dec_below...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@vector_ar@output.py@.PATH_END.py
{ "filename": "installation_guide.md", "repo_name": "astroCV/astroCV", "repo_path": "astroCV_extracted/astroCV-master/installation_guide.md", "type": "Markdown" }
# Installation guide AstroCV The following steps have been tested with Ubuntu 16.04 and Python 2.7. The GPU used is Nvidia GTX1060. For every requisite for AstroCV, you can follow the respective installation guide, but the main steps will still be included here. Check you have the mentioned versions of CUDA, OpenCV an...
astroCVREPO_NAMEastroCVPATH_START.@astroCV_extracted@astroCV-master@installation_guide.md@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/selected/_textfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattergeo.selected", **kwargs ): super(TextfontValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@selected@_textfont.py@.PATH_END.py
{ "filename": "text-processing__test-processing__default-value.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/references/text-processing__test-processing__default-value.md", "type": "Markdown" }
# Text processing default JSON ```json { "tokenizers" : [{ "tokenizer_id" : "Space", "separator_type" : "ByDelimiter", "delimiter" : " " }], "dictionaries" : [{ "dictionary_id" : "BiGram", "max_dictionary_size" : "50000", "occurrence_lower_bound" : "3", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@references@text-processing__test-processing__default-value.md@.PATH_END.py
{ "filename": "test_hernquist.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LightModel/test_Profiles/test_hernquist.py", "type": "Python" }
from lenstronomy.LightModel.Profiles.hernquist import Hernquist, HernquistEllipse from lenstronomy.Util.util import make_grid import numpy as np import numpy.testing as npt class TestHernquist(object): def setup_method(self): self.hernquist = Hernquist() self.hernquist_ellipse = HernquistEllipse(...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LightModel@test_Profiles@test_hernquist.py@.PATH_END.py
{ "filename": "test_sed_zebra.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/examples/sources/test_sed_zebra.py", "type": "Python" }
""" test_sed_zebra.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Wed Jan 22 17:15:49 MST 2014 Description: """ import rt1d import numpy as np import matplotlib.pyplot as pl mass = 10. rmax = 1e3 f_scatter = [0.1, 0.5, 1.0] gamma = [-1.5] Emin = 1e-1 zebra = \ { 'source_...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@examples@sources@test_sed_zebra.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/hoverlabel/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@hoverlabel@font@_size.py@.PATH_END.py
{ "filename": "_max_len_seq.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/signal/_max_len_seq.py", "type": "Python" }
# Author: Eric Larson # 2014 """Tools for MLS generation""" import numpy as np from ._max_len_seq_inner import _max_len_seq_inner __all__ = ['max_len_seq'] # These are definitions of linear shift register taps for use in max_len_seq() _mls_taps = {2: [1], 3: [2], 4: [3], 5: [3], 6: [5], 7: [6], 8: [7, 6, 1], ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@signal@_max_len_seq.py@.PATH_END.py
{ "filename": "simulate.py", "repo_name": "MNGuenther/allesfitter", "repo_path": "allesfitter_extracted/allesfitter-master/allesfitter/v2/simulate.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 29 17:24:48 2019 @author: Maximilian N. Günther MIT Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02109, USA Email: maxgue@mit.edu Web: www.mnguenther.com """ fr...
MNGuentherREPO_NAMEallesfitterPATH_START.@allesfitter_extracted@allesfitter-master@allesfitter@v2@simulate.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/cr/__init__.py", "type": "Python" }
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@cr@__init__.py@.PATH_END.py
{ "filename": "DustEmission.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/physics/DustEmission.py", "type": "Python" }
""" DustEmission.py Author: Felix Bilodeau-Chagnon Affiliation: McGill University Created on: Thursday 9 July 2020 17:03:55 EDT Description: Contains a class which calculates the dust emissions for each galaxy in a GalaxyEnsemble object based on Imara et al. (2018). """ import numpy as np from scipy.integrate impo...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@physics@DustEmission.py@.PATH_END.py
{ "filename": "_fillmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/pattern/_fillmode.py", "type": "Python" }
import _plotly_utils.basevalidators class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="treemap.marker.pattern", **kwargs ): super(FillmodeValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@pattern@_fillmode.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/title/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.title.font", **kwargs): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@title@font@_color.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/image/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="image", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, d...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@image@_stream.py@.PATH_END.py
{ "filename": "test_random.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/math/tests/test_random.py", "type": "Python" }
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np from ..random import RandomArbitraryPdf # Any number will do. Just make it repeatable. np.random.seed(12324) def test_return_right_pdf(): x = np.arange(10.) f = x ** 2. rand = RandomArbitraryPdf(x, f) draws = rand(10000) draws.so...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@math@tests@test_random.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@caxis@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "varma.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/sandbox/tsa/varma.py", "type": "Python" }
'''VAR and VARMA process this does not actually do much, trying out a version for a time loop alternative representation: * textbook, different blocks in matrices * Kalman filter * VAR, VARX and ARX could be calculated with signal.lfilter only tried some examples, not implemented TODO: try minimizing sum of square...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@sandbox@tsa@varma.py@.PATH_END.py
{ "filename": "_zeroline.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/xaxis/_zeroline.py", "type": "Python" }
import _plotly_utils.basevalidators class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="zeroline", parent_name="layout.xaxis", **kwargs): super(ZerolineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@xaxis@_zeroline.py@.PATH_END.py
{ "filename": "ifu_util.py", "repo_name": "sibirrer/hierArc", "repo_path": "hierArc_extracted/hierArc-main/hierarc/Util/ifu_util.py", "type": "Python" }
"""This file contains routines to process the data format of the SLACS IFU data set to be binned in radial annuli and for error estimates.""" import numpy as np import astropy.io.fits as fits def binned_dispersion(dispersion_map, weight_map, flux_map, fiber_scale, r_bins): """ :param dispersion_map: 2d arra...
sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@hierarc@Util@ifu_util.py@.PATH_END.py
{ "filename": "get-pip.py", "repo_name": "ARCLab-MIT/kspdg", "repo_path": "kspdg_extracted/kspdg-main/get-pip.py", "type": "Python" }
#!/usr/bin/env python # # Hi There! # # You may be wondering what this giant blob of binary data here is, you might # even be worried that we're up to something nefarious (good for you for being # paranoid!). This is a base85 encoding of a zip file, this zip file contains # an entire copy of pip (version 23.2.1). # # P...
ARCLab-MITREPO_NAMEkspdgPATH_START.@kspdg_extracted@kspdg-main@get-pip.py@.PATH_END.py
{ "filename": "equilibrium_halos.py", "repo_name": "jakobherpich/pyICs", "repo_path": "pyICs_extracted/pyICs-master/pyICs/equilibrium_halos.py", "type": "Python" }
""" Copyright (C) 2015 Jakob Herpich (herpich@mpia.de) 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 2 of the License, or (at your option) any later version. ...
jakobherpichREPO_NAMEpyICsPATH_START.@pyICs_extracted@pyICs-master@pyICs@equilibrium_halos.py@.PATH_END.py
{ "filename": "from_model.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/feature_selection/from_model.py", "type": "Python" }
# Authors: Gilles Louppe, Mathieu Blondel, Maheshakya Wijewardena # License: BSD 3 clause import numpy as np from .base import SelectorMixin from ..base import TransformerMixin, BaseEstimator, clone from ..externals import six from ..utils import safe_mask, check_array, deprecated from ..utils.validation import chec...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@feature_selection@from_model.py@.PATH_END.py
{ "filename": "socket.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/sugar/socket.py", "type": "Python" }
# coding: utf-8 """0MQ Socket pure Python methods.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import errno import random import sys import warnings import zmq from zmq.backend import Socket as SocketBase from .poll import Poller from . import constants from .attrs...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@sugar@socket.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="histogram2d.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2d@hoverlabel@font@_familysrc.py@.PATH_END.py
{ "filename": "Tutorial-TOV-Piecewise_Polytrope_EOSs.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/Tutorial-TOV-Piecewise_Polytrope_EOSs.ipynb", "type": "Jupyter Notebook" }
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Tutorial: Implementation of Single and Piecewise Polytrop...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Tutorial-TOV-Piecewise_Polytrope_EOSs.ipynb@.PATH_END.py
{ "filename": "linear_wave_parts_live.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/applications/linear_wave_parts_live.py", "type": "Python" }
""" In this script we simulate a 1d linear wave in a 2d field, the periodic boundaries are not handled in the code but by amuse (much slower at time of writing) """ import sys import numpy # import math # from amuse.support.core import late # from amuse.units.quantities import VectorQuantity from amuse.units.generic_u...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@applications@linear_wave_parts_live.py@.PATH_END.py
{ "filename": "snr_metric.md", "repo_name": "lsstdesc/sn_pipe", "repo_path": "sn_pipe_extracted/sn_pipe-master/docs/Metrics/snr_metric.md", "type": "Markdown" }
# SNR metric ## Definition This metric is an estimate of the fraction of faint [(x1,color) = (-2.0,0.2)] supernovae with a Signal-to-Noise Ratio (SNR) higher or equal to the SNR corresponding to a regular cadence. It is defined per band and is a reasonable estimate of the gap effects on SN detection. Let us suppose t...
lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@docs@Metrics@snr_metric.md@.PATH_END.py
{ "filename": "_placement.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/mapbox/layer/symbol/_placement.py", "type": "Python" }
import _plotly_utils.basevalidators class PlacementValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="placement", parent_name="layout.mapbox.layer.symbol", **kwargs ): super(PlacementValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@mapbox@layer@symbol@_placement.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/root/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._color.ColorValidator"] )
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@root@__init__.py@.PATH_END.py