metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "generator.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/waveform/generator.py", "type": "Python" }
# Copyright (C) 2016 Collin Capano, Alex Nitz, Christopher Biwer # 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. # # Th...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@waveform@generator.py@.PATH_END.py
{ "filename": "_minexponent.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/marker/colorbar/_minexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattermap.marker.colorbar", **kwargs, ): super(MinexponentValidator, self).__init__( pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@marker@colorbar@_minexponent.py@.PATH_END.py
{ "filename": "statmorph.py", "repo_name": "vrodgom/statmorph", "repo_path": "statmorph_extracted/statmorph-master/statmorph/statmorph.py", "type": "Python" }
""" Python code for calculating non-parametric morphological diagnostics of galaxy images. """ # Author: Vicente Rodriguez-Gomez <vrodgom.astro@gmail.com> # Licensed under a 3-Clause BSD License. import warnings import time import numpy as np import scipy.optimize as opt import scipy.ndimage as ndi import scipy.signal ...
vrodgomREPO_NAMEstatmorphPATH_START.@statmorph_extracted@statmorph-master@statmorph@statmorph.py@.PATH_END.py
{ "filename": "DopplerImagingGallery_Featureless.ipynb", "repo_name": "rodluger/starry", "repo_path": "starry_extracted/starry-master/notebooks/DopplerImagingGallery_Featureless.ipynb", "type": "Jupyter Notebook" }
# Featureless star <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_Featureless.ipynb@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/selected/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choropleth.selected.marker", **kwargs ): super(OpacityValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@selected@marker@_opacity.py@.PATH_END.py
{ "filename": "_label.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/_label.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="label", parent_name="sankey.node", **kwargs): super(LabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@_label.py@.PATH_END.py
{ "filename": "array.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/array.py", "type": "Python" }
# Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@array.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/unittests/test_utils.py", "type": "Python" }
# keep it first # due to stupid astropy units/constants implementation from unittests import set_astropy_units import numpy as np import pandas as pd from numpy.testing import assert_array_equal from elisa import utils, umpy as up from elisa import const from queue import Queue from unittests.utils import ElisaTestC...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@unittests@test_utils.py@.PATH_END.py
{ "filename": "test_msq2.py", "repo_name": "PaulHancock/Aegean", "repo_path": "Aegean_extracted/Aegean-main/tests/unit/test_msq2.py", "type": "Python" }
#! /usr/bin/env python """ Test msq2.py """ import numpy as np from AegeanTools.msq2 import MarchingSquares __author__ = 'Paul Hancock' def test_defaults(): """Test that we can do a basic task""" # make a + shape from ones on a background of nan data = np.zeros((5, 5))*np.nan data[1:4, 2] = 1 dat...
PaulHancockREPO_NAMEAegeanPATH_START.@Aegean_extracted@Aegean-main@tests@unit@test_msq2.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergl.marker", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@_line.py@.PATH_END.py
{ "filename": "tpu_optimizer.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/tpu/tpu_optimizer.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@tpu@tpu_optimizer.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "AstroSheppard/WFC3-analysis", "repo_path": "WFC3-analysis_extracted/WFC3-analysis-main/LATE/verification/README.md", "type": "Markdown" }
wlpaper.py read in data to make white light analysis figures potentially useful in papers. For example, it searches for red noise, checks normality of residuals, and plots raw and de-trended light curves with residuals. get_stis_curves.py converts Nikolay's sav files into machine readable files for data product for jo...
AstroSheppardREPO_NAMEWFC3-analysisPATH_START.@WFC3-analysis_extracted@WFC3-analysis-main@LATE@verification@README.md@.PATH_END.py
{ "filename": "test_send_state.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py2/ipywidgets/widgets/tests/test_send_state.py", "type": "Python" }
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from traitlets import Bool, Tuple, List from .utils import setup, teardown, DummyComm from ipywidgets.widgets.widget import Widget from ipywidgets._version import __control_protocol_version__ # A widget with simple...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py2@ipywidgets@widgets@tests@test_send_state.py@.PATH_END.py
{ "filename": "export-coreml.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/export-coreml.md", "type": "Markdown" }
# CoreML {% include [export-to-core-ml-core-mle__intro](../_includes/work_src/reusage-python/core-mle__intro.md) %} The following example showcases how to train a model using [CatBoostClassifier](python-reference_catboostclassifier.md), save it CoreML using the [save_model](python-reference_catboostclassifier_save_m...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@export-coreml.md@.PATH_END.py
{ "filename": "OSO_HDF5.md", "repo_name": "creaneroDIAS/beamModelTester", "repo_path": "beamModelTester_extracted/beamModelTester-master/data_descriptions/OSO_HDF5.md", "type": "Markdown" }
**OSO HDF5 Source data\ Version 0.0\ 23ʳᵈ March 2018\ Oisin Creaner** This describes the formats for output from OSO's HDF5 files containing the processed results of observations of a series of [ACC files](/data_descriptions/ACC_Source_data_description_0_0.md) from a LOFAR station in its current state. **Outline**...
creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@data_descriptions@OSO_HDF5.md@.PATH_END.py
{ "filename": "halflife_table.py", "repo_name": "pynucastro/pynucastro", "repo_path": "pynucastro_extracted/pynucastro-main/pynucastro/nucdata/halflife_table.py", "type": "Python" }
from pathlib import Path class HalfLifeTable: """ Read the table of halflives (in seconds) extracted from the Nubase compilation in halflife2020.txt """ def __init__(self, filename: str | Path = None) -> None: self.halflife = {} if filename: self.filename = Path(file...
pynucastroREPO_NAMEpynucastroPATH_START.@pynucastro_extracted@pynucastro-main@pynucastro@nucdata@halflife_table.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "ArgonneCPAC/dsps", "repo_path": "dsps_extracted/dsps-main/dsps/dust/tests/test_utils.py", "type": "Python" }
""" """ import numpy as np from jax.scipy.stats import norm from ..utils import get_filter_effective_wavelength def test_get_filter_effective_wavelength_tophat_transmission_curve(): wave = np.linspace(0, 10, 5_000) trans = np.zeros_like(wave) msk = (wave > 4) & (wave < 6) trans[msk] = 1.0 redshift...
ArgonneCPACREPO_NAMEdspsPATH_START.@dsps_extracted@dsps-main@dsps@dust@tests@test_utils.py@.PATH_END.py
{ "filename": "three_body_bridge_order4m4.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/three_body_bridge_order4m4.py", "type": "Python" }
import numpy from amuse.lab import * from amuse.ext.composition_methods import * from amuse.couple import bridge from amuse.ext.solarsystem import new_solar_system def new_system_of_sun_and_earth(): stars = Particles(3) sun = stars[0] sun.mass = units.MSun(1.0) sun.position = units.m(numpy.array((0.0...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@three_body_bridge_order4m4.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "EdanRein/pyPplusS", "repo_path": "pyPplusS_extracted/pyPplusS-master/setup.py", "type": "Python" }
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="pyppluss", # Replace with your own username version="0.1.5.3", author="Edan Rein", author_email="edanrein2000@gmail.com", description="Models for transiting exoplanets wi...
EdanReinREPO_NAMEpyPplusSPATH_START.@pyPplusS_extracted@pyPplusS-master@setup.py@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "discsim/frank", "repo_path": "frank_extracted/frank-master/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: '' --- **Describe the bug -** 1. A clear and concise description of what the bug is. 2. Include the full Traceback of the error. **To reproduce -** 1. Include a simple, standalone code snippet that demonstrates the issue....
discsimREPO_NAMEfrankPATH_START.@frank_extracted@frank-master@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "tfsa-2022-048.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-048.md", "type": "Markdown" }
## TFSA-2022-048: Memory leak in decoding PNG images ### CVE Number CVE-2022-23585 ### Impact When [decoding PNG images](https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/kernels/image/decode_image_op.cc#L322-L416) TensorFlow can produce a memory leak if the image ...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-048.md@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="treemap.marker.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "pota2clus_simp.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/scripts/mock_tools/pota2clus_simp.py", "type": "Python" }
#standard python import sys import os import shutil import unittest from datetime import datetime import json import numpy as np import fitsio import glob import argparse from astropy.table import Table,join,unique,vstack from matplotlib import pyplot as plt from desitarget.io import read_targets_in_tiles from desitarg...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@mock_tools@pota2clus_simp.py@.PATH_END.py
{ "filename": "introspection.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/utils/introspection.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions related to Python runtime introspection.""" from __future__ import annotations import inspect import os import sys from importlib import import_module, metadata from importlib.metadata import packages_distributions from typing import TYPE_CH...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@utils@introspection.py@.PATH_END.py
{ "filename": "test_kernel_approximation.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/tests/test_kernel_approximation.py", "type": "Python" }
import re import numpy as np import pytest from sklearn.datasets import make_classification from sklearn.kernel_approximation import ( AdditiveChi2Sampler, Nystroem, PolynomialCountSketch, RBFSampler, SkewedChi2Sampler, ) from sklearn.metrics.pairwise import ( chi2_kernel, kernel_metrics, ...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@tests@test_kernel_approximation.py@.PATH_END.py
{ "filename": "test_chat_models.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/cli/langchain_cli/integration_template/tests/integration_tests/test_chat_models.py", "type": "Python" }
"""Test Chat__ModuleName__ chat model.""" from typing import Type from __module_name__.chat_models import Chat__ModuleName__ from langchain_tests.integration_tests import ChatModelIntegrationTests class TestChatParrotLinkIntegration(ChatModelIntegrationTests): @property def chat_model_class(self) -> Type[Ch...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@langchain_cli@integration_template@tests@integration_tests@test_chat_models.py@.PATH_END.py
{ "filename": "plot_projected_density_distributions_all.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/plot_projected_density_distributions_all.py", "type": "Python" }
import numpy from matplotlib import pyplot from amuse.lab import * from amuse.ext.molecular_cloud import molecular_cloud from amuse.plot import sph_particles_plot, native_plot from prepare_figure import figure_frame from distinct_colours import get_distinct def create_molecular_cloud(N, Mcloud, Rcloud, t_end): ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@plot_projected_density_distributions_all.py@.PATH_END.py
{ "filename": "Spectrum.py", "repo_name": "SPARTA-dev/SPARTA", "repo_path": "SPARTA_extracted/SPARTA-master/sparta/UNICOR/Spectrum.py", "type": "Python" }
# ------------------------------ # Spectrum.py (SPARTA UNICOR class) # ------------------------------ # This file defines the "Spectrum" class. An object of this class stores # the measured spectrum (wavelength values and their corresponding fluxes) # and some bas...
SPARTA-devREPO_NAMESPARTAPATH_START.@SPARTA_extracted@SPARTA-master@sparta@UNICOR@Spectrum.py@.PATH_END.py
{ "filename": "dispatch.py", "repo_name": "panoptes/POCS", "repo_path": "POCS_extracted/POCS-main/src/panoptes/pocs/scheduler/dispatch.py", "type": "Python" }
from panoptes.pocs.scheduler import BaseScheduler from panoptes.utils.time import current_time from panoptes.utils.utils import listify class Scheduler(BaseScheduler): def __init__(self, *args, **kwargs): """ Inherit from the `BaseScheduler` """ BaseScheduler.__init__(self, *args, **kwargs) ...
panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@src@panoptes@pocs@scheduler@dispatch.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "ricardoclandim/NIRVANA", "repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/tests/util.py", "type": "Python" }
""" Testing utilities """ # TODO: Put most/all of this in nirvana/tests/__init__.py ? import os import warnings import pytest from pkg_resources import resource_filename def data_file(filename=None): root = resource_filename('nirvana', 'data') return root if filename is None else os.path.join(root, filenam...
ricardoclandimREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@tests@util.py@.PATH_END.py
{ "filename": "test_sia2_remote.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/dal/tests/test_sia2_remote.py", "type": "Python" }
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for pyvo.dal.sia2 against remote services """ import pytest import astropy.units as u from astropy.utils.exceptions import AstropyDeprecationWarning from pyvo.dal.sia2 import search, SIA2Service from pyvo.dal.adhoc import...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@dal@tests@test_sia2_remote.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/contour/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._width import WidthValidator from ._show import ShowValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._width...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@contour@__init__.py@.PATH_END.py
{ "filename": "test_plot_utils.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/tests/base_tests/test_plot_utils.py", "type": "Python" }
# pylint: disable=redefined-outer-name import importlib import os import numpy as np import pytest import xarray as xr from ...data import from_dict from ...plots.backends.matplotlib import dealiase_sel_kwargs, matplotlib_kwarg_dealiaser from ...plots.plot_utils import ( compute_ranks, filter_plotters_list, ...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@tests@base_tests@test_plot_utils.py@.PATH_END.py
{ "filename": "test_lombscargle.py", "repo_name": "StingraySoftware/stingray", "repo_path": "stingray_extracted/stingray-main/stingray/tests/test_lombscargle.py", "type": "Python" }
import copy import numpy as np import pytest from scipy.interpolate import interp1d from astropy.modeling.models import Lorentz1D from stingray.events import EventList from stingray.exceptions import StingrayError from stingray.lightcurve import Lightcurve from stingray.lombscargle import LombScargleCrossspectrum, Lo...
StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@tests@test_lombscargle.py@.PATH_END.py
{ "filename": "using-target-pixel-file-products.ipynb", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/docs/source/tutorials/1-getting-started/using-target-pixel-file-products.ipynb", "type": "Jupyter Notebook" }
# Using Target Pixel Files with Lightkurve ## Learning Goals By the end of this tutorial, you will: - Be able to download and plot target pixel files from the data archive using [Lightkurve](https://docs.lightkurve.org). - Be able to access target pixel file metadata. - Understand where to find more details about *K...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@docs@source@tutorials@1-getting-started@using-target-pixel-file-products.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rotsehub/ImageDiff", "repo_path": "ImageDiff_extracted/ImageDiff-master/py/imagediff/__init__.py", "type": "Python" }
""" imagediff ========= """ from __future__ import absolute_import, division, print_function, unicode_literals
rotsehubREPO_NAMEImageDiffPATH_START.@ImageDiff_extracted@ImageDiff-master@py@imagediff@__init__.py@.PATH_END.py
{ "filename": "_shape.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/line/_shape.py", "type": "Python" }
import _plotly_utils.basevalidators class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scatterpolar.line", **kwargs): super(ShapeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@line@_shape.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/marker/colorbar/title/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="splom.marker.colorbar.title.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@marker@colorbar@title@font@_family.py@.PATH_END.py
{ "filename": "rewrite_fsps.py", "repo_name": "kibokov/grumpy", "repo_path": "grumpy_extracted/grumpy-main/scripts/rewrite_fsps.py", "type": "Python" }
import os import glob import argparse from configparser import ConfigParser, ExtendedInterpolation from mah_fitting import prepare_mh_tracks from galaxy_model import integrate_model, get_beta from run_disruption import run_disruption_model, filter_disruption from plotting import run_plotting from galaxy_model import po...
kibokovREPO_NAMEgrumpyPATH_START.@grumpy_extracted@grumpy-main@scripts@rewrite_fsps.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/agent_toolkits/nla/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@agent_toolkits@nla@__init__.py@.PATH_END.py
{ "filename": "test_numerictypes.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_numerictypes.py", "type": "Python" }
import sys import itertools import pytest import numpy as np import numpy._core.numerictypes as nt from numpy._core.numerictypes import ( issctype, sctype2char, maximum_sctype, sctypes ) from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, IS_PYPY ) # This is the structure of...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_numerictypes.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/visualization/__init__.py", "type": "Python" }
'''MARXS supports several backends for 3D plotting; each of which is implemented as a submodule. To plot using a specific backend, import the relevant submodule. ''' from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for my subpackage. """ xyz_preci...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@visualization@__init__.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/newshape/label/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.newshape.label.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@newshape@label@font@_lineposition.py@.PATH_END.py
{ "filename": "create_beam.py", "repo_name": "ratt-ru/eidos", "repo_path": "eidos_extracted/eidos-master/eidos/create_beam.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function import sys, os package_directory = os.path.dirname(__file__) sys.path.append(package_directory) from util import * from spectral import * from spatial import * from parallelize import * import argparse def zernike_parameters(filename, npix=256, diameter=10,...
ratt-ruREPO_NAMEeidosPATH_START.@eidos_extracted@eidos-master@eidos@create_beam.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/histogram2dcontour/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): super(ColorValidator, self).__init__( plotly_name=p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@tickfont@_weight.py@.PATH_END.py
{ "filename": "file.md", "repo_name": "microsoft/vscode", "repo_path": "vscode_extracted/vscode-main/extensions/markdown-language-features/test-workspace/sub with space/file.md", "type": "Markdown" }
# header
microsoftREPO_NAMEvscodePATH_START.@vscode_extracted@vscode-main@extensions@markdown-language-features@test-workspace@sub with space@file.md@.PATH_END.py
{ "filename": "plot_compound.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/examples/models/spectral/plot_compound.py", "type": "Python" }
r""" .. _compound-spectral-model: Compound spectral model ======================= This model is formed by the arithmetic combination of any two other spectral models. """ # %% # Example plot # ------------ # Here is an example plot of the model: import operator from astropy import units as u import matplotlib.pyplo...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@examples@models@spectral@plot_compound.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/spectral_extraction/__init__.py", "type": "Python" }
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@spectral_extraction@__init__.py@.PATH_END.py
{ "filename": "CombineBeam.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/share/scripts/CombineBeam.py", "type": "Python" }
# Script to combine Holography beams using multiple resolutions and frequency ranges space = 0.0212 # cell spacing in deg (highest resolution, frequency) ncell = 101 # number of cells in Az, El (to cover lowest resolution, low frequency) nFcomb= 2 # Number of frequency bins to combine stoke = 'LL' # Stokes st...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@share@scripts@CombineBeam.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/hoverlabel/font/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter.hoverlabel.font", **kwargs ): super(WeightValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@hoverlabel@font@_weight.py@.PATH_END.py
{ "filename": "extraction.py", "repo_name": "jkrogager/PyNOT", "repo_path": "PyNOT_extracted/PyNOT-master/pynot/extraction.py", "type": "Python" }
# coding/PyNOT/multi_extract.py import numpy as np from astropy.io import fits from matplotlib.backends import backend_pdf import matplotlib.pyplot as plt from scipy.ndimage import median_filter from scipy.signal import find_peaks from numpy.polynomial import Chebyshev import warnings from lmfit import Parameters, min...
jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@extraction.py@.PATH_END.py
{ "filename": "infino_callback.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/callbacks/infino_callback.py", "type": "Python" }
import time from typing import Any, Dict, List, Optional, cast from langchain_core.agents import AgentAction, AgentFinish from langchain_core.callbacks import BaseCallbackHandler from langchain_core.messages import BaseMessage from langchain_core.outputs import ChatGeneration, LLMResult from langchain_core.utils impor...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@callbacks@infino_callback.py@.PATH_END.py
{ "filename": "model_definitions.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/model_definitions.py", "type": "Python" }
#from pyorbit.common.dataset import Dataset from pyorbit.common.planets import CommonPlanets from pyorbit.common.activity import CommonActivity from pyorbit.common.polynomial_trend import CommonPolynomialTrend from pyorbit.common.common_offset import CommonOffset from pyorbit.common.common_jitter import CommonJitter ...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@model_definitions.py@.PATH_END.py
{ "filename": "test_max_len_seq.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/signal/tests/test_max_len_seq.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_allclose, assert_array_equal from pytest import raises as assert_raises from numpy.fft import fft, ifft from scipy.signal import max_len_seq class TestMLS(object): def test_mls_inputs(self): ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@signal@tests@test_max_len_seq.py@.PATH_END.py
{ "filename": "memory_attention.py", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/models/sam/modules/memory_attention.py", "type": "Python" }
# Ultralytics YOLO 🚀, AGPL-3.0 license import copy from typing import Optional import torch from torch import Tensor, nn from .blocks import RoPEAttention class MemoryAttentionLayer(nn.Module): """ Implements a memory attention layer with self-attention and cross-attention mechanisms for neural networks. ...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@models@sam@modules@memory_attention.py@.PATH_END.py
{ "filename": "light_curve.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/examples/tutorials/analysis-time/light_curve.py", "type": "Python" }
""" Light curves ============ Compute per-observation and nightly fluxes of four Crab nebula observations. Prerequisites ------------- - Knowledge of the high level interface to perform data reduction, see the :doc:`/tutorials/starting/analysis_1` tutorial. Context ------- This tutorial presents how light curv...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@examples@tutorials@analysis-time@light_curve.py@.PATH_END.py
{ "filename": "postprocessing_tutorial.ipynb", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/docs/source/postprocessing_tutorial.ipynb", "type": "Jupyter Notebook" }
# Post-processing In this tutorial we demonstrate the functionality and posterior operations supported by the [PostProcessing](postprocessing.rst) module by operating with the posterior samples reported by [Riley et al. (2019)](applications.rst#riley-et-al-2019-apjl-887-l21). The unexecuted notebook for this tutorial...
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@docs@source@postprocessing_tutorial.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/camera/up/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._z import ZValidator from ._y import YValidator from ._x import XValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@camera@up@__init__.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/gradient/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.marker.gradient", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@gradient@_color.py@.PATH_END.py
{ "filename": "_fitpack2.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/interpolate/_fitpack2.py", "type": "Python" }
""" fitpack --- curve and surface fitting with splines fitpack is based on a collection of Fortran routines DIERCKX by P. Dierckx (see http://www.netlib.org/dierckx/) transformed to double routines by Pearu Peterson. """ # Created by Pearu Peterson, June,August 2003 __all__ = [ 'UnivariateSpline', 'Interpolate...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@interpolate@_fitpack2.py@.PATH_END.py
{ "filename": "cables.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/fea/cables.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@fea@cables.py@.PATH_END.py
{ "filename": "neutrinohierarchy.ipynb", "repo_name": "miguelzuma/hi_class_public", "repo_path": "hi_class_public_extracted/hi_class_public-master/notebooks/neutrinohierarchy.ipynb", "type": "Jupyter Notebook" }
```python # import necessary modules # uncomment to get plots displayed in notebook %matplotlib inline import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class from scipy.optimize import fsolve ``` ```python # esthetic definitions for the plots font = {'size' : 16, 'family':'STI...
miguelzumaREPO_NAMEhi_class_publicPATH_START.@hi_class_public_extracted@hi_class_public-master@notebooks@neutrinohierarchy.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "spacepy/spacepy", "repo_path": "spacepy_extracted/spacepy-main/README.md", "type": "Markdown" }
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3252523.svg)](https://doi.org/10.5281/zenodo.3252523) [![Build Status](https://github.com/spacepy/spacepy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/spacepy/spacepy/actions?query=workflow%3ACI) # SpacePy SpacePy is a package for Python, targ...
spacepyREPO_NAMEspacepyPATH_START.@spacepy_extracted@spacepy-main@README.md@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="cone.stream", **kwargs): super(MaxpointsValidator, 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@cone@stream@_maxpoints.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="barpolar.marker.colorbar", **kwargs, ): super(BorderwidthValidator, self).__init__( plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "test_mongodb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/memory/test_mongodb.py", "type": "Python" }
import json import os from langchain.memory import ConversationBufferMemory from langchain_core.messages import message_to_dict from langchain_community.chat_message_histories import MongoDBChatMessageHistory # Replace these with your mongodb connection string connection_string = os.environ.get("MONGODB_CONNECTION_S...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@memory@test_mongodb.py@.PATH_END.py
{ "filename": "rockstar.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/pynbody/halo/rockstar.py", "type": "Python" }
"""Support for the Rockstar halo finder""" from __future__ import annotations import glob import os.path import sys import numpy as np from .. import util from . import HaloCatalogue from .details import number_mapping class RockstarFormatRevisionError(RuntimeError): pass class RockstarCatalogue(HaloCatalog...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@pynbody@halo@rockstar.py@.PATH_END.py
{ "filename": "thinking_in_jax.md", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/docs/notebooks/thinking_in_jax.md", "type": "Markdown" }
--- jupytext: formats: ipynb,md:myst text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.4 kernelspec: display_name: Python 3 name: python3 --- +++ {"id": "LQHmwePqryRU"} # How to think in JAX <!--* freshness: { reviewed: '2024-04-08' } *--> [![O...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@notebooks@thinking_in_jax.md@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.insidetextfont", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@insidetextfont@_lineposition.py@.PATH_END.py
{ "filename": "colors.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/colors.py", "type": "Python" }
""" A module for converting numbers or color arguments to *RGB* or *RGBA* *RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the range 0-1. This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. Color...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@colors.py@.PATH_END.py
{ "filename": "convert_filters.py", "repo_name": "starkit/wsynphot", "repo_path": "wsynphot_extracted/wsynphot-master/wsynphot/data/sdss/convert_filters.py", "type": "Python" }
#Reading Gemini GMOS filters from astropy import units as u, constants as const from numpy import genfromtxt import pandas as pd import os from glob import glob def read_sdss_filter(fname): """ Reading the bessell filter file into a dataframe Parameters ---------- fname: ~str path to fil...
starkitREPO_NAMEwsynphotPATH_START.@wsynphot_extracted@wsynphot-master@wsynphot@data@sdss@convert_filters.py@.PATH_END.py
{ "filename": "JpegImagePlugin.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/PIL/JpegImagePlugin.py", "type": "Python" }
# # The Python Imaging Library. # $Id$ # # JPEG (JFIF) file handling # # See "Digital Compression and Coding of Continuous-Tone Still Images, # Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1) # # History: # 1995-09-09 fl Created # 1995-09-13 fl Added full parser # 1996-03-25 fl Added hack to use t...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@PIL@JpegImagePlugin.py@.PATH_END.py
{ "filename": "fit.py", "repo_name": "franpoz/SHERLOCK", "repo_path": "SHERLOCK_extracted/SHERLOCK-master/sherlockpipe/fit.py", "type": "Python" }
from argparse import ArgumentParser from sherlockpipe.bayesian_fit.run import run_fit def fit_parse_args(args=None): ap = ArgumentParser(description='Fitting of Sherlock objects of interest') ap.add_argument('--object_dir', help="If the object directory is not your current one you need to ...
franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@sherlockpipe@fit.py@.PATH_END.py
{ "filename": "plot_PMN_transmission_wfc3_CC.py", "repo_name": "mrline/CHIMERA", "repo_path": "CHIMERA_extracted/CHIMERA-master/MASTER_ROUTINES/plot_PMN_transmission_wfc3_CC.py", "type": "Python" }
import matplotlib as mpl mpl.use('TkAgg') from matplotlib.pyplot import * from matplotlib import pyplot as plt import pickle import pdb from fm import * from scipy import interp rc('font',family='serif') import pickle import corner #PLOTTING UP CORNER PLOT-------------------------------------------------------------...
mrlineREPO_NAMECHIMERAPATH_START.@CHIMERA_extracted@CHIMERA-master@MASTER_ROUTINES@plot_PMN_transmission_wfc3_CC.py@.PATH_END.py
{ "filename": "_da.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/_da.py", "type": "Python" }
import _plotly_utils.basevalidators class DaValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="da", parent_name="carpet", **kwargs): super(DaValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@_da.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/hoverlabel/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="ohlc.hoverlabel.font", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@hoverlabel@font@_shadow.py@.PATH_END.py
{ "filename": "quick_testing_example.ipynb", "repo_name": "mikekatz04/BOWIE", "repo_path": "BOWIE_extracted/BOWIE-master/notebooks/quick_testing_example.ipynb", "type": "Jupyter Notebook" }
# Notebook for Testing and Running a Fast Example ```python %matplotlib inline import os import numpy as np ``` ## Generation Test Run the following cells. If the code runs successfully, initial_test.hdf5 file will be added to the current directory. It will be an SNR gridded dataset with total mass as the x-value a...
mikekatz04REPO_NAMEBOWIEPATH_START.@BOWIE_extracted@BOWIE-master@notebooks@quick_testing_example.ipynb@.PATH_END.py
{ "filename": "volterra_forward_backward_splitting.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/itreg/examples/volterra_forward_backward_splitting.py", "type": "Python" }
''' The volterra operator inversion with forward-backward-splitting. TV is used as default for penalty term. ''' import logging import matplotlib.pyplot as plt import numpy as np import regpy.stoprules as rules from regpy.operators.volterra import Volterra from regpy.solvers import HilbertSpaceSetting from regpy.sol...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@itreg@examples@volterra_forward_backward_splitting.py@.PATH_END.py
{ "filename": "cluster.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/clusters/cluster.py", "type": "Python" }
# Copyright 2022 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@clusters@cluster.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="y", parent_name="volume.colorbar", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_typ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@colorbar@_y.py@.PATH_END.py
{ "filename": "test_moments.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/measure/tests/test_moments.py", "type": "Python" }
import itertools import numpy as np import pytest from scipy import ndimage as ndi from skimage import draw from skimage._shared import testing from skimage._shared.testing import assert_allclose, assert_almost_equal, assert_equal from skimage._shared.utils import _supported_float_type from skimage.measure import ( ...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@measure@tests@test_moments.py@.PATH_END.py
{ "filename": "test_cfc_webcluster.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/test/functests/cfctests/test_cfc_webcluster.py", "type": "Python" }
############################################################################### # # Copyright (c) typedef int GmbH. Licensed under EUPLv1.2. # ############################################################################### import txaio txaio.use_twisted() from twisted.internet.defer import inlineCallbacks from autoba...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@functests@cfctests@test_cfc_webcluster.py@.PATH_END.py
{ "filename": "_tickformatstop.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermapbox.marker.colorbar" _path_str = "scattermapbox.marker.colorbar.tickformatstop...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattermapbox@marker@colorbar@_tickformatstop.py@.PATH_END.py
{ "filename": "basic.py", "repo_name": "gmbrandt/xwavecal", "repo_path": "xwavecal_extracted/xwavecal-main/xwavecal/basic.py", "type": "Python" }
""" Module for basic reduction steps like overscan subtraction, overscan trimming and gain normalization. """ import numpy as np import sep from xwavecal.stages import Stage from xwavecal.utils.runtime_utils import import_obj from xwavecal.utils.basic_utils import median_subtract_channels_y class OverscanSubtractor...
gmbrandtREPO_NAMExwavecalPATH_START.@xwavecal_extracted@xwavecal-main@xwavecal@basic.py@.PATH_END.py
{ "filename": "_customdatasrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pointcloud/_customdatasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="pointcloud", **kwargs): super(CustomdatasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pointcloud@_customdatasrc.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="line", parent_name="scatterpolargl.marker", **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@marker@_line.py@.PATH_END.py
{ "filename": "directionscreen.py", "repo_name": "revoltek/losoto", "repo_path": "losoto_extracted/losoto-master/losoto/operations/directionscreen.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # This is the direction-screen operation for LoSoTo from losoto.lib_operations import * from losoto.operations.stationscreen import _getxy, _radec2xy, _xy2radec, _makeWCS from losoto.operations.stationscreen import _flag_outliers, _circ_chi2 from losoto._logging import lo...
revoltekREPO_NAMElosotoPATH_START.@losoto_extracted@losoto-master@losoto@operations@directionscreen.py@.PATH_END.py
{ "filename": "POPPY_EELT.ipynb", "repo_name": "astronomyk/SimCADO", "repo_path": "SimCADO_extracted/SimCADO-master/docs/source/_static/python_notebooks/POPPY_EELT.ipynb", "type": "Jupyter Notebook" }
# SimCADO and POPPY ## Comparison of the PSFs for the ESOs single- and dual-phase approach Here we use the POPPY tool to generate mock PSFs for both the single- and the two-phase approaches that ESO is considering. * **Plan A** involves all 798 primary mirror segments being installed in the E-ELT along with the full...
astronomykREPO_NAMESimCADOPATH_START.@SimCADO_extracted@SimCADO-master@docs@source@_static@python_notebooks@POPPY_EELT.ipynb@.PATH_END.py
{ "filename": "test_one_backward.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/schema/mutations/queue/move/test_one_backward.py", "type": "Python" }
from unittest.mock import Mock from deepdiff import DeepDiff from hypothesis import given from hypothesis import strategies as st from nextline_schedule.graphql import MUTATE_QUEUE_MOVE_ONE_BACKWARD from nextline_schedule.queue import Queue from nextline_test_utils.strategies import st_graphql_ints from tests.schema....
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@schema@mutations@queue@move@test_one_backward.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/__init__.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from .pyorbit_run import * from .pyorbit_results import * from .model_definitions import * from .samplers.pyorbit_emcee import * from .samplers.pyorbit_emcee_legacy import * from .samplers.pyorbit_emcee_mpi import * from .samplers.pyorbit_zeus_legacy import * from .sampler...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@__init__.py@.PATH_END.py
{ "filename": "joinlots.py", "repo_name": "dhubber/seren", "repo_path": "seren_extracted/seren-master/joinsim/joinlots.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import glob import time import psutil # Set parameters batch_min = 10 # Minimum number of arguments to xargs (per batch) batch_max = 500 # Maximum number of arguments to xargs (per batch) safety_time = 120 # Do not remove files new...
dhubberREPO_NAMEserenPATH_START.@seren_extracted@seren-master@joinsim@joinlots.py@.PATH_END.py
{ "filename": "configField.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/library/config/configField.py", "type": "Python" }
# # LSST Data Management System # Copyright 2008-2013 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@library@config@configField.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/hoverlabel/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="heatmap.hoverlabel.font", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@hoverlabel@font@_shadow.py@.PATH_END.py
{ "filename": "azel4point.ipynb", "repo_name": "adrijd/beamconv", "repo_path": "beamconv_extracted/beamconv-master/notebooks/azel4point.ipynb", "type": "Jupyter Notebook" }
# Az/el scan requirements ```python import numpy as np import healpy as hp from beamconv import ScanStrategy, tools import matplotlib.pyplot as plt import time import qpoint as qp %matplotlib inline ``` Using `qpoint` to calculate az and el required to look at a fixed point on the sky ```python ra0=-10 dec0=-57.5...
adrijdREPO_NAMEbeamconvPATH_START.@beamconv_extracted@beamconv-master@notebooks@azel4point.ipynb@.PATH_END.py
{ "filename": "get_scale_and_bias__desc.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-python/get_scale_and_bias__desc.md", "type": "Markdown" }
Return the scale and bias of the model. These values affect the results of applying the model, since the model prediction results are calculated as follows: $\sum leaf\_values \cdot scale + bias$
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-python@get_scale_and_bias__desc.md@.PATH_END.py
{ "filename": "fixed_budget.ipynb", "repo_name": "exoclam/gaspery", "repo_path": "gaspery_extracted/gaspery-main/tutorials/fixed_budget.ipynb", "type": "Jupyter Notebook" }
### Tutorial: Optimal Strategy Given a Fixed Observing Budget In this simplest example, let's say you have a budget of 30 P1 (high priority) observations on the NEID spectrograph on the WIYN observatory on Kitt Peak in Arizona, and you want to spend them on a single target. Let's say you also have to plan around alrea...
exoclamREPO_NAMEgasperyPATH_START.@gaspery_extracted@gaspery-main@tutorials@fixed_budget.ipynb@.PATH_END.py
{ "filename": "test_flows.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-databricks/tests/test_flows.py", "type": "Python" }
import re from functools import partial import pytest from httpx import Response from prefect_databricks.credentials import DatabricksCredentials from prefect_databricks.flows import ( DatabricksJobInternalError, DatabricksJobRunTimedOut, DatabricksJobSkipped, DatabricksJobTerminated, jobs_runs_sub...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-databricks@tests@test_flows.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/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.title.font", **kwargs): super(SizeValidator, 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@_size.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "lee-group-cmu/RFCDE", "repo_path": "RFCDE_extracted/RFCDE-master/r/README.md", "type": "Markdown" }
RFCDE === The ``RFCDE`` package implements random forests for conditional density estimation. Installation --- Use the `devtools` package to install from Github ```r devtools::install_github("tpospisi/RFCDE/r") ``` If getting an issue about `R library not found for -lgfortrain`, please see the following [blog post...
lee-group-cmuREPO_NAMERFCDEPATH_START.@RFCDE_extracted@RFCDE-master@r@README.md@.PATH_END.py