metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_yhoverformat.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/_yhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="streamtube", **kwargs): super(YhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@_yhoverformat.py@.PATH_END.py
{ "filename": "test_visibility.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_visibility.py", "type": "Python" }
#!/urs/bin/env python # # Copyright (C) 2020, the ixpeobssim team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # #...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@tests@test_visibility.py@.PATH_END.py
{ "filename": "patch.config.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/platforms/winpack_dldt/2021.2/patch.config.py", "type": "Python" }
applyPatch('20201217-dldt-disable-unused-targets.patch') applyPatch('20200413-dldt-pdb.patch') applyPatch('20200604-dldt-disable-multidevice.patch') applyPatch('20201218-dldt-vs-version.patch')
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@platforms@winpack_dldt@2021.2@patch.config.py@.PATH_END.py
{ "filename": "make_room_for_ylabel_using_axesgrid.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/axes_grid1/make_room_for_ylabel_using_axesgrid.py", "type": "Python" }
""" ==================================== Make room for ylabel using axes_grid ==================================== """ import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from mpl_toolkits.axes_grid1.axes_divider import make_axes_area_auto_adjustable fig = plt.figure() ax = fig.ad...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@axes_grid1@make_room_for_ylabel_using_axesgrid.py@.PATH_END.py
{ "filename": "test_tools.py", "repo_name": "radiocosmology/caput", "repo_path": "caput_extracted/caput-master/tests/test_tools.py", "type": "Python" }
"""Unit tests for the tools module.""" from mpi4py import MPI import numpy as np import pytest from caput import mpiarray, tools ARRAY_SIZE = (100, 111) SEED = 12345 ATOL = 0.0 rng = np.random.Generator(np.random.SFC64(SEED)) random_float_array = rng.standard_normal(size=ARRAY_SIZE, dtype=np.float32) random_double...
radiocosmologyREPO_NAMEcaputPATH_START.@caput_extracted@caput-master@tests@test_tools.py@.PATH_END.py
{ "filename": "Plotting_tutorial.ipynb", "repo_name": "sblunt/orbitize", "repo_path": "orbitize_extracted/orbitize-main/docs/tutorials/Plotting_tutorial.ipynb", "type": "Jupyter Notebook" }
# Advanced Plotting by Henry Ngo (2018) The `results.py` module contains several plotting functions to visualize the results of your `orbitize` orbit fit. Basic uses of these functions are covered in the [OFTI](https://orbitize.readthedocs.io/en/latest/tutorials/OFTI_tutorial.html) and [MCMC](https://orbitize.readthe...
sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@docs@tutorials@Plotting_tutorial.ipynb@.PATH_END.py
{ "filename": "bar.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/test-projects/nested-project/shared_libs/bar.py", "type": "Python" }
def get_bar(): return "bar"
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test-projects@nested-project@shared_libs@bar.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="volume.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@colorbar@title@_text.py@.PATH_END.py
{ "filename": "variables.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/common/variables.py", "type": "Python" }
import numpy as np from keras.src import backend from keras.src.api_export import keras_export from keras.src.backend import config from keras.src.backend.common import dtypes from keras.src.backend.common import global_state from keras.src.backend.common.name_scope import current_path from keras.src.backend.common.st...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@common@variables.py@.PATH_END.py
{ "filename": "evol.py", "repo_name": "TeamLEGWORK/LEGWORK", "repo_path": "LEGWORK_extracted/LEGWORK-main/legwork/evol.py", "type": "Python" }
"""Functions using equations from Peters and Mathews (1964) to calculate inspiral times and evolve binary parameters.""" import legwork.utils as utils from numba import jit, njit import numba as nb from scipy.integrate import odeint, quad import numpy as np import astropy.units as u import astropy.constants as c from ...
TeamLEGWORKREPO_NAMELEGWORKPATH_START.@LEGWORK_extracted@LEGWORK-main@legwork@evol.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sunburst.hoverlabel", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@hoverlabel@_bordercolor.py@.PATH_END.py
{ "filename": "versioning.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/workflow/versioning.py", "type": "Python" }
# Copyright (C) 2023 Gareth Cabourn Davies # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distrib...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@workflow@versioning.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "AarhusCosmology/connect_public", "repo_path": "connect_public_extracted/connect_public-main/docs/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
AarhusCosmologyREPO_NAMEconnect_publicPATH_START.@connect_public_extracted@connect_public-main@docs@conf.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/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...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="splom.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "Max_Like.ipynb", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/docs/nb/Max_Like.ipynb", "type": "Jupyter Notebook" }
# Max likelihood ```python # imports from importlib import reload import pandas import numpy as np from scipy import special import seaborn as sns import mpmath from matplotlib import pyplot as plt ``` # Generate a faux sample ## Let $E_{\rm max} = 10^{50}$ and $E_{\rm th} = 10^{40}$ ```python gamma = -2. ``` ...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@docs@nb@Max_Like.ipynb@.PATH_END.py
{ "filename": "measure_relativistic_biases.ipynb", "repo_name": "MikeSWang/HorizonGRound", "repo_path": "HorizonGRound_extracted/HorizonGRound-master/application/publication/measure_relativistic_biases.ipynb", "type": "Jupyter Notebook" }
# Measurements of Relativistic Biases Set up the appropriate paths. ```python import os, sys current_file_dir = os.getcwd() sys.path.insert(0, "".join([current_file_dir, "/../"])) os.environ['HDF5_USE_FILE_LOCKING'] = 'FALSE' from config.program import data_dir, stylesheet publication_dir = data_dir/"output"/"pub...
MikeSWangREPO_NAMEHorizonGRoundPATH_START.@HorizonGRound_extracted@HorizonGRound-master@application@publication@measure_relativistic_biases.ipynb@.PATH_END.py
{ "filename": "common.py", "repo_name": "f4hzg/p2Gravity", "repo_path": "p2Gravity_extracted/p2Gravity-main/p2Gravity/common.py", "type": "Python" }
#coding: utf8 import sys # a function to find an item on the p2 server. # I took this from the old version of the GRAVITY p2 tools def find_item(item_name, containerId, api, item_type=None): items, itemsVersion = api.getItems(containerId) for it in items: b_name = it['name'] == item_name if it...
f4hzgREPO_NAMEp2GravityPATH_START.@p2Gravity_extracted@p2Gravity-main@p2Gravity@common.py@.PATH_END.py
{ "filename": "ModelReaderTesting_GITM.ipynb", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/Validation/Notebooks/ModelReaderTesting_GITM.ipynb", "type": "Jupyter Notebook" }
# Demo notebook for Model Reader ```python # Delete the time files before running. model = 'GITM' variables_requested = ['T_n', 'TEC'] # one variable from each coordinate # change file path to where data is stored on your machine file_dir = 'D:/GITM/jasoon_shim_071418_IT_1_tenth/' from os.path import isfile from os ...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@Validation@Notebooks@ModelReaderTesting_GITM.ipynb@.PATH_END.py
{ "filename": "check_results.py", "repo_name": "rometsch/fargocpt", "repo_path": "fargocpt_extracted/fargocpt-master/test/dust_diffusion/check_results.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import yaml from datetime import datetime from load_dust import get_sigma_dust from fargocpt import Loader def test(_): datadir = "../../output/tests/dust_diffusion/out" fig, axs = plt.subplots(2, 1, dpi=150) axs = axs.flatten() ax = axs[0] tof...
rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@test@dust_diffusion@check_results.py@.PATH_END.py
{ "filename": "im.md", "repo_name": "myrafproject/myrafproject", "repo_path": "myrafproject_extracted/myrafproject-main/example/command_line/im.md", "type": "Markdown" }
# im MYRaf includes a suite of command-line tools known as `im`. The `im` tool leverages several capabilities from the `myraflib` library, providing powerful functionalities at your fingertips. usage: im [-h] {header,hedit,arith,value,stat,bin,crop,rotate,shift,clean,show,align,p2s,s2p,map2sky} ... ## MYRaf Comma...
myrafprojectREPO_NAMEmyrafprojectPATH_START.@myrafproject_extracted@myrafproject-main@example@command_line@im.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/erg/satellite/erg/xep/__init__.py", "type": "Python" }
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@erg@satellite@erg@xep@__init__.py@.PATH_END.py
{ "filename": "_griddash.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/geo/lataxis/_griddash.py", "type": "Python" }
import _plotly_utils.basevalidators class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.geo.lataxis", **kwargs ): super(GriddashValidator, self).__init__( plotly_name=plotly_name, parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@geo@lataxis@_griddash.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "ofionnad/radiowinds", "repo_path": "radiowinds_extracted/radiowinds-master/setup.py", "type": "Python" }
import setuptools with open("READMEpypi.md", "r") as fh: long_description = fh.read() setuptools.setup( name="radiowinds", version="1.2", author="Dualta O Fionnagain", author_email="ofionnad@tcd.ie", description="A package to calculate the thermal free-free emission from stellar winds", lo...
ofionnadREPO_NAMEradiowindsPATH_START.@radiowinds_extracted@radiowinds-master@setup.py@.PATH_END.py
{ "filename": "meetings.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/doc/meetings.md", "type": "Markdown" }
# Meetings [TOC] # Upcoming meetings {#meetings-upcoming} ## AMRVAC/BHAC Code Developer's [ABCD] meeting 30 March - 3 April 2020 * Location: KU Leuven, Belgium * Organization: R. Keppens ### Participants * Rony Keppens * Jannis Teunissen * Oliver Porth * Chun Xia * Yang Guo * Bart Ripperda * Fabio Bacchini * Niel...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@doc@meetings.md@.PATH_END.py
{ "filename": "conv.py", "repo_name": "sambit-giri/tools21cm", "repo_path": "tools21cm_extracted/tools21cm-master/src/tools21cm/conv.py", "type": "Python" }
''' Various values and functions to deal with unit conversions regarding file types ''' from . import const import numpy as np from . import helper_functions as hf #Conversion factors and other stuff relating to C2Ray simulations boxsize=244.0 LB=boxsize/const.h nbox_fine=8000 M_box = const.rho_matter*(LB*const...
sambit-giriREPO_NAMEtools21cmPATH_START.@tools21cm_extracted@tools21cm-master@src@tools21cm@conv.py@.PATH_END.py
{ "filename": "spawnbase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pexpect/py2/pexpect/spawnbase.py", "type": "Python" }
from io import StringIO, BytesIO import codecs import os import sys import re import errno from .exceptions import ExceptionPexpect, EOF, TIMEOUT from .expect import Expecter, searcher_string, searcher_re PY3 = (sys.version_info[0] >= 3) text_type = str if PY3 else unicode class _NullCoder(object): """Pass bytes ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pexpect@py2@pexpect@spawnbase.py@.PATH_END.py
{ "filename": "_token.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/stream/_token.py", "type": "Python" }
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="token", parent_name="carpet.stream", **kwargs): super(TokenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@stream@_token.py@.PATH_END.py
{ "filename": "data_structures.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/gadget/data_structures.py", "type": "Python" }
import os import struct import numpy as np from yt.data_objects.static_output import ParticleFile from yt.fields.field_info_container import FieldInfoContainer from yt.frontends.sph.data_structures import SPHDataset, SPHParticleIndex from yt.funcs import only_on_root from yt.geometry.geometry_handler import Index fro...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@gadget@data_structures.py@.PATH_END.py
{ "filename": "Tutorial-Min_Max_and_Piecewise_Expressions.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/Tutorial-Min_Max_and_Piecewise_Expressions.ipynb", "type": "Jupyter Notebook" }
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Removing `if` Statements from Expressions ## Author: Pa...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Tutorial-Min_Max_and_Piecewise_Expressions.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/framework/__init__.py", "type": "Python" }
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@framework@__init__.py@.PATH_END.py
{ "filename": "flatmapped.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/flatmapped.py", "type": "Python" }
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@hypothesis@py3@hypothesis@strategies@_internal@flatmapped.py@.PATH_END.py
{ "filename": "sparse_to_dense_op_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/tests/sparse_to_dense_op_test.py", "type": "Python" }
# Copyright 2015 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@compiler@tests@sparse_to_dense_op_test.py@.PATH_END.py
{ "filename": "test_projection.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/data_objects/tests/test_projection.py", "type": "Python" }
import os import tempfile from unittest import mock import numpy as np from numpy.testing import assert_equal from yt.testing import assert_rel_equal, fake_amr_ds, fake_random_ds from yt.units.unit_object import Unit LENGTH_UNIT = 2.0 def setup_module(): from yt.config import ytcfg ytcfg["yt", "internals"...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@data_objects@tests@test_projection.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "drufat/licpy", "repo_path": "licpy_extracted/licpy-master/licpy/command/__init__.py", "type": "Python" }
drufatREPO_NAMElicpyPATH_START.@licpy_extracted@licpy-master@licpy@command@__init__.py@.PATH_END.py
{ "filename": "histo.py", "repo_name": "veusz/veusz", "repo_path": "veusz_extracted/veusz-master/veusz/widgets/histo.py", "type": "Python" }
# Copyright (C) 2020 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
veuszREPO_NAMEveuszPATH_START.@veusz_extracted@veusz-master@veusz@widgets@histo.py@.PATH_END.py
{ "filename": "setup_package.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/sdss/setup_package.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os def get_package_data(): paths = [os.path.join('data', '*.json')] return {'astroquery.sdss': paths}
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@sdss@setup_package.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatter3d/projection/_y.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.projection" _path_str = "scatter3d.projection.y" _valid_props = {"opacity", "scale", "s...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter3d@projection@_y.py@.PATH_END.py
{ "filename": "classifier.py", "repo_name": "kboone/avocado", "repo_path": "avocado_extracted/avocado-master/avocado/classifier.py", "type": "Python" }
import numpy as np import os import pandas as pd from tqdm import tqdm from .settings import settings from .utils import logger, AvocadoException def get_classifier_path(name): """Get the path to where a classifier should be stored on disk Parameters ---------- name : str The unique name for...
kbooneREPO_NAMEavocadoPATH_START.@avocado_extracted@avocado-master@avocado@classifier.py@.PATH_END.py
{ "filename": "py_to_py_cls.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/dnn/dnn_model_runner/dnn_conversion/pytorch/classification/py_to_py_cls.py", "type": "Python" }
from torchvision import models from ..pytorch_model import ( PyTorchModelPreparer, PyTorchModelProcessor, PyTorchDnnModelProcessor ) from ...common.evaluation.classification.cls_data_fetcher import PyTorchPreprocessedFetch from ...common.test.cls_model_test_pipeline import ClsModelTestPipeline from ...comm...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@dnn_model_runner@dnn_conversion@pytorch@classification@py_to_py_cls.py@.PATH_END.py
{ "filename": "gridsearch_test.py", "repo_name": "keras-team/keras-tuner", "repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/tuners/gridsearch_test.py", "type": "Python" }
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@tuners@gridsearch_test.py@.PATH_END.py
{ "filename": "utility_random_walk.py", "repo_name": "knaidoo29/mistree", "repo_path": "mistree_extracted/mistree-master/mistree/levy_flight/utility_random_walk.py", "type": "Python" }
import numpy as np from numba import njit @njit def random_walk_fast_2d(step_size, phi, box_size, x_start, y_start, periodic, length): """Python implementation of a 2D random walk with periodic boundary conditions. Parameters ---------- step_size : array Array of step sizes. phi : array ...
knaidoo29REPO_NAMEmistreePATH_START.@mistree_extracted@mistree-master@mistree@levy_flight@utility_random_walk.py@.PATH_END.py
{ "filename": "_texttemplatesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/_texttemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="icicle", **kwargs): super(TexttemplatesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@_texttemplatesrc.py@.PATH_END.py
{ "filename": "_yanchor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/colorbar/_yanchor.py", "type": "Python" }
import _plotly_utils.basevalidators class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatter3d.marker.colorbar", **kwargs ): super(YanchorValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@colorbar@_yanchor.py@.PATH_END.py
{ "filename": "private.py", "repo_name": "maxmahlke/classy", "repo_path": "classy_extracted/classy-main/classy/sources/private.py", "type": "Python" }
"""Module to add private spectra sources to classy.""" from pathlib import Path import shutil import pandas as pd import rocks from classy import config from classy import index from classy.utils.logging import logger def parse_index(PATH_INDEX): """Parse the user-passed index file of the private spectra reposi...
maxmahlkeREPO_NAMEclassyPATH_START.@classy_extracted@classy-main@classy@sources@private.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "jkrogager/VoigtFit", "repo_path": "VoigtFit_extracted/VoigtFit-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # VoigtFit documentation build configuration file, created by # sphinx-quickstart on Fri Nov 3 12:35:09 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
jkrogagerREPO_NAMEVoigtFitPATH_START.@VoigtFit_extracted@VoigtFit-master@docs@conf.py@.PATH_END.py
{ "filename": "test_encoding.py", "repo_name": "dask/fastparquet", "repo_path": "fastparquet_extracted/fastparquet-main/fastparquet/test/test_encoding.py", "type": "Python" }
"""test_encoding.py - tests for deserializing parquet data.""" import numpy as np import struct import fastparquet.encoding from fastparquet import cencoding from fastparquet import parquet_thrift def test_int32(): """Test reading bytes containing int32 data.""" assert 999 == fastparquet.encoding.read_plain(...
daskREPO_NAMEfastparquetPATH_START.@fastparquet_extracted@fastparquet-main@fastparquet@test@test_encoding.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="splom.marker.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "test_p2p_obj_matched.py", "repo_name": "mpi4py/mpi4py", "repo_path": "mpi4py_extracted/mpi4py-master/test/test_p2p_obj_matched.py", "type": "Python" }
from mpi4py import MPI import mpiunittest as unittest _basic = [ None, True, False, -7, 0, 7, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = list(_basic) messages += [ list(_basic), tuple(_basic), {f'k{k}': v for k, v in enumerate(_basic)}, ] @unittest....
mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_p2p_obj_matched.py@.PATH_END.py
{ "filename": "_token.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/stream/_token.py", "type": "Python" }
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="token", parent_name="barpolar.stream", **kwargs): super(TokenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@stream@_token.py@.PATH_END.py
{ "filename": "ipyroot.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/ipyroot.py", "type": "Python" }
#!/usr/bin/env ipython import ROOT from IPython.iplib import InteractiveShell import IPython.Magic ############ Prefilter to understand Python/CINT command mode ########### def prefilter_cint(self, line, continuation): if line: if line.startswith(".r"): print "ROOT mode" if self._ci...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@ipyroot.py@.PATH_END.py
{ "filename": "command_line.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/core/profiler/g3doc/command_line.md", "type": "Markdown" }
## Command Line Interface Tutorials * [Command Line Inputs](#command-line-inputs) * [Start `tfprof`](#start-tfprof) * [Examples](#examples) * [Profile Python Time](#profile-python-time) * [Profile Graph Time](#profile-graph-time) * [Profile Checkpoint Value](#profile-checkpoint-value) * [Profile Model Paramete...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@core@profiler@g3doc@command_line.md@.PATH_END.py
{ "filename": "test_hdf5_dataset.py", "repo_name": "ML4GW/ml4gw", "repo_path": "ml4gw_extracted/ml4gw-main/tests/dataloading/test_hdf5_dataset.py", "type": "Python" }
import h5py import numpy as np import pytest from ml4gw.dataloading import Hdf5TimeSeriesDataset class TestHdf5TimeSeriesDataset: @pytest.fixture def channels(self): return ["A", "B"] @pytest.fixture def sample_rate(self): return 128 @pytest.fixture def kernel_size(self, sam...
ML4GWREPO_NAMEml4gwPATH_START.@ml4gw_extracted@ml4gw-main@tests@dataloading@test_hdf5_dataset.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "dtamayo/spock", "repo_path": "spock_extracted/spock-master/README.md", "type": "Markdown" }
# SPOCK 🖖 **Stability of Planetary Orbital Configurations Klassifier** [![image](https://badge.fury.io/py/spock.svg)](https://badge.fury.io/py/spock) [![image](https://travis-ci.com/dtamayo/spock.svg?branch=master)](https://travis-ci.com/dtamayo/spock) [![image](http://img.shields.io/badge/license-GPL-green.svg?styl...
dtamayoREPO_NAMEspockPATH_START.@spock_extracted@spock-master@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- import warnings import json from tarfile import TarFile from pkgutil import get_data from io import BytesIO from contextlib import closing from dateutil.tz import tzfile __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata", "rebuild"] ZONEFILENAME = "dateutil-zoneinfo.tar.gz" MET...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@dateutil@zoneinfo@__init__.py@.PATH_END.py
{ "filename": "test_cco_obj.py", "repo_name": "mpi4py/mpi4py", "repo_path": "mpi4py_extracted/mpi4py-master/test/test_cco_obj.py", "type": "Python" }
from mpi4py import MPI import mpiunittest as unittest from functools import reduce cumsum = lambda seq: reduce(lambda x, y: x+y, seq, 0) cumprod = lambda seq: reduce(lambda x, y: x*y, seq, 1) _basic = [ None, True, False, -7, 0, 7, 2**31, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, '...
mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_cco_obj.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ML4GW/amplfi", "repo_path": "amplfi_extracted/amplfi-main/amplfi/train/architectures/__init__.py", "type": "Python" }
ML4GWREPO_NAMEamplfiPATH_START.@amplfi_extracted@amplfi-main@amplfi@train@architectures@__init__.py@.PATH_END.py
{ "filename": "literal.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/typing/tests/data/pass/literal.py", "type": "Python" }
from __future__ import annotations from functools import partial from collections.abc import Callable import pytest # type: ignore import numpy as np AR = np.array(0) AR.setflags(write=False) KACF = frozenset({None, "K", "A", "C", "F"}) ACF = frozenset({None, "A", "C", "F"}) CF = frozenset({None, "C", "F"}) order...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@typing@tests@data@pass@literal.py@.PATH_END.py
{ "filename": "_legendrank.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scatter3d", **kwargs): super(LegendrankValidator, 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@scatter3d@_legendrank.py@.PATH_END.py
{ "filename": "example_5_radial_velocity.py", "repo_name": "GijsMulders/epos", "repo_path": "epos_extracted/epos-master/EPOS/scriptdir/examples/example_5_radial_velocity.py", "type": "Python" }
#! /usr/bin/env ipython ''' Example script fitting a power-law in period and M sin i to radial velocity data ''' import EPOS ''' initialize the EPOS class ''' epos= EPOS.epos(name='example_5', RV=True, MC=False, Msini=True) ''' load the exoplanets and completeness from Mayor+ 2011, Fernandes+ 2018''' obs, survey= EP...
GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@scriptdir@examples@example_5_radial_velocity.py@.PATH_END.py
{ "filename": "_pi_gamma.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/form_factors/vector/_pi_gamma.py", "type": "Python" }
"""Implementation of the pi-gamma form factor.""" # pylint: disable=invalid-name from dataclasses import InitVar, dataclass, field from typing import overload import numpy as np from hazma import parameters from hazma.utils import ComplexArray, ComplexOrComplexArray, RealArray, RealOrRealArray from ._alpha import ...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@form_factors@vector@_pi_gamma.py@.PATH_END.py
{ "filename": "_test_bk.py", "repo_name": "changhoonhahn/pySpectrum", "repo_path": "pySpectrum_extracted/pySpectrum-master/run/_test_bk.py", "type": "Python" }
''' Test Nseries box bispectrum by comparing to outputs of Roman's code ''' import os import h5py import numpy as np # -- pyspectrum -- from pyspectrum import util as UT from pyspectrum import pyspectrum as pySpec # -- plotting -- import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['text.usetex'...
changhoonhahnREPO_NAMEpySpectrumPATH_START.@pySpectrum_extracted@pySpectrum-master@run@_test_bk.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/schema/mutations/scheduler/__init__.py", "type": "Python" }
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@schema@mutations@scheduler@__init__.py@.PATH_END.py
{ "filename": "_showtickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/_showtickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.ternary.aaxis", **kwargs ): super(ShowtickprefixValidator, self).__init__( plotly_name=plotly_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@_showtickprefix.py@.PATH_END.py
{ "filename": "ConstantVelocityBoundaryInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Boundary/ConstantVelocityBoundaryInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Boundary/ConstantVelocityBoundary.cc" #include "Geometry/Dimension.hh" namespace Spheral { template class C...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Boundary@ConstantVelocityBoundaryInst.cc.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "exoclime/FastChem", "repo_path": "FastChem_extracted/FastChem-master/setup.py", "type": "Python" }
from glob import glob import os import sys from setuptools import setup, Extension import tempfile from pybind11.setup_helpers import Pybind11Extension, build_ext from distutils.dir_util import mkpath from distutils.errors import CCompilerError from distutils import sysconfig __version__ = "3.1.2" def __read__(file_...
exoclimeREPO_NAMEFastChemPATH_START.@FastChem_extracted@FastChem-master@setup.py@.PATH_END.py
{ "filename": "ttv_test.py", "repo_name": "exoplanet-dev/exoplanet", "repo_path": "exoplanet_extracted/exoplanet-main/tests/orbits/ttv_test.py", "type": "Python" }
import numpy as np from exoplanet.compat import function from exoplanet.orbits.keplerian import KeplerianOrbit from exoplanet.orbits.ttv import TTVOrbit, compute_expected_transit_times def test_compute_expected_transit_times(): periods = [10.5, 56.34] t0s = [45.3, 48.1] min_time = 456.023 max_time = ...
exoplanet-devREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@tests@orbits@ttv_test.py@.PATH_END.py
{ "filename": "protocol.py", "repo_name": "grand-mother/grand", "repo_path": "grand_extracted/grand-main/grand/io/protocol.py", "type": "Python" }
import ssl import urllib.request import zlib import logging logger = logging.getLogger(__name__) def _disable_certs() -> None: """Disable certificates check""" try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_...
grand-motherREPO_NAMEgrandPATH_START.@grand_extracted@grand-main@grand@io@protocol.py@.PATH_END.py
{ "filename": "hypothesis_levene.md", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/source/tutorial/stats/hypothesis_levene.md", "type": "Markdown" }
--- jupytext: text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.1 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3 --- ```{eval-rst} .. jupyterlite:: ../../_contents/hypothesis_levene.ipynb :new_tab: True ``` (hypo...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@source@tutorial@stats@hypothesis_levene.md@.PATH_END.py
{ "filename": "fitting_and_plotting.ipynb", "repo_name": "jpierel14/sntd", "repo_path": "sntd_extracted/sntd-master/notebooks/fitting_and_plotting.ipynb", "type": "Jupyter Notebook" }
```python import sys try: import sntd except: try: sys.path.append('../') import sntd except: !pip install sntd import sntd import numpy as np import matplotlib.pyplot as plt ``` ```python myMISN = sntd.createMultiplyImagedSN(sourcename='salt2-extended', snType='Ia', redshi...
jpierel14REPO_NAMEsntdPATH_START.@sntd_extracted@sntd-master@notebooks@fitting_and_plotting.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "LSSTDESC/snmachine", "repo_path": "snmachine_extracted/snmachine-main/test/README.md", "type": "Markdown" }
## Unit Tests To execute the full test suite, go into the `test` folder and run: ``` py.test [flags] [arguments] ``` You can use the following flags (all optional): `-h`: print a full list of flags `-v`: verbose mode `-s`: enable stdout capture `-mpl`: plots will explicitly be compared to the baseline pl...
LSSTDESCREPO_NAMEsnmachinePATH_START.@snmachine_extracted@snmachine-main@test@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "petigura/specmatch-syn", "repo_path": "specmatch-syn_extracted/specmatch-syn-master/smsyn/inst/apf/__init__.py", "type": "Python" }
petiguraREPO_NAMEspecmatch-synPATH_START.@specmatch-syn_extracted@specmatch-syn-master@smsyn@inst@apf@__init__.py@.PATH_END.py
{ "filename": "combining.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/output_parsers/combining.py", "type": "Python" }
from __future__ import annotations from typing import Any, Dict, List from langchain_core.output_parsers import BaseOutputParser from langchain_core.utils import pre_init class CombiningOutputParser(BaseOutputParser[Dict[str, Any]]): """Combine multiple output parsers into one.""" parsers: List[BaseOutputP...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@output_parsers@combining.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="histogram2dcontour", **kwargs ): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_marker.py@.PATH_END.py
{ "filename": "cfis-compress.py", "repo_name": "legacysurvey/imagine", "repo_path": "imagine_extracted/imagine-main/cfis-compress.py", "type": "Python" }
import os from glob import glob import numpy as np import fitsio from astrometry.util.fits import fits_table from astrometry.util.multiproc import multiproc def one_file(fn): fn = fn.strip() #fn = os.path.join('/data/CFIS', fn) #outfn = fn.replace('tiles-dr2', 'compressed/tiles-dr2') infn = os.path.joi...
legacysurveyREPO_NAMEimaginePATH_START.@imagine_extracted@imagine-main@cfis-compress.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/domain/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="parcats.domain", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_t...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcats@domain@_y.py@.PATH_END.py
{ "filename": "trim.py", "repo_name": "LCOGT/banzai", "repo_path": "banzai_extracted/banzai-main/banzai/trim.py", "type": "Python" }
from banzai.logs import get_logger from banzai.stages import Stage logger = get_logger() class Trimmer(Stage): def __init__(self, runtime_context): super(Trimmer, self).__init__(runtime_context) def do_stage(self, image): logger.info('Trimming image', image=image) # TODO: this enumer...
LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@trim.py@.PATH_END.py
{ "filename": "test_deblend.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/photutils/segmentation/tests/test_deblend.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the deblend module. """ import numpy as np import pytest from astropy.modeling.models import Gaussian2D from astropy.utils.exceptions import AstropyUserWarning from numpy.testing import assert_allclose, assert_equal from photutils.segmentat...
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@segmentation@tests@test_deblend.py@.PATH_END.py
{ "filename": "_utils.py", "repo_name": "21cmfast/21CMMC", "repo_path": "21CMMC_extracted/21CMMC-master/src/py21cmmc/_utils.py", "type": "Python" }
"""Utility functions used throughout 21CMMC.""" from collections.abc import Iterable def flatten(items): """Yield items from any nested iterable; see Reference.""" for x in items: if isinstance(x, Iterable) and not isinstance(x, (str, bytes)): yield from flatten(x) else: ...
21cmfastREPO_NAME21CMMCPATH_START.@21CMMC_extracted@21CMMC-master@src@py21cmmc@_utils.py@.PATH_END.py
{ "filename": "_ticks.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/marker/colorbar/_ticks.py", "type": "Python" }
import _plotly_utils.basevalidators class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="splom.marker.colorbar", **kwargs ): super(TicksValidator, self).__init__( plotly_name=plotly_name, parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@marker@colorbar@_ticks.py@.PATH_END.py
{ "filename": "_xhoverformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_xhoverformat.py", "type": "Python" }
import _plotly_utils.basevalidators class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="histogram2d", **kwargs): super(XhoverformatValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_xhoverformat.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/bison/data/README.md", "type": "Markdown" }
This directory contains data needed by Bison. # Directory Content ## Skeletons Bison skeletons: the general shapes of the different parser kinds, that are specialized for specific grammars by the bison program. Currently, the supported skeletons are: - yacc.c It used to be named bison.simple: it corresponds to C Y...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@bison@data@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "MGJvanGroeningen/gaia_oc_amd", "repo_path": "gaia_oc_amd_extracted/gaia_oc_amd-main/gaia_oc_amd/machine_learning/__init__.py", "type": "Python" }
MGJvanGroeningenREPO_NAMEgaia_oc_amdPATH_START.@gaia_oc_amd_extracted@gaia_oc_amd-main@gaia_oc_amd@machine_learning@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tslearn-team/tslearn", "repo_path": "tslearn_extracted/tslearn-main/tslearn/clustering/__init__.py", "type": "Python" }
""" The :mod:`tslearn.clustering` module gathers time series specific clustering algorithms. **User guide:** See the :ref:`Clustering <clustering>` section for further details. """ from .kshape import KShape from .utils import (EmptyClusterError, silhouette_score, TimeSeriesCentroidBasedClusterin...
tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@clustering@__init__.py@.PATH_END.py
{ "filename": "J152527.py", "repo_name": "bronreichardtchu/koffee", "repo_path": "koffee_extracted/koffee-main/galaxy_info/J152527.py", "type": "Python" }
""" NAME: J152527.py AUTHOR: Bronwyn Reichardt Chu Swinburne 2021 EMAIL: <breichardtchu@swin.edu.au> PURPOSE: Keeps the info for J152527 Written on MacOS Mojave 10.14.5, with Python 3.7 """ J152527_red = { #'data_filepath' : '/Users/breichardtchu/Documents/data/J152527/J152527_red_test_data.fits', #...
bronreichardtchuREPO_NAMEkoffeePATH_START.@koffee_extracted@koffee-main@galaxy_info@J152527.py@.PATH_END.py
{ "filename": "gauss1d.py", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/funcFit/gauss1d.py", "type": "Python" }
# -*- coding: utf-8 -*- from __future__ import print_function, division import numpy as np from .onedfit import OneDFit from PyAstronomy.pyaC import pyaErrors as PE class GaussFit1d(OneDFit): """ A one-dimensional Gaussian The functional form is: .. math:: \\frac{A}{\\sqrt{2\\pi\\sigma^2}}e^{-(x-\\m...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@funcFit@gauss1d.py@.PATH_END.py
{ "filename": "CustomPulse_trueback.py", "repo_name": "ThomasEdwardRiley/xpsi-pre-transfer", "repo_path": "xpsi-pre-transfer_extracted/xpsi-pre-transfer-master/examples/true_background/CustomPulse_trueback.py", "type": "Python" }
from __future__ import print_function, division import numpy as np import math import xpsi from xpsi.likelihoods.Poisson_loglike import eval_loglike from xpsi.tools import phase_interpolator from xpsi.tools.phase_integrator import phase_integrator from xpsi.tools.synthesise import synthesise class CustomPulse(xpsi....
ThomasEdwardRileyREPO_NAMExpsi-pre-transferPATH_START.@xpsi-pre-transfer_extracted@xpsi-pre-transfer-master@examples@true_background@CustomPulse_trueback.py@.PATH_END.py
{ "filename": "_z.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_z.py", "type": "Python" }
import _plotly_utils.basevalidators class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="volume", **kwargs): super(ZValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_z.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/title/subtitle/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.title.subtitle", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@title@subtitle@_font.py@.PATH_END.py
{ "filename": "Pk_snapshot.py", "repo_name": "franciscovillaescusa/Pylians", "repo_path": "Pylians_extracted/Pylians-master/library/Pk_library/Pk_snapshot.py", "type": "Python" }
import numpy as np import readgadget import redshift_space_library as RSL import MAS_library as MASL import units_library as UL import Pk_library as PKL import sys,os ########### routines ############ # Pk_comp(snapshot_fname,ptype,dims,do_RSD,axis,cpus) # Pk_Gadget(snapshot_fname,dims,particle_type,do_RSD,axis,cpus) ...
franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@library@Pk_library@Pk_snapshot.py@.PATH_END.py
{ "filename": "pareto.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/scipy/stats/pareto.py", "type": "Python" }
# Copyright 2020 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@stats@pareto.py@.PATH_END.py
{ "filename": "test_casting_floatingpoint_errors.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_casting_floatingpoint_errors.py", "type": "Python" }
import pytest from pytest import param from numpy.testing import IS_WASM import numpy as np def values_and_dtypes(): """ Generate value+dtype pairs that generate floating point errors during casts. The invalid casts to integers will generate "invalid" value warnings, the float casts all generate "ove...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_casting_floatingpoint_errors.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "ML4GW/hermes", "repo_path": "hermes_extracted/hermes-main/hermes/quiver/model.py", "type": "Python" }
from dataclasses import dataclass from typing import TYPE_CHECKING, Callable, Dict, Optional, Sequence, Union from hermes.quiver import Platform from hermes.quiver.exporters.utils import find_exporter from hermes.quiver.model_config import ModelConfig if TYPE_CHECKING: from hermes.quiver import ModelRepository ...
ML4GWREPO_NAMEhermesPATH_START.@hermes_extracted@hermes-main@hermes@quiver@model.py@.PATH_END.py
{ "filename": "sun.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/mesa_r15140/examples/sun.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np from amuse.units import units from amuse.community.mesa.interface import MESA from amuse import datamodel stellar_evolution = MESA(version='15140') stellar_evolution.parameters.metallicity = 0.0142 masses=[1.0] | units.MSun stars = datamodel.Particles(len(masses), ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@mesa_r15140@examples@sun.py@.PATH_END.py
{ "filename": "kernels.py", "repo_name": "Starfish-develop/Starfish", "repo_path": "Starfish_extracted/Starfish-master/Starfish/models/kernels.py", "type": "Python" }
import numpy as np from typing import List from Starfish import constants as C def global_covariance_matrix( wave: np.ndarray, amplitude: float, lengthscale: float ) -> np.ndarray: """ A matern-3/2 kernel where the metric is defined as the velocity separation of the wavelengths. Parameters -----...
Starfish-developREPO_NAMEStarfishPATH_START.@Starfish_extracted@Starfish-master@Starfish@models@kernels.py@.PATH_END.py
{ "filename": "chroma.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/chroma.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import Chroma # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@chroma.py@.PATH_END.py
{ "filename": "test_jax_terms.py", "repo_name": "exoplanet-dev/celerite2", "repo_path": "celerite2_extracted/celerite2-main/python/test/jax/test_jax_terms.py", "type": "Python" }
# -*- coding: utf-8 -*- from functools import partial import numpy as np import pytest pytest.importorskip("celerite2.jax") try: import jax from jax import config from celerite2 import terms as pyterms from celerite2.jax import terms from celerite2.testing import check_tensor_term except (Import...
exoplanet-devREPO_NAMEcelerite2PATH_START.@celerite2_extracted@celerite2-main@python@test@jax@test_jax_terms.py@.PATH_END.py
{ "filename": "allresults.py", "repo_name": "darrencroton/sage", "repo_path": "sage_extracted/sage-master/output/allresults.py", "type": "Python" }
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') # import h5py as h5 import numpy as np import pylab as plt from random import sample, seed from os.path import getsize as getFileSize # ================================================================================ # Basic variables # ==================...
darrencrotonREPO_NAMEsagePATH_START.@sage_extracted@sage-master@output@allresults.py@.PATH_END.py
{ "filename": "LASP_VISUALIZATION.md", "repo_name": "spaceml-org/karman", "repo_path": "karman_extracted/karman-main/LASP_VISUALIZATION.md", "type": "Markdown" }
## Visualization The thermospheric density values shown in this visualization are "hindcast" values predicted by the Karman ML model using input data from 100 minutes prior to the date and time selected by the user. The model is valid for altitudes from 200 to 600 km above mean sea level (AMSL). ## AI Trust and Bench...
spaceml-orgREPO_NAMEkarmanPATH_START.@karman_extracted@karman-main@LASP_VISUALIZATION.md@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@marker@colorbar@_xpad.py@.PATH_END.py