metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "README.md", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/pipeline/ingest/README.md", "type": "Markdown" }
#
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@pipeline@ingest@README.md@.PATH_END.py
{ "filename": "procedure.py", "repo_name": "CP3-Origins/cp3-bench", "repo_path": "cp3-bench_extracted/cp3-bench-master/bench/methods/dso/procedure.py", "type": "Python" }
import click import json import os import sys import logging import numpy as np from dso import DeepSymbolicRegressor # Method to Procedure superclass sys.path.append(os.path.join(os.path.dirname(__file__), '../../../')) from bench.utils.method_evaluator import MethodEvaluator PATH = os.path.dirname(os.path.abspath(_...
CP3-OriginsREPO_NAMEcp3-benchPATH_START.@cp3-bench_extracted@cp3-bench-master@bench@methods@dso@procedure.py@.PATH_END.py
{ "filename": "output.py", "repo_name": "sirocco-rt/sirocco", "repo_path": "sirocco_extracted/sirocco-main/py_progs/py4py/py4py/reverb/output.py", "type": "Python" }
""" Reverberation mapping output module This contains helper functions that bundle up the production of multiple transfer functions or the creation of response functions. """ # -*- coding: utf-8 -*- # pylint: disable=C0301 import numpy as np from typing import List, Optional from py4py.reverb import TransferFunction ...
sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@py_progs@py4py@py4py@reverb@output.py@.PATH_END.py
{ "filename": "_hexbin_mapbox.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/figure_factory/_hexbin_mapbox.py", "type": "Python" }
from plotly.express._core import build_dataframe from plotly.express._doc import make_docstring from plotly.express._chart_types import choropleth_mapbox, scatter_mapbox import narwhals.stable.v1 as nw import numpy as np def _project_latlon_to_wgs84(lat, lon): """ Projects lat and lon to WGS84, used to get re...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@figure_factory@_hexbin_mapbox.py@.PATH_END.py
{ "filename": "_layout.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/_layout.py", "type": "Python" }
import _plotly_utils.basevalidators class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="layout", parent_name="layout.template", **kwargs): super(LayoutValidator, 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@layout@template@_layout.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "aburgasser/kastredux", "repo_path": "kastredux_extracted/kastredux-main/docs/source/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # SpeX Prism Library Analysis Toolkit documentation build configuration file, created by # sphinx-quickstart on Sat Jul 11 20:07:28 2015. # ################## # you should compile this using the following command in the _build folder: # sphinx-apidoc -f -o docs/source projectdir #########...
aburgasserREPO_NAMEkastreduxPATH_START.@kastredux_extracted@kastredux-main@docs@source@conf.py@.PATH_END.py
{ "filename": "_direction.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/_direction.py", "type": "Python" }
import _plotly_utils.basevalidators class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="direction", parent_name="pie", **kwargs): super(DirectionValidator, 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@pie@_direction.py@.PATH_END.py
{ "filename": "const.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/src/axolotl/common/const.py", "type": "Python" }
""" Various shared constants """ DEFAULT_DATASET_PREPARED_PATH = "last_run_prepared"
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@common@const.py@.PATH_END.py
{ "filename": "init.py", "repo_name": "antoinemarchal/ROHSA", "repo_path": "ROHSA_extracted/ROHSA-master/publication/OBS/init.py", "type": "Python" }
import numpy as np from astropy.io import fits import matplotlib.pyplot as plt from ROHSApy import ROHSA path = "/data/amarchal/ROHSA_paper/" fitsname = path + "data/observation/GHIGLS_NEP_Tb.fits" hdu = fits.open(fitsname) hdr = hdu[0].header cube = hdu[0].data[0][200:500,:,:] # hdu_rms = fits.open(path + "data/") # ...
antoinemarchalREPO_NAMEROHSAPATH_START.@ROHSA_extracted@ROHSA-master@publication@OBS@init.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/_loss/tests/__init__.py", "type": "Python" }
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@_loss@tests@__init__.py@.PATH_END.py
{ "filename": "_ticktext.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/aaxis/_ticktext.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.ternary.aaxis", **kwargs ): super(TicktextValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@aaxis@_ticktext.py@.PATH_END.py
{ "filename": "test_pipeline_setup.py", "repo_name": "pyDANDIA/pyDANDIA", "repo_path": "pyDANDIA_extracted/pyDANDIA-main/pyDANDIA/tests/test_pipeline_setup.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Fri Oct 13 14:09:50 2017 @author: rstreet """ from os import getcwd, path from sys import path as systempath cwd = getcwd() systempath.append(path.join(cwd,'../')) import pipeline_setup def test_pipeline_setup(): """Function to set the essential parameters to run the pyDAND...
pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@pyDANDIA@tests@test_pipeline_setup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jmschrei/pomegranate", "repo_path": "pomegranate_extracted/pomegranate-master/tests/__init__.py", "type": "Python" }
jmschreiREPO_NAMEpomegranatePATH_START.@pomegranate_extracted@pomegranate-master@tests@__init__.py@.PATH_END.py
{ "filename": "plot_gh_performance.py", "repo_name": "seinecke/aict-tools", "repo_path": "aict-tools_extracted/aict-tools-master/aict_tools/scripts/plot_gh_performance.py", "type": "Python" }
import click import logging import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from sklearn.externals import joblib from ..configuration import AICTConfig import fact.io from ..plotting import ( plot_roc, plot_probabilities, plot_precision_recall, plot_feature_importan...
seineckeREPO_NAMEaict-toolsPATH_START.@aict-tools_extracted@aict-tools-master@aict_tools@scripts@plot_gh_performance.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "HERA-Team/aipy", "repo_path": "aipy_extracted/aipy-main/aipy/__init__.py", "type": "Python" }
""" This package collects together tools for radio astronomical interferometry. In addition to pure-python phasing, calibration, imaging, and deconvolution code, this package includes interfaces to MIRIAD (a Fortran interferometry package) and HEALPix (a package for representing spherical data sets), and some math/fitt...
HERA-TeamREPO_NAMEaipyPATH_START.@aipy_extracted@aipy-main@aipy@__init__.py@.PATH_END.py
{ "filename": "Richtmeyer_Meshkov.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/tests/hd/Richtmyer_Meshkov/Richtmeyer_Meshkov.md", "type": "Markdown" }
# Richtmeyer Meshkov 2D test problem \test 2D HD test: Shock interaction with a contact discontinuity # Introduction This is a 2D test (as studied e.g. in Delmont et al, JFM 2009, 627, 33-53) where a planar shock impinges on an inclined contact discontinuity. The evolution in the early stages as far as the refractio...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@tests@hd@Richtmyer_Meshkov@Richtmeyer_Meshkov.md@.PATH_END.py
{ "filename": "lensinfocache.py", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/grale/lensinfocache.py", "type": "Python" }
"""TODO""" import pickle import hashlib import os from . import plotutil from . import privutil from . import lenses class LensInfoCacheException(Exception): """An exception that's generated if something goes wrong in a function provided by this module.""" pass class LensInfoCache(object): """TODO"""...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@grale@lensinfocache.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/newshape/legendgrouptitle/font/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): super(WeightValidator, self).__init__( plotl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@newshape@legendgrouptitle@font@_weight.py@.PATH_END.py
{ "filename": "generate.py", "repo_name": "jiwoncpark/baobab", "repo_path": "baobab_extracted/baobab-master/baobab/generate.py", "type": "Python" }
# -*- coding: utf-8 -*- """Generating the training data. This script generates the training data according to the config specifications. Example ------- To run this script, pass in the desired config file as argument:: $ generate baobab/configs/tdlmc_diagonal_config.py --n_data 1000 """ import os, sys import r...
jiwoncparkREPO_NAMEbaobabPATH_START.@baobab_extracted@baobab-master@baobab@generate.py@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/violin/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="violin", **kwargs): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@violin@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "findMatchingVertexInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Mesh/findMatchingVertexInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Mesh/findMatchingVertexTempl.cc" namespace Spheral { template unsigned findMatchingVertex<Dim< %(ndim)s >::...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Mesh@findMatchingVertexInst.cc.py@.PATH_END.py
{ "filename": "test_multiclass_classification_sampling_error.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/tests/sampling_error/test_multiclass_classification_sampling_error.py", "type": "Python" }
# Author: Niels Nuyttens <niels@nannyml.com> # # License: Apache Software License 2.0 """Tests.""" import numpy as np from sklearn.preprocessing import LabelBinarizer import nannyml.sampling_error.multiclass_classification as mse def test_multiclass_auroc_sampling_error(): # noqa: D103 np.random.seed(1) ...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@tests@sampling_error@test_multiclass_classification_sampling_error.py@.PATH_END.py
{ "filename": "engine.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/engine.py", "type": "Python" }
import os import sys from uuid import UUID from prefect._internal.compatibility.migration import getattr_migration from prefect.exceptions import ( Abort, Pause, ) from prefect.logging.loggers import ( get_logger, ) from prefect.utilities.asyncutils import ( run_coro_as_sync, ) engine_logger = get_log...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@engine.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/scattercarpet/marker/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattercarpet.marker.colorbar", **kwargs, ): super(TicklabelpositionValidator, self)...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/waterfall/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.textfont" _valid_props = { "color", "col...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@waterfall@_textfont.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/spark/catboost4j-spark/core/src/test/generate_canonical_results/utils.py", "type": "Python" }
import errno import os import shutil import socket import socketserver import subprocess import string import tempfile import time import catboost as cb from config import CATBOOST_APP_PATH def object_list_to_tsv(object_list, file_path): with open(file_path, 'w') as f: for object_data in object_list: ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@spark@catboost4j-spark@core@src@test@generate_canonical_results@utils.py@.PATH_END.py
{ "filename": "printing.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/io/formats/printing.py", "type": "Python" }
""" Printing tools. """ from __future__ import annotations from collections.abc import ( Callable, Iterable, Mapping, Sequence, ) import sys from typing import ( TYPE_CHECKING, Any, TypeVar, Union, ) from unicodedata import east_asian_width from pandas._config import get_option from ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@formats@printing.py@.PATH_END.py
{ "filename": "_ysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_ysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="histogram2dcontour", **kwargs): super(YsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_ysrc.py@.PATH_END.py
{ "filename": "test_util.py", "repo_name": "AdamCobb/hamiltorch", "repo_path": "hamiltorch_extracted/hamiltorch-master/tests/test_util.py", "type": "Python" }
import unittest import torch.nn as nn from torch.nn import functional as F import hamiltorch.util import torch class UtilTestCase(unittest.TestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def test_flatten_unflatten(self): model = nn.Linear(4, 4) flatte...
AdamCobbREPO_NAMEhamiltorchPATH_START.@hamiltorch_extracted@hamiltorch-master@tests@test_util.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/smith/imaginaryaxis/tickfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@smith@imaginaryaxis@tickfont@_size.py@.PATH_END.py
{ "filename": "Fe_statistic.py", "repo_name": "nanograv/enterprise_extensions", "repo_path": "enterprise_extensions_extracted/enterprise_extensions-master/enterprise_extensions/frequentist/Fe_statistic.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np import scipy.linalg as sl from enterprise.signals import (gp_signals, parameter, signal_base, utils, white_signals) class FeStat(object): """ Class for the Fe-statistic. :param psrs: List of `enterprise` Pulsar instances. :pa...
nanogravREPO_NAMEenterprise_extensionsPATH_START.@enterprise_extensions_extracted@enterprise_extensions-master@enterprise_extensions@frequentist@Fe_statistic.py@.PATH_END.py
{ "filename": "_enabled.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py", "type": "Python" }
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): super(EnabledValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@marker@colorbar@tickformatstop@_enabled.py@.PATH_END.py
{ "filename": "Boundary_PYB11.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/Boundary/Boundary_PYB11.py", "type": "Python" }
""" Spheral Boundary module. Provides the Boundary base class and many boundary implementations. """ from PYB11Generator import * from SpheralCommon import * from spheralDimensions import * dims = spheralDimensions() #------------------------------------------------------------------------------- # Includes #-------...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Boundary@Boundary_PYB11.py@.PATH_END.py
{ "filename": "np_utils.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/keras/utils/np_utils.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@keras@utils@np_utils.py@.PATH_END.py
{ "filename": "_variantsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/textfont/_variantsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter3d.textfont", **kwargs ): super(VariantsrcValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@textfont@_variantsrc.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/colorbar/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="heatmapgl.colorbar", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@colorbar@_tickvalssrc.py@.PATH_END.py
{ "filename": "julia_helper.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/utilities/integration/julia_helper.py", "type": "Python" }
""" Helper functions to interface with Julia / Diffeqpy's integration suite """ from typing import Tuple import numpy as np from . import _de, _ode, julia_installed # Read more about Julia's ode solvers here: https://diffeq.sciml.ai/dev/solvers/ode_solve/ known_integration_methods = ( 'rk4', 'rk45', 'tsit5', '...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@utilities@integration@julia_helper.py@.PATH_END.py
{ "filename": "test_py_hireion.py", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/tests/test_py_hireion.py", "type": "Python" }
#!/usr/bin/env python # # test_py_hireion.py # # Sun Sep 08 14:33:22 2024 # Copyright 2024 Sandro Dias Pinto Vitenti # <vitenti@uel.br> # # test_py_hireion.py # Copyright (C) 2024 Sandro Dias Pinto Vitenti <vitenti@uel.br> # # numreion is free software: you can redistribute it and/or modify it # under the terms of th...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@tests@test_py_hireion.py@.PATH_END.py
{ "filename": "lazy_indexer.py", "repo_name": "ska-sa/katdal", "repo_path": "katdal_extracted/katdal-master/katdal/lazy_indexer.py", "type": "Python" }
################################################################################ # Copyright (c) 2011-2022, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at # # ...
ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@katdal@lazy_indexer.py@.PATH_END.py
{ "filename": "hough_lines.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/python/tutorial_code/ImgTrans/HoughLine/hough_lines.py", "type": "Python" }
""" @file hough_lines.py @brief This program demonstrates line finding with the Hough transform """ import sys import math import cv2 as cv import numpy as np def main(argv): ## [load] default_file = 'sudoku.png' filename = argv[0] if len(argv) > 0 else default_file # Loads an image src = cv.imre...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@tutorial_code@ImgTrans@HoughLine@hough_lines.py@.PATH_END.py
{ "filename": "astrometry.py", "repo_name": "sdss/lvmagp", "repo_path": "lvmagp_extracted/lvmagp-main/python/lvmagp/guide/calc/astrometry.py", "type": "Python" }
from typing import Tuple, Dict, List, Any import logging from asyncio import gather from threading import Thread import numpy as np import astrometry from scipy.ndimage import gaussian_filter from scipy.ndimage import median_filter from astropy.wcs import WCS from astropy.stats import mad_std from astropy.coordinat...
sdssREPO_NAMElvmagpPATH_START.@lvmagp_extracted@lvmagp-main@python@lvmagp@guide@calc@astrometry.py@.PATH_END.py
{ "filename": "Sqlite3Tutorial.ipynb", "repo_name": "natashabatalha/picaso", "repo_path": "picaso_extracted/picaso-master/docs/notebooks/codehelp/Sqlite3Tutorial.ipynb", "type": "Jupyter Notebook" }
# SQLITE Tutorial This tutorial shows you how query the existing `opacity.db` and also shows you how to customize your own `opacity.db` A lot of this code is embedded in PICASO. ```python import sqlite3 import io import numpy as np import os ``` ## Establishing a Connection to a Database ```python #this is whe...
natashabatalhaREPO_NAMEpicasoPATH_START.@picaso_extracted@picaso-master@docs@notebooks@codehelp@Sqlite3Tutorial.ipynb@.PATH_END.py
{ "filename": "waves_on_a_string.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/examples/evp_1d_waves_on_a_string/waves_on_a_string.py", "type": "Python" }
""" Dedalus script computing the eigenmodes of waves on a clamped string. This script demonstrates solving a 1D eigenvalue problem and produces plots of the first few eigenmodes and the relative error of the eigenvalues. It should take just a few seconds to run (serial only). We use a Legendre basis to solve the EVP: ...
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@examples@evp_1d_waves_on_a_string@waves_on_a_string.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "HERA-Team/hera_mc", "repo_path": "hera_mc_extracted/hera_mc-main/setup.py", "type": "Python" }
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Module setup.""" import glob import io import sys from setuptools import setup # add hera_mc to our path in order to use the branch_scheme function sys.path.append("hera...
HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@setup.py@.PATH_END.py
{ "filename": "test_config.py", "repo_name": "spacetelescope/stsynphot_refactor", "repo_path": "stsynphot_refactor_extracted/stsynphot_refactor-master/stsynphot/tests/test_config.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Test config.py module.""" # STDLIB import os # THIRD-PARTY import numpy as np import pytest # SYNPHOT from synphot.config import conf as synconf from synphot.utils import generate_wavelengths # LOCAL from stsynphot import config from stsynphot.stio ...
spacetelescopeREPO_NAMEstsynphot_refactorPATH_START.@stsynphot_refactor_extracted@stsynphot_refactor-master@stsynphot@tests@test_config.py@.PATH_END.py
{ "filename": "loop_locator.py", "repo_name": "MazinLab/MKIDGen3", "repo_path": "MKIDGen3_extracted/MKIDGen3-main/mkidgen3/mkid_setup/loop_locator.py", "type": "Python" }
import logging import numpy as np import numpy.typing as nt import scipy.optimize as opt from typing import Optional, Callable from mkidgen3.server.feedline_config import DDCConfig from mkidgen3.drivers.ddc import ThreepartDDC from mkidgen3.mkid_setup.sweeps import Sweep def pointslope_intersect( m0, x0, y0, m...
MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@mkidgen3@mkid_setup@loop_locator.py@.PATH_END.py
{ "filename": "test_simple_vr.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/visualization/volume_rendering/tests/test_simple_vr.py", "type": "Python" }
import os import shutil import tempfile from unittest import TestCase import yt from yt.testing import fake_random_ds def setup(): """Test specific setup.""" from yt.config import ytcfg ytcfg["yt", "internals", "within_testing"] = True class SimpleVRTest(TestCase): # This toggles using a temporary...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@visualization@volume_rendering@tests@test_simple_vr.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="width", parent_name="contourcarpet.line", **kwargs): super(WidthValidator, 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@contourcarpet@line@_width.py@.PATH_END.py
{ "filename": "acsConfigReport.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/Kit/acs/src/acsConfigReport.py", "type": "Python" }
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) European Southern Observatory, 2002 # # # who when what # -------- -------- ---------------------------------------------- # mpasquat 26 SEP 2003 cr...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@Kit@acs@src@acsConfigReport.py@.PATH_END.py
{ "filename": "starcat.py", "repo_name": "SISPO-developers/sispo", "repo_path": "sispo_extracted/sispo-master/sispo/sim/starcat.py", "type": "Python" }
# SPDX-FileCopyrightText: 2021 Gabriel J. Schwarzkopf <sispo-devs@outlook.com> # # SPDX-License-Identifier: GPL-3.0-or-later """ Interface for handling data from a star catalogue. Retrieve data as well as render and write images. """ import logging import subprocess import sys from pathlib import Path logger = loggi...
SISPO-developersREPO_NAMEsispoPATH_START.@sispo_extracted@sispo-master@sispo@sim@starcat.py@.PATH_END.py
{ "filename": "mwpotential.py", "repo_name": "fraserevans/speedystar", "repo_path": "speedystar_extracted/speedystar-main/speedystar/utils/mwpotential.py", "type": "Python" }
from galpy.potential import HernquistPotential, MiyamotoNagaiPotential, KeplerPotential, evaluatePotentials, turn_physical_on, evaluaterforces,evaluatezforces,evaluateRforces, ChandrasekharDynamicalFrictionForce from galpy.potential import NFWPotential, TriaxialNFWPotential#, PlummerSoftening#, MovingObjectPotential f...
fraserevansREPO_NAMEspeedystarPATH_START.@speedystar_extracted@speedystar-main@speedystar@utils@mwpotential.py@.PATH_END.py
{ "filename": "_namelength.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/hoverlabel/_namelength.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatterpolar.hoverlabel", **kwargs ): super(NamelengthValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@hoverlabel@_namelength.py@.PATH_END.py
{ "filename": "test_multiclass.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/tests/test_multiclass.py", "type": "Python" }
from re import escape import numpy as np import pytest import scipy.sparse as sp from numpy.testing import assert_allclose from sklearn import datasets, svm from sklearn.datasets import load_breast_cancer from sklearn.exceptions import NotFittedError from sklearn.impute import SimpleImputer from sklearn.linear_model ...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@tests@test_multiclass.py@.PATH_END.py
{ "filename": "make_testdata.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/dal/tests/make_testdata.py", "type": "Python" }
from pathlib import Path import numpy as np from astropy.table import Table from astropy.io.votable.tree import VOTableFile, Info from astropy.io.fits import ImageHDU def _votablefile(): table = Table([ [23, 42, 1337], [b'Illuminatus', b"Don't panic, and always carry a towel", b'Elite'] ], n...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@dal@tests@make_testdata.py@.PATH_END.py
{ "filename": "constants.py", "repo_name": "desihub/redrock", "repo_path": "redrock_extracted/redrock-main/py/redrock/constants.py", "type": "Python" }
""" redrock.constants ================= Set constants used by the rest of the package. """ max_velo_diff = 1000.0 # km/s max_velo_diff_star = 100.0 # km/s min_resolution_integral = 0.99 min_deltachi2 = 9. # Lyman-alpha from eqn 5 of Calura et al. 2012 (Arxiv: 1201.5121) # Other from eqn 1.1 of Irsic et al. 2013 , ...
desihubREPO_NAMEredrockPATH_START.@redrock_extracted@redrock-main@py@redrock@constants.py@.PATH_END.py
{ "filename": "skipping.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py3/_pytest/skipping.py", "type": "Python" }
"""Support for skip/xfail functions and markers.""" import dataclasses import os import platform import sys import traceback from collections.abc import Mapping from typing import Generator from typing import Optional from typing import Tuple from typing import Type from _pytest.config import Config from _pytest.confi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py3@_pytest@skipping.py@.PATH_END.py
{ "filename": "test_generate_observation.py", "repo_name": "Smithsonian/ngehtsim", "repo_path": "ngehtsim_extracted/ngehtsim-main/tests/test_generate_observation.py", "type": "Python" }
####################################################### # imports import ngehtsim.obs.obs_generator as og import ngehtsim.obs.obs_plotter as op import ngehtsim.metrics as cm ####################################################### # generate an observation # input settings file yamlfile = './tests/data_generation/set...
SmithsonianREPO_NAMEngehtsimPATH_START.@ngehtsim_extracted@ngehtsim-main@tests@test_generate_observation.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/ocs", "repo_path": "ocs_extracted/ocs-main/ocs/agents/influxdb_publisher/__init__.py", "type": "Python" }
simonsobsREPO_NAMEocsPATH_START.@ocs_extracted@ocs-main@ocs@agents@influxdb_publisher@__init__.py@.PATH_END.py
{ "filename": "run.py", "repo_name": "ratt-ru/Stimela-classic", "repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/cargo/cab/casa_uvcontsub/src/run.py", "type": "Python" }
# -*- coding: future_fstrings -*- import Crasa.Crasa as crasa from scabha import config, parameters_dict, prun print(f"Running CASA task '{config.binary}'") task = crasa.CasaTask(config.binary, **parameters_dict) task.run()
ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@cargo@cab@casa_uvcontsub@src@run.py@.PATH_END.py
{ "filename": "test_misc.py", "repo_name": "joshspeagle/dynesty", "repo_path": "dynesty_extracted/dynesty-master/tests/test_misc.py", "type": "Python" }
import numpy as np import pytest import dynesty import pickle from scipy import linalg import dynesty.utils as dyutil from multiprocessing import Pool import itertools from dynesty.dynamicsampler import _SAMPLERS from dynesty.nestedsamplers import MultiEllipsoidSampler from dynesty.sampling import sample_rwalk from uti...
joshspeagleREPO_NAMEdynestyPATH_START.@dynesty_extracted@dynesty-master@tests@test_misc.py@.PATH_END.py
{ "filename": "computeOccurrence-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaselineSC0p9/.ipynb_checkpoints/computeOccurrence-checkpoint.ipynb", "type": "Jupyter Notebook" }
```python import os import requests import pandas as pd from astropy.io import fits from cStringIO import StringIO import numpy as np import matplotlib.pyplot as plt from scipy.stats import gamma from scipy.optimize import minimize from scipy.interpolate import RectBivariateSpline import emcee import corner import scip...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaselineSC0p9@.ipynb_checkpoints@computeOccurrence-checkpoint.ipynb@.PATH_END.py
{ "filename": "verifyFlat.py", "repo_name": "lsst/cp_verify", "repo_path": "cp_verify_extracted/cp_verify-main/python/lsst/cp/verify/verifyFlat.py", "type": "Python" }
# This file is part of cp_verify. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ca...
lsstREPO_NAMEcp_verifyPATH_START.@cp_verify_extracted@cp_verify-main@python@lsst@cp@verify@verifyFlat.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "andizq/sf3dmodels", "repo_path": "sf3dmodels_extracted/sf3dmodels-master/sf3dmodels/arepo/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This package contains useful tools to operate on data from the hybrid (SPH+AMR) code `AREPO`_ (Under development). """ # Packages may add whatever they like to this file, but # should keep this content at the top. # -----------------------------------...
andizqREPO_NAMEsf3dmodelsPATH_START.@sf3dmodels_extracted@sf3dmodels-master@sf3dmodels@arepo@__init__.py@.PATH_END.py
{ "filename": "HydroStaticProfile.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/NodeGenerators/HydroStaticProfile.py", "type": "Python" }
# This bit of code solves the equation for hydrostatic equilibrium to return # a density profile function to be used in various NodeGenerators # NOTE: the eos tuple should contain at least one pair of eos and the range # to which it applies. ex. (tillotsoneos, [rmin,rmax], gammaeos, [rmax,rmax2]) from math import * #...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@NodeGenerators@HydroStaticProfile.py@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="cone", **kwargs): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@_hovertemplate.py@.PATH_END.py
{ "filename": "runcomparison.py", "repo_name": "dtamayo/spock", "repo_path": "spock_extracted/spock-master/run_integrations/runcomparison.py", "type": "Python" }
import math import sys from itertools import repeat from multiprocessing import Pool import pandas as pd import rebound from runfunctions import run_random N_systems=2000 tmax = 1.e6 betamin=5 betamax=20 integrator=sys.argv[1] dt = float(sys.argv[2])*math.sqrt(3)/100. shadow = int(sys.argv[3]) Nthreads = int(sys.arg...
dtamayoREPO_NAMEspockPATH_START.@spock_extracted@spock-master@run_integrations@runcomparison.py@.PATH_END.py
{ "filename": "human.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/core/langchain_core/messages/human.py", "type": "Python" }
from typing import Any, Literal, Union from langchain_core.messages.base import BaseMessage, BaseMessageChunk class HumanMessage(BaseMessage): """Message from a human. HumanMessages are messages that are passed in from a human to the model. Example: .. code-block:: python from lan...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@langchain_core@messages@human.py@.PATH_END.py
{ "filename": "core_auto_encoder_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/tests/core/design/core_auto_encoder_test.py", "type": "Python" }
# Copyright 2024 The Flax 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@tests@core@design@core_auto_encoder_test.py@.PATH_END.py
{ "filename": "bz2fileio.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/tests/bz2fileio.py", "type": "Python" }
#!/usr/bin/env python from spt3g import core import time # File to disk pipe = core.G3Pipeline() pipe.Add(core.G3InfiniteSource, type=core.G3FrameType.Timepoint, n=10) n = 0 def addinfo(fr): global n if fr.type != core.G3FrameType.Timepoint: return fr["time"] = core.G3Time(int(time.time() * core...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@tests@bz2fileio.py@.PATH_END.py
{ "filename": "test_boolean_regions.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/tests/test_boolean_regions.py", "type": "Python" }
import numpy as np from numpy.testing import assert_array_equal from yt.testing import fake_amr_ds # We use morton indices in this test because they are single floating point # values that uniquely identify each cell. That's a convenient way to compare # inclusion in set operations, since there are no duplicates. ...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@tests@test_boolean_regions.py@.PATH_END.py
{ "filename": "_lenmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/marker/colorbar/_lenmode.py", "type": "Python" }
import _plotly_utils.basevalidators class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="icicle.marker.colorbar", **kwargs ): super(LenmodeValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@marker@colorbar@_lenmode.py@.PATH_END.py
{ "filename": "_xtype.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/_xtype.py", "type": "Python" }
import _plotly_utils.basevalidators class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="xtype", parent_name="contour", **kwargs): super(XtypeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@_xtype.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-engine/dlg/data/__init__.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2015 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-engine@dlg@data@__init__.py@.PATH_END.py
{ "filename": "_dataset_wrapper.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/tv_tensors/_dataset_wrapper.py", "type": "Python" }
# type: ignore from __future__ import annotations import collections.abc import contextlib from collections import defaultdict from copy import copy import torch from torchvision import datasets, tv_tensors from torchvision.transforms.v2 import functional as F __all__ = ["wrap_dataset_for_transforms_v2"] def wr...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@tv_tensors@_dataset_wrapper.py@.PATH_END.py
{ "filename": "system.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/dedalus/core/system.py", "type": "Python" }
""" Classes for systems of coefficients/fields. """ import numpy as np from math import prod from ..tools.cache import CachedMethod from ..tools.general import unify class CoeffSystem: """ Representation of a collection of fields that don't need to be transformed, and are therefore stored as a contigou...
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@dedalus@core@system.py@.PATH_END.py
{ "filename": "test_anisotropy.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_GalKin/test_anisotropy.py", "type": "Python" }
"""Tests for `galkin` module.""" import pytest import numpy.testing as npt import numpy as np import unittest from lenstronomy.GalKin.anisotropy import Anisotropy class TestAnisotropy(object): def setup_method(self): self._r_array = np.array([2.0, 3.0]) self._R_array = 1.0 def test_K(self):...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_GalKin@test_anisotropy.py@.PATH_END.py
{ "filename": "chains_convergence.py", "repo_name": "mraveri/tensiometer", "repo_path": "tensiometer_extracted/tensiometer-master/tensiometer/chains_convergence.py", "type": "Python" }
""" This file contains some functions to study convergence of the chains and to compare the two posteriors. """ ############################################################################### # initial imports: import copy import time import numpy as np from getdist import MCSamples from . import utilities as utils ...
mraveriREPO_NAMEtensiometerPATH_START.@tensiometer_extracted@tensiometer-master@tensiometer@chains_convergence.py@.PATH_END.py
{ "filename": "_v.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/_v.py", "type": "Python" }
import _plotly_utils.basevalidators class VValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="v", parent_name="streamtube", **kwargs): super(VValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@_v.py@.PATH_END.py
{ "filename": "user.py", "repo_name": "glass-dev/glass", "repo_path": "glass_extracted/glass-main/glass/user.py", "type": "Python" }
""" User utilities ============== .. currentmodule:: glass The following functions/classes provide convenience functionality for users of the library. Input and Output ---------------- .. autofunction:: save_cls .. autofunction:: load_cls .. autofunction:: write_catalog """ # noqa: D205, D400 from __future__ im...
glass-devREPO_NAMEglassPATH_START.@glass_extracted@glass-main@glass@user.py@.PATH_END.py
{ "filename": "test_input_estimators.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/tests/test_input_estimators.py", "type": "Python" }
# Copyright (c) 2024, 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 agreed to...
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@tests@test_input_estimators.py@.PATH_END.py
{ "filename": "gamma.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/scipy/stats/gamma.py", "type": "Python" }
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@scipy@stats@gamma.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/mesh3d/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="mesh3d.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@mesh3d@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolargl.marker.colorbar", **kwargs ): super(BordercolorValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@marker@colorbar@_bordercolor.py@.PATH_END.py
{ "filename": "_textsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/_textsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="barpolar", **kwargs): super(TextsrcValidator, 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@barpolar@_textsrc.py@.PATH_END.py
{ "filename": "T03check_output_noise.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/test/Veff/1e18eV/T03check_output_noise.py", "type": "Python" }
#!/usr/bin/env python3 import numpy as np import h5py from NuRadioReco.utilities import units import sys import os ########################### # Reference values from previous run, have to be updated, if code changes ########################### # the event generation has a fixed seed and I switched to Alvarez2000 (al...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@test@Veff@1e18eV@T03check_output_noise.py@.PATH_END.py
{ "filename": "_customdatasrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/_customdatasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="contourcarpet", **kwargs ): super(CustomdatasrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contourcarpet@_customdatasrc.py@.PATH_END.py
{ "filename": "test_make_subplots.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/tests/test_core/test_subplots/test_make_subplots.py", "type": "Python" }
from unittest import TestCase import pytest from plotly.graph_objs import ( Annotation, Annotations, Data, Figure, Font, Layout, layout, Scene, XAxis, YAxis, ) import plotly.tools as tls from plotly import subplots class TestMakeSubplots(TestCase): """ Test plotly.tools...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@tests@test_core@test_subplots@test_make_subplots.py@.PATH_END.py
{ "filename": "context_help.py", "repo_name": "ratt-ru/montblanc", "repo_path": "montblanc_extracted/montblanc-master/montblanc/impl/rime/tensorflow/context_help.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 Simon Perkins # # This file is part of montblanc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the L...
ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@impl@rime@tensorflow@context_help.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "bd-j/forcepho", "repo_path": "forcepho_extracted/forcepho-main/docs/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
bd-jREPO_NAMEforcephoPATH_START.@forcepho_extracted@forcepho-main@docs@conf.py@.PATH_END.py
{ "filename": "test_tzinfo.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytz/py3/pytz/tests/test_tzinfo.py", "type": "Python" }
# -*- coding: ascii -*- import doctest import sys import os import os.path import unittest try: import cPickle as pickle except ImportError: import pickle from datetime import ( datetime, timedelta ) import warnings if __name__ == '__main__': # Only munge path if invoked as a script. Testrunners s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytz@py3@pytz@tests@test_tzinfo.py@.PATH_END.py
{ "filename": "conventions.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/conventions.py", "type": "Python" }
""" .. module:: conventions :Synopsis: Some physical constants and naming conventions to make the life of the maintainer easier. :Author: Jesus Torrado """ from typing import Final # Package name (for importlib) # (apparently __package__ is only defined if you import something locally. cobaya_package = __...
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@conventions.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/bin/README.md", "type": "Markdown" }
# Bin folder This folder contains symbolic links to the recipes/tools folder based on the instruments installed.
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@bin@README.md@.PATH_END.py
{ "filename": "galstep.py", "repo_name": "ruggiero/galstep", "repo_path": "galstep_extracted/galstep-master/galstep/galstep.py", "type": "Python" }
# Run python galstep.py --help for a description. from os import path, remove from sys import exit, stdout, path as syspath from time import sleep import numpy as np import numpy.random as nprand from numpy import cos, sin, pi, arccos, log10, exp, arctan2, cosh from scipy.optimize import brentq from scipy import inte...
ruggieroREPO_NAMEgalstepPATH_START.@galstep_extracted@galstep-master@galstep@galstep.py@.PATH_END.py
{ "filename": "prop_shift_center.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/falco/proper/prop_shift_center.py", "type": "Python" }
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@proper@prop_shift_center.py@.PATH_END.py
{ "filename": "skyloc_angles.py", "repo_name": "jroulet/cogwheel", "repo_path": "cogwheel_extracted/cogwheel-main/cogwheel/skyloc_angles.py", "type": "Python" }
""" Implementation of SkyLocAngles class to handle coordinate transformations to and from right ascension and declination. """ import numpy as np import lal from cogwheel import utils from cogwheel import gw_utils class SkyLocAngles(utils.JSONMixin): """ Class that defines a coordinate system for sky locali...
jrouletREPO_NAMEcogwheelPATH_START.@cogwheel_extracted@cogwheel-main@cogwheel@skyloc_angles.py@.PATH_END.py
{ "filename": "waterfall.py", "repo_name": "ucberkeleyseti/blimpy", "repo_path": "blimpy_extracted/blimpy-master/blimpy/waterfall.py", "type": "Python" }
#!/usr/bin/env python """ # waterfall.py Python class and command line utility for reading and plotting waterfall files. This provides a class, Waterfall(), which can be used to read a blimpy file (.fil or .h5): fil = Waterfall("test_psr.fil") print(fil.header) print(fil.data.shape) print(fil.freqs)...
ucberkeleysetiREPO_NAMEblimpyPATH_START.@blimpy_extracted@blimpy-master@blimpy@waterfall.py@.PATH_END.py
{ "filename": "test_fftlog.py", "repo_name": "cosmodesi/cosmoprimo", "repo_path": "cosmoprimo_extracted/cosmoprimo-main/cosmoprimo/tests/test_fftlog.py", "type": "Python" }
import numpy as np from scipy import integrate, interpolate from cosmoprimo import Cosmology, Fourier from cosmoprimo.fftlog import PowerToCorrelation, CorrelationToPower, TophatVariance, GaussianVariance, HankelTransform, pad def wtophat_scalar(x): if x < 0.1: x2 = x**2 return 1. + x2 * (-1.0 / ...
cosmodesiREPO_NAMEcosmoprimoPATH_START.@cosmoprimo_extracted@cosmoprimo-main@cosmoprimo@tests@test_fftlog.py@.PATH_END.py
{ "filename": "dedoc.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/document_loaders/dedoc.ipynb", "type": "Jupyter Notebook" }
# Dedoc This sample demonstrates the use of `Dedoc` in combination with `LangChain` as a `DocumentLoader`. ## Overview [Dedoc](https://dedoc.readthedocs.io) is an [open-source](https://github.com/ispras/dedoc) library/service that extracts texts, tables, attached files and document structure (e.g., titles, list item...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@document_loaders@dedoc.ipynb@.PATH_END.py
{ "filename": "stages.py", "repo_name": "gmbrandt/xwavecal", "repo_path": "xwavecal_extracted/xwavecal-main/xwavecal/stages.py", "type": "Python" }
import abc import os from xwavecal.database import query_db_for_nearest import logging class Stage(object): def __init__(self, runtime_context): self.runtime_context = runtime_context self.logger = logging.getLogger(self.__class__.__name__) @abc.abstractmethod def do_stage(self, image):...
gmbrandtREPO_NAMExwavecalPATH_START.@xwavecal_extracted@xwavecal-main@xwavecal@stages.py@.PATH_END.py
{ "filename": "etree.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.py", "type": "Python" }
from __future__ import absolute_import, division, unicode_literals # pylint:disable=protected-access from pip._vendor.six import text_type import re from . import base from .. import _ihatexml from .. import constants from ..constants import namespaces from .._utils import moduleFactoryFactory tag_regexp = re.compi...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@html5lib@treebuilders@etree.py@.PATH_END.py