metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "preproc.py",
"repo_name": "ysBach/NICpolpy",
"repo_path": "NICpolpy_extracted/NICpolpy-master/nicpolpy/ysfitsutilpy4nicpolpy/preproc.py",
"type": "Python"
} | from warnings import warn
import astroscrappy
import ccdproc
import numpy as np
import pandas as pd
from astropy import units as u
from astropy.nddata import CCDData, StdDevUncertainty
from astropy.stats import sigma_clipped_stats
from astropy.time import Time
from astroscrappy import detect_cosmics
from ccdproc impor... | ysBachREPO_NAMENICpolpyPATH_START.@NICpolpy_extracted@NICpolpy-master@nicpolpy@ysfitsutilpy4nicpolpy@preproc.py@.PATH_END.py |
{
"filename": "blobs.py",
"repo_name": "rapidsai/cuml",
"repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/dask/datasets/blobs.py",
"type": "Python"
} | #
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@dask@datasets@blobs.py@.PATH_END.py |
{
"filename": "medianPositionInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/Utilities/medianPositionInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "Utilities/medianPosition.cc"
namespace Spheral {
template Dim< %(ndim)s >::Vector medianPosition(vector<Dim... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Utilities@medianPositionInst.cc.py@.PATH_END.py |
{
"filename": "python-reference_dictionary_get_token.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_dictionary_get_token.md",
"type": "Markdown"
} | # get_token
{% include [descriptions-get_token](../_includes/work_src/reusage-tokenizer/get_token.md) %}
## {{ dl--invoke-format }} {#call-format}
```
get_token(token_id)
```
## {{ dl--parameters }} {#parameters}
### token_id
#### Description
The identifier of the token that should be returned.
**Data types**
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_dictionary_get_token.md@.PATH_END.py |
{
"filename": "discoverYourData.md",
"repo_name": "dmlc/xgboost",
"repo_path": "xgboost_extracted/xgboost-master/doc/R-package/discoverYourData.md",
"type": "Markdown"
} | # Understand your dataset with XGBoost
## Introduction
The purpose of this vignette is to show you how to use **XGBoost** to
discover and understand your own dataset better.
This vignette is not about predicting anything (see [XGBoost
presentation](https://github.com/dmlc/xgboost/blob/master/R-package/vignettes/xgbo... | dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@doc@R-package@discoverYourData.md@.PATH_END.py |
{
"filename": "_tickangle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/colorbar/_tickangle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(
self, plotly_name="tickangle", parent_name="streamtube.colorbar", **kwargs
):
super(TickangleValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@colorbar@_tickangle.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "jluastro/PopSyCLE",
"repo_path": "PopSyCLE_extracted/PopSyCLE-main/popsycle/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# Packages may add whatever they like to this file, but
# should keep this content at the top.
# ----------------------------------------------------------------------------
from ._astropy_init import * # noqa
# -----------------------------------------... | jluastroREPO_NAMEPopSyCLEPATH_START.@PopSyCLE_extracted@PopSyCLE-main@popsycle@__init__.py@.PATH_END.py |
{
"filename": "class_interface.py",
"repo_name": "GuillermoFrancoAbellan/Swyft-LSS",
"repo_path": "Swyft-LSS_extracted/Swyft-LSS-main/class_interface.py",
"type": "Python"
} | import numpy as np
from astropy import constants as const
from compute_obs import get_obs
from covariance_utils import get_covmat
from copy import deepcopy
from classy import Class
from scipy.interpolate import interp1d
from scipy.integrate import trapz
from itertools import product
impor... | GuillermoFrancoAbellanREPO_NAMESwyft-LSSPATH_START.@Swyft-LSS_extracted@Swyft-LSS-main@class_interface.py@.PATH_END.py |
{
"filename": "quickstart.md",
"repo_name": "LucaMalavolta/PyORBIT",
"repo_path": "PyORBIT_extracted/PyORBIT-main/docs/quickstart.md",
"type": "Markdown"
} | (quickstart)=
# Quickstart
Although it started as a simple program, `PyORBIT` got increasingly complex with time.
Before you start delving into the many available models, let’s work together on a few test cases to better understand the philosophy behind `PyORBIT`.
- In [Radial velocity fit](radial_velocity_fit) we ... | LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@docs@quickstart.md@.PATH_END.py |
{
"filename": "example_2a.ipynb",
"repo_name": "hpparvi/PyTransit",
"repo_path": "PyTransit_extracted/PyTransit-master/notebooks/contamination/example_2a.ipynb",
"type": "Jupyter Notebook"
} | # Contamination example 2a
## M star slightly contaminated by a G star and uninformative prior on orbital parameters
*[Hannu Parviainen](mailto:hannu@iac.es)<br>
Instituto de Astrofísica de Canarias*
Last modified: 15.7.2019
Here we use the `pytransit.contamination` module to estimate the *true planet to star radius... | hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@notebooks@contamination@example_2a.ipynb@.PATH_END.py |
{
"filename": "version.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/externals/_packaging/version.py",
"type": "Python"
} | """Vendoered from
https://github.com/pypa/packaging/blob/main/packaging/version.py
"""
# Copyright (c) Donald Stufft and individual contributors.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# ... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@externals@_packaging@version.py@.PATH_END.py |
{
"filename": "ansi.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/colorama/py3/colorama/ansi.py",
"type": "Python"
} | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''
CSI = '\033['
OSC = '\033]'
BEL = '\a'
def code_to_chars(code):
return CSI + str(code) + 'm'
def set_t... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@colorama@py3@colorama@ansi.py@.PATH_END.py |
{
"filename": "test_read_map.py",
"repo_name": "galsci/pysm",
"repo_path": "pysm_extracted/pysm-main/tests/test_read_map.py",
"type": "Python"
} | import pysm3
import pysm3.units as u
def test_read_map_unit():
m = pysm3.read_map("pysm_2/dust_temp.fits", nside=8, field=0, unit="uK_RJ")
assert u.Unit("uK_RJ") == m.unit
def test_read_map_unit_dimensionless():
m = pysm3.read_map("pysm_2/dust_temp.fits", nside=8, field=0)
assert u.Unit("") == m.uni... | galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@tests@test_read_map.py@.PATH_END.py |
{
"filename": "extended_obs_agent.py",
"repo_name": "ARCLab-MIT/kspdg",
"repo_path": "kspdg_extracted/kspdg-main/arclab_mit/agents/extended_obs_agent/extended_obs_agent.py",
"type": "Python"
} | from kspdg.pe1.e1_envs import PE1_E1_I3_Env
from kspdg.pe1.e2_envs import PE1_E2_I3_Env
from kspdg.pe1.e3_envs import PE1_E3_I3_Env
from kspdg.pe1.e4_envs import PE1_E4_I3_Env
from kspdg.agent_api.runner import AgentEnvRunner
import numpy as np
import time
from datetime import datetime
import sys, os
sys.path.append(o... | ARCLab-MITREPO_NAMEkspdgPATH_START.@kspdg_extracted@kspdg-main@arclab_mit@agents@extended_obs_agent@extended_obs_agent.py@.PATH_END.py |
{
"filename": "_tick0.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_tick0.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Tick0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="tick0", parent_name="scatterpolar.marker.colorbar", **kwargs
):
super(Tick0Validator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@marker@colorbar@_tick0.py@.PATH_END.py |
{
"filename": "_spectrum.py",
"repo_name": "LoganAMorrison/blackthorn",
"repo_path": "blackthorn_extracted/blackthorn-master/blackthorn/spectra/_spectrum.py",
"type": "Python"
} | """Module for working with spectra."""
# pylint: disable=invalid-name
from typing import Union, Optional, Sequence
import numpy as np
import numpy.typing as npt
from .. import fields
from ._hazma import HazmaSpectra
from ._pppc import PPPC4DMIDSpectra
from ._hdmspectra import HDMSpectra
RealArray = npt.NDArray[np.... | LoganAMorrisonREPO_NAMEblackthornPATH_START.@blackthorn_extracted@blackthorn-master@blackthorn@spectra@_spectrum.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/camera/up/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="z", parent_name="layout.scene.camera.up", **kwargs):
super(ZValidator, 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@layout@scene@camera@up@_z.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/pathbar/textfont/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._sizesrc import SizesrcValidator
from ._size import SizeValidator
from ._familysrc import FamilysrcValidator
from ._family import FamilyValidator
from ._colorsrc import ColorsrcValidator
from ._color import ColorValidator
else:
from _plotly_uti... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@pathbar@textfont@__init__.py@.PATH_END.py |
{
"filename": "_outlinecolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="outlinecolor",
parent_name="scattercarpet.marker.colorbar",
**kwargs
):
super(OutlinecolorValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@_outlinecolor.py@.PATH_END.py |
{
"filename": "test_qtransform.py",
"repo_name": "ML4GW/ml4gw",
"repo_path": "ml4gw_extracted/ml4gw-main/tests/transforms/test_qtransform.py",
"type": "Python"
} | import numpy as np
import pytest
import torch
from gwpy.signal.qtransform import QPlane
from gwpy.signal.qtransform import QTile as gwpy_QTile
from gwpy.signal.qtransform import QTiling
from ml4gw.transforms import QScan, SingleQTransform
from ml4gw.transforms.qtransform import QTile
@pytest.fixture(params=[1, 2])
d... | ML4GWREPO_NAMEml4gwPATH_START.@ml4gw_extracted@ml4gw-main@tests@transforms@test_qtransform.py@.PATH_END.py |
{
"filename": "cube_wcs.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/docs/wcs/examples/cube_wcs.py",
"type": "Python"
} | # Define the astropy.wcs.WCS object using a Python dictionary as input
import astropy.wcs
wcs_dict = {
"CTYPE1": "WAVE ",
"CUNIT1": "Angstrom",
"CDELT1": 0.2,
"CRPIX1": 0,
"CRVAL1": 10,
"NAXIS1": 5,
"CTYPE2": "HPLT-TAN",
"CUNIT2": "deg",
"CDELT2": 0.5,
"CRPIX2": 2,
"CRVA... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@docs@wcs@examples@cube_wcs.py@.PATH_END.py |
{
"filename": "recipes_DARK.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/niri/recipes/qa/recipes_DARK.py",
"type": "Python"
} | """
Recipes available to data with tags 'GMOS', 'CAL', 'DARK'].
Default is "makeProcessedDark".
"""
recipe_tags = {'NIRI', 'CAL', 'DARK'}
def makeProcessedDark(p):
"""
This recipe performs the standardization and corrections needed to
convert the raw input dark images into a single stacked dark image.
... | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@niri@recipes@qa@recipes_DARK.py@.PATH_END.py |
{
"filename": "learned_wavelet.py",
"repo_name": "utsav-akhaury/understanding-unets",
"repo_path": "understanding-unets_extracted/understanding-unets-master/learning_wavelets/models/learned_wavelet.py",
"type": "Python"
} | import tensorflow as tf
import tensorflow.keras.backend as K
from tensorflow.keras.layers import Activation, concatenate, UpSampling2D, Input, AveragePooling2D, Lambda
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
from ..evaluate import keras_psnr, keras_ssim, center_keras_psnr... | utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@learning_wavelets@models@learned_wavelet.py@.PATH_END.py |
{
"filename": "_calendar.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/xaxis/_calendar.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="calendar", parent_name="layout.scene.xaxis", **kwargs
):
super(CalendarValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@xaxis@_calendar.py@.PATH_END.py |
{
"filename": "_legendgroup.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/_legendgroup.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="legendgroup", parent_name="scatterpolargl", **kwargs
):
super(LegendgroupValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@_legendgroup.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/marker/colorbar/title/font/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self,
plotly_name="weight",
parent_name="histogram.marker.colorbar.title.font",
**kwargs,
):
super(WeightValidator, self).__init__(
plotly... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@marker@colorbar@title@font@_weight.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/frontends/eagle/io.py",
"type": "Python"
} | from yt.frontends.owls.io import IOHandlerOWLS
class IOHandlerEagleNetwork(IOHandlerOWLS):
_dataset_type = "eagle_network"
| yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@eagle@io.py@.PATH_END.py |
{
"filename": "fisher_information.md",
"repo_name": "LouisDesdoigts/dLux",
"repo_path": "dLux_extracted/dLux-main/docs/tutorials/examples/fisher_information.md",
"type": "Markdown"
} | # Fisher Information
Autodiff doesn't just make it faster to solve optimisation and inference problems -- it also allows you to use powerful ideas in statistics requiring second derivatives that are intractable analytically or with finite differences.
The Fisher Information Matrix, or the inverse of the Hessian of th... | LouisDesdoigtsREPO_NAMEdLuxPATH_START.@dLux_extracted@dLux-main@docs@tutorials@examples@fisher_information.md@.PATH_END.py |
{
"filename": "test_dome_astrohaven.py",
"repo_name": "panoptes/POCS",
"repo_path": "POCS_extracted/POCS-main/tests/test_dome_astrohaven.py",
"type": "Python"
} | # Test the Astrohaven dome interface using a simulated dome controller.
from contextlib import suppress
import pytest
import serial
from panoptes.pocs import hardware
from panoptes.pocs.dome import astrohaven
from panoptes.pocs.dome import create_dome_simulator
from panoptes.utils.config.client import set_config
@... | panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@tests@test_dome_astrohaven.py@.PATH_END.py |
{
"filename": "conversion_abc.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/utilities/grid_data_format/conversion/conversion_abc.py",
"type": "Python"
} | class Converter:
def __init__(self, basename, outname=None):
self.basename = basename
self.outname = outname
def convert(self):
pass
| rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@utilities@grid_data_format@conversion@conversion_abc.py@.PATH_END.py |
{
"filename": "KP3keypaperplots.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/plotting/KP3keypaperplots.py",
"type": "Python"
} | #sys.path.append(os.getenv('HOME')+'/Y1KPplots/py/')
#Need to get pack in path, via, e.g., PYTHONPATH=$PYTHONPATH:$HOME/Y1KPplots/py/
import numpy as np
from matplotlib import pyplot as plt
import sys
import fitsio
import os
import KP3style
outdir = '/global/cfs/cdirs/desi/survey/catalogs/Y1/KP3plots/KeyPaper/'
axla... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@plotting@KP3keypaperplots.py@.PATH_END.py |
{
"filename": "test_units.py",
"repo_name": "lucabaldini/ixpeobssim",
"repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_units.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Copyright (C) 2016--2018, 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 versio... | lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@tests@test_units.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/analysis/__init__.py",
"type": "Python"
} | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@analysis@__init__.py@.PATH_END.py | |
{
"filename": "run_with_submitit.py",
"repo_name": "elastufka/mgcls_dino",
"repo_path": "mgcls_dino_extracted/mgcls_dino-main/run_with_submitit.py",
"type": "Python"
} | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | elastufkaREPO_NAMEmgcls_dinoPATH_START.@mgcls_dino_extracted@mgcls_dino-main@run_with_submitit.py@.PATH_END.py |
{
"filename": "test_nircam.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/assign_wcs/tests/test_nircam.py",
"type": "Python"
} | """
Test NIRCAM grism WCS transformations.
Notes:
These test the stability of the WFSS and TSO transformations based on the
the reference file that is returned from CRDS. The absolute validity
of the results is verified by the team based on the specwcs reference
file.
"""
import numpy as np
import pytest
import re
... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@assign_wcs@tests@test_nircam.py@.PATH_END.py |
{
"filename": "archive.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/webservice/archive.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
import os
import io
import zipfile
import hashlib
from pprint import pfo... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@webservice@archive.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/image/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="image.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@image@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "bayesian_rnn_2.py",
"repo_name": "supernnova/SuperNNova",
"repo_path": "SuperNNova_extracted/SuperNNova-main/python/supernnova/training/bayesian_rnn_2.py",
"type": "Python"
} | import math
import warnings
import torch
import torch.nn as nn
import torch.nn.functional as F
def log_norm(x, min_clip, mean, std, F=torch):
""" """
x = (F.log(x - min_clip + 1e-5) - mean) / std
return x
def inverse_log_norm(x, min_clip, mean, std, F=torch):
x = F.exp(x * std + mean) + min_clip ... | supernnovaREPO_NAMESuperNNovaPATH_START.@SuperNNova_extracted@SuperNNova-main@python@supernnova@training@bayesian_rnn_2.py@.PATH_END.py |
{
"filename": "test_fits2bitmap.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/visualization/scripts/tests/test_fits2bitmap.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.compat.optional_deps import HAS_MATPLOTLIB
if HAS_MATPLOTLIB:
import matplotlib.image as mpimg
from astropy.visualization.scripts.fits2bitmap import fits2bitmap, ma... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@visualization@scripts@tests@test_fits2bitmap.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "qubvel/segmentation_models.pytorch",
"repo_path": "segmentation_models.pytorch_extracted/segmentation_models.pytorch-main/segmentation_models_pytorch/decoders/unetplusplus/model.py",
"type": "Python"
} | from typing import Any, List, Optional, Union
from segmentation_models_pytorch.base import (
ClassificationHead,
SegmentationHead,
SegmentationModel,
)
from segmentation_models_pytorch.encoders import get_encoder
from .decoder import UnetPlusPlusDecoder
class UnetPlusPlus(SegmentationModel):
"""Unet... | qubvelREPO_NAMEsegmentation_models.pytorchPATH_START.@segmentation_models.pytorch_extracted@segmentation_models.pytorch-main@segmentation_models_pytorch@decoders@unetplusplus@model.py@.PATH_END.py |
{
"filename": "image_viewer_creator.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/imviz/plugins/image_viewer_creator/image_viewer_creator.py",
"type": "Python"
} | from traitlets import List
from jdaviz.core.events import NewViewerMessage
from jdaviz.core.template_mixin import TemplateMixin
from jdaviz.core.registries import tool_registry
from jdaviz.configs.imviz.plugins.viewers import ImvizImageView
__all__ = ['ImageViewerCreator']
@tool_registry('g-image-viewer-creator')
c... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@imviz@plugins@image_viewer_creator@image_viewer_creator.py@.PATH_END.py |
{
"filename": "test_discretization.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/preprocessing/tests/test_discretization.py",
"type": "Python"
} | import warnings
import numpy as np
import pytest
import scipy.sparse as sp
from sklearn import clone
from sklearn.preprocessing import KBinsDiscretizer, OneHotEncoder
from sklearn.utils._testing import (
assert_allclose,
assert_allclose_dense_sparse,
assert_array_almost_equal,
assert_array_equal,
)
X... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@preprocessing@tests@test_discretization.py@.PATH_END.py |
{
"filename": "section_5_1_2.py",
"repo_name": "PrincetonUniversity/athena",
"repo_path": "athena_extracted/athena-master/tst/regression/scripts/utils/plot_mignone/section_5_1_2.py",
"type": "Python"
} | import numpy as np
import os
import sys
import logging
mpl_logger = logging.getLogger('matplotlib')
mpl_logger.setLevel(logging.WARNING)
import matplotlib # noqa
# matplotlib.use('agg')
matplotlib.use('pdf')
import matplotlib.pyplot as plt # noqa
from matplotlib.ticker import AutoMinorLocator, FormatStrF... | PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@utils@plot_mignone@section_5_1_2.py@.PATH_END.py |
{
"filename": "elasticsearch.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/query_constructors/elasticsearch.py",
"type": "Python"
} | from typing import Dict, Tuple, Union
from langchain_core.structured_query import (
Comparator,
Comparison,
Operation,
Operator,
StructuredQuery,
Visitor,
)
class ElasticsearchTranslator(Visitor):
"""Translate `Elasticsearch` internal query language elements to valid filters."""
allo... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@query_constructors@elasticsearch.py@.PATH_END.py |
{
"filename": "_showexponent.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/marker/colorbar/_showexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showexponent", parent_name="funnel.marker.colorbar", **kwargs
):
super(ShowexponentValidator, self).__init__(
plotly_name=plotly_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@marker@colorbar@_showexponent.py@.PATH_END.py |
{
"filename": "_classes.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py3/sklearn/tree/_classes.py",
"type": "Python"
} | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py3@sklearn@tree@_classes.py@.PATH_END.py |
{
"filename": "tools.py",
"repo_name": "loostrum/darc",
"repo_path": "darc_extracted/darc-master/darc/external/tools.py",
"type": "Python"
} | #!/usr/bin/env python3
import numpy as np
import glob
import scipy.signal
import optparse
try:
import matplotlib.pyplot as plt
except Exception:
import matplotlib as mpl
mpl.use('Agg', warn=False)
# should there maybe be a clustering class
# and a S/N calculation class?
class AnalyseTriggers:
def __... | loostrumREPO_NAMEdarcPATH_START.@darc_extracted@darc-master@darc@external@tools.py@.PATH_END.py |
{
"filename": "vae.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/experimental/jax2tf/tests/flax_models/vae.py",
"type": "Python"
} | # Copyright 2022 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@experimental@jax2tf@tests@flax_models@vae.py@.PATH_END.py |
{
"filename": "data.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/datasets/modechoice/data.py",
"type": "Python"
} | """Travel Mode Choice"""
from statsmodels.datasets import utils as du
__docformat__ = 'restructuredtext'
COPYRIGHT = """This is public domain."""
TITLE = __doc__
SOURCE = """
Greene, W.H. and D. Hensher (1997) Multinomial logit and discrete choice models
in Greene, W. H. (1997) LIMDEP version 7.0 user's manual revise... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@datasets@modechoice@data.py@.PATH_END.py |
{
"filename": "Priors_for_Bayesian_analysis.md",
"repo_name": "threeML/astromodels",
"repo_path": "astromodels_extracted/astromodels-master/docs/md/Priors_for_Bayesian_analysis.md",
"type": "Markdown"
} | ---
jupyter:
jupytext:
formats: ipynb,md
text_representation:
extension: .md
format_name: markdown
format_version: '1.2'
jupytext_version: 1.8.0
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Priors for Bayesian analysis
Astromodels supports the... | threeMLREPO_NAMEastromodelsPATH_START.@astromodels_extracted@astromodels-master@docs@md@Priors_for_Bayesian_analysis.md@.PATH_END.py |
{
"filename": "data.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/datasets/fertility/data.py",
"type": "Python"
} | """World Bank Fertility Data."""
from statsmodels.datasets import utils as du
__docformat__ = 'restructuredtext'
COPYRIGHT = """This data is distributed according to the World Bank terms of use. See SOURCE."""
TITLE = """World Bank Fertility Data"""
SOURCE = """
This data has been acquired from
The Worl... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@datasets@fertility@data.py@.PATH_END.py |
{
"filename": "problem_setup.py",
"repo_name": "dullemond/radmc3d-2.0",
"repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/examples/run_simple_1_userdef/problem_setup.py",
"type": "Python"
} | #
# Import NumPy for array handling
#
import numpy as np
#
# Import plotting libraries (start Python with ipython --matplotlib)
#
#from mpl_toolkits.mplot3d import axes3d
#from matplotlib import pyplot as plt
#
# Some natural constants
#
au = 1.49598e13 # Astronomical Unit [cm]
pc = 3.08572e18 # Parsec ... | dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@examples@run_simple_1_userdef@problem_setup.py@.PATH_END.py |
{
"filename": "_matrix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/_matrix.py",
"type": "Python"
} | from ._sputils import isintlike, isscalarlike
class spmatrix:
"""This class provides a base class for all sparse matrix classes.
It cannot be instantiated. Most of the work is provided by subclasses.
"""
_is_array = False
@property
def _bsr_container(self):
from ._bsr import bsr_mat... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@_matrix.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterpolargl.marker.colorbar"
_path_str = "scatterpolargl.marker.colorbar.title"
_valid_pro... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterpolargl@marker@colorbar@_title.py@.PATH_END.py |
{
"filename": "cloud.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/workers/cloud.py",
"type": "Python"
} | """
2024-06-27: This surfaces an actionable error message for moved or removed objects in Prefect 3.0 upgrade.
"""
from prefect._internal.compatibility.migration import getattr_migration
__getattr__ = getattr_migration(__name__)
| PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@workers@cloud.py@.PATH_END.py |
{
"filename": "java.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/android/java.md",
"type": "Markdown"
} | # TensorFlow Lite in Google Play services Java API
TensorFlow Lite in Google Play services can also be accessed using Java APIs, in
addition to the Native API. In particular, TensorFlow Lite in Google Play
services is available through the
[TensorFlow Lite Task API](https://www.tensorflow.org/lite/api_docs/java/org/te... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@android@java.md@.PATH_END.py |
{
"filename": "test_starspot.py",
"repo_name": "RuthAngus/starspot",
"repo_path": "starspot_extracted/starspot-master/tests/test_starspot.py",
"type": "Python"
} | import numpy as np
from starspot import phase_dispersion_minimization as pdm
import matplotlib.pyplot as plt
import starspot as ss
def test_big_plot():
# Generate some data
time = np.linspace(0, 100, 1000)
p = 10
w = 2*np.pi/p
flux = np.sin(w*time) + np.random.randn(len(time))*1e-2
flux_err = ... | RuthAngusREPO_NAMEstarspotPATH_START.@starspot_extracted@starspot-master@tests@test_starspot.py@.PATH_END.py |
{
"filename": "test_fake_chat_model.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/llms/test_fake_chat_model.py",
"type": "Python"
} | """Tests for verifying that testing utility code works as expected."""
from itertools import cycle
from typing import Any, Dict, List, Optional, Union
from uuid import UUID
from langchain_core.callbacks.base import AsyncCallbackHandler
from langchain_core.messages import AIMessage, AIMessageChunk, BaseMessage
from la... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@llms@test_fake_chat_model.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/tests/results/frbny_nowcast/Nowcasting/__init__.py",
"type": "Python"
} | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@tests@results@frbny_nowcast@Nowcasting@__init__.py@.PATH_END.py | |
{
"filename": "_tickvalssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="densitymapbox.colorbar", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymapbox@colorbar@_tickvalssrc.py@.PATH_END.py |
{
"filename": "testing.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/testing.py",
"type": "Python"
} | """
pygments.lexers.testing
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for testing languages.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import Comment, Keyword, Na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@testing.py@.PATH_END.py |
{
"filename": "ir.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/extend/mlir/ir.py",
"type": "Python"
} | # Copyright 2023 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@extend@mlir@ir.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/src/amuse/ic/__init__.py",
"type": "Python"
} | """
Initial Conditions
This module contains a number of packages with routines to generate initial conditions:
Initial stellar mass generators:
brokenimf - realisations of multiple-part power-law IMFs
flatimf - logarithmically flat IMF
kroupa - Kroupa (2001) initial mass funct... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@ic@__init__.py@.PATH_END.py |
{
"filename": "ShowerTableMeasurement.py",
"repo_name": "wmpg/WesternMeteorPyLib",
"repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/Utils/ShowerTableMeasurement.py",
"type": "Python"
} | """ Measure meteor shower radiants and create a reference table with solar longitudes and ecliptic coordinates of the radiants that can be used for shower association."""
import os
import pandas as pd
import numpy as np
import scipy.interpolate
import scipy.optimize
import scipy.stats
from wmpl.Formats.WmplTrajector... | wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@Utils@ShowerTableMeasurement.py@.PATH_END.py |
{
"filename": "CONTRIBUTING.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/libs/tbb/CONTRIBUTING.md",
"type": "Markdown"
} | <!--
******************************************************************************
*
* 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
*
* Unl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@tbb@CONTRIBUTING.md@.PATH_END.py |
{
"filename": "airmass.py",
"repo_name": "msiebert1/UCSC_spectral_pipeline",
"repo_path": "UCSC_spectral_pipeline_extracted/UCSC_spectral_pipeline-master/spectral_reduction/tmath/pydux/airmass.py",
"type": "Python"
} | def airmass(el):
"""
Calculate airmass from elevation
:param el: float
:returns: airmass
:rtype: float
Notes
-----
Airmass calculation: the old log program used
airmass=(1/cos(zdrad))-0.0018167*((1/cos(zdrad))-1)-
0.002875*((1/cos(zdrad))-1)^2-0.0008083*((1/cos(dzrad))-1)^3, ... | msiebert1REPO_NAMEUCSC_spectral_pipelinePATH_START.@UCSC_spectral_pipeline_extracted@UCSC_spectral_pipeline-master@spectral_reduction@tmath@pydux@airmass.py@.PATH_END.py |
{
"filename": "test_bitmask.py",
"repo_name": "kbwestfall/NIRVANA",
"repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/tests/test_bitmask.py",
"type": "Python"
} | import pytest
from collections import OrderedDict
import warnings
warnings.simplefilter("ignore", UserWarning)
warnings.simplefilter("ignore", RuntimeWarning)
import numpy
from astropy.io import fits
from nirvana.util.bitmask import BitMask
from .util import test_data_file
#---------------------------------------... | kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@tests@test_bitmask.py@.PATH_END.py |
{
"filename": "mnn.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/integrations/mnn.md",
"type": "Markdown"
} | ---
comments: true
description: Optimize YOLO11 models for mobile and embedded devices by exporting to MNN format.
keywords: Ultralytics, YOLO11, MNN, model export, machine learning, deployment, mobile, embedded systems, deep learning, AI models
---
# MNN Export for YOLO11 Models and Deploy
## MNN
<p align="center">... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@integrations@mnn.md@.PATH_END.py |
{
"filename": "submit_job.py",
"repo_name": "LSSTDESC/chroma",
"repo_path": "chroma_extracted/chroma-master/bin/phosim/characterize/off_axis_dispersion/submit_job.py",
"type": "Python"
} | import os
import subprocess
import numpy
def encode_obshistid(SED_type, filter_name, zenith, seed, redshift):
SED_types = {'G5v':'1', 'star':'2', 'gal':'3'}
SED_digit = SED_types[SED_type]
filter_number = {'u':'0','g':'1','r':'2','i':'3','z':'4','Y':'5'}
filter_digit = filter_number[filter_name]
z... | LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@bin@phosim@characterize@off_axis_dispersion@submit_job.py@.PATH_END.py |
{
"filename": "fileio.py",
"repo_name": "jeffzhen/omnical",
"repo_path": "omnical_extracted/omnical-master/src/fileio.py",
"type": "Python"
} | '''XXX DOCSTRING'''
# XXX lots of imports... are all necessary? can code be separated into files with smaller dependency lists?
# XXX this file has gotten huge. need to break into smaller files
# XXX clean house on commented code?
# XXX obey python style conventions
import math, random, traceback, ephem, string, comma... | jeffzhenREPO_NAMEomnicalPATH_START.@omnical_extracted@omnical-master@src@fileio.py@.PATH_END.py |
{
"filename": "benchmark.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/modes/benchmark.md",
"type": "Markdown"
} | ---
comments: true
description: Learn how to evaluate your YOLO11 model's performance in real-world scenarios using benchmark mode. Optimize speed, accuracy, and resource allocation across export formats.
keywords: model benchmarking, YOLO11, Ultralytics, performance evaluation, export formats, ONNX, TensorRT, OpenVINO... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@modes@benchmark.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/autorangeoptions/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._minallowed import MinallowedValidator
from ._maxallowed import MaxallowedValidator
from ._includesrc import IncludesrcValidator
from ._include import IncludeValidator
from ._clipmin import ClipminValid... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@autorangeoptions@__init__.py@.PATH_END.py |
{
"filename": "wrapper.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/pipeline/sherlock/wrapper.py",
"type": "Python"
} | """Sherlock Kafka wrapper
Consumes alerts (in plain JSON) from an input topic, sends them to Sherlock,
adds the Sherlock classification and crossmatches back into the alert and
republishes on the output topic.
"""
__version__ = "0.7.6"
import warnings
import json
import yaml
import argparse
import logging
import sys... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@pipeline@sherlock@wrapper.py@.PATH_END.py |
{
"filename": "test_fft_corr.py",
"repo_name": "cosmodesi/pypower",
"repo_path": "pypower_extracted/pypower-main/pypower/tests/test_fft_corr.py",
"type": "Python"
} | import os
import tempfile
import numpy as np
from matplotlib import pyplot as plt
from cosmoprimo.fiducial import DESI
from mockfactory import EulerianLinearMock
from mockfactory.make_survey import RandomBoxCatalog
from pypower import MeshFFTCorr, CatalogFFTCorr, CorrelationFunctionStatistics, CorrelationFunctionMul... | cosmodesiREPO_NAMEpypowerPATH_START.@pypower_extracted@pypower-main@pypower@tests@test_fft_corr.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "bd-j/prospector",
"repo_path": "prospector_extracted/prospector-main/prospect/likelihood/__init__.py",
"type": "Python"
} | from .likelihood import *
from .noise_model import *
__all__ = ["lnlike_spec", "lnlike_phot", "NoiseModel", "NoiseModelCov", "NoiseModelKDE"]
| bd-jREPO_NAMEprospectorPATH_START.@prospector_extracted@prospector-main@prospect@likelihood@__init__.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/selected/marker/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="violin.selected.marker", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@selected@marker@_color.py@.PATH_END.py |
{
"filename": "_zsmooth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/image/_zsmooth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="zsmooth", parent_name="image", **kwargs):
super(ZsmoothValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@image@_zsmooth.py@.PATH_END.py |
{
"filename": "ReadPinocchio.py",
"repo_name": "pigimonaco/Pinocchio",
"repo_path": "Pinocchio_extracted/Pinocchio-master/src/ReadPinocchio.py",
"type": "Python"
} | # *****************************************************************
# * PINOCCHIO V4.1 *
# * (PINpointing Orbit-Crossing Collapsed HIerarchical Objects) *
# *****************************************************************
# This code was written by
# Pierluigi M... | pigimonacoREPO_NAMEPinocchioPATH_START.@Pinocchio_extracted@Pinocchio-master@src@ReadPinocchio.py@.PATH_END.py |
{
"filename": "decode_proto_op_test_base.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/proto/decode_proto_op_test_base.py",
"type": "Python"
} | # =============================================================================
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@proto@decode_proto_op_test_base.py@.PATH_END.py |
{
"filename": "rollingParticleTest.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/DEM/LinearSpringDEM/SolidBoundaryCondition/rollingParticleTest.py",
"type": "Python"
} | #ATS:DEM3dImpact = test( SELF, "--clearDirectories True --checkConservation True --goalTime 1.0", label="DEM impacting squares -- 3-D (parallel)", np=8)
import os, sys, shutil, mpi, random
from math import *
from Spheral3d import *
from SpheralTestUtilities import *
from findLastRestart import *
from Genera... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@DEM@LinearSpringDEM@SolidBoundaryCondition@rollingParticleTest.py@.PATH_END.py |
{
"filename": "_x.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/colorbar/_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="x", parent_name="heatmap.colorbar", **kwargs):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_ty... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@colorbar@_x.py@.PATH_END.py |
{
"filename": "_formatsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/table/header/_formatsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="formatsrc", parent_name="table.header", **kwargs):
super(FormatsrcValidator, 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@table@header@_formatsrc.py@.PATH_END.py |
{
"filename": "_table_schema.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/io/json/_table_schema.py",
"type": "Python"
} | """
Table Schema builders
https://specs.frictionlessdata.io/table-schema/
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import warnings
from pandas._libs import lib
from pandas._libs.json import ujson_loads
from pandas._libs.tslibs import timezones
from pandas.u... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@json@_table_schema.py@.PATH_END.py |
{
"filename": "ops_filterbin.py",
"repo_name": "hpc4cmb/toast",
"repo_path": "toast_extracted/toast-main/src/toast/tests/ops_filterbin.py",
"type": "Python"
} | # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.
# from .mpi import MPITestCase
from toast.tests.mpi import MPITestCase
import glob
import os
import shutil
import healpy as ... | hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@toast@tests@ops_filterbin.py@.PATH_END.py |
{
"filename": "multi_result_summary.py",
"repo_name": "NuSpaceSim/nuSpaceSim",
"repo_path": "nuSpaceSim_extracted/nuSpaceSim-main/scripts/multi_result_summary.py",
"type": "Python"
} | # Requires nuspacesim and tabulate
#
# pip install nuspacesim tabulate
#
# Usage:
#
# python multi_result_summary directory/with/simulation/files/
import os
import sys
from astropy.table import Table as AstropyTable
from tabulate import tabulate
if __name__ == "__main__":
results = list()
path = os.path.ab... | NuSpaceSimREPO_NAMEnuSpaceSimPATH_START.@nuSpaceSim_extracted@nuSpaceSim-main@scripts@multi_result_summary.py@.PATH_END.py |
{
"filename": "test.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/modules/python/test/test.py",
"type": "Python"
} | #!/usr/bin/env python
'''
Location of tests:
- <opencv_src>/modules/python/test
- <opencv_src>/modules/<module>/misc/python/test/
'''
from __future__ import print_function
import sys
sys.dont_write_bytecode = True # Don't generate .pyc files / __pycache__ directories
import os
import unittest
# Python 3 moved urlo... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@python@test@test.py@.PATH_END.py |
{
"filename": "_config.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/_config.py",
"type": "Python"
} | """Global configuration state and functions for management"""
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
import os
import threading
from contextlib import contextmanager as contextmanager
_global_config = {
"assume_finite": bool(os.environ.get("SKLEARN_ASSUME_FINITE", False)),... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@_config.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/histogram2d/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram2d.hoverlabel"
_path_str = "histogram2d.hoverlabel.font"
_valid_props = {
"co... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@histogram2d@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "test_cerebriumai.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/llms/test_cerebriumai.py",
"type": "Python"
} | """Test CerebriumAI llm"""
from pydantic import SecretStr
from pytest import CaptureFixture, MonkeyPatch
from langchain_community.llms.cerebriumai import CerebriumAI
def test_api_key_is_secret_string() -> None:
llm = CerebriumAI(cerebriumai_api_key="test-cerebriumai-api-key") # type: ignore[arg-type]
asser... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@llms@test_cerebriumai.py@.PATH_END.py |
{
"filename": "_textcasesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/link/hoverlabel/font/_textcasesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="textcasesrc",
parent_name="sankey.link.hoverlabel.font",
**kwargs,
):
super(TextcasesrcValidator, self).__init__(
plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@link@hoverlabel@font@_textcasesrc.py@.PATH_END.py |
{
"filename": "rb_plot_spec.py",
"repo_name": "rongmon/rbcodes",
"repo_path": "rbcodes_extracted/rbcodes-master/GUIs/rb_plot_spec.py",
"type": "Python"
} | """ Interactive 1D spectrum viewer and multiple absorber identifier."""
import matplotlib
matplotlib.use('TkAgg')
import numpy as np
import matplotlib.pyplot as plt
from astropy.io import ascii
from scipy.interpolate import splrep,splev
import sys
import os
from scipy.signal import medfilt
from astropy.convolution im... | rongmonREPO_NAMErbcodesPATH_START.@rbcodes_extracted@rbcodes-master@GUIs@rb_plot_spec.py@.PATH_END.py |
{
"filename": "nsns.py",
"repo_name": "icecube/toise",
"repo_path": "toise_extracted/toise-main/toise/nsns.py",
"type": "Python"
} | import numpy as np
from scipy.interpolate import interp1d
class NSNS(object):
def __init__(self, distance_mpc=10):
self.E = np.array(
[
369239.10729495314,
471060.7541983269,
642232.5422229343,
875603.9101412345,
1... | icecubeREPO_NAMEtoisePATH_START.@toise_extracted@toise-main@toise@nsns.py@.PATH_END.py |
{
"filename": "decomp_schur.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/linalg/decomp_schur.py",
"type": "Python"
} | """Schur decomposition functions."""
from __future__ import division, print_function, absolute_import
import numpy
from numpy import asarray_chkfinite, single, asarray
from scipy._lib.six import callable
# Local imports.
from . import misc
from .misc import LinAlgError, _datacopied
from .lapack import get_lapack_fun... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@linalg@decomp_schur.py@.PATH_END.py |
{
"filename": "test_hookcaller.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pluggy/py2/tests/test_hookcaller.py",
"type": "Python"
} | import pytest
from pluggy import HookimplMarker, HookspecMarker
from pluggy.hooks import HookImpl
hookspec = HookspecMarker("example")
hookimpl = HookimplMarker("example")
@pytest.fixture
def hc(pm):
class Hooks(object):
@hookspec
def he_method1(self, arg):
pass
pm.add_hookspecs... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pluggy@py2@tests@test_hookcaller.py@.PATH_END.py |
{
"filename": "Gamma_ray_limits_testing_5_9_18.ipynb",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/notebooks/dev/Gamma_ray_limits_testing_5_9_18.ipynb",
"type": "Jupyter Notebook"
} | ```python
import matplotlib.pyplot as plt
import numpy as np
from hazma.scalar_mediator import ScalarMediator
colors = 2*[c["color"] for c in plt.rcParams["axes.prop_cycle"]]
```
```python
gsxx = 1.0
gsff = 1.0
gsGG = 1.0
gsFF = 1.0
ms = 1.0
vx_mw = 1.0e-3 # DM velocity in Milky Way halo
def ex(mx, vx=vx_mw):
... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@notebooks@dev@Gamma_ray_limits_testing_5_9_18.ipynb@.PATH_END.py |
{
"filename": "gaussian_sampler.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/examples/nonlinear/gaussian_sampler.py",
"type": "Python"
} | """
File: examples/nonlinear/gaussian_sampler.py
Author: Keith Tauscher
Date: 24 Nov 2018
Description: Example showing use of the GaussianLoglikelihood class in an MCMC
sampling context and comparison with the Fisher matrix formalism.
"""
from __future__ import division
import os
import numpy as np
import... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@nonlinear@gaussian_sampler.py@.PATH_END.py |
{
"filename": "tf_optimizer_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/grappler/tf_optimizer_test.py",
"type": "Python"
} | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@grappler@tf_optimizer_test.py@.PATH_END.py |
{
"filename": "django_db.py",
"repo_name": "dstndstn/astrometry.net",
"repo_path": "astrometry.net_extracted/astrometry.net-main/net/appsecrets-example/django_db.py",
"type": "Python"
} | DATABASE_USER = 'nova'
DATABASE_PASSWORD = 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''
| dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@net@appsecrets-example@django_db.py@.PATH_END.py |
{
"filename": "DataModelClasses.py",
"repo_name": "sdss/marvin",
"repo_path": "marvin_extracted/marvin-main/python/marvin/db/models/DataModelClasses.py",
"type": "Python"
} | #!/usr/bin/python
# -------------------------------------------------------------------
# Import statements
# -------------------------------------------------------------------
import math
import os
import re
import sys
from decimal import *
from operator import *
import marvin.db.models.SampleModelClasses as sample... | sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@db@models@DataModelClasses.py@.PATH_END.py |
{
"filename": "TUI_lib.py",
"repo_name": "astrom-tom/SPARTAN",
"repo_path": "SPARTAN_extracted/SPARTAN-master/spartan/TUI_lib.py",
"type": "Python"
} | '''
############################
#####
##### The Spartan Project
##### R. THOMAS
##### 2016
#####
##### File of the lib
##### page TUI
#####
###########################
'''
###Python libs
import npyscreen
#######
from . import TUI_lib_Provided as libProvided
from .config_check import ch... | astrom-tomREPO_NAMESPARTANPATH_START.@SPARTAN_extracted@SPARTAN-master@spartan@TUI_lib.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.