metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "utils.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/data/utils.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import astropy.units as u from astropy.table import Table from gammapy.utils.cluster import standard_scaler __all__ = ["get_irfs_features"] def get_irfs_features( observations, energy_true, position=None, fixed_offset=...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@data@utils.py@.PATH_END.py
{ "filename": "ex_start_container.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/test/management/ex_start_container.py", "type": "Python" }
# Copyright (c) typedef int GmbH, licensed under The MIT License (MIT) import asyncio from autobahn.wamp.exception import ApplicationError from crossbar.shell import client CONTAINER_ID = u'my-container1' CONTAINER_OPTIONS = {u'pythonpath': [u'..']} COMPONENT_ID = u'my-component{}' COMPONENT_CONFIG = { u'typ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@management@ex_start_container.py@.PATH_END.py
{ "filename": "test_qotree.py", "repo_name": "spacepy/spacepy", "repo_path": "spacepy_extracted/spacepy-main/spacepy/sandbox/test_qotree.py", "type": "Python" }
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- """ Test suite for qotree Copyright 2010 Los Alamos National Security, LLC. """ import unittest import numpy import qotree class branchTests(unittest.TestCase): def setUp(self): super(branchTests, self).setUp() def tearDown(self): super(bran...
spacepyREPO_NAMEspacepyPATH_START.@spacepy_extracted@spacepy-main@spacepy@sandbox@test_qotree.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/formula/api.py", "type": "Python" }
import statsmodels.regression.linear_model as lm_ import statsmodels.discrete.discrete_model as dm_ import statsmodels.discrete.conditional_models as dcm_ import statsmodels.regression.mixed_linear_model as mlm_ import statsmodels.genmod.generalized_linear_model as glm_ import statsmodels.robust.robust_linear_model as ...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@formula@api.py@.PATH_END.py
{ "filename": "output-data_roc-curve-points.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/output-data_roc-curve-points.md", "type": "Markdown" }
# ROC curve points #### {{ output--contains }} Points of the ROC curve. #### {{ output__header-format }} {% include [reusage-formats-header__intro](../_includes/work_src/reusage-formats/header__intro.md) %} Format: ``` FPR</t>TPR</t>Threshold ``` - `FPR` is the false positive rate. - `TPR` is the true positive rat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@output-data_roc-curve-points.md@.PATH_END.py
{ "filename": "channel_maps_v2.py", "repo_name": "danielrd6/ifscube", "repo_path": "ifscube_extracted/ifscube-master/ifscube/examples/channel_maps_v2.py", "type": "Python" }
import pickle from astropy.units import Quantity from ifscube import Cube from ifscube import channel_maps def main(): evaluate_maps = False if evaluate_maps: fw = Quantity(value=[4900, 5100], unit="Angstrom") cube = Cube("/home/daniel/repos/channel_outflows/test_galaxy.fits") cm = c...
danielrd6REPO_NAMEifscubePATH_START.@ifscube_extracted@ifscube-master@ifscube@examples@channel_maps_v2.py@.PATH_END.py
{ "filename": "photometry.ipynb", "repo_name": "PetroFit/petrofit", "repo_path": "petrofit_extracted/petrofit-main/docs/photometry.ipynb", "type": "Jupyter Notebook" }
# Photometry To measure the Petrosian properties of galaxies, we construct a photometric curve of growth using a set of concentric apertures with varying radii to measure the flux. From this curve of growth, we will measure different properties of the galaxy including the total flux, characteristic radii such as the P...
PetroFitREPO_NAMEpetrofitPATH_START.@petrofit_extracted@petrofit-main@docs@photometry.ipynb@.PATH_END.py
{ "filename": "_hovertextsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/_hovertextsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="icicle", **kwargs): super(HovertextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@_hovertextsrc.py@.PATH_END.py
{ "filename": "bhattacharya13.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/halos/concentration/bhattacharya13.py", "type": "Python" }
__all__ = ("ConcentrationBhattacharya13",) from . import Concentration, get_delta_c class ConcentrationBhattacharya13(Concentration): """Concentration-mass relation by `Bhattacharya et al. 2013 <https://arxiv.org/abs/1112.5479>`_. This parametrization is only valid for S.O. masses with :math:`\\Delta = \...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@halos@concentration@bhattacharya13.py@.PATH_END.py
{ "filename": "_streamtube.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/template/data/_streamtube.py", "type": "Python" }
from plotly.graph_objs import Streamtube
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@template@data@_streamtube.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterpolar.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@hoverlabel@font@_familysrc.py@.PATH_END.py
{ "filename": "template.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/node/template.py", "type": "Python" }
##################################################################################### # # Copyright (c) typedef int GmbH # SPDX-License-Identifier: EUPL-1.2 # ##################################################################################### import sys import os import shutil import pkg_resources import jinja2 f...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@node@template.py@.PATH_END.py
{ "filename": "7_plot_trigger_efficiency.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/examples/cr_efficiency_analysis/7_plot_trigger_efficiency.py", "type": "Python" }
import numpy as np import json import matplotlib.pyplot as plt filename = 'results/air_shower/dict_air_shower_pb_80_180_e7_z9_d2_4000.json' with open(filename, 'r') as fp: data = json.load(fp) distance_bins_low = np.array(data['distance_bins_low']) energy_bins_low = np.array(data['energy_bins_low']) zenith_bins_...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@examples@cr_efficiency_analysis@7_plot_trigger_efficiency.py@.PATH_END.py
{ "filename": "test_nddata.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/astrodata/tests/test_nddata.py", "type": "Python" }
import warnings import numpy as np import pytest from numpy.testing import assert_array_almost_equal, assert_array_equal from astrodata.fits import windowedOp from astrodata import wcs as adwcs from astrodata.nddata import ADVarianceUncertainty, NDAstroData from astropy.io import fits from astropy.nddata import NDDat...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@astrodata@tests@test_nddata.py@.PATH_END.py
{ "filename": "websocket.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-server/vaex/server/websocket.py", "type": "Python" }
import asyncio import logging import vaex import vaex.asyncio import vaex.core._version import vaex.server._version import vaex.server.dataframe from vaex.encoding import serialize, deserialize, Encoding from .utils import exception TEST_LATENCY = 0 logger = logging.getLogger("vaex.webserver.websocket") class Web...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-server@vaex@server@websocket.py@.PATH_END.py
{ "filename": "parameters_gmos_spect.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/parameters_gmos_spect.py", "type": "Python" }
# This parameter file contains the parameters related to the primitives located # in the primitives_gmos_spect.py file, in alphabetical order. from astrodata import AstroData from gempy.library import config from geminidr.core import parameters_spect, parameters_preprocess from geminidr.core import parameters_generic ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@parameters_gmos_spect.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/textfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.textfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@textfont@_family.py@.PATH_END.py
{ "filename": "multivariate.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/distributions/multivariate.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@distributions@multivariate.py@.PATH_END.py
{ "filename": "domain_context.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/fields/domain_context.py", "type": "Python" }
import abc from yt._typing import FieldKey domain_context_registry = {} class DomainContext(abc.ABC): class __metaclass__(type): def __init__(cls, name, b, d): type.__init__(cls, name, b, d) domain_context_registry[name] = cls _known_fluid_fields: tuple[FieldKey, ...] _k...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@domain_context.py@.PATH_END.py
{ "filename": "intersim.py", "repo_name": "gbrammer/unicorn", "repo_path": "unicorn_extracted/unicorn-master/intersim.py", "type": "Python" }
""" Simulate interlaced spectra. """ import os import glob from pylab import cm import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator import numpy as np #import pyfits import astropy.io.fits as pyfits import unicorn import unicorn.interlace_fit import unicorn.utils_c as utils_c import threed...
gbrammerREPO_NAMEunicornPATH_START.@unicorn_extracted@unicorn-master@intersim.py@.PATH_END.py
{ "filename": "_dash.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py", "type": "Python" }
import _plotly_utils.basevalidators class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="dash", parent_name="funnel.connector.line", **kwargs ): super(DashValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@connector@line@_dash.py@.PATH_END.py
{ "filename": "test_openmp.py", "repo_name": "bwinkel/pycraf", "repo_path": "pycraf_extracted/pycraf-master/pycraf/tests/test_openmp.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from .. import pathprof def test_set_num_threads(): pathprof.set_num_threads(2)
bwinkelREPO_NAMEpycrafPATH_START.@pycraf_extracted@pycraf-master@pycraf@tests@test_openmp.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/decreasing/line/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="ohlc.decreasing.line", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@decreasing@line@_color.py@.PATH_END.py
{ "filename": "check_copyright.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/common/check_copyright.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2018-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@common@check_copyright.py@.PATH_END.py
{ "filename": "recipes_DARK_SLITV.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/ghostdr/ghost/recipes/sq/recipes_DARK_SLITV.py", "type": "Python" }
""" Recipes available to data with tags ``['GHOST', 'SLITV', 'CAL', 'DARK']``. Default is ``makeProcessedSlitDark``. """ recipe_tags = set(['GHOST', 'SLITV', 'CAL', 'DARK']) def makeProcessedSlitDark(p): """ This recipe performs the standardization and corrections needed to convert the raw input dark image...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@ghostdr@ghost@recipes@sq@recipes_DARK_SLITV.py@.PATH_END.py
{ "filename": "stratsi_eqm.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/caseA_Z0.1/stratsi_eqm.py", "type": "Python" }
""" stratified streaming instability equilibrium vertical profiles of horizontal velocities """ ''' import parameters and functions ''' from stratsi_params import * ''' process command line arguements ''' parser = argparse.ArgumentParser() parser.add_argument("--xlim", "-xl", nargs='*', help="set horizontal axis r...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@caseA_Z0.1@stratsi_eqm.py@.PATH_END.py
{ "filename": "_rangefont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/_rangefont.py", "type": "Python" }
import _plotly_utils.basevalidators class RangefontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="rangefont", parent_name="parcoords", **kwargs): super(RangefontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@_rangefont.py@.PATH_END.py
{ "filename": "gradientFieldListSVPHInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/SVPH/gradientFieldListSVPHInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "SVPH/gradientFieldListSVPH.cc" #include "Geometry/Dimension.hh" namespace Spheral { using std::vector; // S...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@SVPH@gradientFieldListSVPHInst.cc.py@.PATH_END.py
{ "filename": "test_half_gaussian.py", "repo_name": "wdpozzo/raynest", "repo_path": "raynest_extracted/raynest-main/raynest/tests/test_half_gaussian.py", "type": "Python" }
import sys import unittest import numpy as np from scipy import integrate,stats import raynest import raynest.model import matplotlib as mpl mpl.use('Agg') from matplotlib import pyplot as plt class HalfGaussianModel(raynest.model.Model): """ A simple gaussian model with parameters mean and sigma """ d...
wdpozzoREPO_NAMEraynestPATH_START.@raynest_extracted@raynest-main@raynest@tests@test_half_gaussian.py@.PATH_END.py
{ "filename": "simple_axisline4.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/axes_grid1/simple_axisline4.py", "type": "Python" }
""" ================ Simple Axisline4 ================ """ import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.axes_grid1 import host_subplot ax = host_subplot(111) xx = np.arange(0, 2*np.pi, 0.01) ax.plot(xx, np.sin(xx)) ax2 = ax.twin() # ax2 is responsible for "top" axis and "right" axis ax2.set...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@axes_grid1@simple_axisline4.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/aaxis/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.ternary.aaxis", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@aaxis@_tickformat.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/colorbar/title/__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 ._side import SideValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "creating_ndcube_from_fitsfile.py", "repo_name": "sunpy/ndcube", "repo_path": "ndcube_extracted/ndcube-main/examples/creating_ndcube_from_fitsfile.py", "type": "Python" }
""" ======================================================= How to create an NDCube from data stored in a FITS file ======================================================= This example shows how you load in data from a FITS file to create an `~ndcube.NDCube`. Here we will use an example of a single image. """ import ...
sunpyREPO_NAMEndcubePATH_START.@ndcube_extracted@ndcube-main@examples@creating_ndcube_from_fitsfile.py@.PATH_END.py
{ "filename": "predict.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/reference/models/yolo/detect/predict.md", "type": "Markdown" }
--- description: Explore the Ultralytics YOLO Detection Predictor. Learn how to implement and use the DetectionPredictor class for object detection in Python. keywords: YOLO, Ultralytics, DetectionPredictor, object detection, Python, machine learning, AI, non_max_suppression --- # Reference for `ultralytics/models/yol...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@reference@models@yolo@detect@predict.md@.PATH_END.py
{ "filename": "test_progress.py", "repo_name": "ma-xu/pointMLP-pytorch", "repo_path": "pointMLP-pytorch_extracted/pointMLP-pytorch-main/classification_ScanObjectNN/utils/progress/test_progress.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function import random import time from progress.bar import (Bar, ChargingBar, FillingSquaresBar, FillingCirclesBar, IncrementalBar, PixelBar, ShadyBar) from progress.spinner import (Spinner, PieSpinner, MoonSpinne...
ma-xuREPO_NAMEpointMLP-pytorchPATH_START.@pointMLP-pytorch_extracted@pointMLP-pytorch-main@classification_ScanObjectNN@utils@progress@test_progress.py@.PATH_END.py
{ "filename": "exceptions.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/exceptions.py", "type": "Python" }
from _plotly_utils.exceptions import *
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@exceptions.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "mj-will/nessai", "repo_path": "nessai_extracted/nessai-main/src/nessai/plot.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Plotting utilities. """ import functools import logging from typing import List, Optional import matplotlib as mpl import numpy as np import pandas as pd import seaborn as sns from cycler import cycler from matplotlib import pyplot as plt from . import config from .livepoint import live_p...
mj-willREPO_NAMEnessaiPATH_START.@nessai_extracted@nessai-main@src@nessai@plot.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="heatmap.stream", **kwargs): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@stream@_maxpoints.py@.PATH_END.py
{ "filename": "weatherstation.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/interfaces/weatherstation.py", "type": "Python" }
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free S...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@interfaces@weatherstation.py@.PATH_END.py
{ "filename": "removelines_general.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/util/removelines_general.py", "type": "Python" }
#! /usr/bin/env python3 # This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import sys try: import pyfits except ImportError: try: from astropy.io import fits as pyfits except ImportError: raise I...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@util@removelines_general.py@.PATH_END.py
{ "filename": "_ticktextsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/_ticktextsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.baxis", **kwargs): super(TicktextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@baxis@_ticktextsrc.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "PrincetonUniversity/charis-dep", "repo_path": "charis-dep_extracted/charis-dep-main/charis/primitives/setup.py", "type": "Python" }
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_module = Extension("matutils", ['matutils.pyx'], extra_compile_args=['-fopenmp'], extra_link_args=['-fopenmp'], ...
PrincetonUniversityREPO_NAMEcharis-depPATH_START.@charis-dep_extracted@charis-dep-main@charis@primitives@setup.py@.PATH_END.py
{ "filename": "_domain.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/pie/_domain.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "pie" _path_str = "pie.domain" _valid_props = {"column", "row", "x", "y"} # column #...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@pie@_domain.py@.PATH_END.py
{ "filename": "_l.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/updatemenu/pad/_l.py", "type": "Python" }
import _plotly_utils.basevalidators class LValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="l", parent_name="layout.updatemenu.pad", **kwargs): super(LValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@updatemenu@pad@_l.py@.PATH_END.py
{ "filename": "photometry.py", "repo_name": "benmontet/f3", "repo_path": "f3_extracted/f3-master/f3/photometry.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from astropy.io import fits import kplr from scipy.ndimage.measurements import label import mahotas as mh from scipy.ndimage.measurements import center_of_mass from scipy.interpolate import splrep, splev import os from . import files import matplotlib.image as mpimg f...
benmontetREPO_NAMEf3PATH_START.@f3_extracted@f3-master@f3@photometry.py@.PATH_END.py
{ "filename": "plot_svm_margin.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/svm/plot_svm_margin.py", "type": "Python" }
""" ========================================================= SVM Margins Example ========================================================= The plots below illustrate the effect the parameter `C` has on the separation line. A large value of `C` basically tells our model that we do not have that much faith in our data's...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@svm@plot_svm_margin.py@.PATH_END.py
{ "filename": "test_output.py", "repo_name": "ajshajib/dolphin", "repo_path": "dolphin_extracted/dolphin-main/test/test_analysis/test_output.py", "type": "Python" }
# -*- coding: utf-8 -*- """Tests for output module.""" from pathlib import Path import pytest import numpy as np import matplotlib.pyplot as plt from dolphin.processor import Processor from dolphin.analysis.output import Output _ROOT_DIR = Path(__file__).resolve().parents[2] _TEST_IO_DIR = _ROOT_DIR / "io_directory_e...
ajshajibREPO_NAMEdolphinPATH_START.@dolphin_extracted@dolphin-main@test@test_analysis@test_output.py@.PATH_END.py
{ "filename": "_len.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/colorbar/_len.py", "type": "Python" }
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="len", parent_name="heatmap.colorbar", **kwargs): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, e...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@colorbar@_len.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "alibaba/TinyNeuralNetwork", "repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/tinynn/prune/__init__.py", "type": "Python" }
from .base_pruner import * from .oneshot_pruner import * from .admm_pruner import * from .netadapt_pruner import *
alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@tinynn@prune@__init__.py@.PATH_END.py
{ "filename": "Warnings.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/util/Warnings.py", "type": "Python" }
""" Warnings.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Wed Aug 13 14:31:51 MDT 2014 Description: """ import os import sys import textwrap import numpy as np from ..data import ARES from .PrintInfo import twidth, line, tabulate separator = '|'*twidth separator2 = '-'*twid...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@util@Warnings.py@.PATH_END.py
{ "filename": "smooth_cal.py", "repo_name": "HERA-Team/hera_cal", "repo_path": "hera_cal_extracted/hera_cal-main/hera_cal/smooth_cal.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright 2019 the HERA Project # Licensed under the MIT License import numpy as np import scipy from copy import deepcopy import warnings import argparse import pyuvdata from collections.abc import Iterable import hera_filters try: import aipy AIPY = True except ImportError: AIP...
HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@hera_cal@smooth_cal.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/scene/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.scene.annotation" _path_str = "layout.scene.annotation.font" _valid_props = {"color"...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@scene@annotation@_font.py@.PATH_END.py
{ "filename": "pebblo.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/document_loaders/pebblo.ipynb", "type": "Jupyter Notebook" }
# Pebblo Safe DocumentLoader > [Pebblo](https://daxa-ai.github.io/pebblo/) enables developers to safely load data and promote their Gen AI app to deployment without worrying about the organization’s compliance and security requirements. The project identifies semantic topics and entities found in the loaded data and s...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@document_loaders@pebblo.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/hypothesis/py3/hypothesis/strategies/__init__.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@__init__.py@.PATH_END.py
{ "filename": "isomap.py", "repo_name": "COINtoolbox/DRACULA", "repo_path": "DRACULA_extracted/DRACULA-master/CODE/Drac/reduction/isomap.py", "type": "Python" }
from sklearn import manifold from aux import ERROR def reduction(data, params): # parse parameters possible_keys=['n_neighbors','n_components','eigen_solver','tol','max_iter','path_method','neighbors_algorithm',] for item in params: if item not in possible_keys: ERROR(item) if isinstance(params...
COINtoolboxREPO_NAMEDRACULAPATH_START.@DRACULA_extracted@DRACULA-master@CODE@Drac@reduction@isomap.py@.PATH_END.py
{ "filename": "particleoperators.md", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/docs/particleoperators.md", "type": "Markdown" }
# Operators ## Adding, subtracting, multiplying particles REBOUND allows you to multiply particles with scalars. In the code blow, the particle's position and velocity coordinates, and its mass are all multiplied by a constant. === "C" ```c struct reb_simulation* r = reb_simulation_create(); reb_simulatio...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@docs@particleoperators.md@.PATH_END.py
{ "filename": "readers.md", "repo_name": "CHIMEFRB/fitburst", "repo_path": "fitburst_extracted/fitburst-main/docs/developer_guide/readers.md", "type": "Markdown" }
# Writing Data Readers for `fitburst` In a pipeline setting, `fitburst` is designed to isolate all telescope-specific dependencies (e.g., the format and structure of local data archiving servers) to the `backend/` subdirectory. Here, users are encouraged to write Python objects -- using the `utilities.bases.ReaderBase...
CHIMEFRBREPO_NAMEfitburstPATH_START.@fitburst_extracted@fitburst-main@docs@developer_guide@readers.md@.PATH_END.py
{ "filename": "subnet_fourier.ipynb", "repo_name": "mattcraigie/scattering-transform", "repo_path": "scattering-transform_extracted/scattering-transform-master/scattering_transform/examples/subnet_fourier.ipynb", "type": "Jupyter Notebook" }
```python import matplotlib.pyplot as plt from torch.fft import fft2, ifft2, fftshift, rfft2, irfft2 import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset from torch.utils.data import DataLoader, SubsetRandomSampler from torchvision import datasets, transforms import numpy...
mattcraigieREPO_NAMEscattering-transformPATH_START.@scattering-transform_extracted@scattering-transform-master@scattering_transform@examples@subnet_fourier.ipynb@.PATH_END.py
{ "filename": "sitecustomize.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/Tools/extpy/src/sitecustomize.py", "type": "Python" }
#!/usr/bin/env python # APEX - Atacama Pathfinder EXperiment Project # # Copyright (C) 2003-2005 # Max-Planck-Institut fuer Radioastronomie, Bonn, Germany # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # S...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@Tools@extpy@src@sitecustomize.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/candlestick/decreasing/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="line", parent_name="candlestick.decreasing", **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@candlestick@decreasing@_line.py@.PATH_END.py
{ "filename": "mms_fgm_remove_flags.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/mms/fgm/mms_fgm_remove_flags.py", "type": "Python" }
import numpy as np from pytplot import get_data, store_data from pytplot import tnames from pytplot import data_exists def mms_fgm_remove_flags(probe, data_rate, level, instrument, suffix=''): """ This function removes data flagged by the FGM 'flag' variable (flags > 0), in order to only show science qu...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@mms@fgm@mms_fgm_remove_flags.py@.PATH_END.py
{ "filename": "python_vtkfiles.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/doc/python_vtkfiles.md", "type": "Markdown" }
# Reading the vtk files [TOC] # Introduction on reading vtk files {#introductionvtk} This document describes the use of Python for plotting MPI-AMRVAC 1D and 2D simulation data using the `vtk` filetypes. All required packages and instructions on how to set up the tools folder are described in @ref python_setup.md. T...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@doc@python_vtkfiles.md@.PATH_END.py
{ "filename": "mgc_plot2.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/source/tutorial/stats/plots/mgc_plot2.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from scipy.stats import multiscale_graphcorr def mgc_plot(x, y, mgc_dict): """Plot sim and MGC-plot""" plt.figure(figsize=(8, 8)) ax = plt.gca() # local correlation map mgc_map = mgc_dict["mgc_map"] # draw heatmap ax.set_title("Local Cor...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@source@tutorial@stats@plots@mgc_plot2.py@.PATH_END.py
{ "filename": "test_sas7bdat.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/io/sas/test_sas7bdat.py", "type": "Python" }
import contextlib from datetime import datetime import io import os from pathlib import Path import numpy as np import pytest from pandas._config import using_string_dtype from pandas.compat._constants import ( IS64, WASM, ) from pandas.errors import EmptyDataError import pandas as pd import pandas._testing...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@io@sas@test_sas7bdat.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/marker/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.marker", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@marker@_color.py@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/yaxis/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.tickfont" _valid_props = { "color", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@yaxis@_tickfont.py@.PATH_END.py
{ "filename": "model_modpar.py", "repo_name": "remi-adam/minot", "repo_path": "minot_extracted/minot-master/minot/model_modpar.py", "type": "Python" }
""" This file deals with 'model parameters' issues regarding the Cluster Class (e.g. GNFW parameteres) """ import astropy.units as u import numpy as np from scipy import interpolate import warnings from astropy import constants as const from scipy.interpolate import interp1d from minot import model_tools ...
remi-adamREPO_NAMEminotPATH_START.@minot_extracted@minot-master@minot@model_modpar.py@.PATH_END.py
{ "filename": "plot_container.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/visualization/plot_container.py", "type": "Python" }
import abc import base64 import os import warnings from collections import defaultdict from functools import wraps from typing import Any, Final, Literal import matplotlib from matplotlib.colors import LogNorm, Normalize, SymLogNorm from unyt.dimensions import length from yt._maintenance.deprecation import issue_depr...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@plot_container.py@.PATH_END.py
{ "filename": "tutorial_parallel.py", "repo_name": "lberaldoesilva/naif", "repo_path": "naif_extracted/naif-main/docs/source/tutorial_parallel.py", "type": "Python" }
import numpy as np import scipy import agama import naif import time import datetime import multiprocessing as mp from concurrent.futures import ProcessPoolExecutor np.random.seed(0) # n. of orbits: n_orbs = 100 # n. of circular periods to integrate for: n_Tcirc = 100 # n. of points per orbit: n_steps = 100_000 # ...
lberaldoesilvaREPO_NAMEnaifPATH_START.@naif_extracted@naif-main@docs@source@tutorial_parallel.py@.PATH_END.py
{ "filename": "djax.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/slab/djax.py", "type": "Python" }
# Copyright 2024 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...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@slab@djax.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "shsuyu/H0LiCOW-public", "repo_path": "H0LiCOW-public_extracted/H0LiCOW-public-master/H0_tension_plots/util.py", "type": "Python" }
import os, sys import numpy as np from sklearn.neighbors import KernelDensity def confinterval(xs, weights=None, conflevel=0.6826, cumulative=False): """ Hand-made weighted quantile/percentile computation tool, since there is no numpy equivalent. :param xs: list, distribution :param weights: list, we...
shsuyuREPO_NAMEH0LiCOW-publicPATH_START.@H0LiCOW-public_extracted@H0LiCOW-public-master@H0_tension_plots@util.py@.PATH_END.py
{ "filename": "decorators.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/testing/decorators.py", "type": "Python" }
from __future__ import absolute_import, division, print_function import six import functools import inspect import os import sys import shutil import warnings import unittest # Note - don't import nose up here - import it only as needed in functions. # This allows other functions here to be used by pytest-based test...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@testing@decorators.py@.PATH_END.py
{ "filename": "barbs.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/plot_types/arrays/barbs.py", "type": "Python" }
""" ================= barbs(X, Y, U, V) ================= Plot a 2D field of wind barbs. See `~matplotlib.axes.Axes.barbs`. """ import matplotlib.pyplot as plt import numpy as np plt.style.use('_mpl-gallery-nogrid') # make data: X, Y = np.meshgrid([1, 2, 3, 4], [1, 2, 3, 4]) angle = np.pi / 180 * np.array([[15., 30,...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@plot_types@arrays@barbs.py@.PATH_END.py
{ "filename": "test_get_polyfit_filename.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/ghost/tests/spect/test_get_polyfit_filename.py", "type": "Python" }
import pytest import datetime import itertools from geminidr.ghost.primitives_ghost_spect import GHOSTSpect from . import ad_min # minimum AD fixture @pytest.mark.ghostspect @pytest.mark.parametrize('arm,res,caltype', list(itertools.product(*[ ['BLUE', 'RED'], # Arm ['LO_ONLY', 'HI_ONLY'], # Res. mode ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@ghost@tests@spect@test_get_polyfit_filename.py@.PATH_END.py
{ "filename": "scriptVPolCal.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/share/scripts/scriptVPolCal.py", "type": "Python" }
# python/Obit script to calibrate Stokes Vpol SiO maser line cubes # Vpol is calculated by averaging the R/L gain ratio determined from # Stokes Ipol and Vpol images is constant.A import Image, History, ImageDesc, OSystem, FArray, OErr from Obit import Bomb # Init Obit err=OErr.OErr() myName = "VPolCal" ObitSys=OSys...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@share@scripts@scriptVPolCal.py@.PATH_END.py
{ "filename": "test_delitem.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/indexing/test_delitem.py", "type": "Python" }
import re import numpy as np import pytest from pandas import ( DataFrame, MultiIndex, ) class TestDataFrameDelItem: def test_delitem(self, float_frame): del float_frame["A"] assert "A" not in float_frame def test_delitem_multiindex(self): midx = MultiIndex.from_product([["A...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@indexing@test_delitem.py@.PATH_END.py
{ "filename": "_textcasesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/outsidetextfont/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.outsidetextfont", **kwargs ): super(TextcasesrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@outsidetextfont@_textcasesrc.py@.PATH_END.py
{ "filename": "intro.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/doc/intro.py", "type": "Python" }
from __future__ import print_function import matplotlib matplotlib.use('Agg') if True: from tractor import * source = PointSource(PixPos(17., 27.4), Flux(23.9)) photocal = NullPhotoCal() wcs = NullWCS() counts = photocal.brightnessToCounts(source.getBrightness()) x,y = wcs.positionToPixel(sourc...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@doc@intro.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattergeo/selected/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo.selected" _path_str = "scattergeo.selected.textfont" _valid_props = {"color"} ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattergeo@selected@_textfont.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/choroplethmapbox/colorbar/title/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmapbox.colorbar.title", **kwargs, ): super(FontValidator, self).__init__( plotly_name=plot...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@colorbar@title@_font.py@.PATH_END.py
{ "filename": "samples.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/data/soho/samples.py", "type": "Python" }
import os import random from matplotlib import pyplot as plt from sunpy.visualization.colormaps import cm from itipy.data.dataset import SECCHIDataset, EITDataset base_path = '/gss/r.jarolim/data/soho/valid' channels = [ 171, 195, 284, 304, ] cmaps = [ cm.sdoaia171, cm.sdoaia193, cm.sdoai...
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@data@soho@samples.py@.PATH_END.py
{ "filename": "testing_script.py", "repo_name": "astromer-science/main-code", "repo_path": "main-code_extracted/main-code-main/presentation/scripts/testing_script.py", "type": "Python" }
#!/usr/bin/python import subprocess import sys import time import json import os, sys gpu = sys.argv[1] ds_name = sys.argv[2] batch_size = 512 datasets = ['{}_20'.format(ds_name), '{}_50'.format(ds_name), '{}_100'.format(ds_name), '{}_500'.format(ds_name), ] for astrome...
astromer-scienceREPO_NAMEmain-codePATH_START.@main-code_extracted@main-code-main@presentation@scripts@testing_script.py@.PATH_END.py
{ "filename": "intersection.py", "repo_name": "rodluger/planetplanet", "repo_path": "planetplanet_extracted/planetplanet-master/scripts/intersection.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' intersection.py |github| ------------------------ Interactive circle/ellipse intersection point finder. Solves a quartic polynomial to determine the points of intersection. This method is slow because it also finds imaginary roots, which we don't care about. Eventually...
rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@intersection.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/legendgrouptitle/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@legendgrouptitle@font@_lineposition.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/marker/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="bar.marker.colorbar", **kwargs ): super(ShowticklabelsValidator, self).__init__( plotly_name=plotly_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@marker@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "shape_utils.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/distributions/shape_utils.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@distributions@shape_utils.py@.PATH_END.py
{ "filename": "redux.py", "repo_name": "jkrogager/PyNOT", "repo_path": "PyNOT_extracted/PyNOT-master/pynot/redux.py", "type": "Python" }
""" Automatically Classify and Reduce a given Data Set """ from collections import defaultdict import glob import numpy as np import os import sys from PyQt5.QtWidgets import QApplication from pynot.data import io from pynot.data import organizer as do from pynot.data import obs from pynot.calibs import task_bias, t...
jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@redux.py@.PATH_END.py
{ "filename": "test_named.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tests/contrib/autoname/test_named.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch import pyro import pyro.distributions as dist from pyro import poutine from pyro.contrib.autoname import named def get_sample_names(tr): return set( [ name for name, site in tr.no...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@contrib@autoname@test_named.py@.PATH_END.py
{ "filename": "Database.py", "repo_name": "PoulinV/AxiCLASS", "repo_path": "AxiCLASS_extracted/AxiCLASS-master/external/RealSpaceInterface/Calc2D/Database.py", "type": "Python" }
import pickle import os import logging import uuid class Database: def __init__(self, directory, db_file="database.dat"): self.directory = directory self.db_file = db_file if not os.path.isdir(directory): raise ValueError("'{}' is not a directory!".format(directory)) s...
PoulinVREPO_NAMEAxiCLASSPATH_START.@AxiCLASS_extracted@AxiCLASS-master@external@RealSpaceInterface@Calc2D@Database.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/surface/contours/x/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._project import Project else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@surface@contours@x@__init__.py@.PATH_END.py
{ "filename": "unit.py", "repo_name": "hgrecco/pint", "repo_path": "pint_extracted/pint-master/pint/facets/plain/unit.py", "type": "Python" }
""" pint.facets.plain.unit ~~~~~~~~~~~~~~~~~~~~~ :copyright: 2016 by Pint Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import annotations import copy import locale import operator from numbers import Number from typing import TYPE_CHECKING, A...
hgreccoREPO_NAMEpintPATH_START.@pint_extracted@pint-master@pint@facets@plain@unit.py@.PATH_END.py
{ "filename": "_thicknessmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatter3d.marker.colorbar", **kwargs, ): super(ThicknessmodeValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@colorbar@_thicknessmode.py@.PATH_END.py
{ "filename": "Forces.ipynb", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/ipython_examples/Forces.ipynb", "type": "Jupyter Notebook" }
# Additional forces REBOUND is a gravitational N-body integrator. But you can also use it to integrate systems with additional, non-gravitational forces. This tutorial gives you a very quick overview of how that works. Implementing additional forces in python as below will typically be a factor of a few slower than a ...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@ipython_examples@Forces.ipynb@.PATH_END.py
{ "filename": "decoder.py", "repo_name": "qubvel/segmentation_models.pytorch", "repo_path": "segmentation_models.pytorch_extracted/segmentation_models.pytorch-main/segmentation_models_pytorch/decoders/unetplusplus/decoder.py", "type": "Python" }
import torch import torch.nn as nn import torch.nn.functional as F from segmentation_models_pytorch.base import modules as md class DecoderBlock(nn.Module): def __init__( self, in_channels, skip_channels, out_channels, use_batchnorm=True, attention_type=None, )...
qubvelREPO_NAMEsegmentation_models.pytorchPATH_START.@segmentation_models.pytorch_extracted@segmentation_models.pytorch-main@segmentation_models_pytorch@decoders@unetplusplus@decoder.py@.PATH_END.py
{ "filename": "_btype.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/_btype.py", "type": "Python" }
import _plotly_utils.basevalidators class BtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="btype", parent_name="contourcarpet", **kwargs): super(BtypeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@_btype.py@.PATH_END.py
{ "filename": "horizons.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/io/horizons.py", "type": "Python" }
from datetime import date, timedelta class LoadStar(object): def __init__(self, planet): f = open('../viewer/'+planet+'.txt','r') M = f.readlines() f.close() """ radiusline = M[4] radius = float(radiusline.split('=')[1].split('(')[0]) massline = M[5] ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@io@horizons.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/relativity/__init__.py", "type": "Python" }
from .relativity import *
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@relativity@__init__.py@.PATH_END.py
{ "filename": "sineWave_time_compare.py", "repo_name": "cjekel/piecewise_linear_fit_py", "repo_path": "piecewise_linear_fit_py_extracted/piecewise_linear_fit_py-master/examples/sineWave_time_compare.py", "type": "Python" }
# fit for a specified number of line segments # you specify the number of line segments you want, the library does the rest # import our libraries import numpy as np import matplotlib.pyplot as plt import pwlf from time import time # generate sin wave data x = np.linspace(0, 10, num=100) y = np.sin(x * np.pi / 2) # a...
cjekelREPO_NAMEpiecewise_linear_fit_pyPATH_START.@piecewise_linear_fit_py_extracted@piecewise_linear_fit_py-master@examples@sineWave_time_compare.py@.PATH_END.py
{ "filename": "_symbol.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/marker/_symbol.py", "type": "Python" }
import _plotly_utils.basevalidators class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="scattergl.marker", **kwargs): super(SymbolValidator, 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@scattergl@marker@_symbol.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "telegraphic/pygsm", "repo_path": "pygsm_extracted/pygsm-master/README.md", "type": "Markdown" }
**This archive is deprecated; please use [PyGDSM](https://github.com/telegraphic/pygdsm)** PyGSM ===== **Note: GSM2016 methods are in beta!!** `PyGSM` is a Python interface for the Global Sky Model (GSM2008) of [Oliveira-Costa et. al., (2008)](http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2966.2008.13376.x/abstr...
telegraphicREPO_NAMEpygsmPATH_START.@pygsm_extracted@pygsm-master@README.md@.PATH_END.py