metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/unselected/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choropleth.unselected.marker", **kwargs, ): super(OpacityValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@unselected@marker@_opacity.py@.PATH_END.py
{ "filename": "events_search.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/office365/events_search.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.tools import O365SearchEvents from langchain_community.tools.office365.events_search import SearchEventsInput # Create a way to dynamically look up deprecated imports. # Used to consoli...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@office365@events_search.py@.PATH_END.py
{ "filename": "GNN_plots_all_corr.ipynb", "repo_name": "astrockragh/Mangrove", "repo_path": "Mangrove_extracted/Mangrove-main/analysis/GNN_plots_all_corr.ipynb", "type": "Jupyter Notebook" }
```python import pickle, os, torch import os.path as osp import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from sklearn.metrics import r2_score from mpl_toolkits.axes_grid1 import make_axes_locatable ``` ```python from matplotlib.ticker import NullFormatter from scipy import stats from matpl...
astrockraghREPO_NAMEMangrovePATH_START.@Mangrove_extracted@Mangrove-main@analysis@GNN_plots_all_corr.ipynb@.PATH_END.py
{ "filename": "_text.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/mapbox/layer/symbol/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.mapbox.layer.symbol", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@layer@symbol@_text.py@.PATH_END.py
{ "filename": "quickstart.ipynb", "repo_name": "ArtificialStellarPopulations/ArtPop", "repo_path": "ArtPop_extracted/ArtPop-main/colab_tutorials/quickstart.ipynb", "type": "Jupyter Notebook" }
# Quick Start This tutorial is designed to let you quickly see **ArtPop** in action. For a deeper dive into each of the components of the code, we recommend stepping through the [list of tutorials](https://artpop.readthedocs.io/en/latest/index.html#tutorials) on the home page. **Note:** To generate MIST synthetic ph...
ArtificialStellarPopulationsREPO_NAMEArtPopPATH_START.@ArtPop_extracted@ArtPop-main@colab_tutorials@quickstart.ipynb@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/mojeek_search/tool.py", "type": "Python" }
from __future__ import annotations from typing import Any, Optional from langchain_core.callbacks import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, ) from langchain_core.tools import BaseTool from langchain_community.utilities.mojeek_search import MojeekSearchAPIWrapper class MojeekSearch...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@mojeek_search@tool.py@.PATH_END.py
{ "filename": "wheeled_driveline.md", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/doxygen/documentation/manuals/vehicle/wheeled_driveline.md", "type": "Markdown" }
Driveline models {#wheeled_driveline} ===================================== \tableofcontents The driveline subsystem (aka drivetrain) is the set of components that deliver power to the vehicle's driven wheels. Currently, Chrono::Vehicle provides templates for traditional drivelines connected to a single motor (in the...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@manuals@vehicle@wheeled_driveline.md@.PATH_END.py
{ "filename": "test_whole.py", "repo_name": "e-koch/FilFinder", "repo_path": "FilFinder_extracted/FilFinder-master/fil_finder/tests/test_whole.py", "type": "Python" }
# Licensed under an MIT open source license - see LICENSE import numpy as np import numpy.testing as npt import astropy.units as u from copy import deepcopy import warnings from .. import fil_finder_2D, FilFinder2D from ._testing_data import * def test_with_rht_branches(): test1 = fil_finder_2D(img, header=hd...
e-kochREPO_NAMEFilFinderPATH_START.@FilFinder_extracted@FilFinder-master@fil_finder@tests@test_whole.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "b-biswas/MADNESS", "repo_path": "MADNESS_extracted/MADNESS-main/madness_deblender/model.py", "type": "Python" }
"""Create the models for MADNESS.""" import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tensorflow.keras.layers import ( Conv2D, Conv2DTranspose, Cropping2D, Dense, Flatten, Input, PReLU, Reshape, ) from tensorflow.keras.models import Model tfd = tfp.d...
b-biswasREPO_NAMEMADNESSPATH_START.@MADNESS_extracted@MADNESS-main@madness_deblender@model.py@.PATH_END.py
{ "filename": "polynomial.py", "repo_name": "jmackereth/asteroestimate", "repo_path": "asteroestimate_extracted/asteroestimate-master/asteroestimate/bolometric/polynomial.py", "type": "Python" }
import numpy as np def BCv_from_teff(teff): """ from F Pijpers 2003. BCv values from Flower 1996 polynomials presented in Torres 2010 taken from MathewSchofield/ATL_public """ lteff = np.log10(teff) BCv = np.zeros(len(teff)) BCv[lteff<3.70] = (-0.190537291496456*10.0**5) + \ (0.1551448667...
jmackerethREPO_NAMEasteroestimatePATH_START.@asteroestimate_extracted@asteroestimate-master@asteroestimate@bolometric@polynomial.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "microsoft/vscode", "repo_path": "vscode_extracted/vscode-main/extensions/jake/README.md", "type": "Markdown" }
# Jake - JavaScript build tool **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension supports running [Jake](http://jakejs.com/) tasks defined in a `Jakefile.js` file as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks). Jake ...
microsoftREPO_NAMEvscodePATH_START.@vscode_extracted@vscode-main@extensions@jake@README.md@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="splom.marker", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@_line.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/funnel/connector/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel.connector" _path_str = "funnel.connector.line" _valid_props = {"color", "dash", "width"...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@funnel@connector@_line.py@.PATH_END.py
{ "filename": "test_dynesty_sampler.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Sampling/test_Samplers/test_dynesty_sampler.py", "type": "Python" }
__author__ = "aymgal" import pytest import numpy as np import numpy.testing as npt from lenstronomy.Sampling.Samplers.dynesty_sampler import DynestySampler @pytest.fixture def import_fixture(simple_einstein_ring_likelihood): """ :param simple_einstein_ring_likelihood: fixture :return: """ likel...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Sampling@test_Samplers@test_dynesty_sampler.py@.PATH_END.py
{ "filename": "_startarrowhead.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/annotation/_startarrowhead.py", "type": "Python" }
import _plotly_utils.basevalidators class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="startarrowhead", parent_name="layout.scene.annotation", **kwargs, ): super(StartarrowheadValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@annotation@_startarrowhead.py@.PATH_END.py
{ "filename": "_arraysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/error_x/_arraysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scatter3d.error_x", **kwargs ): super(ArraysrcValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@error_x@_arraysrc.py@.PATH_END.py
{ "filename": "_len.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/colorbar/_len.py", "type": "Python" }
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="len", parent_name="streamtube.colorbar", **kwargs): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@colorbar@_len.py@.PATH_END.py
{ "filename": "lightcurve.py", "repo_name": "hotokezaka/HeatingRate", "repo_path": "HeatingRate_extracted/HeatingRate-master/HeatingRate_beta/lightcurve.py", "type": "Python" }
from numpy import pi import numpy as np import pandas as pd import math from astropy import constants as const from numba import jit day = 86400. c = const.c.cgs.value sigma_SB = const.sigma_sb.cgs.value @jit(nopython=True) def calc_lightcurve(Mej, vej, alpha_max, alpha_min, n, kappa_low, kappa_...
hotokezakaREPO_NAMEHeatingRatePATH_START.@HeatingRate_extracted@HeatingRate-master@HeatingRate_beta@lightcurve.py@.PATH_END.py
{ "filename": "_lonsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/_lonsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="scattergeo", **kwargs): super(LonsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@_lonsrc.py@.PATH_END.py
{ "filename": "IonCal.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/python/IonCal.py", "type": "Python" }
# $Id$ #----------------------------------------------------------------------- # Copyright (C) 2007,2019 # Associated Universities, Inc. Washington DC, USA. # # 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...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@python@IonCal.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "robbassett/TAOIST_MC", "repo_path": "TAOIST_MC_extracted/TAOIST_MC-master/README.md", "type": "Markdown" }
![Logo by James Josephides Swinburne Astronomy Productions](/TMClogo.png) *Logo by James Josephides, Swinburne Astronomy Productions* TrAnsmission Of IoniSing lightT - Monte Carlo: Simulated IGM UV Transmission This code uses hydrogen absorption system statistics from the literature (redshift and column density dist...
robbassettREPO_NAMETAOIST_MCPATH_START.@TAOIST_MC_extracted@TAOIST_MC-master@README.md@.PATH_END.py
{ "filename": "asciielement.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/lib/asciidata/asciielement.py", "type": "Python" }
""" Table element classes for input @author: Martin Kuemmel, Jonas Haase @organization: Space Telescope - European Coordinating Facility (ST-ECF) @license: Gnu Public Licence @contact: mkuemmel@eso.org @since: 2005/09/13 $LastChangedBy: mkuemmel $ $LastChangedDate: 2008-07-03 10:27:47 +0200 (Thu, 03 Jul 2008) $ $Head...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@lib@asciidata@asciielement.py@.PATH_END.py
{ "filename": "shard_map_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/shard_map_test.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@shard_map_test.py@.PATH_END.py
{ "filename": "load_books.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/toast/ops/load_books.py", "type": "Python" }
# Copyright (c) 2022-2024 Simons Observatory. # Full license can be found in the top level "LICENSE" file. import os import re import datetime import numpy as np import traitlets from astropy import units as u import yaml from toast.timing import function_timer, Timer from toast.traits import trait_docs, Int, Unicod...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@toast@ops@load_books.py@.PATH_END.py
{ "filename": "io.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/gdf/io.py", "type": "Python" }
import numpy as np from yt.funcs import mylog from yt.geometry.selection_routines import GridSelector from yt.utilities.io_handler import BaseParticleIOHandler from yt.utilities.on_demand_imports import _h5py as h5py def _grid_dname(grid_id): return "/data/grid_%010i" % grid_id def _field_dname(grid_id, field_...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@gdf@io.py@.PATH_END.py
{ "filename": "_frame.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/_frame.py", "type": "Python" }
from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType import copy as _copy class Frame(_BaseFrameHierarchyType): # class properties # -------------------- _parent_path_str = "" _path_str = "frame" _valid_props = {"baseframe", "data", "group", "layout", "name", "traces...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@_frame.py@.PATH_END.py
{ "filename": "MakeTape5.py", "repo_name": "kgullikson88/Telluric-Fitter", "repo_path": "Telluric-Fitter_extracted/Telluric-Fitter-master/src/MakeTape5.py", "type": "Python" }
""" This file will read in the file 'ParameterFile', which is a human-readable version of the input for LBLRTM (called TAPE5). It will convert that into TAPE5 for use by LBLRTM. You should never need to call this directly! This file is part of the TelFit program. TelFit is free software: yo...
kgullikson88REPO_NAMETelluric-FitterPATH_START.@Telluric-Fitter_extracted@Telluric-Fitter-master@src@MakeTape5.py@.PATH_END.py
{ "filename": "constants.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/trackable/constants.py", "type": "Python" }
# Copyright 2022 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@trackable@constants.py@.PATH_END.py
{ "filename": "state_test.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/tests/state_test.py", "type": "Python" }
from common import * import vaex.ml def test_state_skip_main(df_factory): df = df_factory(x=[1, 2]).hashed()._future() dff = df[df.x > 1] dff._push_down_filter() state = dff.state_get() assert dff.dataset.id in state['objects'] assert df.dataset.id not in state['objects'] def test_state_skip...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@state_test.py@.PATH_END.py
{ "filename": "phys.py", "repo_name": "NASA-Planetary-Science/sbpy", "repo_path": "sbpy_extracted/sbpy-main/sbpy/data/phys.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ====================== sbpy data.Phys Module ===================== Class for storing and querying physical properties created on June 04, 2017 """ __all__ = ["Phys"] __doctest_requires__ = { "Phys.from_sbdb": ["astroquery"], } from collections...
NASA-Planetary-ScienceREPO_NAMEsbpyPATH_START.@sbpy_extracted@sbpy-main@sbpy@data@phys.py@.PATH_END.py
{ "filename": "timing.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/utilities/timing.py", "type": "Python" }
import logging logger = logging.getLogger('NuRadioReco.timing') def analyze_timing(module_list, t_tot=None): data = [] t_tot_int = 0 for module in module_list: dt = module.end() data.append([module.__class__.__name__, dt]) t_tot_int += dt.total_seconds() logger.info("timing inf...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@utilities@timing.py@.PATH_END.py
{ "filename": "_nbinsx.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/_nbinsx.py", "type": "Python" }
import _plotly_utils.basevalidators class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="nbinsx", parent_name="histogram", **kwargs): super(NbinsxValidator, 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@histogram@_nbinsx.py@.PATH_END.py
{ "filename": "test_state.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/tests/step_methods/test_state.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@step_methods@test_state.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "AMReX-Astro/Castro", "repo_path": "Castro_extracted/Castro-main/Exec/science/subchandra/README.md", "type": "Markdown" }
# subchandra This is the double detonation Type Ia supernova setup. It takes a 1-d initial model representing a sub-Chandra WD and a surface He layer and initializes a small perturbation at the pole in the He layer. Initial models for this setup can be created via https://github.com/AMReX-Astro/initial_models in the...
AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@subchandra@README.md@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="ohlc.hoverlabel.font", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@hoverlabel@font@_variantsrc.py@.PATH_END.py
{ "filename": "test_lnlike.py", "repo_name": "bd-j/prospector", "repo_path": "prospector_extracted/prospector-main/tests/test_lnlike.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import numpy as np import pytest from prospect.sources import CSPSpecBasis from prospect.models import SpecModel, templates from prospect.observation import Spectrum, Photometry from prospect.likelihood import NoiseModel from prospect.likelihood.likelihood imp...
bd-jREPO_NAMEprospectorPATH_START.@prospector_extracted@prospector-main@tests@test_lnlike.py@.PATH_END.py
{ "filename": "validation_report.py", "repo_name": "franpoz/SHERLOCK", "repo_path": "SHERLOCK_extracted/SHERLOCK-master/sherlockpipe/validation/validation_report.py", "type": "Python" }
# import os import datetime import os import pathlib from PyPDF2 import PdfReader from astropy.coordinates import Angle from pdf2image import pdf2image from reportlab.lib import colors from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY from r...
franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@sherlockpipe@validation@validation_report.py@.PATH_END.py
{ "filename": "test_pdf.py", "repo_name": "Astroua/TurbuStat", "repo_path": "TurbuStat_extracted/TurbuStat-master/turbustat/tests/test_pdf.py", "type": "Python" }
# Licensed under an MIT open source license - see LICENSE from __future__ import print_function, absolute_import, division import numpy as np import numpy.testing as npt import os from ..statistics.pdf import PDF, PDF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances d...
AstrouaREPO_NAMETurbuStatPATH_START.@TurbuStat_extracted@TurbuStat-master@turbustat@tests@test_pdf.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="bar.marker.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( plotly_name=plotly_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "single-cws_demo.ipynb", "repo_name": "nanograv/holodeck", "repo_path": "holodeck_extracted/holodeck-main/notebooks/single-cws_demo.ipynb", "type": "Jupyter Notebook" }
```python # %load ../init.ipy %reload_ext autoreload %autoreload 2 from importlib import reload import numpy as np import matplotlib.cm as cm import holodeck as holo from holodeck import plot, utils from holodeck.constants import YR ``` # Build Semi-Analytic Model, sam Select a shape (smaller for speed, larger for a...
nanogravREPO_NAMEholodeckPATH_START.@holodeck_extracted@holodeck-main@notebooks@single-cws_demo.ipynb@.PATH_END.py
{ "filename": "test_k_means.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/cluster/tests/test_k_means.py", "type": "Python" }
"""Testing for K-means""" import re import sys from io import StringIO import numpy as np import pytest from scipy import sparse as sp from sklearn.base import clone from sklearn.cluster import KMeans, MiniBatchKMeans, k_means, kmeans_plusplus from sklearn.cluster._k_means_common import ( _euclidean_dense_dense_...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@cluster@tests@test_k_means.py@.PATH_END.py
{ "filename": "arbor.py", "repo_name": "ytree-project/ytree", "repo_path": "ytree_extracted/ytree-main/ytree/data_structures/arbor.py", "type": "Python" }
""" Arbor class and member functions """ #----------------------------------------------------------------------------- # Copyright (c) ytree development team. All rights reserved. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this sof...
ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@ytree@data_structures@arbor.py@.PATH_END.py
{ "filename": "precessionlib.py", "repo_name": "skyfielders/python-skyfield", "repo_path": "python-skyfield_extracted/python-skyfield-master/skyfield/precessionlib.py", "type": "Python" }
from numpy import array, cos, sin from .constants import ASEC2RAD, T0 def compute_precession(jd_tdb): """Return the rotation matrices for precessing to an array of epochs. `jd_tdb` - array of TDB Julian dates The array returned has the shape `(3, 3, n)` where `n` is the number of dates that have bee...
skyfieldersREPO_NAMEpython-skyfieldPATH_START.@python-skyfield_extracted@python-skyfield-master@skyfield@precessionlib.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/ohlc/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._split import SplitValidator from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcV...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/pygad/kerasga/__init__.py", "type": "Python" }
from .kerasga import * __version__ = "1.3.0"
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@pygad@kerasga@__init__.py@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "LSSTDESC/descqa", "repo_path": "descqa_extracted/descqa-master/CONTRIBUTING.md", "type": "Markdown" }
# How to contribute to DESCQA? ## Our GitHub workflow ### Step 1: Fork the DESCQA GitHub repo and clone a local copy on NERSC _Note_: You can skip this step and start with Step 2, if you already did it once. Go to GitHub and [fork](https://guides.github.com/activities/forking/) the DESCQA GitHub repo. Once you have...
LSSTDESCREPO_NAMEdescqaPATH_START.@descqa_extracted@descqa-master@CONTRIBUTING.md@.PATH_END.py
{ "filename": "_below.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymapbox/_below.py", "type": "Python" }
import _plotly_utils.basevalidators class BelowValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="below", parent_name="densitymapbox", **kwargs): super(BelowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymapbox@_below.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/jplspec/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ JPL Spectral Catalog -------------------- :author: Giannina Guzman (gguzman2@villanova.edu) :author: Miguel de Val-Borro (miguel.deval@gmail.com) """ from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configurat...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@jplspec@__init__.py@.PATH_END.py
{ "filename": "test_constant_shift.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Profiles/test_constant_shift.py", "type": "Python" }
__author__ = "sibirrer" from lenstronomy.LensModel.Profiles.constant_shift import Shift import numpy as np import numpy.testing as npt import pytest class TestShift(object): """Tests the Gaussian methods.""" def setup_method(self): self.shift = Shift() alpha_x, alpha_y = 10.0, 0.1 ...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Profiles@test_constant_shift.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/human/tool.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.tools import HumanInputRun # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@human@tool.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "NuSpaceSim/nupyprop", "repo_path": "nupyprop_extracted/nupyprop-main/src/nupyprop/main.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 15 14:04:46 2021 @author: sam """ import nupyprop.data as Data import nupyprop.geometry as Geometry from nupyprop.propagate import run as Run import nupyprop.constants as const import numpy as np from astropy.table import Table from collections ...
NuSpaceSimREPO_NAMEnupypropPATH_START.@nupyprop_extracted@nupyprop-main@src@nupyprop@main.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/parcoords/line/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="parcoords.line.colorbar", **kwargs, ): super(TicklabelpositionValidator, self).__ini...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "_autorange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/yaxis/_autorange.py", "type": "Python" }
import _plotly_utils.basevalidators class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="autorange", parent_name="layout.yaxis", **kwargs): super(AutorangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@yaxis@_autorange.py@.PATH_END.py
{ "filename": "vald.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/vald.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import Vald # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED_L...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@vald.py@.PATH_END.py
{ "filename": "equations.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/radis/spectrum/equations.py", "type": "Python" }
# -*- coding: utf-8 -*- """Created on Mon Nov 13 21:58:47 2017. @author: erwan Formula to calculate most spectral quantities Are stored here all equations that need to be used by both the factory (to generate the spectrum) or the spectrum class (to recompute some quantities in post processing) """ from radis.phys.b...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@radis@spectrum@equations.py@.PATH_END.py
{ "filename": "summary.py", "repo_name": "shaoshanglqy/shap-shapley", "repo_path": "shap-shapley_extracted/shap-shapley-master/shap/plots/summary.py", "type": "Python" }
""" Summary plots of SHAP values across a whole dataset. """ from __future__ import division import warnings import numpy as np from scipy.stats import gaussian_kde try: import matplotlib.pyplot as pl except ImportError as e: warnings.warn("matplotlib could not be loaded!", e) pass from . import labels fr...
shaoshanglqyREPO_NAMEshap-shapleyPATH_START.@shap-shapley_extracted@shap-shapley-master@shap@plots@summary.py@.PATH_END.py
{ "filename": "_yaxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class YAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.xaxis.rangeslider" _path_str = "layout.xaxis.rangeslider.yaxis" _valid_props = {"ra...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@xaxis@rangeslider@_yaxis.py@.PATH_END.py
{ "filename": "test_cumulative.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/arrays/datetimes/test_cumulative.py", "type": "Python" }
import pytest import pandas._testing as tm from pandas.core.arrays import DatetimeArray class TestAccumulator: def test_accumulators_freq(self): # GH#50297 arr = DatetimeArray._from_sequence( [ "2000-01-01", "2000-01-02", "2000-01-03", ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@arrays@datetimes@test_cumulative.py@.PATH_END.py
{ "filename": "InMemoryStorageUtil.py", "repo_name": "JulianBMunoz/21cmvFAST", "repo_path": "21cmvFAST_extracted/21cmvFAST-master/public_21CMvFAST_MC/Programs/CosmoHammer_21CMMC/util/InMemoryStorageUtil.py", "type": "Python" }
#!/usr/bin/env python import cosmoHammer.constants.Constants as c import numpy as np from copy import copy class InMemoryStorageUtil(object): """ Stores the data in memory :var samplesBurin: samples from the burn in :var probBurnin: likelihoods from the burn in :var samples: samples from the burn i...
JulianBMunozREPO_NAME21cmvFASTPATH_START.@21cmvFAST_extracted@21cmvFAST-master@public_21CMvFAST_MC@Programs@CosmoHammer_21CMMC@util@InMemoryStorageUtil.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/physicsmodel/stars/ezmist/__init__.py", "type": "Python" }
from beast.physicsmodel.stars.ezmist.mist import get_one_isochrone, get_t_isochrones # noqa F401
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@physicsmodel@stars@ezmist@__init__.py@.PATH_END.py
{ "filename": "09_sampler_interface.ipynb", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/tutorials/09_sampler_interface.ipynb", "type": "Jupyter Notebook" }
# Sampling algorithms in `sbi` `sbi` implements three methods: NPE, NLE, and NRE. When using NPE, the trained neural network directly approximates the posterior. Thus, sampling from the posterior can be done by sampling from the trained neural network. The neural networks trained in NLE and NRE approximate the likelih...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@tutorials@09_sampler_interface.ipynb@.PATH_END.py
{ "filename": "mouseEvents.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/GraphicsScene/mouseEvents.py", "type": "Python" }
__all__ = ["MouseDragEvent", "MouseClickEvent", "HoverEvent"] import weakref from time import perf_counter from ..Point import Point from ..Qt import QtCore class MouseDragEvent(object): """ Instances of this class are delivered to items in a :class:`GraphicsScene <pyqtgraph.GraphicsScene>` via their mouseD...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@GraphicsScene@mouseEvents.py@.PATH_END.py
{ "filename": "distribute_config.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/distribute_config.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@distribute_config.py@.PATH_END.py
{ "filename": "predictionguard.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/llms/predictionguard.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.llms import PredictionGuard # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATE...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@llms@predictionguard.py@.PATH_END.py
{ "filename": "grid.py", "repo_name": "jmackereth/asteroestimate", "repo_path": "asteroestimate_extracted/asteroestimate-master/asteroestimate/parsec/grid.py", "type": "Python" }
import numpy as np from astropy.io import fits import os from scipy.stats import multivariate_normal, norm from scipy.interpolate import interp1d datapath = os.environ['ASTEROESTIMATE_DATA'] def fullPARSECgrid(): """ load the pre-compiled grid with Chabrier (2001) IMF and global seismic params from scaling relatio...
jmackerethREPO_NAMEasteroestimatePATH_START.@asteroestimate_extracted@asteroestimate-master@asteroestimate@parsec@grid.py@.PATH_END.py
{ "filename": "smooth_cal_inspect_2458206.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458206.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Calibration Smoothing Nightly Notebook **Josh Dillon**, Last Revised 12/4/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metr...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458206.ipynb@.PATH_END.py
{ "filename": "iostream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/tornado/tornado-6/tornado/iostream.py", "type": "Python" }
# # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@tornado@tornado-6@tornado@iostream.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/angularaxis/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.polar.angularaxis", **kwargs, ): super(ShowticklabelsValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@angularaxis@_showticklabels.py@.PATH_END.py
{ "filename": "direct_posterior.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/inference/posteriors/direct_posterior.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> from typing import Optional, Union import torch from torch import Tensor, log from torch.distributions import Distribution from sbi.inference.posteriors...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@posteriors@direct_posterior.py@.PATH_END.py
{ "filename": "test_mysql_backup.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/tests/unit/services/test_mysql_backup.py", "type": "Python" }
import context #import mysql_backup import unittest class MySQLBackupDumpTest(unittest.TestCase): """Placeholder""" if __name__ == '__main__': import xmlrunner runner = xmlrunner.XMLTestRunner(output='test-reports') unittest.main(testRunner=runner)
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@services@test_mysql_backup.py@.PATH_END.py
{ "filename": "pydis.py", "repo_name": "TheAstroFactory/pydis", "repo_path": "pydis_extracted/pydis-master/pydis/pydis.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pyDIS: A simple one dimensional spectra reduction and analysis package Created with the Apache Point Observatory (APO) 3.5-m telescope's Dual Imaging Spectrograph (DIS) in mind. YMMV e.g. DIS specifics: - have BLUE/RED channels - hand-code in that the RED channel wavelength is backwards - ...
TheAstroFactoryREPO_NAMEpydisPATH_START.@pydis_extracted@pydis-master@pydis@pydis.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/setup.py", "type": "Python" }
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst # NOTE: The configuration for the package, including the name, version, and # other information are set in the setup.cfg file. import os import sys from setuptools import setup # To get MARX binary info from configparser import Co...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@setup.py@.PATH_END.py
{ "filename": "distributions.py", "repo_name": "ucl-exoplanets/pylightcurve", "repo_path": "pylightcurve_extracted/pylightcurve-master/pylightcurve/analysis/distributions.py", "type": "Python" }
__all__ = ['one_d_distribution', 'two_d_distribution'] import numpy as np from pylightcurve.errors import * from pylightcurve.analysis.gaussian import fit_gaussian, fit_two_d_gaussian def one_d_distribution(datax, step=None, abs_step=None, min_value=None, max_value=None, mad_filter=None, con...
ucl-exoplanetsREPO_NAMEpylightcurvePATH_START.@pylightcurve_extracted@pylightcurve-master@pylightcurve@analysis@distributions.py@.PATH_END.py
{ "filename": "plot_functions.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/plotting/plot_functions.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ APERO plotting definitions All plots come are linked to here via Graph and Plot classes Created on 2019-10-03 at 10:51 @author: cook """ import copy import os import warnings from collections.abc import Iterable from typing import Any, Dict, Generator, Tuple, Union ...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@plotting@plot_functions.py@.PATH_END.py
{ "filename": "Untitled1.ipynb", "repo_name": "cheerfuluser/tessreduce", "repo_path": "tessreduce_extracted/tessreduce-master/development/Untitled1.ipynb", "type": "Jupyter Notebook" }
```python import astroalign as aa import numpy as np import matplotlib.pyplot as plt %matplotlib notebook import tessreduce as tr from tessreduce import * ``` ```python tess = tr.tessreduce(tpf='../../SN_individual/2020ghq/s23.fits',reduce=True,plot=True,diff=False,align=False) ``` made reference 7 made...
cheerfuluserREPO_NAMEtessreducePATH_START.@tessreduce_extracted@tessreduce-master@development@Untitled1.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._zorder import ZorderValidator from ._ysrc import YsrcValidator from ._yperiodalignment import YperiodalignmentValidator from ._yperiod0 import Yperiod0Validator from ._yperiod import YperiodValidator ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/photutils/centroids/tests/__init__.py", "type": "Python" }
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@centroids@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ArgonneCPAC/diffmah", "repo_path": "diffmah_extracted/diffmah-main/diffmah/data/__init__.py", "type": "Python" }
ArgonneCPACREPO_NAMEdiffmahPATH_START.@diffmah_extracted@diffmah-main@diffmah@data@__init__.py@.PATH_END.py
{ "filename": "getdata.py", "repo_name": "jdeast/EXOFASTv2", "repo_path": "EXOFASTv2_extracted/EXOFASTv2-master/getdata.py", "type": "Python" }
''' this uses lightkurve to extract TESS/Kepler data and format it for EXOFASTv2 The first argument is the SIMBAD-resolvable star name The second (optional) argument is the transit depth, in fraction. Values >= 1 - depth will never be clipped. Default = 0.03 = 3%. The third (optional) argument is the sigma clipping...
jdeastREPO_NAMEEXOFASTv2PATH_START.@EXOFASTv2_extracted@EXOFASTv2-master@getdata.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatterternary/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.textfont" _valid_props = { "color", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterternary@_textfont.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/libs/libarchive/README.md", "type": "Markdown" }
# Welcome to libarchive! The libarchive project develops a portable, efficient C library that can read and write streaming archives in a variety of formats. It also includes implementations of the common `tar`, `cpio`, and `zcat` command-line tools that use the libarchive library. ## Questions? Issues? * https://w...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@libarchive@README.md@.PATH_END.py
{ "filename": "tfsa-2022-107.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-107.md", "type": "Markdown" }
## TFSA-2022-107: Segfault in `QuantizedMatMul` ### CVE Number CVE-2022-35973 ### Impact If `QuantizedMatMul` is given nonscalar input for: - `min_a` - `max_a` - `min_b` - `max_b` It gives a segfault that can be used to trigger a denial of service attack. ```python import tensorflow as tf Toutput = tf.qint32 tra...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-107.md@.PATH_END.py
{ "filename": "hypothesis_spearmanr.md", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/source/tutorial/stats/hypothesis_spearmanr.md", "type": "Markdown" }
--- jupytext: text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.1 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3 --- ```{eval-rst} .. jupyterlite:: ../../_contents/hypothesis_spearmanr.ipynb :new_tab: True ``` (h...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@source@tutorial@stats@hypothesis_spearmanr.md@.PATH_END.py
{ "filename": "camera_utils.py", "repo_name": "agurvich/FIRE_studio", "repo_path": "FIRE_studio_extracted/FIRE_studio-main/src/firestudio/utils/camera_utils.py", "type": "Python" }
import numpy as np from abg_python.math_utils import rotateQuaternion_math class Camera(object): def __repr__(self): roll_str = f"{self.camera_roll}" if self.camera_roll is not None else '' return "Camera(pos=%s,focus=%s%s)"%(repr(self.camera_pos),repr(self.camera_focus),roll_str) de...
agurvichREPO_NAMEFIRE_studioPATH_START.@FIRE_studio_extracted@FIRE_studio-main@src@firestudio@utils@camera_utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ucl-exoplanets/pylightcurve", "repo_path": "pylightcurve_extracted/pylightcurve-master/pylightcurve/processes/__init__.py", "type": "Python" }
ucl-exoplanetsREPO_NAMEpylightcurvePATH_START.@pylightcurve_extracted@pylightcurve-master@pylightcurve@processes@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-client/py2/jupyter_client/blocking/__init__.py", "type": "Python" }
from .client import BlockingKernelClient
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-client@py2@jupyter_client@blocking@__init__.py@.PATH_END.py
{ "filename": "dist.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/setuptools/dist.py", "type": "Python" }
__all__ = ['Distribution'] import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist import itertools from collections import defaultdict from distutils.errors import ( DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@setuptools@dist.py@.PATH_END.py
{ "filename": "test_monitor.py", "repo_name": "DLR-RM/stable-baselines3", "repo_path": "stable-baselines3_extracted/stable-baselines3-master/tests/test_monitor.py", "type": "Python" }
import json import os import uuid import gymnasium as gym import pandas from stable_baselines3.common.monitor import Monitor, get_monitor_files, load_results def test_monitor(tmp_path): """ Test the monitor wrapper """ env = gym.make("CartPole-v1") env.reset(seed=0) monitor_file = os.path.jo...
DLR-RMREPO_NAMEstable-baselines3PATH_START.@stable-baselines3_extracted@stable-baselines3-master@tests@test_monitor.py@.PATH_END.py
{ "filename": "search_ics.py", "repo_name": "askap-craco/CELEBI", "repo_path": "CELEBI_extracted/CELEBI-main/localise/search_ics.py", "type": "Python" }
import numpy as np from argparse import ArgumentParser import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from requests import head def _main(): args = parse_args() ds = normalise(np.load(args.ds)) t = np.load(args.t) freqs = get_freqs(args.f0, args.bw, ds.shape[0]) #parse...
askap-cracoREPO_NAMECELEBIPATH_START.@CELEBI_extracted@CELEBI-main@localise@search_ics.py@.PATH_END.py
{ "filename": "_metasrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/_metasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="surface", **kwargs): super(MetasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@_metasrc.py@.PATH_END.py
{ "filename": "_cmid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/line/_cmid.py", "type": "Python" }
import _plotly_utils.basevalidators class CmidValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattergl.marker.line", **kwargs ): super(CmidValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@line@_cmid.py@.PATH_END.py
{ "filename": "monotone-constraints__formats__individually-for-required-features.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/monotone-constraints__formats__individually-for-required-features.md", "type": "Markdown" }
Set constraints individually for each explicitly specified feature as a string (the number of features is n). ``` "<feature index or name>:<constraint>, .., <feature index or name>:<constraint>" ```
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@monotone-constraints__formats__individually-for-required-features.md@.PATH_END.py
{ "filename": "writeDmumuSh.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/projects/DiffusionScripts/writeDmumuSh.py", "type": "Python" }
import sys,os,shutil,time import numpy as np import math indx = int(sys.argv[1]) pathRun = '/scratch/project_2000203/dubartma/dmumu/' pathDmumuTemplate = "/users/dubartma/analysis/subgrid/TimeDependence/" DmumuTemplate = 'DmumuFit.sh' with open(pathDmumuTemplate+DmumuTemplate,'r') as file: fileDmumu = fi...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@projects@DiffusionScripts@writeDmumuSh.py@.PATH_END.py
{ "filename": "_autocolorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/_autocolorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="surface", **kwargs): super(AutocolorscaleValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@_autocolorscale.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "aelanman/pycalc11", "repo_path": "pycalc11_extracted/pycalc11-main/setup.py", "type": "Python" }
from skbuild import setup setup( packages=['pycalc11'], python_requires=">=3.7", include_package_data=True, )
aelanmanREPO_NAMEpycalc11PATH_START.@pycalc11_extracted@pycalc11-main@setup.py@.PATH_END.py
{ "filename": "gauss.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/core/math/gauss.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ APERO Gaussian math functionality Created on 2019-05-15 at 12:24 @author: cook """ import warnings from typing import Any, Tuple, Union import numpy as np from scipy.optimize import curve_fit from scipy.stats import chisquare from apero.base import base from apero.c...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@core@math@gauss.py@.PATH_END.py
{ "filename": "test_regular_languages.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py2/tests/test_regular_languages.py", "type": "Python" }
from __future__ import unicode_literals from prompt_toolkit.completion import CompleteEvent, Completer, Completion from prompt_toolkit.contrib.regular_languages import compile from prompt_toolkit.contrib.regular_languages.compiler import Match, Variables from prompt_toolkit.contrib.regular_languages.completion import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py2@tests@test_regular_languages.py@.PATH_END.py
{ "filename": "redshift_difference.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/docs/papers/Overview/scripts/redshift_difference.py", "type": "Python" }
#!/usr/bin/env python3 import os import time import numpy from matplotlib import pyplot, ticker, rc from astropy.io import fits import astropy.constants from mangadap.proc.util import growth_lim from mangadap.util.bitmask import BitMask #-----------------------------------------------------------------------------...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@docs@papers@Overview@scripts@redshift_difference.py@.PATH_END.py
{ "filename": "IMU_sensor.md", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/doxygen/documentation/manuals/sensor/IMU_sensor.md", "type": "Markdown" }
IMU Sensor Model {#IMU_sensor} ================================= \tableofcontents Chrono::Sensor supports three sensors commonly used collectively as an IMU. These are accelerometer, gyroscope, and magnetometer. #### Accelerometer Creation ~~~{.cpp} // create a noise model auto noise_model=chrono_types::make_shared<...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@manuals@sensor@IMU_sensor.md@.PATH_END.py
{ "filename": "TestLogLevelsComp.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/containerTests/contLogTest/src/pyContLogTest/TestLogLevelsComp.py", "type": "Python" }
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) National Research Council of Canada, 2007 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@containerTests@contLogTest@src@pyContLogTest@TestLogLevelsComp.py@.PATH_END.py