metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/radialaxis/tickfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): super(VariantValidator, self).__init__( plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@radialaxis@tickfont@_variant.py@.PATH_END.py
{ "filename": "eigfunc_handler.py", "repo_name": "n-claes/legolas", "repo_path": "legolas_extracted/legolas-master/post_processing/pylbo/visualisation/eigenfunctions/eigfunc_handler.py", "type": "Python" }
import numpy as np from pylbo.data_containers import LegolasDataSet from pylbo.exceptions import EigenfunctionsNotPresent from pylbo.utilities.toolbox import transform_to_numpy from pylbo.visualisation.eigenfunctions.eigfunc_interface import EigenfunctionInterface from pylbo.visualisation.utils import ef_name_to_latex ...
n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@post_processing@pylbo@visualisation@eigenfunctions@eigfunc_handler.py@.PATH_END.py
{ "filename": "test_runner.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/tests/tests/test_runner.py", "type": "Python" }
import pytest # Renamed these imports so that them being in the namespace will not # cause pytest 3 to discover them as tests and then complain that # they have __init__ defined. from astropy.tests.runner import TestRunner as _TestRunner from astropy.tests.runner import TestRunnerBase as _TestRunnerBase from astropy.t...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@tests@tests@test_runner.py@.PATH_END.py
{ "filename": "test_truncated_svd.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/decomposition/tests/test_truncated_svd.py", "type": "Python" }
"""Test truncated SVD transformer.""" import numpy as np import pytest import scipy.sparse as sp from sklearn.decomposition import PCA, TruncatedSVD from sklearn.utils import check_random_state from sklearn.utils._testing import assert_allclose, assert_array_less SVD_SOLVERS = ["arpack", "randomized"] @pytest.fixt...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@decomposition@tests@test_truncated_svd.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/input/__init__.py", "type": "Python" }
from .actions import ( create_flow_run_input, create_flow_run_input_from_model, delete_flow_run_input, filter_flow_run_input, read_flow_run_input, ) from .run_input import ( GetInputHandler, Keyset, RunInput, RunInputMetadata, keyset_from_base_key, keyset_from_paused_state, ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@input@__init__.py@.PATH_END.py
{ "filename": "comal.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/comal.py", "type": "Python" }
""" pygments.lexers.comal ~~~~~~~~~~~~~~~~~~~~~ Lexer for COMAL-80. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, words from pygments.token import Comment, Whitespace, Operator, Keyw...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@comal.py@.PATH_END.py
{ "filename": "interp_utils.py", "repo_name": "dylancromer/maszcal", "repo_path": "maszcal_extracted/maszcal-main/maszcal/interp_utils.py", "type": "Python" }
import numpy as np def cartesian_prod(*arrays): la = len(arrays) dtype = np.result_type(*arrays) arr = np.empty([la] + [len(a) for a in arrays], dtype=dtype) for i, a in enumerate(np.ix_(*arrays)): arr[i, ...] = a return arr.reshape(la, -1).T def combine_radii_with_params(rs, params): ...
dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@maszcal@interp_utils.py@.PATH_END.py
{ "filename": "miri_wd.py", "repo_name": "kevin218/MEOW", "repo_path": "MEOW_extracted/MEOW-main/src/meow/miri_wd.py", "type": "Python" }
# # Astropy tools # from astropy.coordinates import match_coordinates_sky, SkyCoord from astropy.io import fits, ascii from astropy.stats import SigmaClip, sigma_clipped_stats from astropy.table import Table, Column, vstack import astropy.units as u from astropy.visualization import LogStretch, LinearStretch, Percentil...
kevin218REPO_NAMEMEOWPATH_START.@MEOW_extracted@MEOW-main@src@meow@miri_wd.py@.PATH_END.py
{ "filename": "interface.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/brutus/interface.py", "type": "Python" }
from amuse.community import * from amuse.community.interface.gd import GravitationalDynamicsInterface, GravitationalDynamics try: import mpmath HAS_MPMATH=True except ImportError: HAS_MPMATH=False """ currently setting the particle (and possibly model time) as strings (ie to conserve precision) is not ye...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@brutus@interface.py@.PATH_END.py
{ "filename": "contamination_and_visibility_demo.ipynb", "repo_name": "ExoCTK/exoctk", "repo_path": "exoctk_extracted/exoctk-main/exoctk/notebooks/contamination_and_visibility_demo.ipynb", "type": "Jupyter Notebook" }
# ExoCTK Contamination and Visibility Tool Demo This notebook contains general instructions on how to run the Contamination and Visibility Tool as well as some validation tests with on-sky data. The Web application for this tool can also be found at https://exoctk.stsci.edu/contam_visibility. ```python # Imports from...
ExoCTKREPO_NAMEexoctkPATH_START.@exoctk_extracted@exoctk-main@exoctk@notebooks@contamination_and_visibility_demo.ipynb@.PATH_END.py
{ "filename": "optimize.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/cosmology/funcs/optimize.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Convenience functions for `astropy.cosmology`.""" import warnings import numpy as np from astropy.cosmology import units as cu from astropy.cosmology.core import CosmologyError from astropy.units import Quantity from astropy.utils.exceptions import A...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@cosmology@funcs@optimize.py@.PATH_END.py
{ "filename": "find_SVR_params.py", "repo_name": "LSSTDESC/chroma", "repo_path": "chroma_extracted/chroma-master/bin/analytic/catalog/find_SVR_params.py", "type": "Python" }
import cPickle from argparse import ArgumentParser import numpy as np import regressor def ML(train_objs, test_objs, predict_var=None, predict_band=None, use_color=False, use_mag=False, C=None, gamma=None, epsilon=None): if C is None: C = 100 if gamma is None: gamma = 0.1 if epsil...
LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@bin@analytic@catalog@find_SVR_params.py@.PATH_END.py
{ "filename": "python-reference_sample_gaussian_process.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_sample_gaussian_process.md", "type": "Markdown" }
# sample_gaussian_process ## {{ dl--purpose }} {#purpose} Implementation of Gaussian process sampling (Kernel Gradient Boosting/Algorithm 4) from ["Gradient Boosting Performs Gaussian Process Inference"](https://arxiv.org/abs/2206.05608) paper. Produces samples from posterior GP with prior assumption $f \sim \mathca...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_sample_gaussian_process.md@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattergl", **kwargs): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@_marker.py@.PATH_END.py
{ "filename": "kernel.py", "repo_name": "spacetelescope/specview", "repo_path": "specview_extracted/specview-master/specview/ui/ipython/kernel.py", "type": "Python" }
"""Start an IPython kernel""" from IPython import get_ipython from IPython.qt.client import QtKernelClient from IPython.qt.inprocess import QtInProcessKernelManager from IPython.kernel.connect import get_connection_file from IPython.kernel.inprocess.ipkernel import InProcessInteractiveShell def ipython_kernel_start(*...
spacetelescopeREPO_NAMEspecviewPATH_START.@specview_extracted@specview-master@specview@ui@ipython@kernel.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/void_statistics/tests/__init__.py", "type": "Python" }
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@void_statistics@tests@__init__.py@.PATH_END.py
{ "filename": "layers.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-ui/vaex/ui/layers.py", "type": "Python" }
import collections import operator import vaex.vaexfast import threading import matplotlib import numpy as np import scipy.ndimage import matplotlib.colors import traceback import vaex import vaex.delayed import vaex.ui.storage import vaex.ui.undo import vaex.ui.colormaps import vaex.grids from vaex.ui.icons import ic...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ui@vaex@ui@layers.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/violin/_stream.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "violin" _path_str = "violin.stream" _valid_props = {"maxpoints", "token"} # maxpoints ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@violin@_stream.py@.PATH_END.py
{ "filename": "test_class.py", "repo_name": "nbellomo/Multi_CLASS", "repo_path": "Multi_CLASS_extracted/Multi_CLASS-master/python/test_class.py", "type": "Python" }
""" .. module:: test_class :synopsis: python script for testing CLASS using nose .. moduleauthor:: Benjamin Audren <benjamin.audren@gmail.com> .. credits:: Benjamin Audren, Thomas Tram .. version:: 1.0 This is a python script for testing CLASS and its wrapper Classy using nose. To run the test suite, type nosetest...
nbellomoREPO_NAMEMulti_CLASSPATH_START.@Multi_CLASS_extracted@Multi_CLASS-master@python@test_class.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/parthenon/tests/__init__.py", "type": "Python" }
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@parthenon@tests@__init__.py@.PATH_END.py
{ "filename": "ttFont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttLib/ttFont.py", "type": "Python" }
from fontTools.config import Config from fontTools.misc import xmlWriter from fontTools.misc.configTools import AbstractConfig from fontTools.misc.textTools import Tag, byteord, tostr from fontTools.misc.loggingTools import deprecateArgument from fontTools.ttLib import TTLibError from fontTools.ttLib.ttGlyphSet import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttLib@ttFont.py@.PATH_END.py
{ "filename": "lens_image_future.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/herculens/LensImage/lens_image_future.py", "type": "Python" }
# Defines the model of a strong lens # # Copyright (c) 2023, herculens developers and contributors # Copyright (c) 2018, Simon Birrer & lenstronomy contributors # based on the ImSim module from lenstronomy (version 1.9.3) __author__ = 'sibirrer', 'austinpeel', 'aymgal' import copy import numpy as np import jax.numpy ...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@LensImage@lens_image_future.py@.PATH_END.py
{ "filename": "CSFR_delay--plot.py", "repo_name": "DebduttaPaul/luminosity_function_of_sGRBs", "repo_path": "luminosity_function_of_sGRBs_extracted/luminosity_function_of_sGRBs-master/CSFR_delay--plot.py", "type": "Python" }
from __future__ import division from astropy.io import ascii from astropy.table import Table from scipy.optimize import curve_fit from scipy.integrate import quad, simps from scipy import interpolate import debduttaS_functions as mf import specific_functions as sf import time import numpy as np import matplotlib.pyplot...
DebduttaPaulREPO_NAMEluminosity_function_of_sGRBsPATH_START.@luminosity_function_of_sGRBs_extracted@luminosity_function_of_sGRBs-master@CSFR_delay--plot.py@.PATH_END.py
{ "filename": "datamodel.py", "repo_name": "spacepy/spacepy", "repo_path": "spacepy_extracted/spacepy-main/spacepy/datamodel.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Data model conceptually similar to HDF5 and CDF. For more documentation :doc:`../datamodel` Authors: Steve Morley and Brian Larsen Additional Contributors: Charles Kiyanda and Miles Engel Institution: Los Alamos National Laboratory Contact: smorley@lanl.gov; balars...
spacepyREPO_NAMEspacepyPATH_START.@spacepy_extracted@spacepy-main@spacepy@datamodel.py@.PATH_END.py
{ "filename": "postgresql.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/edge/worker/postgresql.py", "type": "Python" }
############################################################################## # # Crossbar.io # Copyright (C) Crossbar.io Technologies GmbH. All rights reserved. # ############################################################################## import datetime from collections.abc import Mapp...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@edge@worker@postgresql.py@.PATH_END.py
{ "filename": "quaternionx.py", "repo_name": "ExoCTK/exoctk", "repo_path": "exoctk_extracted/exoctk-main/exoctk/contam_visibility/quaternionx.py", "type": "Python" }
# ! /usr/bin/env python # quaternion module """Version 4 September 9, 2010 WMK Flipped sign of the angle in the QX, QY, QZ, QJX, QJY, QJZ, set_values, set_as_QX, ... functions to be consistent with the corrected multiplication. Also updated the doc strings. Version 3 September 8, 2010 RLH Backed out change to cnvrt in...
ExoCTKREPO_NAMEexoctkPATH_START.@exoctk_extracted@exoctk-main@exoctk@contam_visibility@quaternionx.py@.PATH_END.py
{ "filename": "tutorial.ipynb", "repo_name": "0satoken/Eclairs", "repo_path": "Eclairs_extracted/Eclairs-main/notebooks/tutorial.ipynb", "type": "Jupyter Notebook" }
# Tutorial In this notebook, I review basic usage of our python wrapper. ## Compile python wrapper First of all, you need to install the python wrapper `pyecl`. `Eclairs` needs C++ compiler, GSL, and Boost library. Please make sure that yout Boost library has numpy extension since older versions of Boost do not incl...
0satokenREPO_NAMEEclairsPATH_START.@Eclairs_extracted@Eclairs-main@notebooks@tutorial.ipynb@.PATH_END.py
{ "filename": "tfsa-2022-037.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-037.md", "type": "Markdown" }
## TFSA-2022-037: Unitialized variable access in `AssignOp` ### CVE Number CVE-2022-23573 ### Impact The [implementation of `AssignOp`](https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/kernels/assign_op.h#L30-L143) can result in copying unitialized data to a new t...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-037.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._text import TextValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.TextVal...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "relora.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/src/axolotl/monkeypatch/relora.py", "type": "Python" }
"""Implements the ReLoRA training procedure from https://arxiv.org/abs/2307.05695, minus the initial full fine-tune.""" import glob import json import logging import os.path import shutil from functools import partial from pathlib import Path from typing import Dict, List, Sequence, Union import bitsandbytes as bnb im...
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@monkeypatch@relora.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._hoverlabel import Hoverlabel from ._legendgrouptitle import Legendgrouptitle from ._line import Line from ._marker import Marker from ._selected import Selected from ._stream import Stream from...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterternary@__init__.py@.PATH_END.py
{ "filename": "Custom fitting example.ipynb", "repo_name": "PyEllips/pyElli", "repo_path": "pyElli_extracted/pyElli-master/examples/Custom fitting/Custom fitting example.ipynb", "type": "Jupyter Notebook" }
# Custom fitting example This is a short example for fitting data, which is not covered by the fitting widget. It relies on calling lmfit manually. Therefore one needs to provide a fitting function, which calculates the numerical residual between measurement and model. This notebook is about fitting multiple datasets ...
PyEllipsREPO_NAMEpyElliPATH_START.@pyElli_extracted@pyElli-master@examples@Custom fitting@Custom fitting example.ipynb@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatter.marker.colorbar", **kwargs, ): super(ShowticksuffixValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "question2_entropy_reg.py", "repo_name": "freelunchtheorem/Conditional_Density_Estimation", "repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/evaluation/simulation_eval/question2_entropy_reg.py", "type": "Python" }
import matplotlib as mpl mpl.use("PS") #handles X11 server detection (required to run on console) import numpy as np from cde.model_fitting.GoodnessOfFitResults import GoodnessOfFitResults from cde.evaluation.simulation_eval import base_experiment from ml_logger import logger EXP_PREFIX = 'question2_entropy_reg' RESUL...
freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@evaluation@simulation_eval@question2_entropy_reg.py@.PATH_END.py
{ "filename": "screen_plot.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/modules/atmValidate/screen_plot.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@modules@atmValidate@screen_plot.py@.PATH_END.py
{ "filename": "Tiling_Observations_GBM.ipynb", "repo_name": "astro-transients/tilepy", "repo_path": "tilepy_extracted/tilepy-master/examples/launcher/Tiling_Observations_GBM.ipynb", "type": "Jupyter Notebook" }
```python # Import main packages from tilepy.include.ObservationScheduler import GetSchedule from tilepy.include.PointingTools import ObservationParameters, NextWindowTools import time import argparse import os from pathlib import Path import datetime ``` /Users/md274436/software/miniforge3/envs/tilepy/lib/python...
astro-transientsREPO_NAMEtilepyPATH_START.@tilepy_extracted@tilepy-master@examples@launcher@Tiling_Observations_GBM.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: 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@py3@plotly@graph_objs@scattergl@marker@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "TestDeviceAndThreads.py", "repo_name": "kokkos/kokkos", "repo_path": "kokkos_extracted/kokkos-master/core/unit_test/TestDeviceAndThreads.py", "type": "Python" }
#@HEADER # ************************************************************************ # Kokkos v. 4.0 # Copyright (2022) National Technology & Engineering # Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, # the U.S. Government retains c...
kokkosREPO_NAMEkokkosPATH_START.@kokkos_extracted@kokkos-master@core@unit_test@TestDeviceAndThreads.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/annotation/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.annotation" _path_str = "layout.annotation.font" _valid_props = {"color", "family", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@annotation@_font.py@.PATH_END.py
{ "filename": "Force.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/potential/Force.py", "type": "Python" }
############################################################################### # Force.py: top-level class for a 3D force, conservative (Potential) or # not (DissipativeForce) # ############################################################################### import copy import numpy from ..util import c...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@potential@Force.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@hoverlabel@font@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/neural_nets/embedding_nets/__init__.py", "type": "Python" }
from sbi.neural_nets.embedding_nets.cnn import CNNEmbedding from sbi.neural_nets.embedding_nets.fully_connected import FCEmbedding from sbi.neural_nets.embedding_nets.permutation_invariant import ( PermutationInvariantEmbedding, )
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@neural_nets@embedding_nets@__init__.py@.PATH_END.py
{ "filename": "_pade.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/interpolate/_pade.py", "type": "Python" }
from numpy import zeros, asarray, eye, poly1d, hstack, r_ from scipy import linalg __all__ = ["pade"] def pade(an, m, n=None): """ Return Pade approximation to a polynomial as the ratio of two polynomials. Parameters ---------- an : (N,) array_like Taylor series coefficients. m : int ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@interpolate@_pade.py@.PATH_END.py
{ "filename": "backend_qtagg.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/backends/backend_qtagg.py", "type": "Python" }
""" Render to qt from agg. """ import ctypes from matplotlib.transforms import Bbox from .qt_compat import QT_API, QtCore, QtGui from .backend_agg import FigureCanvasAgg from .backend_qt import _BackendQT, FigureCanvasQT from .backend_qt import ( # noqa: F401 # pylint: disable=W0611 FigureManagerQT, NavigationT...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@backends@backend_qtagg.py@.PATH_END.py
{ "filename": "_metasrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/_metasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattergeo", **kwargs): super(MetasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@_metasrc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/analytics/__init__.py", "type": "Python" }
from elisa.analytics.dataset.base import LCData from elisa.analytics.dataset.base import RVData from elisa.analytics.tasks import RVBinaryAnalyticsTask, LCBinaryAnalyticsTask
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@analytics@__init__.py@.PATH_END.py
{ "filename": "injections.py", "repo_name": "nuclear-multimessenger-astronomy/nmma", "repo_path": "nmma_extracted/nmma-main/nmma/tests/injections.py", "type": "Python" }
from argparse import Namespace import bilby.core import numpy as np import json import os import shutil from nmma.em.model import ( SimpleKilonovaLightCurveModel, SupernovaLightCurveModel, ShockCoolingLightCurveModel, GRBLightCurveModel, SVDLightCurveModel, ) from ..em import create_lightcurves fr...
nuclear-multimessenger-astronomyREPO_NAMEnmmaPATH_START.@nmma_extracted@nmma-main@nmma@tests@injections.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/icicle/legendgrouptitle/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "icicle.legendgrouptitle" _path_str = "icicle.legendgrouptitle.font" _valid_props = { "...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@icicle@legendgrouptitle@_font.py@.PATH_END.py
{ "filename": "Two_Clusters.ipynb", "repo_name": "jzuhone/soxs", "repo_path": "soxs_extracted/soxs-main/doc/source/cookbook/Two_Clusters.ipynb", "type": "Jupyter Notebook" }
# Two Clusters Using the SOXS Python interface, this example shows how to generate photons from two thermal spectra and two $\beta$-model spatial distributions, as an approximation of two galaxy clusters. ```python import matplotlib matplotlib.rc("font", size=18) import soxs ``` ### Generate Spectral Models We w...
jzuhoneREPO_NAMEsoxsPATH_START.@soxs_extracted@soxs-main@doc@source@cookbook@Two_Clusters.ipynb@.PATH_END.py
{ "filename": "classify_with_nn.py", "repo_name": "vblanka24/Ba_star_classification_PaperIII", "repo_path": "Ba_star_classification_PaperIII_extracted/Ba_star_classification_PaperIII-main/classify_with_nn.py", "type": "Python" }
import numpy as np import sys, os import rf_lib as rfl import matplotlib.pyplot as plt from tensorflow.keras.utils import plot_model from ann_visualizer.visualize import ann_viz import pandas as pd from classify_lib import * from silence_tensorflow import silence_tensorflow silence_tensorflow() import tensorflow as t...
vblanka24REPO_NAMEBa_star_classification_PaperIIIPATH_START.@Ba_star_classification_PaperIII_extracted@Ba_star_classification_PaperIII-main@classify_with_nn.py@.PATH_END.py
{ "filename": "_ysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/_ysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="histogram", **kwargs): super(YsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_typ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@_ysrc.py@.PATH_END.py
{ "filename": "test_overview.py", "repo_name": "1313e/PRISM", "repo_path": "PRISM_extracted/PRISM-master/prism/_gui/widgets/tests/test_overview.py", "type": "Python" }
# -*- coding: utf-8 -*- # %% IMPORTS # Built-in imports import os from os import path from sys import platform # Package imports import e13tools as e13 from matplotlib.backends.backend_qt5agg import ( FigureCanvasQTAgg as FigureCanvas) import matplotlib.pyplot as plt from mpi4pyd import MPI import pytest from qtp...
1313eREPO_NAMEPRISMPATH_START.@PRISM_extracted@PRISM-master@prism@_gui@widgets@tests@test_overview.py@.PATH_END.py
{ "filename": "tf.py", "repo_name": "ultralytics/yolov5", "repo_path": "yolov5_extracted/yolov5-master/models/tf.py", "type": "Python" }
# Ultralytics YOLOv5 🚀, AGPL-3.0 license """ TensorFlow, Keras and TFLite versions of YOLOv5 Authored by https://github.com/zldrobit in PR https://github.com/ultralytics/yolov5/pull/1127. Usage: $ python models/tf.py --weights yolov5s.pt Export: $ python export.py --weights yolov5s.pt --include saved_model p...
ultralyticsREPO_NAMEyolov5PATH_START.@yolov5_extracted@yolov5-master@models@tf.py@.PATH_END.py
{ "filename": "index.md", "repo_name": "j-faria/kima", "repo_path": "kima_extracted/kima-master/docs/index.md", "type": "Markdown" }
j-fariaREPO_NAMEkimaPATH_START.@kima_extracted@kima-master@docs@index.md@.PATH_END.py
{ "filename": "chatglm.py", "repo_name": "alibaba/TinyNeuralNetwork", "repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/tinynn/llm_quant/examples/chatglm.py", "type": "Python" }
# This script is based on https://github.com/THUDM/ChatGLM-6B import signal import os import torch from transformers import AutoModel, AutoTokenizer from tinynn.llm_quant.modules import quant_fc def basic_usage(model_path='THUDM/chatglm-6b', quant_mod='dynamic'): model = AutoModel.from_pretrained(model_path, tru...
alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@tinynn@llm_quant@examples@chatglm.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Jashcraf/poke", "repo_path": "poke_extracted/poke-main/poke/__init__.py", "type": "Python" }
"""poke base file"""
JashcrafREPO_NAMEpokePATH_START.@poke_extracted@poke-main@poke@__init__.py@.PATH_END.py
{ "filename": "_textpositionsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/_textpositionsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scatter3d", **kwargs ): super(TextpositionsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@_textpositionsrc.py@.PATH_END.py
{ "filename": "wavelet.py", "repo_name": "miguelcarcamov/csromer", "repo_path": "csromer_extracted/csromer-master/src/csromer/dictionaries/wavelet.py", "type": "Python" }
from abc import ABCMeta, abstractmethod from dataclasses import dataclass, field import numpy as np from pywt import Wavelet @dataclass(init=True, repr=True) class Wavelet(metaclass=ABCMeta): wavelet_name: str = None wavelet_level: int = None mode: str = None append_signal: bool = None ncoeffs: i...
miguelcarcamovREPO_NAMEcsromerPATH_START.@csromer_extracted@csromer-master@src@csromer@dictionaries@wavelet.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/unselected/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolar.unselected.marker", **kwargs, ): super(OpacityValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@unselected@marker@_opacity.py@.PATH_END.py
{ "filename": "ppo_lib_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/examples/ppo/ppo_lib_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@examples@ppo@ppo_lib_test.py@.PATH_END.py
{ "filename": "test_amurrica.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/tests/test_amurrica.py", "type": "Python" }
""" Module contains functions used to guarantee that only correct American spellings are used throughout the Halotools source code. """ import os import fnmatch from ..custom_exceptions import AmurricaError, SpellingError from . import usa, ddc def test_amurrica_instantiation(): try: basename, linenum, ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@tests@test_amurrica.py@.PATH_END.py
{ "filename": "_procrustes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/linalg/_procrustes.py", "type": "Python" }
""" Solve the orthogonal Procrustes problem. """ import numpy as np from ._decomp_svd import svd __all__ = ['orthogonal_procrustes'] def orthogonal_procrustes(A, B, check_finite=True): """ Compute the matrix solution of the orthogonal Procrustes problem. Given matrices A and B of equal shape, find an ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@linalg@_procrustes.py@.PATH_END.py
{ "filename": "orbit.py", "repo_name": "adrn/gala", "repo_path": "gala_extracted/gala-main/gala/dynamics/orbit.py", "type": "Python" }
import warnings # Third-party import astropy.coordinates as coord import astropy.table as at import astropy.units as u import numpy as np from scipy.signal import argrelmax # Project from gala.logging import logger from ..io import quantity_from_hdf5, quantity_to_hdf5 from ..units import DimensionlessUnitSystem, Uni...
adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@dynamics@orbit.py@.PATH_END.py
{ "filename": "hinton_demo.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/specialty_plots/hinton_demo.py", "type": "Python" }
""" =============== Hinton diagrams =============== Hinton diagrams are useful for visualizing the values of a 2D array (e.g. a weight matrix): Positive and negative values are represented by white and black squares, respectively, and the size of each square represents the magnitude of each value. Initial idea from D...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@specialty_plots@hinton_demo.py@.PATH_END.py
{ "filename": "exoplanet_lc.py", "repo_name": "ucl-exoplanets/pylightcurve", "repo_path": "pylightcurve_extracted/pylightcurve-master/pylightcurve/models/exoplanet_lc.py", "type": "Python" }
__all__ = ['planet_orbit', 'planet_star_projected_distance', 'planet_phase', 'transit', 'transit_integrated', 'transit_depth', 'transit_duration', 'eclipse', 'eclipse_integrated', 'eclipse_depth', 'eclipse_duration', 'eclipse_mid_time', 'fp_over_fs', 'exotethys'] import os import num...
ucl-exoplanetsREPO_NAMEpylightcurvePATH_START.@pylightcurve_extracted@pylightcurve-master@pylightcurve@models@exoplanet_lc.py@.PATH_END.py
{ "filename": "make_sv3_vagc.ipynb", "repo_name": "changhoonhahn/provabgs", "repo_path": "provabgs_extracted/provabgs-main/nb/sv3/make_sv3_vagc.ipynb", "type": "Jupyter Notebook" }
# construct `PROVABGS` sample from SV3 data ```python import os import numpy as np from astropy.table import Table # --- plotting --- import corner as DFM import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['text.usetex'] = True mpl.rcParams['font.family'] = 'serif' mpl.rcParams['axes.linewidth'] ...
changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@nb@sv3@make_sv3_vagc.ipynb@.PATH_END.py
{ "filename": "BADASS3_multi_spectra_options-checkpoint.ipynb", "repo_name": "remingtonsexton/BADASS3", "repo_path": "BADASS3_extracted/BADASS3-master/example_notebooks/.ipynb_checkpoints/BADASS3_multi_spectra_options-checkpoint.ipynb", "type": "Jupyter Notebook" }
## Bayesian AGN Decomposition Analysis for SDSS Spectra (BADASS) ### Example: Multi Spectrum Fitting with Options File This notebook is a working example of how to fit multiple spectra with Python's multiprocessing with a user-input options file. The options file contains all the fitting options, line lists, constrai...
remingtonsextonREPO_NAMEBADASS3PATH_START.@BADASS3_extracted@BADASS3-master@example_notebooks@.ipynb_checkpoints@BADASS3_multi_spectra_options-checkpoint.ipynb@.PATH_END.py
{ "filename": "_width.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/violin/box/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.box.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@violin@box@line@_width.py@.PATH_END.py
{ "filename": "create_link.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/com/win32comext/shell/demos/create_link.py", "type": "Python" }
# link.py # From a demo by Mark Hammond, corrupted by Mike Fletcher # (and re-corrupted by Mark Hammond :-) import os import pythoncom from win32com.shell import shell class PyShortcut: def __init__(self): self._base = pythoncom.CoCreateInstance( shell.CLSID_ShellLink, None, ...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@com@win32comext@shell@demos@create_link.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "kboone/avocado", "repo_path": "avocado_extracted/avocado-master/README.md", "type": "Markdown" }
# Avocado Photometric Classification of Astronomical Transients and Variables With Biased Spectroscopic Samples [![Documentation Status](https://readthedocs.org/projects/avocado-classifier/badge/?version=latest)](https://avocado-classifier.readthedocs.io/en/latest/?badge=latest) ## About `avocado` is a general phot...
kbooneREPO_NAMEavocadoPATH_START.@avocado_extracted@avocado-master@README.md@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/insidetextfont/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.insidetextfont", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@insidetextfont@_sizesrc.py@.PATH_END.py
{ "filename": "bokeh_plot_mcse.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/examples/bokeh/bokeh_plot_mcse.py", "type": "Python" }
""" Quantile Monte Carlo Standard Error Plot ======================================== """ import arviz as az data = az.load_arviz_data("centered_eight") ax = az.plot_mcse(data, var_names=["tau", "mu"], rug=True, extra_methods=True, backend="bokeh")
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@examples@bokeh@bokeh_plot_mcse.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/saved_model/utils.py", "type": "Python" }
# Copyright 2016 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@saved_model@utils.py@.PATH_END.py
{ "filename": "test_bf_direction.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/lsst/test_bf_direction.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@lsst@test_bf_direction.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/box/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "box" _path_str = "box.marker" _valid_props = { "angle", "color", "li...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@box@_marker.py@.PATH_END.py
{ "filename": "disk_bulge_kernels.py", "repo_name": "LSSTDESC/lsstdesc-diffsky", "repo_path": "lsstdesc-diffsky_extracted/lsstdesc-diffsky-main/lsstdesc_diffsky/disk_bulge_modeling/disk_bulge_kernels.py", "type": "Python" }
""" """ from collections import OrderedDict import numpy as np from diffstar.fitting_helpers.fitting_kernels import _integrate_sfr from dsps.constants import SFR_MIN from dsps.sed.stellar_age_weights import calc_age_weights_from_sfh_table from dsps.utils import _jax_get_dt_array from jax import jit as jjit from jax im...
LSSTDESCREPO_NAMElsstdesc-diffskyPATH_START.@lsstdesc-diffsky_extracted@lsstdesc-diffsky-main@lsstdesc_diffsky@disk_bulge_modeling@disk_bulge_kernels.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "trivnguyen/nehod_torch", "repo_path": "nehod_torch_extracted/nehod_torch-main/nehod/utils.py", "type": "Python" }
import numpy as np try: from wonderwords import RandomWord except: RandomWord = None continue def get_random_name(): """ Generate a random name """ if RandomWord is None: return "default-run-0" w = RandomWord() word1 = " " while "-" in word1 or " " in word1: word1 = w.w...
trivnguyenREPO_NAMEnehod_torchPATH_START.@nehod_torch_extracted@nehod_torch-main@nehod@utils.py@.PATH_END.py
{ "filename": "stateless_scope_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/common/stateless_scope_test.py", "type": "Python" }
import numpy as np from keras.src import backend from keras.src import ops from keras.src import testing from keras.src.backend.common.stateless_scope import StatelessScope class TestStatelessScope(testing.TestCase): def test_basic_flow(self): var1 = backend.Variable(np.zeros((2,))) var2 = backen...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@common@stateless_scope_test.py@.PATH_END.py
{ "filename": "fit_tser_emcee.py", "repo_name": "eas342/tshirt", "repo_path": "tshirt_extracted/tshirt-master/tshirt/fit_tser_emcee.py", "type": "Python" }
import numpy as np import emcee import pdb import os import glob from astropy.io import ascii from astropy.table import Table from matplotlib import style as mplStyle mplStyle.use('classic') import matplotlib.pyplot as plt import matplotlib.mlab as mlab from matplotlib.collections import LineCollection from matplotlib ...
eas342REPO_NAMEtshirtPATH_START.@tshirt_extracted@tshirt-master@tshirt@fit_tser_emcee.py@.PATH_END.py
{ "filename": "equations.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/doc/equations.md", "type": "Markdown" }
# Physics modules and equations [TOC] # List of physics modules {#eq_list_physics} This document describes the equations implemented. Information about user defined source terms are in [user module](amrvacusr.md). In principle, the code handles anything of generic form ![](figmovdir/eq.general.gif) The code is con...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@doc@equations.md@.PATH_END.py
{ "filename": "one_time.py", "repo_name": "nbellomo/Multi_CLASS", "repo_path": "Multi_CLASS_extracted/Multi_CLASS-master/scripts/one_time.py", "type": "Python" }
# coding: utf-8 # In[1]: # import necessary modules # uncomment to get plots displayed in notebook #%matplotlib inline import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class from scipy.optimize import fsolve from scipy.interpolate import interp1d import math # In[2]: # esthe...
nbellomoREPO_NAMEMulti_CLASSPATH_START.@Multi_CLASS_extracted@Multi_CLASS-master@scripts@one_time.py@.PATH_END.py
{ "filename": "networkx_graph.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/graphs/networkx_graph.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.graphs import NetworkxEntityGraph from langchain_community.graphs.networkx_graph import ( KnowledgeTriple, get_entities, parse_triples, ) # Create a way to d...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@graphs@networkx_graph.py@.PATH_END.py
{ "filename": "test_simultaneous.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/app/tests/test_simultaneous.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_allclose from time import sleep from vispy.app import use_app, Canvas, Timer from vispy.testing import requires_application, SkipTest, run_tests_if_main from vispy.util.ptime import time from vispy.gloo import gl from vispy.gloo.util import _...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@app@tests@test_simultaneous.py@.PATH_END.py
{ "filename": "copy_prebuilt_native_files.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/jvm-packages/tools/copy_prebuilt_native_files.py", "type": "Python" }
#!/usr/bin/env python import argparse import errno import os import shutil import sys if sys.version_info[0] == 2: import distutils.dir_util def makedirs_if_not_exist(dir_path): """ ensure that target directory exists, can't use exist_ok flag because it is unavailable in python 2.7 """ ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@jvm-packages@tools@copy_prebuilt_native_files.py@.PATH_END.py
{ "filename": "misc.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/utils/misc.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@autograph@utils@misc.py@.PATH_END.py
{ "filename": "linear_model_test.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/tests/ml/linear_model_test.py", "type": "Python" }
import pytest pytest.importorskip("sklearn") import sys import numpy as np import vaex.datasets import vaex.ml.linear_model features = ['petal_length', 'petal_width', 'sepal_length', 'sepal_width'] @pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher") def test_linear_model(df_iris): ...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@ml@linear_model_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/ga/GA/problems/__init__.py", "type": "Python" }
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@ga@GA@problems@__init__.py@.PATH_END.py
{ "filename": "rules.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/f2py/rules.py", "type": "Python" }
#!/usr/bin/env python3 """ Rules for building C/API module with f2py2e. Here is a skeleton of a new wrapper function (13Dec2001): wrapper_function(args) declarations get_python_arguments, say, `a' and `b' get_a_from_python if (successful) { get_b_from_python if (successful) { callfortran ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@f2py@rules.py@.PATH_END.py
{ "filename": "setup_package.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/esasky/tests/setup_package.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os # setup paths to the test data # can specify a single file or a list of files def get_package_data(): paths = [os.path.join('data', '*.dat'), os.path.join('data', '*.xml'), os.path.join('data', '*.txt'), ...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@esasky@tests@setup_package.py@.PATH_END.py
{ "filename": "test_pointverify.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/controllers/tests/test_pointverify.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@controllers@tests@test_pointverify.py@.PATH_END.py
{ "filename": "copy_injection_recovery.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_TF2/injection_32/copy_injection_recovery.py", "type": "Python" }
import os os.environ['CUDA_VISIBLE_DEVICES'] = "3" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" import numpy as np import argparse # The following is needed on CIT cluster to avoid an obscure Python error import psutil p = psutil.Process() p.cpu_affinity([0]) # Regular imports import argparse import copy impo...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_TF2@injection_32@copy_injection_recovery.py@.PATH_END.py
{ "filename": "integral_sympy.ipynb", "repo_name": "lgrcia/paper-nuance", "repo_path": "paper-nuance_extracted/paper-nuance-main/proofs/integral_sympy.ipynb", "type": "Jupyter Notebook" }
$$p(y \vert P, T_0 ,D, \Delta)$$ $$p(y \vert P, T_0 ,D, \Delta) = \prod_k p(y \vert T_k ,D, \Delta)$$ $$ p(y \vert T_k ,D, \Delta) = \int p(y \vert T_k ,D, \tilde\Delta) \cdot p(\tilde\Delta \vert \Delta) \tilde\Delta$$ $$p(\tilde\Delta \vert \Delta) = N(\Delta, \Sigma) \quad \text{with} \quad \frac{1}{\Sigma^2} ...
lgrciaREPO_NAMEpaper-nuancePATH_START.@paper-nuance_extracted@paper-nuance-main@proofs@integral_sympy.ipynb@.PATH_END.py
{ "filename": "plot_b_aperture.ipynb", "repo_name": "jpierel14/space_phot", "repo_path": "space_phot_extracted/space_phot-main/Docs/source/examples/plot_b_aperture.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline ``` # Aperture Photometry Measuring PSF Photometry with space_phot. An example HST Dataset is downloaded, and then we measure aperture photometry. This is public HST data for the gravitationally lensed SN 2022riv ```python import sys,os,glob from astropy.io import fits from astropy...
jpierel14REPO_NAMEspace_photPATH_START.@space_phot_extracted@space_phot-main@Docs@source@examples@plot_b_aperture.ipynb@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattergl.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "Detailed Plot evolution to compare beta effect .ipynb", "repo_name": "FloorBroekgaarden/Double-Compact-Object-Mergers", "repo_path": "Double-Compact-Object-Mergers_extracted/Double-Compact-Object-Mergers-main/plottingCode/mass_transfer_efficiency_check/Detailed Plot evolution to compare beta effect...
```python import sys sys.path.append('../../Scripts') from PostProcessingScripts import * import pandas as pd import string # just to make the cells appear wider: from IPython.core.display import display, HTML display(HTML("<style>.container { width:100% !important; }</style>")) import h5py as h5 import numpy as n...
FloorBroekgaardenREPO_NAMEDouble-Compact-Object-MergersPATH_START.@Double-Compact-Object-Mergers_extracted@Double-Compact-Object-Mergers-main@plottingCode@mass_transfer_efficiency_check@Detailed Plot evolution to compare beta effect .ipynb@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="surface", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@_name.py@.PATH_END.py
{ "filename": "spectrum_oneD.py", "repo_name": "cylammarco/ASPIRED", "repo_path": "ASPIRED_extracted/ASPIRED-main/src/aspired/spectrum_oneD.py", "type": "Python" }
# -*- coding: utf-8 -*- import datetime import logging import os from typing import Callable, Union import astropy import numpy as np from astropy.io import fits from rascal.calibrator import Calibrator from scipy import interpolate as itp __all__ = ["SpectrumOneD"] class SpectrumOneD: """ Base class of a 1...
cylammarcoREPO_NAMEASPIREDPATH_START.@ASPIRED_extracted@ASPIRED-main@src@aspired@spectrum_oneD.py@.PATH_END.py
{ "filename": "modsAdd.py", "repo_name": "rwpogge/modsCCDRed", "repo_path": "modsCCDRed_extracted/modsCCDRed-master/modsAdd.py", "type": "Python" }
#! /usr/bin/env python # # modsAdd - Add (or average) FITS images # # Usage: modsAdd [options] inFile?.fits outFile.fits # # Where: # inFile?.fits = input FITS files to add together. # outFile.fits = output file to create # # Options: # -a = compute the average instead of the sum # -f = force overwrite of th...
rwpoggeREPO_NAMEmodsCCDRedPATH_START.@modsCCDRed_extracted@modsCCDRed-master@modsAdd.py@.PATH_END.py
{ "filename": "isotope_pd_subclass.ipynb", "repo_name": "tardis-sn/tardis", "repo_path": "tardis_extracted/tardis-main/docs/using/interaction/isotope_pd_subclass.ipynb", "type": "Jupyter Notebook" }
# Extending Pandas DataFrame Class In this notebook we show how to extend the Pandas DataFrame class using the IsotopeAbundances class defined in tardis/io/decay.py. Official Pandas documentation is located here: https://pandas.pydata.org/pandas-docs/stable/development/extending.html ```python import pandas as pd im...
tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@docs@using@interaction@isotope_pd_subclass.ipynb@.PATH_END.py
{ "filename": "test_qif.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/genmod/tests/test_qif.py", "type": "Python" }
import numpy as np from numpy.testing import assert_allclose import pandas as pd import pytest from statsmodels.genmod.qif import (QIF, QIFIndependence, QIFExchangeable, QIFAutoregressive) from statsmodels.tools.numdiff import approx_fprime from statsmodels.genmod import families @...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@genmod@tests@test_qif.py@.PATH_END.py