metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_textcasesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/hoverlabel/font/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="volume.hoverlabel.font", **kwargs ): super(TextcasesrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@hoverlabel@font@_textcasesrc.py@.PATH_END.py
{ "filename": "calculator.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/nannyml/stats/std/calculator.py", "type": "Python" }
# Author: Nikolaos Perrakis <nikos@nannyml.com> # # License: Apache Software License 2.0 """Simple Statistics Standard Deviation Module.""" from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd from pandas import MultiIndex from nannyml.base import AbstractCalculator...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@stats@std@calculator.py@.PATH_END.py
{ "filename": "misc.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/_skeleton/misc.py", "type": "Python" }
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@_skeleton@misc.py@.PATH_END.py
{ "filename": "3D_Visualization_Jet_Curry_Paper_WISE_KnotD_Radio_20200303_Version4.0_3D_PLOTLY_GitHub.ipynb", "repo_name": "esperlman/JetCurry", "repo_path": "JetCurry_extracted/JetCurry-master/3D_Visualization_Jet_Curry_Paper_WISE_KnotD_Radio_20200303_Version4.0_3D_PLOTLY_GitHub.ipynb", "type": "Jupyter Notebo...
```python ''' PROJECT TITLE: THREE-DIMENSIONAL (3-D) VISUALIZATION OF RELATIVISTIC JET GEOMETRY AUTHOR: Sailee M. Sawant A part of the JetCurry Project Collaboration: Authors: Kunyang Li, Katie Kosak, Sayali S. Avachat, Sailee M. Sawant, Eric S. Perlman, Debasis Mitra PURPOSE: To create three-dimensional ...
esperlmanREPO_NAMEJetCurryPATH_START.@JetCurry_extracted@JetCurry-master@3D_Visualization_Jet_Curry_Paper_WISE_KnotD_Radio_20200303_Version4.0_3D_PLOTLY_GitHub.ipynb@.PATH_END.py
{ "filename": "parameterized.py", "repo_name": "freelunchtheorem/Conditional_Density_Estimation", "repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/utils/tf_utils/parameterized.py", "type": "Python" }
from contextlib import contextmanager from cde.utils.serializable import Serializable from cde.utils.tf_utils.tensor_utils import flatten_tensors, unflatten_tensors import tensorflow as tf load_params = True @contextmanager def suppress_params_loading(): global load_params load_params = False yield ...
freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@utils@tf_utils@parameterized.py@.PATH_END.py
{ "filename": "test_tiledb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/vectorstores/test_tiledb.py", "type": "Python" }
from pathlib import Path import numpy as np import pytest from langchain_core.documents import Document from langchain_community.vectorstores.tiledb import TileDB from tests.integration_tests.vectorstores.fake_embeddings import ( ConsistentFakeEmbeddings, FakeEmbeddings, ) @pytest.mark.requires("tiledb-vect...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@vectorstores@test_tiledb.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/coords/__init__.py", "type": "Python" }
from .pmat import P from .helpers import ( get_radec, get_horiz, get_footprint, get_wcs_kernel, get_supergeom, Timer, DEG, ScalarLastQuat ) from . import planets from . import local from .plotting import * from . import demod from . import pointing_model from . import healpix_utils
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@coords@__init__.py@.PATH_END.py
{ "filename": "test_conversion.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/base/test_conversion.py", "type": "Python" }
import numpy as np import pytest from pandas.compat import HAS_PYARROW from pandas.compat.numpy import np_version_gt2 from pandas.core.dtypes.dtypes import DatetimeTZDtype import pandas as pd from pandas import ( CategoricalIndex, Series, Timedelta, Timestamp, date_range, ) import pandas._testing...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@base@test_conversion.py@.PATH_END.py
{ "filename": "synthetic_population.py", "repo_name": "dusanmarceta/Synthetic-Population-of-Interstellar-Objects", "repo_path": "Synthetic-Population-of-Interstellar-Objects_extracted/Synthetic-Population-of-Interstellar-Objects-main/synthetic_population.py", "type": "Python" }
import numpy as np from scipy import interpolate from scipy.integrate import simps, cumtrapz from tqdm import tqdm from scipy.stats import multivariate_normal # constants au=1.495978707e11 # astronomical unit mu=1.32712440042e20 # standard gravitional parameter of the Sun def p_vx_vy_vz(vx, sigma_vx, mu_x, vy, sigma...
dusanmarcetaREPO_NAMESynthetic-Population-of-Interstellar-ObjectsPATH_START.@Synthetic-Population-of-Interstellar-Objects_extracted@Synthetic-Population-of-Interstellar-Objects-main@synthetic_population.py@.PATH_END.py
{ "filename": "torch_utils_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/utils/torch_utils_test.py", "type": "Python" }
import os import numpy as np import pytest import torch from absl.testing import parameterized from keras.src import backend from keras.src import layers from keras.src import models from keras.src import saving from keras.src import testing from keras.src.utils.torch_utils import TorchModuleWrapper class Classifie...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@utils@torch_utils_test.py@.PATH_END.py
{ "filename": "test_static.py", "repo_name": "einsteinpy/einsteinpy", "repo_path": "einsteinpy_extracted/einsteinpy-main/tests/test_plotting/test_geodesic/test_static.py", "type": "Python" }
from unittest import mock import numpy as np import pytest import warnings from matplotlib.axes import Axes from matplotlib import pyplot as plt from einsteinpy.geodesic import Timelike from einsteinpy.plotting import StaticGeodesicPlotter @pytest.fixture() def dummy_geod(): return Timelike( metric="Ker...
einsteinpyREPO_NAMEeinsteinpyPATH_START.@einsteinpy_extracted@einsteinpy-main@tests@test_plotting@test_geodesic@test_static.py@.PATH_END.py
{ "filename": "generate_Pk_example_w_tensors.py", "repo_name": "nbellomo/Multi_CLASS", "repo_path": "Multi_CLASS_extracted/Multi_CLASS-master/external_Pk/generate_Pk_example_w_tensors.py", "type": "Python" }
#!/usr/bin/python from __future__ import print_function import sys from math import exp # README: # # This is an example python script for the external_Pk mode of Class. # It generates the primordial spectrum of LambdaCDM. # It can be edited and used directly, though keeping a copy of it is recommended. # # Two (maybe...
nbellomoREPO_NAMEMulti_CLASSPATH_START.@Multi_CLASS_extracted@Multi_CLASS-master@external_Pk@generate_Pk_example_w_tensors.py@.PATH_END.py
{ "filename": "_hovertext.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/_hovertext.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="waterfall", **kwargs): super(HovertextValidator, 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@waterfall@_hovertext.py@.PATH_END.py
{ "filename": "coco_eval.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/references/detection/coco_eval.py", "type": "Python" }
import copy import io from contextlib import redirect_stdout import numpy as np import pycocotools.mask as mask_util import torch import utils from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval class CocoEvaluator: def __init__(self, coco_gt, iou_types): if not isinstance(iou_typ...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@detection@coco_eval.py@.PATH_END.py
{ "filename": "test_reduce_flat.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/ghost/recipes/sq/tests/test_reduce_flat.py", "type": "Python" }
# Tests for the reduction of echelle flatfield images import os import pytest from numpy.testing import assert_allclose from astrodata.testing import ad_compare, download_from_archive import astrodata, gemini_instruments from geminidr.ghost.primitives_ghost_bundle import GHOSTBundle from geminidr.ghost.primitives_gh...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@ghost@recipes@sq@tests@test_reduce_flat.py@.PATH_END.py
{ "filename": "test_photometry_kernels.py", "repo_name": "ArgonneCPAC/dsps", "repo_path": "dsps_extracted/dsps-main/dsps/photometry/tests/test_photometry_kernels.py", "type": "Python" }
""" """ import numpy as np import os from jax import jit as jjit, vmap from ..photometry_kernels import _calc_obs_mag_no_dimming, calc_rest_mag, calc_obs_mag from ...cosmology.flat_wcdm import FSPS_COSMO _THIS_DRNAME = os.path.dirname(os.path.abspath(__file__)) DATA_DRN = os.path.join( os.path.dirname(os.path.dir...
ArgonneCPACREPO_NAMEdspsPATH_START.@dsps_extracted@dsps-main@dsps@photometry@tests@test_photometry_kernels.py@.PATH_END.py
{ "filename": "optimize_global_1.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/source/tutorial/examples/optimize_global_1.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from scipy import optimize def eggholder(x): return (-(x[1] + 47) * np.sin(np.sqrt(abs(x[0]/2 + (x[1] + 47)))) -x[0] * np.sin(np.sqrt(abs(x[0] - (x[1] + 47))))) bounds = [(-512, 512), (-512, 512)] x = np.arange(-512, 513) y = np.arange(-512, 513) ...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@source@tutorial@examples@optimize_global_1.py@.PATH_END.py
{ "filename": "android.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/pkg_resources/_vendor/platformdirs/android.py", "type": "Python" }
from __future__ import annotations import os import re import sys from functools import lru_cache from typing import cast from .api import PlatformDirsABC class Android(PlatformDirsABC): """ Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the `appname <platfo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@pkg_resources@_vendor@platformdirs@android.py@.PATH_END.py
{ "filename": "_flip.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/tiling/_flip.py", "type": "Python" }
import _plotly_utils.basevalidators class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="flip", parent_name="icicle.tiling", **kwargs): super(FlipValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@tiling@_flip.py@.PATH_END.py
{ "filename": "opacityinputfile.py", "repo_name": "artis-mcrt/artistools", "repo_path": "artistools_extracted/artistools-main/artistools/inputmodel/opacityinputfile.py", "type": "Python" }
from pathlib import Path import numpy as np import pandas as pd import polars as pl def all_cells_same_opacity(modelpath, ngrid): cell_opacities = np.array([0.1] * ngrid) with Path(modelpath, "opacity.txt").open("w", encoding="utf-8") as fopacity: fopacity.write(f"{ngrid}\n") for cellid, op...
artis-mcrtREPO_NAMEartistoolsPATH_START.@artistools_extracted@artistools-main@artistools@inputmodel@opacityinputfile.py@.PATH_END.py
{ "filename": "interlace_test.py", "repo_name": "gbrammer/unicorn", "repo_path": "unicorn_extracted/unicorn-master/interlace_test.py", "type": "Python" }
""" Tests on the UDF interlaced data """ import numpy as np import matplotlib.pyplot as plt #import pyfits import astropy.io.fits as pyfits import unicorn import threedhst from threedhst.prep_flt_files import process_3dhst_pair as pair import threedhst.prep_flt_files import glob import os def prepare(): os.chdi...
gbrammerREPO_NAMEunicornPATH_START.@unicorn_extracted@unicorn-master@interlace_test.py@.PATH_END.py
{ "filename": "TEEE.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2018_highl_CamSpec2021/TEEE.py", "type": "Python" }
from cobaya.likelihoods.planck_2018_highl_CamSpec2021.planck_2018_CamSpec2021_python import Planck2018CamSpec2021Python class TEEE(Planck2018CamSpec2021Python): r""" High-$\ell$ TE+EE \textsc{CamSpec} 12.6HMcl likelihood using Planck 2018 data \cite{efstathiou2019}. """ pass
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2018_highl_CamSpec2021@TEEE.py@.PATH_END.py
{ "filename": "inkpot.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/styles/inkpot.py", "type": "Python" }
""" pygments.styles.inkpot ~~~~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by the Inkpot theme for VIM. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Tex...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@styles@inkpot.py@.PATH_END.py
{ "filename": "_ypad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/coloraxis/colorbar/_ypad.py", "type": "Python" }
import _plotly_utils.basevalidators class YpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="layout.coloraxis.colorbar", **kwargs ): super(YpadValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@coloraxis@colorbar@_ypad.py@.PATH_END.py
{ "filename": "matchers.md", "repo_name": "google/googletest", "repo_path": "googletest_extracted/googletest-main/docs/reference/matchers.md", "type": "Markdown" }
# Matchers Reference A **matcher** matches a *single* argument. You can use it inside `ON_CALL()` or `EXPECT_CALL()`, or use it to validate a value directly using two macros: | Macro | Description | | :----------------------------------- | :--------------------...
googleREPO_NAMEgoogletestPATH_START.@googletest_extracted@googletest-main@docs@reference@matchers.md@.PATH_END.py
{ "filename": "primitives.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/contrib/funsor/handlers/primitives.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pyro.poutine.runtime from pyro.contrib.funsor.handlers.runtime import _DIM_STACK, DimRequest, DimType @pyro.poutine.runtime.effectful(type="to_funsor") def to_funsor(x, output=None, dim_to_name=None, dim_type=DimType.LOCAL): ...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@contrib@funsor@handlers@primitives.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/textfont/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._sizesrc import SizesrcValidator from ._size import SizeValidator from ._familysrc import FamilysrcValidator from ._family import FamilyValidator from ._colorsrc import ColorsrcValidator from ._color import ColorValidator else: from _plotly_uti...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@textfont@__init__.py@.PATH_END.py
{ "filename": "bing_search.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/utilities/bing_search.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.utilities import BingSearchAPIWrapper # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports....
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@utilities@bing_search.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/colorbar/title/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter.marker.colorbar.title", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@colorbar@title@_font.py@.PATH_END.py
{ "filename": "sunf95.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/sunf95.py", "type": "Python" }
"""SCons.Tool.sunf95 Tool-specific initialization for sunf95, the Sun Studio F95 compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@sunf95.py@.PATH_END.py
{ "filename": "05aDensitySensitivity.py", "repo_name": "MehrnooshTahani/MappingBLOS_MolecularClouds", "repo_path": "MappingBLOS_MolecularClouds_extracted/MappingBLOS_MolecularClouds-master/MolecularClouds/05aDensitySensitivity.py", "type": "Python" }
""" This is the fifth stage of the BLOSMapping method where the dependence on density is assessed. - All parameters except for density are held constant, and the magnetic field is calculated with electron abundances corresponding to changes of 0 and +/- 1, 2.5, 5, 10, 20, 20, 40, and 50 % the fiducial input den...
MehrnooshTahaniREPO_NAMEMappingBLOS_MolecularCloudsPATH_START.@MappingBLOS_MolecularClouds_extracted@MappingBLOS_MolecularClouds-master@MolecularClouds@05aDensitySensitivity.py@.PATH_END.py
{ "filename": "vsdx.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/vsdx.py", "type": "Python" }
import os import tempfile from abc import ABC from pathlib import Path from typing import List, Union from urllib.parse import urlparse import requests from langchain_community.docstore.document import Document from langchain_community.document_loaders.base import BaseLoader from langchain_community.document_loaders....
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@vsdx.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="heatmap.colorbar.title", **kwargs ): super(SideValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@colorbar@title@_side.py@.PATH_END.py
{ "filename": "subset.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/tools/subset.py", "type": "Python" }
#!/usr/bin/env python # # Copyright 2010-2012, Google Inc. # Author: Mikhail Kashkin (mkashkin@gmail.com) # Author: Raph Levien (<firstname.lastname>@gmail.com) # Author: Dave Crossland (dave@understandinglimited.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file ex...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@tools@subset.py@.PATH_END.py
{ "filename": "ex_sysrem_pca.ipynb", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/doc/pyaslDoc/aslDoc/aslExt_1Doc/ex_sysrem_pca.ipynb", "type": "Jupyter Notebook" }
SYSREM, Principle Component Analysis, and eigenvectors =================================================== A comparison between the results of SYSREM, a PCA, and the eigenvectors of a small artificial data matrix, using equal uncertainties for all data points. In this case, all of these are basically equivalent. ```...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@doc@pyaslDoc@aslDoc@aslExt_1Doc@ex_sysrem_pca.ipynb@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/textfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="scatter.textfont", **kwargs): super(VariantValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@textfont@_variant.py@.PATH_END.py
{ "filename": "AnalyzeSimFile.py", "repo_name": "zoglauer/megalib", "repo_path": "megalib_extracted/megalib-main/resource/examples/python/AnalyzeSimFile.py", "type": "Python" }
import ROOT as M # Load MEGAlib into ROOT M.gSystem.Load("$(MEGALIB)/lib/libMEGAlib.so") # Initialize MEGAlib G = M.MGlobal() G.Initialize() # We are good to go ... GeometryName = "$(MEGALIB)/resource/examples/geomega/special/Max.geo.setup" FileName = "Test.inc1.id1.sim" # Load geometry: Geometry = M.MDGeometryQu...
zoglauerREPO_NAMEmegalibPATH_START.@megalib_extracted@megalib-main@resource@examples@python@AnalyzeSimFile.py@.PATH_END.py
{ "filename": "plot_posterior.py", "repo_name": "Jingxuan97/nemesispy", "repo_path": "nemesispy_extracted/nemesispy-main/nemesispy/retrieval/plot_posterior.py", "type": "Python" }
Jingxuan97REPO_NAMEnemesispyPATH_START.@nemesispy_extracted@nemesispy-main@nemesispy@retrieval@plot_posterior.py@.PATH_END.py
{ "filename": "lamp.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/interfaces/lamp.py", "type": "Python" }
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@interfaces@lamp.py@.PATH_END.py
{ "filename": "nodeframe.py", "repo_name": "Guo-Jian-Wang/colfi", "repo_path": "colfi_extracted/colfi-master/colfi/nodeframe.py", "type": "Python" }
# -*- coding: utf-8 -*- def decreasingNode(node_in=1970, node_out=5, hidden_layer=3, get_allNode=True): """A network structure that the number of neurons in each hidden layer is decreased proportionally. Parameters ---------- node_in : int The number of nodes in the input layer. node_o...
Guo-Jian-WangREPO_NAMEcolfiPATH_START.@colfi_extracted@colfi-master@colfi@nodeframe.py@.PATH_END.py
{ "filename": "GenericBodyForce.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/Physics/GenericBodyForce.py", "type": "Python" }
#------------------------------------------------------------------------------- # GenericBodyForce base class #------------------------------------------------------------------------------- from PYB11Generator import * from Physics import * @PYB11template("Dimension") @PYB11module("SpheralPhysics") class GenericBody...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Physics@GenericBodyForce.py@.PATH_END.py
{ "filename": "_level.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/_level.py", "type": "Python" }
import _plotly_utils.basevalidators class LevelValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="level", parent_name="sunburst", **kwargs): super(LevelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=k...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@_level.py@.PATH_END.py
{ "filename": "FirstFull.ipynb", "repo_name": "FRBs/FRB", "repo_path": "FRB_extracted/FRB-main/frb/associate/dev/FirstFull.ipynb", "type": "Jupyter Notebook" }
# First Full Run No extra contaminants 180924 field 1-P_chance prior ```python %matplotlib notebook ``` ```python # imports from importlib import reload import numpy as np from matplotlib import pyplot as plt from astropy.table import Table from astropy import units from astropy.coordinates import SkyC...
FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@frb@associate@dev@FirstFull.ipynb@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/marker/colorbar/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): super(StyleValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@marker@colorbar@title@font@_style.py@.PATH_END.py
{ "filename": "nd_interpolation.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/examples/algorithms/nd_interpolation.py", "type": "Python" }
""" Use N-dimensional Histogram functionality and Interpolation =========================================================== - could be used for example to read and interpolate an lookup table or IRF. - In this example, we load a sample energy reconstruction lookup-table from a FITS file - In this case it is o...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@examples@algorithms@nd_interpolation.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "kaitlyn-loftus/alien-sulfur-cycles", "repo_path": "alien-sulfur-cycles_extracted/alien-sulfur-cycles-master/main.py", "type": "Python" }
################################################################ # use the model of Loftus, Wordsworth, & Morley, 2019 # to calculate the observability of atmospheric sulfur in a # planetary atmosphere of your choosing # # code by Kaitlyn Loftus (2019) ################################################################ '...
kaitlyn-loftusREPO_NAMEalien-sulfur-cyclesPATH_START.@alien-sulfur-cycles_extracted@alien-sulfur-cycles-master@main.py@.PATH_END.py
{ "filename": "rotation.ipynb", "repo_name": "dfm/celerite", "repo_path": "celerite_extracted/celerite-main/paper/figures/rotation/rotation.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline %config IPython.matplotlib.backend = "retina" from matplotlib import rcParams rcParams["savefig.dpi"] = 300 rcParams["figure.dpi"] = 300 from celerite import plot_setup plot_setup.setup(auto=False) ``` ```python import kplr import copy import emcee import corner import autograd.numpy as ...
dfmREPO_NAMEceleritePATH_START.@celerite_extracted@celerite-main@paper@figures@rotation@rotation.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs_nnx/flip/README.md", "type": "Markdown" }
# FLIP: Flax Improvement Process Most changes can be discussed with simple issues/discussions and pull requests. Some changes though are a bit larger in scope or require more discussion, and these should be implemented as FLIPs. This allows for writing longer documents that can be discussed in a pull request themselv...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs_nnx@flip@README.md@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/line/colorbar/tickfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@tickfont@_lineposition.py@.PATH_END.py
{ "filename": "backend_wxcairo.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/backends/backend_wxcairo.py", "type": "Python" }
import wx.lib.wxcairo as wxcairo from .backend_cairo import cairo, FigureCanvasCairo from .backend_wx import _BackendWx, _FigureCanvasWxBase from .backend_wx import ( # noqa: F401 # pylint: disable=W0611 NavigationToolbar2Wx as NavigationToolbar2WxCairo) class FigureCanvasWxCairo(FigureCanvasCairo, _FigureCanva...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@backends@backend_wxcairo.py@.PATH_END.py
{ "filename": "TensorMetadataAddProcessUnits.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata_schema_py_generated/TensorMetadataAddProcessUnits.md", "type": "Markdown" }
page_type: reference <link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.metadata_schema_py_generated.TensorMetadataAddProcessUnits" /> <meta...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@metadata_schema_py_generated@TensorMetadataAddProcessUnits.md@.PATH_END.py
{ "filename": "kernelbase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipykernel/py2/ipykernel/kernelbase.py", "type": "Python" }
"""Base class for a kernel that talks to frontends over 0MQ.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import sys import time import logging import uuid from datetime import datetime try: # jupyter_client >= 5, u...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipykernel@py2@ipykernel@kernelbase.py@.PATH_END.py
{ "filename": "_ticklen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/xaxis/_ticklen.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.scene.xaxis", **kwargs ): super(TicklenValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@xaxis@_ticklen.py@.PATH_END.py
{ "filename": "_utils.py", "repo_name": "dask/dask-image", "repo_path": "dask-image_extracted/dask-image-main/dask_image/ndmorph/_utils.py", "type": "Python" }
# -*- coding: utf-8 -*- import numbers import dask.array as da import numpy as np from ..dispatch._dispatch_ndmorph import dispatch_binary_structure from ..ndfilters._utils import (_get_depth, _get_depth_boundary, _get_origin, _update_wrapper) _update_wrapper = _update_wrapper _get_...
daskREPO_NAMEdask-imagePATH_START.@dask-image_extracted@dask-image-main@dask_image@ndmorph@_utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/inspection/_plot/tests/__init__.py", "type": "Python" }
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@inspection@_plot@tests@__init__.py@.PATH_END.py
{ "filename": "_gradient.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_gradient.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo.marker" _path_str = "scattergeo.marker.gradient" _valid_props = {"color", "colo...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattergeo@marker@_gradient.py@.PATH_END.py
{ "filename": "settings.py", "repo_name": "ejhigson/perfectns", "repo_path": "perfectns_extracted/perfectns-master/perfectns/settings.py", "type": "Python" }
#!/usr/bin/env python """ Defines base class which holds settings for performing perfect nested sampling. This includes likelihood and prior objects as well as the parameters controlling how the calculation is performed - for example the number of live points and whether or not dynamic nested sampling is to be used. ""...
ejhigsonREPO_NAMEperfectnsPATH_START.@perfectns_extracted@perfectns-master@perfectns@settings.py@.PATH_END.py
{ "filename": "spatial.py", "repo_name": "lynx-x-ray-observatory/soxs", "repo_path": "soxs_extracted/soxs-main/soxs/spatial.py", "type": "Python" }
import astropy.units as u import numpy as np from astropy import wcs from astropy.io import fits from soxs.constants import one_arcsec from soxs.utils import get_rot_mat, parse_prng, parse_value def construct_wcs(ra0, dec0, dtheta=None, nx=None): if dtheta is None: dtheta = one_arcsec if nx is None: ...
lynx-x-ray-observatoryREPO_NAMEsoxsPATH_START.@soxs_extracted@soxs-main@soxs@spatial.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/export/__init__.py", "type": "Python" }
"""DO NOT EDIT. This file was autogenerated. Do not edit it by hand, since your modifications would be overwritten. """ from keras.src.export.export_lib import ExportArchive
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@export@__init__.py@.PATH_END.py
{ "filename": "test_concentration.py", "repo_name": "halomod/halomod", "repo_path": "halomod_extracted/halomod-main/tests/test_concentration.py", "type": "Python" }
import numpy as np import pytest from hmf import MassFunction from hmf.halos.mass_definitions import SOCritical, SOMean, SOVirial from halomod import TracerHaloModel from halomod import concentration as cm @pytest.fixture() def mass(): return np.logspace(10, 15, 100) @pytest.mark.parametrize("mdef", [SOMean, S...
halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@tests@test_concentration.py@.PATH_END.py
{ "filename": "list_distributions.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/examples/distributions/list_distributions.py", "type": "Python" }
from pycbc import distributions # print all distribution names print(distributions.distribs.keys())
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@examples@distributions@list_distributions.py@.PATH_END.py
{ "filename": "_buttons.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/updatemenu/_buttons.py", "type": "Python" }
import _plotly_utils.basevalidators class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="buttons", parent_name="layout.updatemenu", **kwargs ): super(ButtonsValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@updatemenu@_buttons.py@.PATH_END.py
{ "filename": "XiTau_RLOF.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/XiTau_RLOF.py", "type": "Python" }
""" example code bridging a gravity solver with a hydrodynamics solver """ import numpy from amuse.lab import * from amuse.couple import bridge def evolve_binary_in_common_envelope(stars, envelope, t_end): R = stars.position.length() converter=nbody_system.nbody_to_si(stars.mass.sum(), R) gravity = ph4...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@XiTau_RLOF.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcoords/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="parcoords", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, dat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcoords@_line.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/cholla/tests/__init__.py", "type": "Python" }
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@cholla@tests@__init__.py@.PATH_END.py
{ "filename": "test_ref.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/tests/test_ref.py", "type": "Python" }
""" Tests the setting and updating of the reference pdf, including re-checking if point-like. """ import pytest import numpy as np from cobaya.model import get_model from cobaya.sampler import get_sampler from cobaya import mpi def test_ref(): val = 1 mean, std = 0.5, 0.1 info = { "params": { ...
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@tests@test_ref.py@.PATH_END.py
{ "filename": "_layout.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_layout.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType import copy as _copy class Layout(_BaseLayoutType): _subplotid_prop_names = [ "coloraxis", "geo", "legend", "map", "mapbox", "polar", "scene", "smith", "ternary", "xa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_layout.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/threeML/bayesian/__init__.py", "type": "Python" }
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@bayesian@__init__.py@.PATH_END.py
{ "filename": "all.py", "repo_name": "rabrahm/ceres", "repo_path": "ceres_extracted/ceres-master/utils/Correlation/all.py", "type": "Python" }
import pyfits import numpy import os import continuum import correlation dire = '/home/rabrahm/Desktop/spec2/' mods = os.listdir(dire) t=[] g = [] z=[] r=[] v=[] nam = [] mods = mods[:-5] for fits in mods: print fits sc = pyfits.getdata(dire+fits) L,F = sc[0],sc[1] Ln,Fn = continuum.NORM2(L,F) Tfin, Gfin, Zfin, r...
rabrahmREPO_NAMEceresPATH_START.@ceres_extracted@ceres-master@utils@Correlation@all.py@.PATH_END.py
{ "filename": "VGGLoss.py", "repo_name": "Yash-10/modified_gravity_emulation", "repo_path": "modified_gravity_emulation_extracted/modified_gravity_emulation-main/BicycleGAN/VGGLoss.py", "type": "Python" }
import torch import torchvision class VGGPerceptualLoss_VGG19(torch.nn.Module): def __init__(self, opt, resize=True): super(VGGPerceptualLoss, self).__init__() self.gpu_ids = opt.gpu_ids self.device = torch.device('cuda:{}'.format(self.gpu_ids[0])) if self.gpu_ids else torch.device...
Yash-10REPO_NAMEmodified_gravity_emulationPATH_START.@modified_gravity_emulation_extracted@modified_gravity_emulation-main@BicycleGAN@VGGLoss.py@.PATH_END.py
{ "filename": "plot_indiv_pdfs.py", "repo_name": "BEAST-Fitting/beast", "repo_path": "beast_extracted/beast-master/beast/plotting/plot_indiv_pdfs.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from astropy.io import fits import copy __all__ = ["plot_indiv_pdfs"] def plot_indiv_pdfs(pdf1d_file, pdf2d_file, starnum): """ Make a triangle/corner plot with the 1D and 2D PDFs of a star Parameters -------...
BEAST-FittingREPO_NAMEbeastPATH_START.@beast_extracted@beast-master@beast@plotting@plot_indiv_pdfs.py@.PATH_END.py
{ "filename": "test_empirical.py", "repo_name": "aburgasser/splat", "repo_path": "splat_extracted/splat-main/splat/tests/test_empirical.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import print_function # this is the test function set for splat empirical functions # imports - internal import copy import glob import os # # imports - external import numpy from astropy import units as u # standard units from astropy import constants as const ...
aburgasserREPO_NAMEsplatPATH_START.@splat_extracted@splat-main@splat@tests@test_empirical.py@.PATH_END.py
{ "filename": "serializers.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/serializers.py", "type": "Python" }
from .basedatatypes import Undefined from .optional_imports import get_module np = get_module("numpy") def _py_to_js(v, widget_manager): """ Python -> Javascript ipywidget serializer This function must repalce all objects that the ipywidget library can't serialize natively (e.g. numpy arrays) with s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@serializers.py@.PATH_END.py
{ "filename": "demo_plot.ipynb", "repo_name": "remi-adam/minot", "repo_path": "minot_extracted/minot-master/notebook/demo_plot.ipynb", "type": "Jupyter Notebook" }
The notebook provides examples of the functionalities of minot. It uses a baseline model defined using parametric functions to illustrates the various options. In addition real clusters are used together with publicaly available data to test the observable generated given a model. # 1. Import prerequists and useful fun...
remi-adamREPO_NAMEminotPATH_START.@minot_extracted@minot-master@notebook@demo_plot.ipynb@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/legendgrouptitle/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="sankey.legendgrouptitle.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@legendgrouptitle@font@_family.py@.PATH_END.py
{ "filename": "FixedModel.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/FixedModel.py", "type": "Python" }
import numpy as numpy from astropy import units import re import string import warnings from . import Tools from .BaseModel import BaseModel from .Tools import setAttribute as setatt from .Formatter import formatter as fmt __author__ = "Do Kester" __year__ = 2024 __license__ = "GPL3" __version__ = "3.2.1" __url__ = "...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@FixedModel.py@.PATH_END.py
{ "filename": "image.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/torch/image.py", "type": "Python" }
import functools import itertools import operator import torch from keras.src import backend from keras.src.backend.torch.core import convert_to_tensor from keras.src.utils.module_utils import torchvision RESIZE_INTERPOLATIONS = {} # populated after torchvision import UNSUPPORTED_INTERPOLATIONS = ( "lanczos3",...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@torch@image.py@.PATH_END.py
{ "filename": "camera_display.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/examples/visualization/camera_display.py", "type": "Python" }
""" Displaying Camera Images ======================== """ import astropy.coordinates as c import astropy.units as u import matplotlib.pyplot as plt import numpy as np from matplotlib.animation import FuncAnimation from matplotlib.colors import PowerNorm from ctapipe.coordinates import CameraFrame, EngineeringCameraF...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@examples@visualization@camera_display.py@.PATH_END.py
{ "filename": "_shadowsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/hoverlabel/font/_shadowsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): super(ShadowsrcValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@hoverlabel@font@_shadowsrc.py@.PATH_END.py
{ "filename": "_showexponent.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/_showexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatter3d.line.colorbar", **kwargs, ): super(ShowexponentValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@line@colorbar@_showexponent.py@.PATH_END.py
{ "filename": "test_norm.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/sparse/linalg/tests/test_norm.py", "type": "Python" }
"""Test functions for the sparse.linalg.norm module """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.linalg import norm as npnorm from numpy.testing import assert_equal, assert_allclose from pytest import raises as assert_raises from scipy._lib._version import NumpyV...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@sparse@linalg@tests@test_norm.py@.PATH_END.py
{ "filename": "scipy_utils.py", "repo_name": "arjunsavel/SImMER", "repo_path": "SImMER_extracted/SImMER-main/src/simmer/scipy_utils.py", "type": "Python" }
""" Utility functions (used in the registration stage) adapted from SciPy 1.2.0 that have since been deprecated (see the LICENSE.MD file at the project root directory). """ import numpy as np from PIL import Image def bytescale(data, high=255, low=0): """ Byte scales an image. inputs: :data: (nd...
arjunsavelREPO_NAMESImMERPATH_START.@SImMER_extracted@SImMER-main@src@simmer@scipy_utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/slider/currentvalue/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@slider@currentvalue@__init__.py@.PATH_END.py
{ "filename": "test_info.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/database/test_info.py", "type": "Python" }
import pytest from autofit import database as db @pytest.fixture( name="fit" ) def make_fit(): return db.Fit( id="id", info={ "key": "value" } ) def test_create( fit ): assert fit.info["key"] == "value" @pytest.fixture( autouse=True ) def add_to_ses...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@database@test_info.py@.PATH_END.py
{ "filename": "category.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/core/indexes/category.py", "type": "Python" }
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Literal, cast, ) import numpy as np from pandas._libs import index as libindex from pandas.util._decorators import ( cache_readonly, doc, set_module, ) from pandas.core.dtypes.common import is_scalar from pandas....
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@core@indexes@category.py@.PATH_END.py
{ "filename": "ultranester.py", "repo_name": "guillochon/MOSFiT", "repo_path": "MOSFiT_extracted/MOSFiT-master/mosfit/samplers/ultranester.py", "type": "Python" }
# -*- coding: UTF-8 -*- """Definitions for `UltraNester` class.""" import numpy as np from astrocats.catalog.model import MODEL from astrocats.catalog.quantity import QUANTITY from mosfit.samplers.sampler import Sampler from mosfit.utils import pretty_num class UltraNester(Sampler): """Fit transient events with ...
guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@mosfit@samplers@ultranester.py@.PATH_END.py
{ "filename": "modeling_test.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/test/modeling_test.py", "type": "Python" }
# Testing modeling workflows # # Copyright (c) 2023, herculens developers and contributors import numpy as np import numpy.testing as npt import pytest from copy import deepcopy import jax import jax.numpy as jnp jax.config.update("jax_enable_x64", True) import numpyro import numpyro.distributions as dist from num...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@test@modeling_test.py@.PATH_END.py
{ "filename": "input_layer_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/core/input_layer_test.py", "type": "Python" }
import numpy as np from absl.testing import parameterized from keras.src import backend from keras.src import testing from keras.src.backend import KerasTensor from keras.src.layers import InputLayer class InputLayerTest(testing.TestCase): # Testing happy path for layer without input tensor @parameterized.na...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@core@input_layer_test.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/baxis/title/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.baxis.title.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@baxis@title@font@_family.py@.PATH_END.py
{ "filename": "basewidget.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/basewidget.py", "type": "Python" }
import uuid from importlib import import_module import os import numbers try: from urllib import parse except ImportError: from urlparse import urlparse as parse import ipywidgets as widgets from traitlets import List, Unicode, Dict, observe, Integer from .basedatatypes import BaseFigure, BasePlotlyType from ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@basewidget.py@.PATH_END.py
{ "filename": "getstagecorr_50.py", "repo_name": "timcarleton/Illustris_XMD", "repo_path": "Illustris_XMD_extracted/Illustris_XMD-main/getstagecorr_50.py", "type": "Python" }
from astropy.io import fits, ascii import glob import numpy as np import gettemp import h5py from scipy.optimize import minimize_scalar from astropy import cosmology astrocosmo = cosmology.FlatLambdaCDM(H0=67.7,Om0=0.307) zs=np.array([20.05,14.99,11.98,10.976,10.0,9.389,9.002,8.449,8.012,7.595,7.236,7.005,6.491,6.011,...
timcarletonREPO_NAMEIllustris_XMDPATH_START.@Illustris_XMD_extracted@Illustris_XMD-main@getstagecorr_50.py@.PATH_END.py
{ "filename": "pathccompiler.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/distutils/pathccompiler.py", "type": "Python" }
from __future__ import division, absolute_import, print_function from distutils.unixccompiler import UnixCCompiler class PathScaleCCompiler(UnixCCompiler): """ PathScale compiler compatible with an gcc built Python. """ compiler_type = 'pathcc' cc_exe = 'pathcc' cxx_exe = 'pathCC' def _...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@distutils@pathccompiler.py@.PATH_END.py
{ "filename": "_label.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sankey/link/_label.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="label", parent_name="sankey.link", **kwargs): super(LabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sankey@link@_label.py@.PATH_END.py
{ "filename": "ClassDDEGridMachine.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Imager/ClassDDEGridMachine.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@ClassDDEGridMachine.py@.PATH_END.py
{ "filename": "readObs.py", "repo_name": "folsomcp/ZDIpy", "repo_path": "ZDIpy_extracted/ZDIpy-main/core/readObs.py", "type": "Python" }
import numpy as np c = 2.99792458e5 class obsProf: def __init__(self, obsFileName): #Read an observed (LSD) profile from obsFileName, and return it as an obsProf object. #If no file name is given, create an empty obsProf object if(obsFileName == ''): self.wl = np.array([]) ...
folsomcpREPO_NAMEZDIpyPATH_START.@ZDIpy_extracted@ZDIpy-main@core@readObs.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/projection/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="x", parent_name="scatter3d.projection", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, d...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@projection@_x.py@.PATH_END.py
{ "filename": "mathmpl.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/matplotlib/sphinxext/mathmpl.py", "type": "Python" }
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import os import sys from hashlib import md5 from docutils import nodes from docutils.parsers.rst import directives import warnings from matplotlib import rcParams from matplotlib.mathtext import ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@sphinxext@mathmpl.py@.PATH_END.py
{ "filename": "check_sph_pure.py", "repo_name": "LSSTDESC/NaMaster", "repo_path": "NaMaster_extracted/NaMaster-master/sandbox_validation/check_sph_pure.py", "type": "Python" }
from __future__ import print_function from optparse import OptionParser import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt import os import sys DTOR=np.pi/180 def opt_callback(option, opt, value, parser): setattr(parser.values, option.dest, value.split(',')) parser = Opt...
LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@sandbox_validation@check_sph_pure.py@.PATH_END.py
{ "filename": "_angle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/_angle.py", "type": "Python" }
import _plotly_utils.basevalidators class AngleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scatterternary.marker", **kwargs ): super(AngleValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@_angle.py@.PATH_END.py
{ "filename": "integration.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/test/rh_neutrino/integration.py", "type": "Python" }
import unittest # import pytest import numpy as np from hazma.parameters import standard_model_masses as sm_masses from hazma import rh_neutrino ME = sm_masses["e"] MMU = sm_masses["mu"] MPI0 = sm_masses["pi0"] MPI = sm_masses["pi"] MRHO = sm_masses["rho"] MOMEGA = sm_masses["omega"] MPHI = sm_masses["phi"] class ...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@test@rh_neutrino@integration.py@.PATH_END.py