metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "enc_int_wrapper.py", "repo_name": "masoncarney/stepped_luneburg", "repo_path": "stepped_luneburg_extracted/stepped_luneburg-master/scripts/enc_int_wrapper.py", "type": "Python" }
import os, sys import numpy as np import pylab as pl try: from enclosed_intensity import enc_int except: raise ImportError("Cannot import module enc_int. Try updating the PYTHONPATH variable to include the path to the directory containing enclosed_intensity.py") ''' Wrapper script for function enc_int(). Requ...
masoncarneyREPO_NAMEstepped_luneburgPATH_START.@stepped_luneburg_extracted@stepped_luneburg-master@scripts@enc_int_wrapper.py@.PATH_END.py
{ "filename": "_reversescale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/line/_reversescale.py", "type": "Python" }
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@line@_reversescale.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "xgds/xgds_core", "repo_path": "xgds_core_extracted/xgds_core-master/xgds_core/util.py", "type": "Python" }
# __BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance...
xgdsREPO_NAMExgds_corePATH_START.@xgds_core_extracted@xgds_core-master@xgds_core@util.py@.PATH_END.py
{ "filename": "test_predicted_zeropoints.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/tests/phot_utils/test_predicted_zeropoints.py", "type": "Python" }
import unittest import numpy as np from rubin_scheduler.utils import SysEngVals from rubin_sim.phot_utils import ( predicted_zeropoint, predicted_zeropoint_e2v, predicted_zeropoint_hardware, predicted_zeropoint_hardware_e2v, predicted_zeropoint_hardware_itl, predicted_zeropoint_itl, ) class ...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@tests@phot_utils@test_predicted_zeropoints.py@.PATH_END.py
{ "filename": "_outlinewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/colorbar/_outlinewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="streamtube.colorbar", **kwargs ): super(OutlinewidthValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@colorbar@_outlinewidth.py@.PATH_END.py
{ "filename": "test_plot.py", "repo_name": "iraf-community/pyraf", "repo_path": "pyraf_extracted/pyraf-main/pyraf/tests/test_plot.py", "type": "Python" }
import pytest import os from .utils import HAS_IRAF from pyraf import gki from ..tools import capable if HAS_IRAF: from pyraf import iraf else: pytestmark = pytest.mark.skip('Need IRAF to run') try: import tkinter tkinter.Tk().destroy() except Exception: pytestmark = pytest.mark.skip('No graphics ...
iraf-communityREPO_NAMEpyrafPATH_START.@pyraf_extracted@pyraf-main@pyraf@tests@test_plot.py@.PATH_END.py
{ "filename": "cli-reference_eval-metrics.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/cli-reference_eval-metrics.md", "type": "Markdown" }
# Calculate metrics ## {{ dl--purpose }} {#purpose} Calculate metrics for a given dataset using a previously trained model. ## {{ dl__cli__execution-format }} {#execution-format} ``` catboost eval-metrics --metrics <comma-separated list of metrics> [optional parameters] ``` ## {{ common-text__title__reference__par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@cli-reference_eval-metrics.md@.PATH_END.py
{ "filename": "XID+SED_example.ipynb", "repo_name": "H-E-L-P/XID_plus", "repo_path": "XID_plus_extracted/XID_plus-master/docs/build/doctrees/nbsphinx/notebooks/examples/XID+SED_example.ipynb", "type": "Jupyter Notebook" }
# XID+SED Example Run Script (This is based on a Jupyter notebook, available in the [XID+ package](https://github.com/H-E-L-P/XID_plus/tree/master/docs/notebooks/examples/) and can be interactively run and edited) XID+ is a probababilistic deblender for confusion dominated maps. It is designed to: 1. Use a MCMC base...
H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@doctrees@nbsphinx@notebooks@examples@XID+SED_example.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "RafiKueng/SpaghettiLens", "repo_path": "SpaghettiLens_extracted/SpaghettiLens-master/SpaghettiLensProject/Lenses/tests/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*-
RafiKuengREPO_NAMESpaghettiLensPATH_START.@SpaghettiLens_extracted@SpaghettiLens-master@SpaghettiLensProject@Lenses@tests@__init__.py@.PATH_END.py
{ "filename": "_error_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/_error_y.py", "type": "Python" }
import _plotly_utils.basevalidators class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="scattergl", **kwargs): super(Error_YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@_error_y.py@.PATH_END.py
{ "filename": "freetype.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/ext/freetype.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Handle loading freetype package from system or from the bundled copy """ try: from ._bundled.freetype import * # noqa except ImportError: from freetype import * ...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@ext@freetype.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "jzuhone/pyxsim", "repo_path": "pyxsim_extracted/pyxsim-main/pyxsim/tests/conftest.py", "type": "Python" }
import os import pytest def pytest_addoption(parser): parser.addoption("--check_dir", help="Directory where spectrum checks are stored.") parser.addoption( "--answer_store", action="store_true", help="Generate new answers, but don't test.", ) @pytest.fixture() def answer_store(r...
jzuhoneREPO_NAMEpyxsimPATH_START.@pyxsim_extracted@pyxsim-main@pyxsim@tests@conftest.py@.PATH_END.py
{ "filename": "splittable.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/workflow/splittable.py", "type": "Python" }
# Copyright (C) 2013 Ian Harry # # 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 distributed in the...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@workflow@splittable.py@.PATH_END.py
{ "filename": "_namelengthsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/hoverlabel/_namelengthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="pie.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@hoverlabel@_namelengthsrc.py@.PATH_END.py
{ "filename": "_showtickprefix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/_showtickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="carpet.baxis", **kwargs ): super(ShowtickprefixValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@baxis@_showtickprefix.py@.PATH_END.py
{ "filename": "_meta.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/_meta.py", "type": "Python" }
import _plotly_utils.basevalidators class MetaValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattermapbox", **kwargs): super(MetaValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, arra...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@_meta.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergeo.marker.colorbar", **kwargs, ): super(ThicknessValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@colorbar@_thickness.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/title/__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 ._side import SideValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "analysis.particles.md", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/docs/source/api/analysis.particles.md", "type": "Markdown" }
# Extra particle quantities ```{eval-rst} .. automodule:: plonk.analysis.particles :members: ```
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@docs@source@api@analysis.particles.md@.PATH_END.py
{ "filename": "test_utils_numba.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/tests/base_tests/test_utils_numba.py", "type": "Python" }
# pylint: disable=redefined-outer-name, no-member """Tests for arviz.utils.""" import importlib from unittest.mock import Mock import numpy as np import pytest from ...stats.stats_utils import stats_variance_2d as svar from ...utils import Numba, _numba_var, numba_check from ..helpers import importorskip from .test_u...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@tests@base_tests@test_utils_numba.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/legendgrouptitle/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.legendgrouptitle.font", **kwargs, ): super(TextcaseValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@legendgrouptitle@font@_textcase.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "COSMOGRAIL/PyCS", "repo_path": "PyCS_extracted/PyCS-master/pycs/regdiff2/__init__.py", "type": "Python" }
""" Regression difference curve shifting technique, using gaussian process regression. """ __all__ = ["rslc", "multiopt", "gpr"] import rslc import multiopt import gpr
COSMOGRAILREPO_NAMEPyCSPATH_START.@PyCS_extracted@PyCS-master@pycs@regdiff2@__init__.py@.PATH_END.py
{ "filename": "_len.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/colorbar/_len.py", "type": "Python" }
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="len", parent_name="densitymap.colorbar", **kwargs): super(LenValidator, 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@densitymap@colorbar@_len.py@.PATH_END.py
{ "filename": "idealized.py", "repo_name": "pynbody/genetIC", "repo_path": "genetIC_extracted/genetIC-master/tools/toy_implementation/constrainedzoom/methods/idealized.py", "type": "Python" }
import copy import numpy as np from . import ZoomConstrained, UnfilteredZoomConstrained from ..fft_wrapper import FFTArray, in_real_space, in_fourier_space, complex_dot from ..power_spectrum import powerlaw_covariance class IdealizedZoomConstrained(ZoomConstrained): """Calculate the low-res/high-res split by maki...
pynbodyREPO_NAMEgenetICPATH_START.@genetIC_extracted@genetIC-master@tools@toy_implementation@constrainedzoom@methods@idealized.py@.PATH_END.py
{ "filename": "filter.py", "repo_name": "lpsinger/ligo.skymap", "repo_path": "ligo.skymap_extracted/ligo.skymap-main/ligo/skymap/bayestar/filter.py", "type": "Python" }
# # Copyright (C) 2013-2024 Leo Singer # # 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 distribute...
lpsingerREPO_NAMEligo.skymapPATH_START.@ligo.skymap_extracted@ligo.skymap-main@ligo@skymap@bayestar@filter.py@.PATH_END.py
{ "filename": "cube.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/cube.py", "type": "Python" }
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@cube.py@.PATH_END.py
{ "filename": "get_data.py", "repo_name": "multipass-black-holes/multipass", "repo_path": "multipass_extracted/multipass-main/get_data.py", "type": "Python" }
import requests import re import time import subprocess import tarfile import os def list_catalog(name): print(f"Fetching catalog {name}...", end="") alias = { 'gwtc-1': 'GWTC-1-confident', 'gwtc-2': 'GWTC-2', 'gwtc-2.1': 'GWTC-2.1-confident', 'gwtc-3': 'GWTC-3-confident', ...
multipass-black-holesREPO_NAMEmultipassPATH_START.@multipass_extracted@multipass-main@get_data.py@.PATH_END.py
{ "filename": "_ticktext.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/colorbar/_ticktext.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="volume.colorbar", **kwargs): super(TicktextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@colorbar@_ticktext.py@.PATH_END.py
{ "filename": "python-reference_catboostregressor_plot_predictions.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboostregressor_plot_predictions.md", "type": "Markdown" }
# plot_predictions {% include [plot_predictions-plot_predictions__desc__full](../_includes/work_src/reusage-python/plot_predictions__desc__full.md) %} ## {{ dl--parameters }} {#parameters} ### data #### Description The data to plot predictions for. For example, use a two-document slice of the original dataset (re...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboostregressor_plot_predictions.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gemini_instruments/oscir/tests/__init__.py", "type": "Python" }
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gemini_instruments@oscir@tests@__init__.py@.PATH_END.py
{ "filename": "test_memory_astradb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/memory/test_memory_astradb.py", "type": "Python" }
import os from typing import AsyncIterable, Iterable import pytest from langchain.memory import ConversationBufferMemory from langchain_core.messages import AIMessage, HumanMessage from langchain_community.chat_message_histories.astradb import ( AstraDBChatMessageHistory, ) from langchain_community.utilities.astr...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@memory@test_memory_astradb.py@.PATH_END.py
{ "filename": "yt_gadget_owls_analysis.ipynb", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/doc/source/cookbook/yt_gadget_owls_analysis.ipynb", "type": "Jupyter Notebook" }
# Loading Gadget OWLS Data ## Setup The first thing you will need to run these examples is a working installation of yt. The author or these examples followed the instructions under "Get yt: from source" at https://yt-project.org/ to install an up to date development version of yt. We will be working with an OWLS s...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@yt_gadget_owls_analysis.ipynb@.PATH_END.py
{ "filename": "plot_adaboost_regression.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/ensemble/plot_adaboost_regression.py", "type": "Python" }
""" ====================================== Decision Tree Regression with AdaBoost ====================================== A decision tree is boosted using the AdaBoost.R2 [1]_ algorithm on a 1D sinusoidal dataset with a small amount of Gaussian noise. 299 boosts (300 decision trees) is compared with a single decision t...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@ensemble@plot_adaboost_regression.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "LSSTDESC/descqa", "repo_path": "descqa_extracted/descqa-master/descqa/base.py", "type": "Python" }
from __future__ import division, unicode_literals, absolute_import import os __all__ = ['BaseValidationTest', 'TestResult'] class TestResult(object): """ class for passing back test result """ def __init__(self, score=None, summary=None, passed=False, skipped=False, inspect_only=False): """ ...
LSSTDESCREPO_NAMEdescqaPATH_START.@descqa_extracted@descqa-master@descqa@base.py@.PATH_END.py
{ "filename": "binary.py", "repo_name": "laristra/flecsph", "repo_path": "flecsph_extracted/flecsph-master/tools/starID_tools/nsID_tov/binary.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright (c) 2017 Triad National Security, LLC # All rights reserved. # Author : Hyun Lim # Date : Jun3.27.2017, Updated : Oct.8.2019 # This is a python script that generates binary system in Keperlian orbit # Usage : binary.py <separation> <input1> <input2> <output_name> from __future__ i...
laristraREPO_NAMEflecsphPATH_START.@flecsph_extracted@flecsph-master@tools@starID_tools@nsID_tov@binary.py@.PATH_END.py
{ "filename": "blast_sph.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/curvilinear/blast_sph.py", "type": "Python" }
# Regression test to check whether blast wave remains spherical in spherical_polar coords # Modules import logging import scripts.utils.athena as athena import sys sys.path.insert(0, '../../vis/python') import athena_read # noqa athena_read.check_nan_flag = True logger = logging.getLogger('athena' + __name__[7:]) # ...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@curvilinear@blast_sph.py@.PATH_END.py
{ "filename": "_ticklabelposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="cone.colorbar", **kwargs ): super(TicklabelpositionValidator, self).__init__( plotly_name=plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "definitions.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/tipsy/definitions.py", "type": "Python" }
npart_mapping = {"Gas": "nsph", "DarkMatter": "ndark", "Stars": "nstar"}
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@tipsy@definitions.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="bar", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=kwargs.pop("...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@_y.py@.PATH_END.py
{ "filename": "io.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/enzo_e/io.py", "type": "Python" }
import numpy as np from yt.frontends.enzo_e.misc import get_particle_mass_correction, nested_dict_get from yt.utilities.exceptions import YTException from yt.utilities.io_handler import BaseIOHandler from yt.utilities.on_demand_imports import _h5py as h5py class EnzoEIOHandler(BaseIOHandler): _dataset_type = "en...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@enzo_e@io.py@.PATH_END.py
{ "filename": "spec_mode_stage_2.ipynb", "repo_name": "spacetelescope/jwebbinar_prep", "repo_path": "jwebbinar_prep_extracted/jwebbinar_prep-main/spec_mode/spec_mode_stage_2.ipynb", "type": "Jupyter Notebook" }
<a id='top'></a> # JWST Spectroscopic Data Calibration: Pipeline Stage 2 --- **Authors**: Maria Pena-Guerrero (pena@stsci.edu), Jo Taylor (jotaylor@stsci.edu) Based on original notebooks by Bryan Hilbert (hilbert@stsci.edu) **Latest Update**: Dec. 8, 2022 <div class="alert alert-block alert-warning"> <h3><u><b...
spacetelescopeREPO_NAMEjwebbinar_prepPATH_START.@jwebbinar_prep_extracted@jwebbinar_prep-main@spec_mode@spec_mode_stage_2.ipynb@.PATH_END.py
{ "filename": "stats_dist_funnel.ipynb", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/notebooks/stats_dist_tests/stats_dist_funnel.ipynb", "type": "Jupyter Notebook" }
--- **License** stats_dist_funnel Mon Jan 25 20:56:00 2020\ Copyright 2021\ Sandro Dias Pinto Vitenti <vitenti@uel.br> --- --- stats_dist_funnel\ Copyright (C) 2021 Sandro Dias Pinto Vitenti <vitenti@uel.br> numcosmo is free software: you can redistribute it and/or modify it under the terms of the GNU Ge...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@notebooks@stats_dist_tests@stats_dist_funnel.ipynb@.PATH_END.py
{ "filename": "2023_01_26_045501_2882cd2df464_create_migration_index.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2023_01_26_045501_2882cd2df464_create_migration_index.py", "type": "Python" }
"""Adds a helper index for the artifact data migration Revision ID: 2882cd2df464 Revises: 2882cd2df463 Create Date: 2023-01-26 04:55:01.358638 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "2882cd2df464" down_revision = "2882cd2df463" branch_labels = None dep...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2023_01_26_045501_2882cd2df464_create_migration_index.py@.PATH_END.py
{ "filename": "array_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/parallel_for/array_test.py", "type": "Python" }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@parallel_for@array_test.py@.PATH_END.py
{ "filename": "mockup.py", "repo_name": "pyDANDIA/pyDANDIA", "repo_path": "pyDANDIA_extracted/pyDANDIA-main/trials/db/mockup.py", "type": "Python" }
""" Produce some mockup data to fill the database with test data. """ import random import os from os import getcwd, path from sys import path as systempath cwd = getcwd() systempath.append(path.join(cwd, '../')) from phot_db import * def fill_with_fake_entries(): conn = get_connection(database_file_path) en...
pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@trials@db@mockup.py@.PATH_END.py
{ "filename": "testsim.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/simulator/testsim.py", "type": "Python" }
import pyghost.tests import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-cosmics', action='store_false', help="*don't* add in" " cosmic rays to the generated frames") parser.add_argument('-crplane', action='store_true', help='output co...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@simulator@testsim.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "QEF/q-e", "repo_path": "q-e_extracted/q-e-master/KCW/examples/example05.1/nspin1/0_dft/README.md", "type": "Markdown" }
# Run the calculations in the following way: pw.x < scf.pwi | tee scf.pwo pw.x < bands.pwi | tee bands.pwo bands.x < bands.in | tee bands.out gnuplot plot_bands.gnu
QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@KCW@examples@example05.1@nspin1@0_dft@README.md@.PATH_END.py
{ "filename": "frequencyseries.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/types/frequencyseries.py", "type": "Python" }
# Copyright (C) 2012 Tito Dal Canton, Josh Willis # # 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...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@types@frequencyseries.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): super(TickvalsValidator, self).__init__( plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/dimension/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="parcoords.dimension", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@dimension@_tickformat.py@.PATH_END.py
{ "filename": "_scattermap.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/template/data/_scattermap.py", "type": "Python" }
import _plotly_utils.basevalidators class ScattermapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="scattermap", parent_name="layout.template.data", **kwargs ): super(ScattermapValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@template@data@_scattermap.py@.PATH_END.py
{ "filename": "tracker.py", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/python-package/xgboost/tracker.py", "type": "Python" }
"""Tracker for XGBoost collective.""" import ctypes import json import socket from enum import IntEnum, unique from typing import Dict, Optional, Union from .core import _LIB, _check_call, _deprecate_positional_args, make_jcargs def get_family(addr: str) -> int: """Get network family from address.""" return...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@python-package@xgboost@tracker.py@.PATH_END.py
{ "filename": "losses.py", "repo_name": "henrysky/astroNN", "repo_path": "astroNN_extracted/astroNN-master/src/astroNN/nn/losses.py", "type": "Python" }
# ---------------------------------------------------------------# # astroNN.nn.losses: losses # ---------------------------------------------------------------# import keras from astroNN.config import MAGIC_NUMBER from astroNN.nn import nn_obj_lookup epsilon = keras.backend.epsilon Model = keras.Model def magic...
henryskyREPO_NAMEastroNNPATH_START.@astroNN_extracted@astroNN-master@src@astroNN@nn@losses.py@.PATH_END.py
{ "filename": "filtering.py", "repo_name": "RuthAngus/gprotation", "repo_path": "gprotation_extracted/gprotation-master/gprotation/filtering.py", "type": "Python" }
from scipy.signal import butter, lfilter import matplotlib.pyplot as plt import numpy as np from scipy.signal import freqz def butter_bandpass(lowcut, fs, order=5): nyq = 0.5 * fs low = lowcut / nyq b, a = butter(order, low, btype='highpass') return b, a def butter_bandpass_filter(data, lowcut, fs, ...
RuthAngusREPO_NAMEgprotationPATH_START.@gprotation_extracted@gprotation-master@gprotation@filtering.py@.PATH_END.py
{ "filename": "sequential.py", "repo_name": "jiffyclub/palettable", "repo_path": "palettable_extracted/palettable-master/palettable/colorbrewer/sequential.py", "type": "Python" }
from __future__ import absolute_import from .colorbrewer import _load_maps_by_type globals().update(_load_maps_by_type('sequential'))
jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@palettable@colorbrewer@sequential.py@.PATH_END.py
{ "filename": "Pick.py", "repo_name": "wmpg/Supracenter", "repo_path": "Supracenter_extracted/Supracenter-master/supra/Stations/Pick.py", "type": "Python" }
""" Inputs a single-component waveform (trace or stream not certain yet) and outputs the times of the signals. Pick objects might be overkill for this project, but BAM will use them, so I've put them in Author: Luke McFadden """ import numpy as np class Pick: def __init__(self, first_pt, last_pt): """ Make...
wmpgREPO_NAMESupracenterPATH_START.@Supracenter_extracted@Supracenter-master@supra@Stations@Pick.py@.PATH_END.py
{ "filename": "test_structured_chat.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/agents/test_structured_chat.py", "type": "Python" }
"""Unittests for langchain.agents.chat package.""" from textwrap import dedent from typing import Any, Tuple from langchain_core.agents import AgentAction, AgentFinish from langchain_core.prompts.chat import ( ChatPromptTemplate, HumanMessagePromptTemplate, SystemMessagePromptTemplate, ) from langchain_co...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@agents@test_structured_chat.py@.PATH_END.py
{ "filename": "launch.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/setuptools/launch.py", "type": "Python" }
""" Launch the Python script on the command line after setuptools is bootstrapped via import. """ # Note that setuptools gets imported implicitly by the # invocation of this script using python -m setuptools.launch import tokenize import sys def run(): """ Run the script in sys.argv[1] as if it had been...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@setuptools@launch.py@.PATH_END.py
{ "filename": "agent_fireworks_ai_langchain_mongodb.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/cookbook/agent_fireworks_ai_langchain_mongodb.ipynb", "type": "Jupyter Notebook" }
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mongodb-developer/GenAI-Showcase/blob/main/notebooks/agents/agent_fireworks_ai_langchain_mongodb.ipynb) [![View Article](https://img.shields.io/badge/View%20Article-blue)](https://www.mongodb.com/devel...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@agent_fireworks_ai_langchain_mongodb.ipynb@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/title/subtitle/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.title.subtitle" _path_str = "layout.title.subtitle.font" _valid_props = { "c...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@title@subtitle@_font.py@.PATH_END.py
{ "filename": "_version.py", "repo_name": "simonsobs/nemo", "repo_path": "nemo_extracted/nemo-main/nemo/_version.py", "type": "Python" }
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
simonsobsREPO_NAMEnemoPATH_START.@nemo_extracted@nemo-main@nemo@_version.py@.PATH_END.py
{ "filename": "agent.py", "repo_name": "simonsobs/socs", "repo_path": "socs_extracted/socs-main/socs/agents/lakeshore372/agent.py", "type": "Python" }
import argparse import os import time import numpy as np import txaio import yaml from ocs import ocs_agent, site_config from ocs.ocs_twisted import Pacemaker, TimeoutLock from twisted.internet import reactor from socs.Lakeshore.Lakeshore372 import LS372 def still_power_to_perc(power, res, lead, max_volts): cur...
simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@lakeshore372@agent.py@.PATH_END.py
{ "filename": "scene_ui_plugin.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/tvtk/plugins/scene/ui/scene_ui_plugin.py", "type": "Python" }
""" A TVTK render window scene UI plugin. """ # Enthought library imports. from envisage.api import Plugin from traits.api import List class SceneUIPlugin(Plugin): """ A TVTK render window scene UI plugin. This is the plugin that contributes actions, menus, preferences pages etc. """ # Extens...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@tvtk@plugins@scene@ui@scene_ui_plugin.py@.PATH_END.py
{ "filename": "units.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/units/units.py", "type": "Python" }
""" Units supported in AMUSE """ import numpy from . import constants from . import quantities # The two imports below are to explicitly expose everything directly used in # this module. from .si import (named, s, m, kg, none, core, no_unit,) from .derivedsi import (km, V, W, J, Pa, rad,) # importing * from si and d...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@units@units.py@.PATH_END.py
{ "filename": "post_process_tod.py", "repo_name": "cosmo-ethz/seek", "repo_path": "seek_extracted/seek-master/seek/plugins/post_process_tod.py", "type": "Python" }
# SEEK 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. # # SEEK is distributed in the hope that it will be useful, # but WITHOUT ANY W...
cosmo-ethzREPO_NAMEseekPATH_START.@seek_extracted@seek-master@seek@plugins@post_process_tod.py@.PATH_END.py
{ "filename": "pldcorrector.py", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/correctors/pldcorrector.py", "type": "Python" }
"""Defines a `PLDCorrector` class which provides a simple way to correct a light curve by utilizing the pixel time series data contained within the target's own Target Pixel File. `PLDCorrector` builds upon `RegressionCorrector` by correlating the light curve against a design matrix composed of the following elements:...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@correctors@pldcorrector.py@.PATH_END.py
{ "filename": "edit_nc_file_to_preserve_monthly_means.py", "repo_name": "ExeClim/Isca", "repo_path": "Isca_extracted/Isca-master/src/extra/python/scripts/edit_nc_file_to_preserve_monthly_means.py", "type": "Python" }
import xarray as xar import numpy as np import pdb import matplotlib.pyplot as plt import create_timeseries as cts def adjust_data(input_data): """ adjust_data solves the matrix problem Ax=b, where A is a matrix with recurring entries of 0.125, 0.75, 0.125, x is 12 unknowns, and b is a column vector of 12 monthly...
ExeClimREPO_NAMEIscaPATH_START.@Isca_extracted@Isca-master@src@extra@python@scripts@edit_nc_file_to_preserve_monthly_means.py@.PATH_END.py
{ "filename": "toymodel.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/image/toymodel.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Utilities to generate toymodel (fake) reconstruction inputs for testing purposes. Examples: .. code-block:: python >>> from ctapipe.instrument import CameraGeometry >>> geom = CameraGeometry.make_rectangular(20, 20) >>> showermodel = Gau...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@image@toymodel.py@.PATH_END.py
{ "filename": "custom_partitioning_sharding_rule_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/custom_partitioning_sharding_rule_test.py", "type": "Python" }
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@custom_partitioning_sharding_rule_test.py@.PATH_END.py
{ "filename": "UBVRI.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/visualization/volume_rendering/UBVRI.py", "type": "Python" }
import numpy as np johnson_filters = { "B": { "wavelen": np.array( [ 3600, 3650, 3700, 3750, 3800, 3850, 3900, 3950, 4000, 4050, ...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@volume_rendering@UBVRI.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/docs/conf.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Documentation build configuration file. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this file. All configuration values have a default. Some values are...
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@docs@conf.py@.PATH_END.py
{ "filename": "run.py", "repo_name": "pmelchior/skylens", "repo_path": "skylens_extracted/skylens-master/moka_batch/run.py", "type": "Python" }
#!/bin/env python from os import system, popen, environ import fitsio import numpy as np from glob import glob from random import randint def kappa2alpha(kappafile, alphafile): fits = fitsio.FITS(kappafile) kappa = fits[0].read() h = fits[0].read_header() fits.close() sidel = h['SIDEL'] Dl = h...
pmelchiorREPO_NAMEskylensPATH_START.@skylens_extracted@skylens-master@moka_batch@run.py@.PATH_END.py
{ "filename": "mockmaker.py", "repo_name": "bccp/nbodykit", "repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/mockmaker.py", "type": "Python" }
import numpy import numbers from mpi4py import MPI from pmesh.pm import RealField, ComplexField from nbodykit.meshtools import SlabIterator from nbodykit.utils import GatherArray, ScatterArray from nbodykit.mpirng import MPIRandomState import mpsort def gaussian_complex_fields(pm, linear_power, seed, unit...
bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@mockmaker.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/scattermap/cluster/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._stepsrc import StepsrcValidator from ._step import StepValidator from ._sizesrc import SizesrcValidator from ._size import SizeValidator from ._opacitysrc import OpacitysrcValidator from ._opacity ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@cluster@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mit-ll/spacegym-kspdg", "repo_path": "spacegym-kspdg_extracted/spacegym-kspdg-main/src/kspdg/pe1/__init__.py", "type": "Python" }
# Copyright (c) 2024, MASSACHUSETTS INSTITUTE OF TECHNOLOGY # Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014). # SPDX-License-Identifier: MIT
mit-llREPO_NAMEspacegym-kspdgPATH_START.@spacegym-kspdg_extracted@spacegym-kspdg-main@src@kspdg@pe1@__init__.py@.PATH_END.py
{ "filename": "compiled.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/compiled.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.compiled ~~~~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.jvm import JavaLexer, Sc...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@compiled.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcoords/line/colorbar/_title.py", "type": "Python" }
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.TitleValidator): def __init__( self, plotly_name="title", parent_name="parcoords.line.colorbar", **kwargs ): super(TitleValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcoords@line@colorbar@_title.py@.PATH_END.py
{ "filename": "chaindesk.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/retrievers/chaindesk.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.retrievers import ChaindeskRetriever # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@retrievers@chaindesk.py@.PATH_END.py
{ "filename": "_ticklabelstep.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticklabelstep.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatter.marker.colorbar", **kwargs, ): super(TicklabelstepValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@_ticklabelstep.py@.PATH_END.py
{ "filename": "verification.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/verification.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Intermediate Verification Languages (IVLs). :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@verification.py@.PATH_END.py
{ "filename": "stats.py", "repo_name": "gogrean/PyXel", "repo_path": "PyXel_extracted/PyXel-master/pyxel/stats.py", "type": "Python" }
import numpy as np def cstat_deriv(measured_raw_cts, updated_model, measured_bkg_cts, t_raw, t_bkg, x): """ Calculates the derivatives of the C-statistic. """ model_derivs = np.array(updated_model.fit_deriv(x, *updated_model.parameters)) model_vals = updated_model(x) nbin...
gogreanREPO_NAMEPyXelPATH_START.@PyXel_extracted@PyXel-master@pyxel@stats.py@.PATH_END.py
{ "filename": "_legendgroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/area/_legendgroup.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="area", **kwargs): super(LegendgroupValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@area@_legendgroup.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): super(ColorValidator, self).__init__( plotly_name=plot...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@rangeselector@font@_color.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "starkit/wsynphot", "repo_path": "wsynphot_extracted/wsynphot-master/wsynphot/data/hst/acs/__init__.py", "type": "Python" }
starkitREPO_NAMEwsynphotPATH_START.@wsynphot_extracted@wsynphot-master@wsynphot@data@hst@acs@__init__.py@.PATH_END.py
{ "filename": "parameter_server_strategy_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/parameter_server_strategy_test.py", "type": "Python" }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@distribute@parameter_server_strategy_test.py@.PATH_END.py
{ "filename": "SVFields.ipynb", "repo_name": "desihub/desiutil", "repo_path": "desiutil_extracted/desiutil-main/doc/nb/SVFields.ipynb", "type": "Jupyter Notebook" }
# SV Fields This example is based on a plot initially developed by Anand Raichoor. ```python %matplotlib inline import os from pkg_resources import resource_filename import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Polygon import astropy.units as u from astropy.coordinates import Sky...
desihubREPO_NAMEdesiutilPATH_START.@desiutil_extracted@desiutil-main@doc@nb@SVFields.ipynb@.PATH_END.py
{ "filename": "intg.py", "repo_name": "ja-vazquez/SimpleMC", "repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/tools/intg.py", "type": "Python" }
#!/usr/bin/env python from RunBase import * C=LCDMCosmology() Df=C.Da_z(1090) lims=[0.25,0.50, 0.95, 0.99, 0.995] l=lims.pop(0) z=0.5; while True: f=C.Da_z(z)/Df if (f>l): print z,f, "XXX" if len(lims)>0: l=lims.pop(0) else: break z*=1.03
ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@tools@intg.py@.PATH_END.py
{ "filename": "plot_cf_colour.py", "repo_name": "igmhub/LyaCoLoRe", "repo_path": "LyaCoLoRe_extracted/LyaCoLoRe-master/picca_analysis/plot_cf_colour.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from astropy.io import fits import sys from lyacolore import plot_functions default_location = ['/global/homes/j/jfarr/Programs/picca/picca_analysis_000/picca_00000/'] if len(sys.argv) > 1: locations = sys.argv[1:] else: locations = default_location #Plotti...
igmhubREPO_NAMELyaCoLoRePATH_START.@LyaCoLoRe_extracted@LyaCoLoRe-master@picca_analysis@plot_cf_colour.py@.PATH_END.py
{ "filename": "plotting.py", "repo_name": "aabdurrouf/piXedfit", "repo_path": "piXedfit_extracted/piXedfit-main/piXedfit/piXedfit_analysis/plotting.py", "type": "Python" }
import numpy as np from math import pow import sys, os from operator import itemgetter import matplotlib matplotlib.use('agg') from astropy.io import fits import matplotlib.pyplot as plt from matplotlib.ticker import ScalarFormatter from scipy.interpolate import interp1d from mpl_toolkits.axes_grid1 import make_axes_lo...
aabdurroufREPO_NAMEpiXedfitPATH_START.@piXedfit_extracted@piXedfit-main@piXedfit@piXedfit_analysis@plotting.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "dmlc/xgboost", "repo_path": "xgboost_extracted/xgboost-master/R-package/README.md", "type": "Markdown" }
XGBoost R Package for Scalable GBM ================================== [![CRAN Status Badge](http://www.r-pkg.org/badges/version/xgboost)](https://cran.r-project.org/web/packages/xgboost) [![CRAN Downloads](http://cranlogs.r-pkg.org/badges/xgboost)](https://cran.rstudio.com/web/packages/xgboost/index.html) [![Documenta...
dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@R-package@README.md@.PATH_END.py
{ "filename": "test_YSEDR1_AD.ipynb", "repo_name": "patrickaleo/LAISS-local", "repo_path": "LAISS-local_extracted/LAISS-local-main/notebooks/test_YSEDR1_AD.ipynb", "type": "Jupyter Notebook" }
```python import time import numpy as np import matplotlib.pyplot as plt import pandas as pd import pickle import seaborn as sns import os import sys import annoy from annoy import AnnoyIndex import random import glob from IPython.display import display_markdown from collections import Counter from sklearn import ...
patrickaleoREPO_NAMELAISS-localPATH_START.@LAISS-local_extracted@LAISS-local-main@notebooks@test_YSEDR1_AD.ipynb@.PATH_END.py
{ "filename": "VariationalEquations.ipynb", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/ipython_examples/VariationalEquations.ipynb", "type": "Jupyter Notebook" }
# Variational Equations For a complete introduction to variational equations, please read the paper by Rein and Tamayo (2016). For this tutorial, we work with a two planet system. We vary the initial semi-major axis $a$ of the outer planet. Because the planets interact with each other, the final $x$-position of the in...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@ipython_examples@VariationalEquations.ipynb@.PATH_END.py
{ "filename": "twoMass.py", "repo_name": "ProfessorBrunner/rc3-pipeline", "repo_path": "rc3-pipeline_extracted/rc3-pipeline-master/pipeline/twoMass.py", "type": "Python" }
# Note: 2MASS Class can not be named starting with number from survey import Survey class TwoMass(Survey): def __init__(self): self.name = '2MASS' self.bands=['j','h','k'] self.color_bands=['j','h','k'] self.best_band ='k' #see Fig 2 (Skrutskie et al. 2006) self.pixel_scale ...
ProfessorBrunnerREPO_NAMErc3-pipelinePATH_START.@rc3-pipeline_extracted@rc3-pipeline-master@pipeline@twoMass.py@.PATH_END.py
{ "filename": "spiefigures.ipynb", "repo_name": "Jashcraf/poke", "repo_path": "poke_extracted/poke-main/docs/_build/html/notebooks/spiefigures.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt from poke.writing import read_serial_to_rayfront from poke.poke_core import Rayfront import poke.plotting as plot ``` ```python rf = read_serial_to_rayfront('sample_rayfront.msgpack') ``` ```python rayset = 0 surf = -1 size = 1e-10 r = rf.xData[rayset,0]*...
JashcrafREPO_NAMEpokePATH_START.@poke_extracted@poke-main@docs@_build@html@notebooks@spiefigures.ipynb@.PATH_END.py
{ "filename": "DopplerImagingGallery_Variable.ipynb", "repo_name": "rodluger/starry", "repo_path": "starry_extracted/starry-master/notebooks/DopplerImagingGallery_Variable.ipynb", "type": "Jupyter Notebook" }
# Spectrally variable `SPOT` <script> // Force "pop out" links to open in the browser (rather than download) document.addEventListener("DOMContentLoaded", function(event) { var links = document.getElementsByClassName("reference download internal") for (var i = 0; i < links.length; i++) { ...
rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@notebooks@DopplerImagingGallery_Variable.ipynb@.PATH_END.py
{ "filename": "nnu-H0-sigma8.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/batch3/outputs/nnu-H0-sigma8.py", "type": "Python" }
import planckStyle as s from pylab import * g = s.getSinglePlotter() g.settings.param_names_for_labels = 'clik_Hunits.paramnames' base = 'base_nnu_' roots = [base + s.defdata_all] neff = [1, 5] updated = True if updated: g.add_y_bands(74.03, 1.42) g.add_text_left('Riess et al. (2019)', 0.03, 0.8, color='k...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@batch3@outputs@nnu-H0-sigma8.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "amerand/CANDID", "repo_path": "CANDID_extracted/CANDID-master/README.md", "type": "Markdown" }
# [C]ompanion [A]nalysis and [N]on-[D]etection in [I]nterferometric [D]ata This is a suite of Python 2/3 tools to find faint companion around star in interferometric data in the [OIFITS format](http://www.mrao.cam.ac.uk/research/optical-interferometry/oifits/). This tool allows to systematically search for faint compa...
amerandREPO_NAMECANDIDPATH_START.@CANDID_extracted@CANDID-master@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/pointcloud/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._hoverlabel import Hoverlabel from ._marker import Marker from ._stream import Stream from . import hoverlabel from . import marker else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@pointcloud@__init__.py@.PATH_END.py
{ "filename": "opfilt_kk.py", "repo_name": "carronj/plancklens", "repo_path": "plancklens_extracted/plancklens-master/plancklens/qcinv/opfilt_kk.py", "type": "Python" }
"""lending map Wiener and inverse variance filtering module. This is literally the very same spin-0 inverse variance filtering codes than for temperatures, with indices 'tt' replaced with 'pp' and potential to k remapping """ from __future__ import absolute_import from __future__ import print_function import hashli...
carronjREPO_NAMEplancklensPATH_START.@plancklens_extracted@plancklens-master@plancklens@qcinv@opfilt_kk.py@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/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...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@textfont@_variantsrc.py@.PATH_END.py