metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "postprocess.py", "repo_name": "bd-j/forcepho", "repo_path": "forcepho_extracted/forcepho-main/forcepho/postprocess.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, glob import numpy as np try: import matplotlib.pyplot as pl from matplotlib.backends.backend_pdf import PdfPages except: pass import json from astropy.io import fits import h5py from .fitting import Result from .utils import sky_to_pix, populate_im...
bd-jREPO_NAMEforcephoPATH_START.@forcepho_extracted@forcepho-main@forcepho@postprocess.py@.PATH_END.py
{ "filename": "less_equal.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/less_equal.py", "type": "Python" }
# Copyright 2019 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@lite@testing@op_tests@less_equal.py@.PATH_END.py
{ "filename": "txtio.py", "repo_name": "jkrogager/PyNOT", "repo_path": "PyNOT_extracted/PyNOT-master/pynot/txtio.py", "type": "Python" }
import numpy as np from os.path import splitext from astropy.table import Table class DataColumnMissing(Exception): pass def save_ascii_spectrum(fname, wl, flux, err, hdr=None, bg=None, mask=None): """Write spectrum to an ascii text file with header saved to separate text file.""" fmt = "%12.4f % .3e ...
jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@txtio.py@.PATH_END.py
{ "filename": "ClassModelMachineWSCMS.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Imager/WSCMS/ClassModelMachineWSCMS.py", "type": "Python" }
''' DDFacet, a facet-based radio imaging package Copyright (C) 2013-2016 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University 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; eit...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@Imager@WSCMS@ClassModelMachineWSCMS.py@.PATH_END.py
{ "filename": "_yhoverformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/_yhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="scattergl", **kwargs): super(YhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@_yhoverformat.py@.PATH_END.py
{ "filename": "fitting_opt_model.py", "repo_name": "latrop/DECA", "repo_path": "DECA_extracted/DECA-master/ini_modules/fitting_opt_model.py", "type": "Python" }
#!/usr/bin/python # -*- coding: cp1251 -*- #*** Common modules *** import sys import math import numpy as np from scipy import stats import scipy as sp import matplotlib.pyplot as plt import matplotlib.mlab as mlab import matplotlib.patches as patches import matplotlib.path as path from matplotlib.ticker import NullF...
latropREPO_NAMEDECAPATH_START.@DECA_extracted@DECA-master@ini_modules@fitting_opt_model.py@.PATH_END.py
{ "filename": "test_beta_model.py", "repo_name": "jzuhone/pyxsim", "repo_path": "pyxsim_extracted/pyxsim-main/pyxsim/tests/test_beta_model.py", "type": "Python" }
""" A unit test for the pyxsim analysis module. """ import os import shutil import tempfile import numpy as np from numpy.testing import assert_allclose from soxs import ApecGenerator from yt.utilities.cosmology import Cosmology from yt.utilities.physical_constants import clight from pyxsim import CIESourceModel, ma...
jzuhoneREPO_NAMEpyxsimPATH_START.@pyxsim_extracted@pyxsim-main@pyxsim@tests@test_beta_model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-ml/vaex/ml/incubator/__init__.py", "type": "Python" }
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ml@vaex@ml@incubator@__init__.py@.PATH_END.py
{ "filename": "InterpSols.py", "repo_name": "saopicc/killMS", "repo_path": "killMS_extracted/killMS-master/killMS/InterpSols.py", "type": "Python" }
#!/usr/bin/env python """ killMS, a package for calibration in radio interferometry. Copyright (C) 2013-2017 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
saopiccREPO_NAMEkillMSPATH_START.@killMS_extracted@killMS-master@killMS@InterpSols.py@.PATH_END.py
{ "filename": "potentialutils.py", "repo_name": "mackelab/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/utils/potentialutils.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 Callable, Dict, Union import numpy as np import torch import torch.distributions.transforms as torch_tf from torch import Tensor from...
mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@utils@potentialutils.py@.PATH_END.py
{ "filename": "training-from-baseline.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/features/training-from-baseline.md", "type": "Markdown" }
# Continue learning from baseline {{ product }} supports training with a baseline model. Training parameters of the baseline model and the one being trained may vary. The final model is the sum of these two models. ## FML ### [Train Formula on FML](../yandex_specific/nirvana-operations/catboost__nirvana__train-formu...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@features@training-from-baseline.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "COINtoolbox/DRACULA", "repo_path": "DRACULA_extracted/DRACULA-master/CODE/Drac/som_module/__init__.py", "type": "Python" }
COINtoolboxREPO_NAMEDRACULAPATH_START.@DRACULA_extracted@DRACULA-master@CODE@Drac@som_module@__init__.py@.PATH_END.py
{ "filename": "_tickformatstop.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/bar/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 = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.tickformatstop" _valid_props =...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@bar@marker@colorbar@_tickformatstop.py@.PATH_END.py
{ "filename": "test_plot_options.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/plot_options/tests/test_plot_options.py", "type": "Python" }
import numpy as np import pytest from astropy import units as u from astropy.nddata import NDData import matplotlib from numpy.testing import assert_allclose from photutils.datasets import make_4gaussians_image from jdaviz.configs.default.plugins.plot_options.plot_options import SplineStretch @pytest.mark.filterwarn...
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@plot_options@tests@test_plot_options.py@.PATH_END.py
{ "filename": "test_pickle.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/timedeltas/test_pickle.py", "type": "Python" }
from pandas import timedelta_range import pandas._testing as tm class TestPickle: def test_pickle_after_set_freq(self): tdi = timedelta_range("1 day", periods=4, freq="s") tdi = tdi._with_freq(None) res = tm.round_trip_pickle(tdi) tm.assert_index_equal(res, tdi)
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@timedeltas@test_pickle.py@.PATH_END.py
{ "filename": "response_metadata.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/response_metadata.ipynb", "type": "Jupyter Notebook" }
# Response metadata Many model providers include some metadata in their chat generation [responses](/docs/concepts/messages/#aimessage). This metadata can be accessed via the `AIMessage.response_metadata: Dict` attribute. Depending on the model provider and model configuration, this can contain information like [token...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@response_metadata.ipynb@.PATH_END.py
{ "filename": "docscrape_sphinx.py", "repo_name": "jakevdp/supersmoother", "repo_path": "supersmoother_extracted/supersmoother-master/doc/sphinxext/numpy_ext/docscrape_sphinx.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import sys, re, inspect, textwrap, pydoc import sphinx import collections from .docscrape import NumpyDocString, FunctionDoc, ClassDoc if sys.version_info[0] >= 3: sixu = lambda s: s else: sixu = lambda s: unicode(s, 'unicode_escape') class Sp...
jakevdpREPO_NAMEsupersmootherPATH_START.@supersmoother_extracted@supersmoother-master@doc@sphinxext@numpy_ext@docscrape_sphinx.py@.PATH_END.py
{ "filename": "gp_framework_quasiperiodic_activity.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/models/gp_framework_quasiperiodic_activity.py", "type": "Python" }
from pyorbit.subroutines.common import * from pyorbit.models.abstract_model import * from pyorbit.keywords_definitions import * from scipy.linalg import cho_factor, cho_solve, lapack, LinAlgError from scipy import matrix, spatial class GP_Framework_QuasiPeriodicActivity(AbstractModel): ''' Three parameters out o...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@models@gp_framework_quasiperiodic_activity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/eventloop/minitornado/platform/__init__.py", "type": "Python" }
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@eventloop@minitornado@platform@__init__.py@.PATH_END.py
{ "filename": "correct_disconnected.py", "repo_name": "oliverphilcox/RascalC", "repo_path": "RascalC_extracted/RascalC-master/python/correct_disconnected.py", "type": "Python" }
## Script to correct jackknife disconnected term from runs of older versions of RascalC ## Determines single-field vs multi-field and jackknife automatically, but by default does no changes for 2nd field import numpy as np import sys,os # PARAMETERS if len(sys.argv) not in (8, 10): print("Usage: python correct_di...
oliverphilcoxREPO_NAMERascalCPATH_START.@RascalC_extracted@RascalC-master@python@correct_disconnected.py@.PATH_END.py
{ "filename": "AXIS.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/missions/AXIS/AXIS.py", "type": "Python" }
import copy import astropy.units as u import numpy as np from astropy.table import Table from astropy.utils.data import get_pkg_data_filename from marxs import analysis, design, optics, simulator from marxs.base import MarxsElement, TagVersion from marxs.design import tolerancing as tol from marxs.design.bendgratings...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@missions@AXIS@AXIS.py@.PATH_END.py
{ "filename": "font_manager.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/font_manager.py", "type": "Python" }
""" A module for finding, managing, and using fonts across platforms. This module provides a single :class:`FontManager` instance that can be shared across backends and platforms. The :func:`findfont` function returns the best TrueType (TTF) font file in the local or system font path that matches the specified :class...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@font_manager.py@.PATH_END.py
{ "filename": "model-evaluation-insights.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/guides/model-evaluation-insights.md", "type": "Markdown" }
--- comments: true description: Explore the most effective ways to assess and refine YOLO11 models for better performance. Learn about evaluation metrics, fine-tuning processes, and how to customize your model for specific needs. keywords: Model Evaluation, Machine Learning Model Evaluation, Fine Tuning Machine Learnin...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@guides@model-evaluation-insights.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/tests/db/__init__.py", "type": "Python" }
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@tests@db@__init__.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/pathbar/_textfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="icicle.pathbar", **kwargs): super(TextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@pathbar@_textfont.py@.PATH_END.py
{ "filename": "test_image_array.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/tests/test_image_array.py", "type": "Python" }
import os import shutil import tempfile import unittest import numpy as np from numpy.testing import assert_equal from yt.data_objects.image_array import ImageArray from yt.testing import requires_module old_settings = None def setup(): global old_settings from yt.config import ytcfg ytcfg["yt", "inte...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@tests@test_image_array.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/zaxis/title/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.zaxis.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@zaxis@title@font@_color.py@.PATH_END.py
{ "filename": "_autobiny.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/_autobiny.py", "type": "Python" }
import _plotly_utils.basevalidators class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="autobiny", parent_name="histogram2dcontour", **kwargs ): super(AutobinyValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@_autobiny.py@.PATH_END.py
{ "filename": "SkyGeom.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/python/SkyGeom.py", "type": "Python" }
""" Python Obit Sky Geometry Utility This module contains utilities for Sky Geometry calculations Also primary beam calculations """ # $Id$ #----------------------------------------------------------------------- # Copyright (C) 2007-2021 # Associated Universities, Inc. Washington DC, USA. # # This program is free ...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@python@SkyGeom.py@.PATH_END.py
{ "filename": "_legendwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/_legendwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="contour", **kwargs): super(LegendwidthValidator, 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@contour@_legendwidth.py@.PATH_END.py
{ "filename": "mask.py", "repo_name": "igmhub/picca", "repo_path": "picca_extracted/picca-master/py/picca/delta_extraction/mask.py", "type": "Python" }
"""This module defines the abstract class Mask from which all Masks must inherit """ from picca.delta_extraction.errors import MaskError def _remove_pixels(forest, param, w): if param in ['resolution_matrix']: setattr(forest, param, getattr(forest, param)[:, w]) else: setattr(forest, param, get...
igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@py@picca@delta_extraction@mask.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/isosurface/slices/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._x import X from ._y import Y from ._z import Z else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._x.X", "._y.Y", "._z....
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@isosurface@slices@__init__.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distGeom/setGeomLogPMF/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import glob import sys fontsize = 17 kind = "IK" label = [ r"probSuccess = .1" , r"probSuccess = .2" , r"probSuccess = .5" , r"probSuccess = .8" ] pattern = "*." + kind + ".txt" fileList = gl...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distGeom@setGeomLogPMF@main.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "gterreran/Swift_host_subtraction", "repo_path": "Swift_host_subtraction_extracted/Swift_host_subtraction-main/setup.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Giacomo Terreran (2022) # # This file is part of the Swift_host_subtraction python package. # # Swift_host_subtraction 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 S...
gterreranREPO_NAMESwift_host_subtractionPATH_START.@Swift_host_subtraction_extracted@Swift_host_subtraction-main@setup.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymap/hoverlabel/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymap.hoverlabel", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymap@hoverlabel@_font.py@.PATH_END.py
{ "filename": "fillexel.py", "repo_name": "svalenti/pessto", "repo_path": "pessto_extracted/pessto-master/trunk/passtobin/fillexel.py", "type": "Python" }
#!/usr/bin/env python import os import sys import string import re import glob import ntt from pyfits import open as popen from ntt.util import readkey3, readhdr, readspectrum, delete import datetime import time from optparse import OptionParser description = "> filling exelfile " usage = "%prog \t listframes [option...
svalentiREPO_NAMEpesstoPATH_START.@pessto_extracted@pessto-master@trunk@passtobin@fillexel.py@.PATH_END.py
{ "filename": "donor_props.py", "repo_name": "orlox/mesa_input_data", "repo_path": "mesa_input_data_extracted/mesa_input_data-master/2016_ULX/scripts/orbit/donor_props.py", "type": "Python" }
#!/usr/bin/env python import numpy as np from pylab import * import matplotlib.pyplot as plt from matplotlib import rc rc('text', usetex=True) import matplotlib.patches as patches from scipy.interpolate import griddata import math import scipy from matplotlib import ticker import sys import os import mmap import iterto...
orloxREPO_NAMEmesa_input_dataPATH_START.@mesa_input_data_extracted@mesa_input_data-master@2016_ULX@scripts@orbit@donor_props.py@.PATH_END.py
{ "filename": "_bayesian_mixture.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/mixture/_bayesian_mixture.py", "type": "Python" }
"""Bayesian Gaussian Mixture Model.""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import math from numbers import Real import numpy as np from scipy.special import betaln, digamma, gammaln from ..utils import check_array from ..utils._param_validation import Interval, StrOptions ...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@mixture@_bayesian_mixture.py@.PATH_END.py
{ "filename": "_zmin.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/_zmin.py", "type": "Python" }
import _plotly_utils.basevalidators class ZminValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="histogram2dcontour", **kwargs): super(ZminValidator, 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@histogram2dcontour@_zmin.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/error_x/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram.error_x", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@error_x@_thickness.py@.PATH_END.py
{ "filename": "distribute_coordinator.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/distribute_coordinator.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_coordinator.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/title/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="pie.title.font", **kwargs): super(VariantValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@title@font@_variant.py@.PATH_END.py
{ "filename": "file_system.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/document_loaders/blob_loaders/file_system.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import FileSystemBlobLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional i...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@document_loaders@blob_loaders@file_system.py@.PATH_END.py
{ "filename": "fields.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/enzo_e/fields.py", "type": "Python" }
import numpy as np from yt._typing import KnownFieldsT from yt.fields.field_info_container import FieldInfoContainer from yt.fields.particle_fields import add_union_field from yt.frontends.enzo_e.misc import ( get_listed_subparam, get_particle_mass_correction, nested_dict_get, ) rho_units = "code_mass / c...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@enzo_e@fields.py@.PATH_END.py
{ "filename": "mixed_lm_example.ipynb", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/examples/notebooks/mixed_lm_example.ipynb", "type": "Jupyter Notebook" }
# Linear Mixed Effects Models ```python %matplotlib inline import numpy as np import pandas as pd import statsmodels.api as sm import statsmodels.formula.api as smf from statsmodels.tools.sm_exceptions import ConvergenceWarning ``` **Note**: The R code and the results in this notebook has been converted to markdown...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@examples@notebooks@mixed_lm_example.ipynb@.PATH_END.py
{ "filename": "autograph_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/autograph_ops_test.py", "type": "Python" }
# Copyright 2023 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@autograph_ops_test.py@.PATH_END.py
{ "filename": "plot_phase_unwrap.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/doc/examples/filters/plot_phase_unwrap.py", "type": "Python" }
""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate an algorithm [1]_ implemented in...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@examples@filters@plot_phase_unwrap.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/backends/base.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@pymc@backends@base.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="funnelarea", **kwargs ): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@_legendgrouptitle.py@.PATH_END.py
{ "filename": "plot_colormap.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/pyPlots/plot_colormap.py", "type": "Python" }
# # This file is part of Analysator. # Copyright 2013-2016 Finnish Meteorological Institute # Copyright 2017-2018 University of Helsinki # # For details of usage, see the COPYING file and read the "Rules of the Road" # at http://www.physics.helsinki.fi/vlasiator/ # # This program is free software; you can redistribu...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@pyPlots@plot_colormap.py@.PATH_END.py
{ "filename": "interpolative.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/linalg/interpolative.py", "type": "Python" }
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@linalg@interpolative.py@.PATH_END.py
{ "filename": "flow.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/test-projects/wrapped-flow-project/flow.py", "type": "Python" }
from .utils import pipeline_flow @pipeline_flow(name="wrapped-flow") def test_flow(): return "I'm a pipeline flow!"
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test-projects@wrapped-flow-project@flow.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "IAS-Astrophysics/athenak", "repo_path": "athenak_extracted/athenak-main/tst/scripts/__init__.py", "type": "Python" }
IAS-AstrophysicsREPO_NAMEathenakPATH_START.@athenak_extracted@athenak-main@tst@scripts@__init__.py@.PATH_END.py
{ "filename": "matrix.md", "repo_name": "smirik/resonances", "repo_path": "resonances_extracted/resonances-main/docs/matrix.md", "type": "Markdown" }
# Resonance Matrices The Resonance Matrices allows us to find the preliminary (theoretical) value of a resonant semi-major axis for the resonance. While for a two-body mean motion resonance the calculation follows obviously from the Third Kepler Law, it is not so straightforward for three-body mean motion resonances. ...
smirikREPO_NAMEresonancesPATH_START.@resonances_extracted@resonances-main@docs@matrix.md@.PATH_END.py
{ "filename": "_fresnel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/lighting/_fresnel.py", "type": "Python" }
import _plotly_utils.basevalidators class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="mesh3d.lighting", **kwargs): super(FresnelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@lighting@_fresnel.py@.PATH_END.py
{ "filename": "_showexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(ShowexponentValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@_showexponent.py@.PATH_END.py
{ "filename": "test_construction.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/arrays/boolean/test_construction.py", "type": "Python" }
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.arrays import BooleanArray from pandas.core.arrays.boolean import coerce_to_array def test_boolean_array_constructor(): values = np.array([True, False, True, False], dtype="bool") mask = np.array([False, False, Fals...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@arrays@boolean@test_construction.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="treemap", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@_text.py@.PATH_END.py
{ "filename": "test.py", "repo_name": "bolverk/huji-rich", "repo_path": "huji-rich_extracted/huji-rich-master/convergence/acoustic_1d/lagrangian_second_order/test.py", "type": "Python" }
#! /usr/bin/python import math def chi_squared(a1, a2): import math diff2 = [(x-y)**2 for x,y in zip(a1,a2)] return math.sqrt(sum(diff2)/(max(a1)-min(a1))**2/len(a1)) def L1_error_norm(a1,a2): import math abs_diff = [abs(x-y) for x,y in zip(a1,a2)] return sum(abs_diff)/len(a1) def error_...
bolverkREPO_NAMEhuji-richPATH_START.@huji-rich_extracted@huji-rich-master@convergence@acoustic_1d@lagrangian_second_order@test.py@.PATH_END.py
{ "filename": "test_scs.py", "repo_name": "stephane-caron/qpsolvers", "repo_path": "qpsolvers_extracted/qpsolvers-main/tests/test_scs.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # SPDX-License-Identifier: LGPL-3.0-or-later # Copyright 2016-2022 Stéphane Caron and the qpsolvers contributors """Unit tests for SCS.""" import unittest import warnings import numpy as np from qpsolvers import ProblemError from .problems import get_sd3310_problem ...
stephane-caronREPO_NAMEqpsolversPATH_START.@qpsolvers_extracted@qpsolvers-main@tests@test_scs.py@.PATH_END.py
{ "filename": "lut_tags.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/ghost_instruments/test/lut_tags.py", "type": "Python" }
fixture_data = { # Example # ('GHOST', 'filename.fits'): ['tag', 'set', 'in', 'full', ], # GHOST BIAS ('GHOST', 'bias_1_MEF.fits'): ['BIAS', 'BUNDLE', 'CAL', 'GEMINI', ...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@ghost_instruments@test@lut_tags.py@.PATH_END.py
{ "filename": "molinfo_test.py", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/tests/unittests/spec/api/molinfo_test.py", "type": "Python" }
import pytest from exojax.spec.molinfo import molmass_isotope from exojax.spec.molinfo import isotope_molmass from exojax.spec.molinfo import molmass #deprecated def test_isotope_molmass(): assert isotope_molmass("(12C)(16O)") == pytest.approx(27.994915) assert isotope_molmass("12C-16O") == pytest.approx(27.9...
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@unittests@spec@api@molinfo_test.py@.PATH_END.py
{ "filename": "text.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/feature_extraction/text.py", "type": "Python" }
# Copyright (c) 2022-2023, NVIDIA CORPORATION. # # 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 agre...
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@feature_extraction@text.py@.PATH_END.py
{ "filename": "hints.py", "repo_name": "joezuntz/cosmosis", "repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/samplers/hints.py", "type": "Python" }
import numpy as np class Hints(object): def __init__(self): self._peak = None self._cov = None self._peak_post = None def has_peak(self): return self._peak is not None def set_peak(self, peak, post): if self._peak_post is None or post > self._peak_post: ...
joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@samplers@hints.py@.PATH_END.py
{ "filename": "featureclassifier.py", "repo_name": "dtamayo/spock", "repo_path": "spock_extracted/spock-master/spock/featureclassifier.py", "type": "Python" }
import os from multiprocessing import cpu_count from multiprocessing.pool import ThreadPool import numpy as np import rebound from xgboost import XGBClassifier from .feature_functions import features from .simsetup import init_sim_parameters class FeatureClassifier(): def __init__(self, modelfile='featureclassif...
dtamayoREPO_NAMEspockPATH_START.@spock_extracted@spock-master@spock@featureclassifier.py@.PATH_END.py
{ "filename": "INPUT.md", "repo_name": "bradkav/WIMpy_NREFT", "repo_path": "WIMpy_NREFT_extracted/WIMpy_NREFT-main/old_WIMpy/FormFactors/INPUT.md", "type": "Markdown" }
# WIMpy_NREFT ## NREFT form factors The nuclear form factors are written in the form: $$ F_X^{(N, N')} = \mathrm{e}^{-2y}\sum_{k} c_k y^k\,. $$ The definition of the dimensionless momentum variable y can be found in e.g. Appendix A.3 of [arXiv:1203.3542](https://arxiv.org/abs/1203.3542). The form factors tables gi...
bradkavREPO_NAMEWIMpy_NREFTPATH_START.@WIMpy_NREFT_extracted@WIMpy_NREFT-main@old_WIMpy@FormFactors@INPUT.md@.PATH_END.py
{ "filename": "_yanchor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/colorbar/_yanchor.py", "type": "Python" }
import _plotly_utils.basevalidators class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatter.marker.colorbar", **kwargs ): super(YanchorValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@colorbar@_yanchor.py@.PATH_END.py
{ "filename": "test_isin.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_isin.py", "type": "Python" }
import numpy as np import pytest import pandas as pd from pandas import ( Series, date_range, ) import pandas._testing as tm from pandas.core import algorithms from pandas.core.arrays import PeriodArray class TestSeriesIsIn: def test_isin(self): s = Series(["A", "B", "C", "a", "B", "B", "A", "C"]...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_isin.py@.PATH_END.py
{ "filename": "interface.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/mesa/interface.py", "type": "Python" }
""" MESA chooser """ from amuse.community.mesa_r2208.interface import \ MESAInterface as MESAInterface_2208 from amuse.community.mesa_r15140.interface import \ MESAInterface as MESAInterface_15140 from amuse.community.mesa_r2208.interface import MESA as MESA_2208 from amuse.community.mesa_r15140.interface impor...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@mesa@interface.py@.PATH_END.py
{ "filename": "postprocess.py", "repo_name": "eggplantbren/RJObject", "repo_path": "RJObject_extracted/RJObject-master/Examples/SineWaves/postprocess.py", "type": "Python" }
# Copyright (c) 2009, 2010, 2011, 2012 Brendon J. Brewer. # # This file is part of DNest3. # # DNest3 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 ...
eggplantbrenREPO_NAMERJObjectPATH_START.@RJObject_extracted@RJObject-master@Examples@SineWaves@postprocess.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "panoptes/POCS", "repo_path": "POCS_extracted/POCS-main/setup.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Setup file for utils. Use setup.cfg to configure your project. This file was generated with PyScaffold 3.2.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: https://pyscaffold.org/ """ import sys from pkg_resources import Versi...
panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@setup.py@.PATH_END.py
{ "filename": "test_noisy_percentile.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/empirical_models/abunmatch/tests/test_noisy_percentile.py", "type": "Python" }
""" """ import numpy as np from scipy.stats import spearmanr from astropy.utils.misc import NumpyRNGContext from ..noisy_percentile import noisy_percentile __all__ = ('test_noisy_percentile1', ) fixed_seed = 43 npts = int(1e5) with NumpyRNGContext(fixed_seed): u = np.random.uniform(0, 1, npts) uran = np.ra...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@empirical_models@abunmatch@tests@test_noisy_percentile.py@.PATH_END.py
{ "filename": "linear_basis.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LightModel/linear_basis.py", "type": "Python" }
__author__ = "sibirrer" # this file contains a class which describes the surface brightness of the light models import numpy as np from lenstronomy.LightModel.light_model_base import LightModelBase __all__ = ["LinearBasis"] class LinearBasis(LightModelBase): """Class to handle source and lens light models.""" ...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LightModel@linear_basis.py@.PATH_END.py
{ "filename": "axeinputs.py", "repo_name": "spacetelescope/hstaxe", "repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/axesrc/axeinputs.py", "type": "Python" }
""" See LICENSE.txt """ import os import numpy as np from copy import deepcopy from astropy.io import fits from astropy.table import Table, Column from astropy.io.registry import IORegistryError from hstaxe.axeerror import aXeError from hstaxe import config as config_util class aXeInput: """Class for the admini...
spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@axesrc@axeinputs.py@.PATH_END.py
{ "filename": "fresnel.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/itreg/regpy/operators/fresnel.py", "type": "Python" }
import numpy as np from regpy.operators import Exponential, FourierTransform, Multiplication, RealPart, SquaredModulus def fresnel_propagator(domain, fresnel_number): r"""Operator that implements Fresnel-propagation of 2D-arrays, which models near-field diffraction in the regime of the free-space paraxial He...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@itreg@regpy@operators@fresnel.py@.PATH_END.py
{ "filename": "savedmodel_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/jax2tf/tests/savedmodel_test.py", "type": "Python" }
# Copyright 2020 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@experimental@jax2tf@tests@savedmodel_test.py@.PATH_END.py
{ "filename": "trappist_substellar.py", "repo_name": "marblestation/posidonius", "repo_path": "posidonius_extracted/posidonius-master/cases/Revol_et_al_2024/trappist_substellar.py", "type": "Python" }
import posidonius import numpy as np import argparse import os, sys from posidonius.particles.axes import Axes if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('output_filename', action='store', help='Filename where the initial snapshot will be stored (e.g., universe_integrator...
marblestationREPO_NAMEposidoniusPATH_START.@posidonius_extracted@posidonius-master@cases@Revol_et_al_2024@trappist_substellar.py@.PATH_END.py
{ "filename": "12240_rval_150010.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/Zero/AR_12240/12240_rval_150010.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 5 03:33:07 2024 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "12240" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@Zero@AR_12240@12240_rval_150010.py@.PATH_END.py
{ "filename": "validator.py", "repo_name": "franpoz/SHERLOCK", "repo_path": "SHERLOCK_extracted/SHERLOCK-master/sherlockpipe/validation/validator.py", "type": "Python" }
import copy import logging import shutil import traceback import numpy as np import matplotlib.pyplot as plt import yaml from astroquery.mast import TesscutClass from lcbuilder.lcbuilder_class import LcBuilder from lightkurve import TessLightCurve, KeplerLightCurve import pandas as pd import os import ast import tricer...
franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@sherlockpipe@validation@validator.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gemini_instruments/cirpass/__init__.py", "type": "Python" }
__all__ = ['AstroDataCirpass'] from astrodata import factory from .adclass import AstroDataCirpass factory.addClass(AstroDataCirpass)
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gemini_instruments@cirpass@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/yaxis/title/font/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._size import SizeValidator from ._family import FamilyValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._siz...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@yaxis@title@font@__init__.py@.PATH_END.py
{ "filename": "2023_09_25_121806_8167af8df781_remove_flow_run_id_requirement_from_task_run.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/sqlite/2023_09_25_121806_8167af8df781_remove_flow_run_id_requirement_from_task_run.py", ...
"""Make flow_run_id nullable on task_run and log tables Revision ID: 05ea6f882b1d Revises: 8167af8df781 Create Date: 2023-09-25 12:18:06.722322 """ from alembic import op # revision identifiers, used by Alembic. revision = "05ea6f882b1d" down_revision = "8167af8df781" branch_labels = None depends_on = None def up...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@sqlite@2023_09_25_121806_8167af8df781_remove_flow_run_id_requirement_from_task_run.py@.PATH_END.py
{ "filename": "memh5.py", "repo_name": "radiocosmology/caput", "repo_path": "caput_extracted/caput-master/caput/memh5.py", "type": "Python" }
"""Module for making in-memory mock-ups of :mod:`h5py` objects. It is sometimes useful to have a consistent API for data that is independent of whether that data lives on disk or in memory. :mod:`h5py` provides this to a certain extent, having :class:`h5py.Dataset` objects that act very much like :mod:`numpy` arrays. ...
radiocosmologyREPO_NAMEcaputPATH_START.@caput_extracted@caput-master@caput@memh5.py@.PATH_END.py
{ "filename": "admin.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/admin.py", "type": "Python" }
from django.contrib import admin
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@admin.py@.PATH_END.py
{ "filename": "_outlinecolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/colorbar/_outlinecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="heatmap.colorbar", **kwargs ): super(OutlinecolorValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@colorbar@_outlinecolor.py@.PATH_END.py
{ "filename": "Multi-Star Inference with Chempy - Tutorial.ipynb", "repo_name": "oliverphilcox/ChempyMulti", "repo_path": "ChempyMulti_extracted/ChempyMulti-master/Multi-Star Inference with Chempy - Tutorial.ipynb", "type": "Jupyter Notebook" }
## Tutorial Outline **In this tutorial we will demonstrate how to:** 1. Use the new *Chempy* functions, which take the stellar birth-time as inputs 2. Create and train a neural network to emulate the *Chempy* with birth-time as a free parameter 3. Generate mock data-sets using *Chempy*. We will also describe the fi...
oliverphilcoxREPO_NAMEChempyMultiPATH_START.@ChempyMulti_extracted@ChempyMulti-master@Multi-Star Inference with Chempy - Tutorial.ipynb@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/contours/labelfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contourcarpet.contours.labelfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contourcarpet@contours@labelfont@_weight.py@.PATH_END.py
{ "filename": "shift.md", "repo_name": "myrafproject/myrafproject", "repo_path": "myrafproject_extracted/myrafproject-main/example/command_line/shift.md", "type": "Markdown" }
# shift `shift` shifts FITS files. usage: im shift [-h] file x y output ## Positional Arguments: - **file** A file path or pattern (e.g., "*.fits") - **x** Amount to shift in the X direction - **y** Amount to shift in the Y direction - **output** Output directory ## Op...
myrafprojectREPO_NAMEmyrafprojectPATH_START.@myrafproject_extracted@myrafproject-main@example@command_line@shift.md@.PATH_END.py
{ "filename": "test_erfa.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/_erfa/tests/test_erfa.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from .. import core as erfa from ...tests.helper import catch_warnings def test_erfa_wrapper(): """ Runs a set of tests that mostly make sure vectorization is working as expected """ jd = np.linspace(2456855.5, 24...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@_erfa@tests@test_erfa.py@.PATH_END.py
{ "filename": "job.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/non_linear/grid/grid_search/job.py", "type": "Python" }
from typing import Optional, Dict from autofit.non_linear.parallel import AbstractJob, AbstractJobResult class JobResult(AbstractJobResult): def __init__(self, result, result_list_row, number): """ The result of a job Parameters ---------- result The result of...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@non_linear@grid@grid_search@job.py@.PATH_END.py
{ "filename": "test_interval_range.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/interval/test_interval_range.py", "type": "Python" }
from datetime import timedelta import numpy as np import pytest from pandas.core.dtypes.common import is_integer from pandas import ( DateOffset, Interval, IntervalIndex, Timedelta, Timestamp, date_range, interval_range, timedelta_range, ) import pandas._testing as tm from pandas.tse...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@interval@test_interval_range.py@.PATH_END.py
{ "filename": "ngmix_runner.py", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/shapepipe/modules/ngmix_runner.py", "type": "Python" }
"""NGMIX RUNNER. Module runner for ``ngmix``. :Author: Axel Guinot """ from shapepipe.modules.module_decorator import module_runner from shapepipe.modules.ngmix_package.ngmix import Ngmix @module_runner( version='0.0.1', input_module=[ 'sextractor_runner', 'psfex_interp_runner', 'v...
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@shapepipe@modules@ngmix_runner.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pointcloud/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="pointcloud", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, arra...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pointcloud@_text.py@.PATH_END.py
{ "filename": "_ticklen.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_ticklen.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattersmith.marker.colorbar", **kwargs, ): super(TicklenValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@colorbar@_ticklen.py@.PATH_END.py
{ "filename": "_value.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): super(ValueValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@baxis@tickformatstop@_value.py@.PATH_END.py
{ "filename": "ResultsPlotting.ipynb", "repo_name": "nickfarrow/GalacticDNSMass", "repo_path": "GalacticDNSMass_extracted/GalacticDNSMass-master/mainCode/Plotting/ResultsPlotting.ipynb", "type": "Jupyter Notebook" }
```python import matplotlib.pyplot as plt import corner import pymultinest #Imports import numpy as np from scipy import stats from scipy.special import erf import json import os import sys import random from math import log10, floor ### Top directory for the location of project files. topDirectory = '../' if not...
nickfarrowREPO_NAMEGalacticDNSMassPATH_START.@GalacticDNSMass_extracted@GalacticDNSMass-master@mainCode@Plotting@ResultsPlotting.ipynb@.PATH_END.py
{ "filename": "plot_energy_vs_t.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/ph4/plot_energy_vs_t.py", "type": "Python" }
#!/usr/bin/env python import getopt import string from pylab import * import re import numpy from math import log10 # Display a time sequence from a (not yet standard) AMUSE log file. if __name__ == '__main__': try: opts, args = getopt.getopt(sys.argv[1:], "f:lq:t:") except getopt.GetoptErr...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@ph4@plot_energy_vs_t.py@.PATH_END.py
{ "filename": "MassIntegrals.py", "repo_name": "oliverphilcox/EffectiveHalos", "repo_path": "EffectiveHalos_extracted/EffectiveHalos-master/EffectiveHalos/MassIntegrals.py", "type": "Python" }
from . import Cosmology, MassFunction, HaloPhysics import numpy as np from scipy.special import spherical_jn from scipy.integrate import simps class MassIntegrals: """ Class to compute and store the various mass integrals of the form .. math:: I_p^{q_1,q_2}(k_1,...k_p) = \\int n(m)b^{(q_1)}(m)b^{...
oliverphilcoxREPO_NAMEEffectiveHalosPATH_START.@EffectiveHalos_extracted@EffectiveHalos-master@EffectiveHalos@MassIntegrals.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.baxis.title.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@baxis@title@font@_style.py@.PATH_END.py
{ "filename": "urap.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/ulysses/urap.py", "type": "Python" }
from .load import load from typing import List, Union # This routine was moved out of __init__.py. Please see that file for previous revision history. def urap(trange:List[str]=['2003-01-01', '2003-01-02'], datatype:str='pfrp_m0', prefix:str='', suffix:str='', get_support_data:bool=Fa...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@ulysses@urap.py@.PATH_END.py