metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "bench.md",
"repo_name": "teuben/DataComb",
"repo_path": "DataComb_extracted/DataComb-main/md/bench.md",
"type": "Markdown"
} | # DC2019 benchmark
There is a bench.md in QAC, but here we want a much simpler one. Probably the goal here
is to have a benchmark that also tests if the results of the
computation are same/close enough to what we consider the correct answer.
In QAC we use qac_stats(), which prints some simple mean/rms/min/max/flux/sra... | teubenREPO_NAMEDataCombPATH_START.@DataComb_extracted@DataComb-main@md@bench.md@.PATH_END.py |
{
"filename": "test_astro_data2.py",
"repo_name": "sherpa/sherpa",
"repo_path": "sherpa_extracted/sherpa-main/sherpa/astro/tests/test_astro_data2.py",
"type": "Python"
} | #
# Copyright (C) 2020 - 2024
# Smithsonian Astrophysical Observatory
#
#
# 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 v... | sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@astro@tests@test_astro_data2.py@.PATH_END.py |
{
"filename": "paper.md",
"repo_name": "hposborn/MonoTools",
"repo_path": "MonoTools_extracted/MonoTools-main/paper/paper.md",
"type": "Markdown"
} | ---
title: 'MonoTools -- A python package for planets of uncertain period'
tags:
- Python
- astronomy
- exoplanets
- transit
authors:
- name: Hugh P. Osborn
orcid: 0000-0002-4047-4724
affiliation: 1, 2
affiliations:
- name: NCCR/Planet S, Centre for Space and Habitability, University of Bern, Swit... | hposbornREPO_NAMEMonoToolsPATH_START.@MonoTools_extracted@MonoTools-main@paper@paper.md@.PATH_END.py |
{
"filename": "run_compiled_diffusion_model_hotswap.py",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/tests/run_compiled_diffusion_model_hotswap.py",
"type": "Python"
} | # Copyright 2024-present the HuggingFace Inc. team.
#
# 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... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@tests@run_compiled_diffusion_model_hotswap.py@.PATH_END.py |
{
"filename": "test_blocks.py",
"repo_name": "lgrcia/prose",
"repo_path": "prose_extracted/prose-main/tests/test_blocks.py",
"type": "Python"
} | import inspect
import sys
import numpy as np
import pytest
from prose import Block, Sequence, blocks, example_image
from prose.blocks.centroids import _PhotutilsCentroid
from prose.blocks.detection import _SourceDetection
from prose.blocks.psf import _PSFModelBase
image = blocks.PointSourceDetection()(example_image(... | lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@tests@test_blocks.py@.PATH_END.py |
{
"filename": "HI2Astro.py",
"repo_name": "PabloVD/21cmDeepLearning",
"repo_path": "21cmDeepLearning_extracted/21cmDeepLearning-master/HI2Astro.py",
"type": "Python"
} | #----------------------------------------------------------------
# CNN to predict the astrophysical parameters from a 21 cm field
# It can employ the encoder of the pre-trained U-Net
# Author: Pablo Villanueva Domingo
# Last update: 25/6/20
#----------------------------------------------------------------
import time... | PabloVDREPO_NAME21cmDeepLearningPATH_START.@21cmDeepLearning_extracted@21cmDeepLearning-master@HI2Astro.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterternary/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="scatterternary", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterternary@_text.py@.PATH_END.py |
{
"filename": "selfcal.py",
"repo_name": "mpi-astronomy/snowblind",
"repo_path": "snowblind_extracted/snowblind-main/src/snowblind/selfcal.py",
"type": "Python"
} | from os.path import commonprefix
import warnings
from astropy.stats import sigma_clipped_stats
import numpy as np
from jwst import datamodels
from jwst.stpipe import Step
OPEN = datamodels.dqflags.pixel["OPEN"]
ADJ_OPEN = datamodels.dqflags.pixel["ADJ_OPEN"]
DO_NOT_USE = datamodels.dqflags.pixel["DO_NOT_USE"]
clas... | mpi-astronomyREPO_NAMEsnowblindPATH_START.@snowblind_extracted@snowblind-main@src@snowblind@selfcal.py@.PATH_END.py |
{
"filename": "spherical_rht.py",
"repo_name": "georgehalal/sphericalrht",
"repo_path": "sphericalrht_extracted/sphericalrht-main/src/sphericalrht/spherical_rht.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Spherical Rolling Hough Transform
A fast, efficient implementation of the Rolling Hough
Transform using spherical harmonic convolutions to
perform the algorithm directly on the sphere.
Classes:
StokesQU: Handling Stokes linear polarization maps (only use
if necessary).
Cub... | georgehalalREPO_NAMEsphericalrhtPATH_START.@sphericalrht_extracted@sphericalrht-main@src@sphericalrht@spherical_rht.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="densitymapbox.hoverlabel.font",
**kwargs,
):
super(FamilysrcValidator, self).__init__(
plotly_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "evidence.py",
"repo_name": "florpi/sunbird",
"repo_path": "sunbird_extracted/sunbird-main/paper_figures/boss/evidence.py",
"type": "Python"
} | """
Figure 7: Bayesian evidence
"""
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
from sunbird.data.data_readers import NseriesCutsky, CMASS
from sunbird.covariance import CovarianceMatrix
from sunbird.summaries import Bundle
from getdist import MCSamples
plt.style.use(['stylelib/science.m... | florpiREPO_NAMEsunbirdPATH_START.@sunbird_extracted@sunbird-main@paper_figures@boss@evidence.py@.PATH_END.py |
{
"filename": "_ticklabelposition.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/colorbar/_ticklabelposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabelposition",
parent_name="densitymap.colorbar",
**kwargs,
):
super(TicklabelpositionValidator, self).__init__(... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@colorbar@_ticklabelposition.py@.PATH_END.py |
{
"filename": "densenet.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/torchvision/models/densenet.py",
"type": "Python"
} | import re
from collections import OrderedDict
from functools import partial
from typing import Any, List, Optional, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
from torch import Tensor
from ..transforms._presets import ImageClassification
from ..utils i... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@models@densenet.py@.PATH_END.py |
{
"filename": "prior.py",
"repo_name": "ojhall94/michael",
"repo_path": "michael_extracted/michael-main/michael/prior.py",
"type": "Python"
} | """
Class to estimate prior expectations of target rotation period based on
select input data.
"""
import pandas as pd
import numpy as np
import emcee
import statsmodels.api as sm
from statsmodels.nonparametric.bandwidths import select_bandwidth
from .utils import _random_seed
class priorclass():
""" Class manag... | ojhall94REPO_NAMEmichaelPATH_START.@michael_extracted@michael-main@michael@prior.py@.PATH_END.py |
{
"filename": "_x.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/marker/colorbar/_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="x", parent_name="splom.marker.colorbar", **kwargs):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@marker@colorbar@_x.py@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="name", parent_name="surface", **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_ty... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@_name.py@.PATH_END.py |
{
"filename": "vincent_renderer.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/matplotlylib/mplexporter/renderers/vincent_renderer.py",
"type": "Python"
} | import warnings
from .base import Renderer
from ..exporter import Exporter
class VincentRenderer(Renderer):
def open_figure(self, fig, props):
self.chart = None
self.figwidth = int(props["figwidth"] * props["dpi"])
self.figheight = int(props["figheight"] * props["dpi"])
def draw_line(... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@matplotlylib@mplexporter@renderers@vincent_renderer.py@.PATH_END.py |
{
"filename": "notes.md",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/kpfpipe/models/notes.md",
"type": "Markdown"
} | # Data Model Notes
## Level 0 data
- Contain a single 2D image and variance array (2 extensions).
- Image and variance can be empty.
- contain "receipt" extension as ASCII table (exist in memory as pandas)
- support adding/removing auxillary HDUs
## Level 1 data
- Data identified by fibers
- Each fiber have flux, w... | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@kpfpipe@models@notes.md@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/aaxis/title/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="layout.ternary.aaxis.title.font",
**kwargs,
):
super(TextcaseValidator, self).__init__(
pl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@aaxis@title@font@_textcase.py@.PATH_END.py |
{
"filename": "acsData.py",
"repo_name": "spacetelescope/drizzlepac",
"repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/acsData.py",
"type": "Python"
} | """
Class used to model ACS specific instrument data.
:Authors: Christopher Hanley, Warren Hack, Ivo Busko, David Grumm
:License: :doc:`/LICENSE`
"""
from stsci.tools import fileutil
import numpy as np
from .imageObject import imageObject
class ACSInputImage(imageObject):
SEPARATOR = '_'
def __init__(sel... | spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@acsData.py@.PATH_END.py |
{
"filename": "test_reduce.py",
"repo_name": "ledatelescope/bifrost",
"repo_path": "bifrost_extracted/bifrost-master/test/test_reduce.py",
"type": "Python"
} |
# Copyright (c) 2016-2023, The Bifrost Authors. 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
# notice, this list of conditi... | ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@test@test_reduce.py@.PATH_END.py |
{
"filename": "PN_dE_GW_dt_and_dM_dt.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/NRPyPN/PN_dE_GW_dt_and_dM_dt.py",
"type": "Python"
} | # As documented in the NRPyPN notebook
# PN-dE_GW_dt.ipynb, this Python script
# generates dE_GW/dt at highest known
# post-Newtonian order (as of 2015, at
# least).
# Core functions:
# dE_GW_dt_OBKPSS2015_consts(m1,m2, n12U, S1U,S2U):
# Define constants used in the dE_GW/dt expression.
# f_dE_GW_dt(mOmega, m1,m... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@NRPyPN@PN_dE_GW_dt_and_dM_dt.py@.PATH_END.py |
{
"filename": "config.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/omni/config.py",
"type": "Python"
} | import os
CONFIG = {'local_data_dir': 'omni_data/',
'remote_data_dir': 'https://spdf.gsfc.nasa.gov/pub/data/omni/omni_cdaweb/'}
# override local data directory with environment variables
if os.environ.get('SPEDAS_DATA_DIR'):
CONFIG['local_data_dir'] = os.sep.join([os.environ['SPEDAS_DATA_DIR'], 'omni'])... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@omni@config.py@.PATH_END.py |
{
"filename": "config_s4cmb.py",
"repo_name": "JulienPeloton/s4cmb",
"repo_path": "s4cmb_extracted/s4cmb-master/s4cmb/config_s4cmb.py",
"type": "Python"
} | #!/usr/bin/python
# Copyright (c) 2016-2021 Julien Peloton, Giulio Fabbian.
#
# This file is part of s4cmb
#
# 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
#... | JulienPelotonREPO_NAMEs4cmbPATH_START.@s4cmb_extracted@s4cmb-master@s4cmb@config_s4cmb.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="scatterpolargl.hoverlabel.font",
**kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "index.md",
"repo_name": "nasa/Kamodo",
"repo_path": "Kamodo_extracted/Kamodo-master/kamodo_ccmc/readers/kamodo-tsyganenko/docs/index.md",
"type": "Markdown"
} |
{! ../README.md !}
| nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@kamodo_ccmc@readers@kamodo-tsyganenko@docs@index.md@.PATH_END.py |
{
"filename": "test_signal.py",
"repo_name": "ExObsSim/ExoRad2-public",
"repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/tests/test_signal.py",
"type": "Python"
} | import logging
import unittest
import astropy.units as u
import numpy as np
from exorad.log import setLogLevel
from exorad.models.noise import Noise
from exorad.models.signal import CountsPerSeconds
from exorad.models.signal import Sed
from exorad.models.signal import Signal
setLogLevel(logging.DEBUG)
class Signal... | ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@tests@test_signal.py@.PATH_END.py |
{
"filename": "_tickvalssrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="layout.scene.xaxis", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
p... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@_tickvalssrc.py@.PATH_END.py |
{
"filename": "test_color_maps.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/visualization/tests/test_color_maps.py",
"type": "Python"
} | import os
import shutil
import tempfile
import unittest
import matplotlib.pyplot as plt
import numpy as np
from nose.tools import assert_raises
from numpy.testing import assert_almost_equal, assert_equal
from yt import make_colormap, show_colormaps
from yt.testing import requires_backend
class TestColorMaps(unittes... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@visualization@tests@test_color_maps.py@.PATH_END.py |
{
"filename": "_bgcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/colorbar/_bgcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bgcolor", parent_name="barpolar.marker.colorbar", **kwargs
):
super(BgcolorValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@colorbar@_bgcolor.py@.PATH_END.py |
{
"filename": "test_value_counts.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/methods/test_value_counts.py",
"type": "Python"
} | import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.compat import HAS_PYARROW
import pandas as pd
import pandas._testing as tm
def test_data_frame_value_counts_unsorted():
df = pd.DataFrame(
{"num_legs": [2, 4, 4, 6], "num_wings": [2, 0, 0, 0]},
index=["fa... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@methods@test_value_counts.py@.PATH_END.py |
{
"filename": "test_argument_inputs.py",
"repo_name": "JLBLine/WODEN",
"repo_path": "WODEN_extracted/WODEN-master/cmake_testing/wodenpy/wodenpy_setup/test_argument_inputs.py",
"type": "Python"
} | from sys import path
import os
import unittest
import numpy as np
import numpy.testing as npt
code_dir = os.path.realpath(__file__)
code_dir = ('/').join(code_dir.split('/')[:-1])
# ##Code we are testing
from wodenpy.wodenpy_setup import run_setup
##some expected values
east = [-5.55600e+01, 1.77467e+02, -2.17100e+0... | JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@cmake_testing@wodenpy@wodenpy_setup@test_argument_inputs.py@.PATH_END.py |
{
"filename": "_xref.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_xref.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="xref", parent_name="scatter.marker.colorbar", **kwargs
):
super(XrefValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@_xref.py@.PATH_END.py |
{
"filename": "zoomtool.py",
"repo_name": "healpy/healpy",
"repo_path": "healpy_extracted/healpy-main/lib/healpy/zoomtool.py",
"type": "Python"
} | #
# This file is part of Healpy.
#
# Healpy is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Healpy is distributed in the hope... | healpyREPO_NAMEhealpyPATH_START.@healpy_extracted@healpy-main@lib@healpy@zoomtool.py@.PATH_END.py |
{
"filename": "_weightsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="weightsrc",
parent_name="densitymapbox.hoverlabel.font",
**kwargs,
):
super(WeightsrcValidator, self).__init__(
plotly_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@hoverlabel@font@_weightsrc.py@.PATH_END.py |
{
"filename": "model_trace.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/alembic/models/rev_6e3cf7d9b6bf/model_trace.py",
"type": "Python"
} | from datetime import datetime
from typing import TYPE_CHECKING
from sqlalchemy import ForeignKey, UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column, relationship
from .base import Model
if TYPE_CHECKING:
from .model_prompt import Prompt
from .model_run import Run
from .model_stdout import... | simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@alembic@models@rev_6e3cf7d9b6bf@model_trace.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "NuSpaceSim/nuSpaceSim",
"repo_path": "nuSpaceSim_extracted/nuSpaceSim-main/src/nuspacesim/simulation/taus/__init__.py",
"type": "Python"
} | # The Clear BSD License
#
# Copyright (c) 2021 Alexander Reustle and the NuSpaceSim Team
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the disclaimer
# below) provided that the following conditions are met:
#
# ... | NuSpaceSimREPO_NAMEnuSpaceSimPATH_START.@nuSpaceSim_extracted@nuSpaceSim-main@src@nuspacesim@simulation@taus@__init__.py@.PATH_END.py |
{
"filename": "test_fitting_smah_helpers.py",
"repo_name": "ArgonneCPAC/diffstar",
"repo_path": "diffstar_extracted/diffstar-main/diffstar/fitting_helpers/tests/test_fitting_smah_helpers.py",
"type": "Python"
} | """
"""
import numpy as np
from ...defaults import DEFAULT_MS_PDICT, DEFAULT_Q_PDICT
from ...utils import _jax_get_dt_array
from ..fit_smah_helpers import get_header, get_loss_data_fixed_hi
DIFFMAH_K = 3.5
def test_get_header_colnames_agree_with_model_param_names():
header = get_header()
assert header[0] =... | ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@diffstar@fitting_helpers@tests@test_fitting_smah_helpers.py@.PATH_END.py |
{
"filename": "plot_disk.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/examples/models/spatial/plot_disk.py",
"type": "Python"
} | r"""
.. _disk-spatial-model:
Disk spatial model
==================
This is a spatial model parametrising a disk.
By default, the model is symmetric, i.e. a disk:
.. math::
\phi(lon, lat) = \frac{1}{2 \pi (1 - \cos{r_0}) } \cdot
\begin{cases}
1 & \text{for } \theta \leq r_0 \\
... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@examples@models@spatial@plot_disk.py@.PATH_END.py |
{
"filename": "CODE_OF_CONDUCT.md",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/CODE_OF_CONDUCT.md",
"type": "Markdown"
} | [scikit-image Code of Conduct](doc/source/about/code_of_conduct.md)
| scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@CODE_OF_CONDUCT.md@.PATH_END.py |
{
"filename": "test_point_source_rendering.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_ImSim/test_Numerics/test_point_source_rendering.py",
"type": "Python"
} | from lenstronomy.ImSim.Numerics.point_source_rendering import PointSourceRendering
from lenstronomy.Data.pixel_grid import PixelGrid
from lenstronomy.Data.psf import PSF
import numpy as np
import numpy.testing as npt
import pytest
import unittest
class TestPointSourceRendering(object):
def setup_method(self):
... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_ImSim@test_Numerics@test_point_source_rendering.py@.PATH_END.py |
{
"filename": "_layout.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/_layout.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="layout", parent_name="", **kwargs):
super(LayoutValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_c... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@_layout.py@.PATH_END.py |
{
"filename": "classifier_metrics.py",
"repo_name": "daniel-muthukrishna/astrorapid",
"repo_path": "astrorapid_extracted/astrorapid-master/astrorapid/classifier_metrics.py",
"type": "Python"
} | """
Plot overall classification performance metrics.
"""
import os
import sys
import numpy as np
import itertools
from distutils.spawn import find_executable
from sklearn.metrics import roc_curve, auc
from sklearn.metrics import precision_recall_curve
from sklearn.metrics import f1_score
from sklearn.metrics import av... | daniel-muthukrishnaREPO_NAMEastrorapidPATH_START.@astrorapid_extracted@astrorapid-master@astrorapid@classifier_metrics.py@.PATH_END.py |
{
"filename": "zep.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/zep.py",
"type": "Python"
} | from __future__ import annotations
import logging
import warnings
from dataclasses import asdict, dataclass
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.vectorstores impor... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@zep.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/_eigen/lobpcg/tests/__init__.py",
"type": "Python"
} | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@_eigen@lobpcg@tests@__init__.py@.PATH_END.py | |
{
"filename": "filter_design.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/signal/filter_design.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.signal` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = [ # noqa: F822
'findfreqs', 'freqs', 'freqz', 'tf2zpk', 'zpk2tf', 'normalize',
'lp... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@signal@filter_design.py@.PATH_END.py |
{
"filename": "sis_truncate.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/Profiles/sis_truncate.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy as np
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
__all__ = ["SIS_truncate"]
class SIS_truncate(LensProfileBase):
"""This class contains the function and the derivatives of the Singular Isothermal
Sphere."""
param_names = ["theta_E", "r_t... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@Profiles@sis_truncate.py@.PATH_END.py |
{
"filename": "test_tgasSelect.py",
"repo_name": "jobovy/gaia_tools",
"repo_path": "gaia_tools_extracted/gaia_tools-main/nose/test_tgasSelect.py",
"type": "Python"
} | # Tests of gaia_tools.select.tgasSelect
import numpy
import gaia_tools.select
def test_effvol_complete():
# Test that the effective volume == volume when the completeness == 1
tsf= gaia_tools.select.tgasSelectUniform(comp=1.)
tesf= gaia_tools.select.tgasEffectiveSelect(tsf)
dxy, dz, zmin= 0.2, 0.1, 0.1... | jobovyREPO_NAMEgaia_toolsPATH_START.@gaia_tools_extracted@gaia_tools-main@nose@test_tgasSelect.py@.PATH_END.py |
{
"filename": "__init__kpd.py",
"repo_name": "tgrassi/prizmo",
"repo_path": "prizmo_extracted/prizmo-main/src_py/ChiantiPy/__init__kpd.py",
"type": "Python"
} | """
ChiantiPy - CHIANTI Python package Calculates various aspects of emission lines
and continua from the CHIANTI atomic database for astrophysical spectroscopy.
"""
# This is not yet an Astropy affiliated package, but it makes use of the Astropy
# package template
# this indicates whether or not we are in the package... | tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@ChiantiPy@__init__kpd.py@.PATH_END.py |
{
"filename": "laguerre.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/polynomial/laguerre.py",
"type": "Python"
} | """
==================================================
Laguerre Series (:mod:`numpy.polynomial.laguerre`)
==================================================
This module provides a number of objects (mostly functions) useful for
dealing with Laguerre series, including a `Laguerre` class that
encapsulates the usual arit... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@polynomial@laguerre.py@.PATH_END.py |
{
"filename": "example_reduction.ipynb",
"repo_name": "grzeimann/LRS2Multi",
"repo_path": "LRS2Multi_extracted/LRS2Multi-main/notebooks/example_reduction.ipynb",
"type": "Jupyter Notebook"
} | # LRS2 advanced reductions (LRS2Multi)
This notebook is an introduction to using LRS2Multi, which operates on Panacea multi*.fits products to perform advanced sky subtraction, object detection, object extraction, cube creation, or stacking multiple observations. The details of the code can be found in https://github.... | grzeimannREPO_NAMELRS2MultiPATH_START.@LRS2Multi_extracted@LRS2Multi-main@notebooks@example_reduction.ipynb@.PATH_END.py |
{
"filename": "test_basinhopping.py",
"repo_name": "lmfit/lmfit-py",
"repo_path": "lmfit-py_extracted/lmfit-py-master/tests/test_basinhopping.py",
"type": "Python"
} | """Tests for the basinhopping minimization algorithm."""
import numpy as np
from numpy.testing import assert_allclose
import pytest
from scipy.optimize import basinhopping
import lmfit
def test_basinhopping_lmfit_vs_scipy():
"""Test basinhopping in lmfit versus scipy."""
# SciPy
def func(x):
retu... | lmfitREPO_NAMElmfit-pyPATH_START.@lmfit-py_extracted@lmfit-py-master@tests@test_basinhopping.py@.PATH_END.py |
{
"filename": "style.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/style.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
pygments.style
~~~~~~~~~~~~~~
Basic style object.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.token import Token, STANDARD_TYPES
from pygments.util import add_metaclass
# Default mapping ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@style.py@.PATH_END.py |
{
"filename": "singleParticleBoundaryCollision-3d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/DEM/LinearSpringDEM/SolidBoundaryCondition/singleParticleBoundaryCollision-3d.py",
"type": "Python"
} | #ATS:DEM3dSPBC1 = test( SELF, "--clearDirectories True --boolCheckRestitutionCoefficient True --normalRestitutionCoefficient 1.0 --g0 0.0 --steps 100", label="DEM perfectly elastic collision with solid boundary -- 3-D (serial)")
#ATS:DEM3dSPBC2 = test( SELF, "--clearDirectories True --boolCheckRestitutionCoefficient... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@DEM@LinearSpringDEM@SolidBoundaryCondition@singleParticleBoundaryCollision-3d.py@.PATH_END.py |
{
"filename": "_pattern.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/_pattern.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class PatternValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="pattern", parent_name="barpolar.marker", **kwargs):
super(PatternValidator, 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@barpolar@marker@_pattern.py@.PATH_END.py |
{
"filename": "_stream.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/densitymapbox/_stream.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Stream(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "densitymapbox"
_path_str = "densitymapbox.stream"
_valid_props = {"maxpoints", "token"}
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@densitymapbox@_stream.py@.PATH_END.py |
{
"filename": "llm_checker.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/cookbook/llm_checker.ipynb",
"type": "Jupyter Notebook"
} | # Self-checking chain
This notebook showcases how to use LLMCheckerChain.
```python
from langchain.chains import LLMCheckerChain
from langchain_openai import OpenAI
llm = OpenAI(temperature=0.7)
text = "What type of mammal lays the biggest eggs?"
checker_chain = LLMCheckerChain.from_llm(llm, verbose=True)
checker... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@llm_checker.ipynb@.PATH_END.py |
{
"filename": "MetadataDisplayer.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata/MetadataDisplayer.md",
"type": "Markdown"
} | page_type: reference
description: Displays metadata and associated file info in human-readable format.
<link rel="stylesheet" href="/site-assets/css/style.css">
<!-- DO NOT EDIT! Automatically generated file. -->
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@metadata@MetadataDisplayer.md@.PATH_END.py |
{
"filename": "mpl_axes.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/mpl_axes.py",
"type": "Python"
} | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import warnings
import matplotlib.axes as maxes
from matplotlib.artist import Artist
from matplotlib.axis import XAxis, YAxis
class SimpleChainedObjects(object):
def __init__(self, objects):
... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@axes_grid1@mpl_axes.py@.PATH_END.py |
{
"filename": "send_cor.py",
"repo_name": "igmhub/picca",
"repo_path": "picca_extracted/picca-master/tutorials/eboss_dr16/Scripts/send_cor.py",
"type": "Python"
} | import scipy as sp
import scipy.linalg
import argparse
import subprocess
import fitsio
import os
import h5py
import glob
import time
import matplotlib.pyplot as plt
from picca.constants import ABSORBER_IGM
path_here = os.environ['DR16_BASE']
path_drq = os.environ['QSO_CAT']
path_deltas = os.environ['DR16_BASE']
met... | igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@tutorials@eboss_dr16@Scripts@send_cor.py@.PATH_END.py |
{
"filename": "sd_fit.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/erg/ground/radar/superdarn/sd_fit.py",
"type": "Python"
} | import cdflib
import fnmatch
import numpy as np
from copy import deepcopy
from pytplot import get_data, store_data, options, clip, ylim, zlim
from pytplot import tnames
from ....satellite.erg.load import load
from ....satellite.erg.get_gatt_ror import get_gatt_ror
from .get_sphcntr import get_sphcntr
"""
;Internal... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@erg@ground@radar@superdarn@sd_fit.py@.PATH_END.py |
{
"filename": "mArchiveDownload.py",
"repo_name": "Caltech-IPAC/Montage",
"repo_path": "Montage_extracted/Montage-main/python/MontagePy/mArchiveDownload.py",
"type": "Python"
} | #!/bin/env python
import os
import sys
import ssl
import json
import bz2
import urllib.parse
from urllib.request import urlopen
def mArchiveDownload(survey, location, size, path):
"""
.
mArchiveDownload populates a directory with raw images from
one of several astronomical missions (2MASS, SDSS, WI... | Caltech-IPACREPO_NAMEMontagePATH_START.@Montage_extracted@Montage-main@python@MontagePy@mArchiveDownload.py@.PATH_END.py |
{
"filename": "maps.py",
"repo_name": "dhanson/quicklens",
"repo_path": "quicklens_extracted/quicklens-master/quicklens/maps.py",
"type": "Python"
} | # quicklens/maps.py
# --
# this module contains classes and subroutines
# for working with flat-sky temperature and polarization maps,
# as well as their 2D fourier transforms.
# overview of classes:
# * pix = descriptor class for a map pixelization with rectangular pixels.
# * rmap = real-valued map... | dhansonREPO_NAMEquicklensPATH_START.@quicklens_extracted@quicklens-master@quicklens@maps.py@.PATH_END.py |
{
"filename": "piernik_problem.py",
"repo_name": "piernik-dev/piernik",
"repo_path": "piernik_extracted/piernik-master/problems/sedov/piernik_problem.py",
"type": "Python"
} | from yt.mods import \
load, SlicePlot, parallel_objects
FIELDS = ['denn', 'enen']
def visualize(files):
output = []
for fn in parallel_objects(files, njobs=-1):
pf = load(fn)
for field in FIELDS:
slc = SlicePlot(pf, 'z', field)
output.append(slc.save(fn.replace('.h... | piernik-devREPO_NAMEpiernikPATH_START.@piernik_extracted@piernik-master@problems@sedov@piernik_problem.py@.PATH_END.py |
{
"filename": "models.py",
"repo_name": "ArtificialStellarPopulations/ArtPop",
"repo_path": "ArtPop_extracted/ArtPop-main/src/artpop/space/models.py",
"type": "Python"
} | # Third-party
import numpy as np
from astropy.modeling import Fittable2DModel, Parameter
__all__ = ['Plummer2D', 'Constant2D']
class Plummer2D(Fittable2DModel):
"""
Two-dimensional Plummer surface brightness profile.
Parameters
----------
amplitude : float
Central surface brightness.
... | ArtificialStellarPopulationsREPO_NAMEArtPopPATH_START.@ArtPop_extracted@ArtPop-main@src@artpop@space@models.py@.PATH_END.py |
{
"filename": "acspyTestError.py",
"repo_name": "ACS-Community/ACS",
"repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/test/acspyTestError.py",
"type": "Python"
} | #!/usr/bin/env python
#*******************************************************************************
# ALMA - Atacama Large Millimiter Array
# (c) Associated Universities Inc., 2002
# (c) European Southern Observatory, 2002
# Copyright by ESO (in the framework of the ALMA collaboration)
# and Cosylab 2002, All right... | ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@test@acspyTestError.py@.PATH_END.py |
{
"filename": "redivide_segments.py",
"repo_name": "ideasrule/sparta",
"repo_path": "sparta_extracted/sparta-master/gj1214/redivide_segments.py",
"type": "Python"
} | import astropy.io.fits
import matplotlib.pyplot as plt
import numpy as np
import copy
#Integration numbers, counting from beginning
transit_begin = 10824
transit_end = 11302
seg5_begin = 10528
seg6_begin = 11000
def write_pre_transit_segment(input_filename="old_uncalibrated/jw01803001001_04103_00003-seg005_mirimage_u... | ideasruleREPO_NAMEspartaPATH_START.@sparta_extracted@sparta-master@gj1214@redivide_segments.py@.PATH_END.py |
{
"filename": "neg.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/neg.py",
"type": "Python"
} | # Copyright 2019 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@lite@testing@op_tests@neg.py@.PATH_END.py |
{
"filename": "_anchor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/yaxis/_anchor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="anchor", parent_name="layout.yaxis", **kwargs):
super(AnchorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@yaxis@_anchor.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "philbull/FastBox",
"repo_path": "FastBox_extracted/FastBox-main/fastbox/__init__.py",
"type": "Python"
} |
from .box import CosmoBox
from . import analysis, beams, box, filters, forecast, foregrounds, halos, inpaint, noise, plot, tracers, utils, voids
| philbullREPO_NAMEFastBoxPATH_START.@FastBox_extracted@FastBox-main@fastbox@__init__.py@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sunburst/marker/_line.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="line", parent_name="sunburst.marker", **kwargs):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sunburst@marker@_line.py@.PATH_END.py |
{
"filename": "util_test.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/tests/util_test.py",
"type": "Python"
} | # Copyright 2020 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@util_test.py@.PATH_END.py |
{
"filename": "test_kernel.py",
"repo_name": "clemson-cal/sailfish",
"repo_path": "sailfish_extracted/sailfish-master/scripts/test_kernel.py",
"type": "Python"
} | import sys
import logging
sys.path.insert(1, ".")
code = """
PUBLIC void my_1d_kernel(
int ni,
double *data) // :: $.shape == (ni,)
{
FOR_EACH_1D(ni)
{
data[i] = i;
}
}
PUBLIC void my_2d_kernel(
int ni,
int nj,
double *data) // :: $.shape == (ni, nj)
{
FOR_EACH_2D(ni, nj)
... | clemson-calREPO_NAMEsailfishPATH_START.@sailfish_extracted@sailfish-master@scripts@test_kernel.py@.PATH_END.py |
{
"filename": "torchvision_schema.py",
"repo_name": "alibaba/TinyNeuralNetwork",
"repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/tinynn/converter/schemas/torch/torchvision_schema.py",
"type": "Python"
} | from abc import abstractmethod
from ...operators.torch.base import OperatorConverter
class TorchVisionPsRoiAlignSchema(OperatorConverter):
@abstractmethod
def parse(self, node, attrs, args, graph_converter):
'''torchvision::ps_roi_align(Tensor input, Tensor rois, float spatial_scale, int pooled_heigh... | alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@tinynn@converter@schemas@torch@torchvision_schema.py@.PATH_END.py |
{
"filename": "_maxpoints.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/stream/_maxpoints.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs
):
super(MaxpointsValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@stream@_maxpoints.py@.PATH_END.py |
{
"filename": "maketable.py",
"repo_name": "alexbinks/tessilator",
"repo_path": "tessilator_extracted/tessilator-main/tessilator/maketable.py",
"type": "Python"
} | '''
Alexander Binks & Moritz Guenther, 2024
Licence: MIT 2024
Make tabular data for tessilator
This module contains the functions required to convert the input data
into correct formatted astropy tables to be used for further analysis
in the tessilator.
'''
#########################################################... | alexbinksREPO_NAMEtessilatorPATH_START.@tessilator_extracted@tessilator-main@tessilator@maketable.py@.PATH_END.py |
{
"filename": "_cache.py",
"repo_name": "xpsi-group/xpsi",
"repo_path": "xpsi_extracted/xpsi-main/xpsi/PostProcessing/_cache.py",
"type": "Python"
} | from .. import __version__
from ._global_imports import *
try:
import h5py
except ImportError:
print('Install h5py to enable signal caching.')
raise
class _Cache(object):
""" Cache numerical model objects computed during likelihood evaluation.
:param str filename:
Filename of cache.
... | xpsi-groupREPO_NAMExpsiPATH_START.@xpsi_extracted@xpsi-main@xpsi@PostProcessing@_cache.py@.PATH_END.py |
{
"filename": "velocity_moments_kexpanded_fftw.py",
"repo_name": "sfschen/velocileptors",
"repo_path": "velocileptors_extracted/velocileptors-master/velocileptors/EPT/velocity_moments_kexpanded_fftw.py",
"type": "Python"
} | import numpy as np
import time
from scipy.interpolate import interp1d
from velocileptors.Utils.spherical_bessel_transform_fftw import SphericalBesselTransform
from velocileptors.EPT.cleft_kexpanded_fftw import KECLEFT
class KEVelocityMoments(KECLEFT):
'''
Class based on cleft_kexpanded_fftw to compute pair... | sfschenREPO_NAMEvelocileptorsPATH_START.@velocileptors_extracted@velocileptors-master@velocileptors@EPT@velocity_moments_kexpanded_fftw.py@.PATH_END.py |
{
"filename": "scheduler_virtual.py",
"repo_name": "cosmo-ethz/hide",
"repo_path": "hide_extracted/hide-master/hide/strategy/scheduler_virtual.py",
"type": "Python"
} | # HIDE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# HIDE is distributed in the hope that it will be useful,
# but WITHOUT ANY W... | cosmo-ethzREPO_NAMEhidePATH_START.@hide_extracted@hide-master@hide@strategy@scheduler_virtual.py@.PATH_END.py |
{
"filename": "_ambient.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/lighting/_ambient.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AmbientValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="ambient", parent_name="mesh3d.lighting", **kwargs):
super(AmbientValidator, 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@mesh3d@lighting@_ambient.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/evaluation/__init__.py",
"type": "Python"
} | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@evaluation@__init__.py@.PATH_END.py | |
{
"filename": "test_los_distribution.py",
"repo_name": "sibirrer/hierArc",
"repo_path": "hierArc_extracted/hierArc-main/test/test_Likelihood/test_los_distribution.py",
"type": "Python"
} | from hierarc.Sampling.Distributions.los_distributions import LOSDistribution
from scipy.stats import genextreme
import numpy as np
import numpy.testing as npt
import unittest
class TestLOSDistribution(object):
def setup_method(self):
pass
def test_gev(self):
xi = -0.1
mean_gev = 0.0... | sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@test@test_Likelihood@test_los_distribution.py@.PATH_END.py |
{
"filename": "outputs.py",
"repo_name": "jordanflitter/21cmFirstCLASS",
"repo_path": "21cmFirstCLASS_extracted/21cmFirstCLASS-main/src/py21cmfast/outputs.py",
"type": "Python"
} | """
Output class objects.
The classes provided by this module exist to simplify access to large datasets created within C.
Fundamentally, ownership of the data belongs to these classes, and the C functions merely accesses
this and fills it. The various boxes and lightcones associated with each output are available as
... | jordanflitterREPO_NAME21cmFirstCLASSPATH_START.@21cmFirstCLASS_extracted@21cmFirstCLASS-main@src@py21cmfast@outputs.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "OpenAccess-AI-Collective/axolotl",
"repo_path": "axolotl_extracted/axolotl-main/src/axolotl/core/__init__.py",
"type": "Python"
} | OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@core@__init__.py@.PATH_END.py | |
{
"filename": "template.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/template.py",
"type": "Python"
} | """
Description of example
"""
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui, QtWidgets, mkQApp
app = mkQApp()
# win.setWindowTitle('pyqtgraph example: ____')
if __name__ == '__main__':
pg.exec()
| 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@template.py@.PATH_END.py |
{
"filename": "svg_histogram_sgskip.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/user_interfaces/svg_histogram_sgskip.py",
"type": "Python"
} | """
=============
SVG Histogram
=============
Demonstrate how to create an interactive histogram, in which bars
are hidden or shown by clicking on legend markers.
The interactivity is encoded in ecmascript (javascript) and inserted in
the SVG code in a post-processing step. To render the image, open it in
a web brows... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@user_interfaces@svg_histogram_sgskip.py@.PATH_END.py |
{
"filename": "pdfratio.py",
"repo_name": "icecube/skyllh",
"repo_path": "skyllh_extracted/skyllh-master/skyllh/plotting/i3/pdfratio.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""Plotting module to plot IceCube specific PDF ratio objects.
"""
import numpy as np
import itertools
from matplotlib.axes import Axes
from matplotlib.colors import LogNorm
from skyllh.core.py import classname
from skyllh.core.source_hypo_grouping import (
SourceHypoGroupManager,
)
from... | icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@skyllh@plotting@i3@pdfratio.py@.PATH_END.py |
{
"filename": "_startline.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/baxis/_startline.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="startline", parent_name="carpet.baxis", **kwargs):
super(StartlineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@baxis@_startline.py@.PATH_END.py |
{
"filename": "demo_FEA_loads_dynamic.py",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/src/demos/python/fea/demo_FEA_loads_dynamic.py",
"type": "Python"
} | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2014 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distr... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@fea@demo_FEA_loads_dynamic.py@.PATH_END.py |
{
"filename": "gammapy_plugin.py",
"repo_name": "andreatramacere/jetset",
"repo_path": "jetset_extracted/jetset-master/jetset/gammapy_plugin.py",
"type": "Python"
} | __author__ = "Andrea Tramacere"
import os
try:
from gammapy.modeling.models import (
SpectralModel,
)
from gammapy.modeling.parameter import Parameter,Parameters
from gammapy.estimators import FluxPoints
from gammapy.datasets import FluxPointsDataset
from gammapy.modeling import Fit
gammap... | andreatramacereREPO_NAMEjetsetPATH_START.@jetset_extracted@jetset-master@jetset@gammapy_plugin.py@.PATH_END.py |
{
"filename": "plot_fig4.py",
"repo_name": "mkenworthy/exorings",
"repo_path": "exorings_extracted/exorings-master/plot_fig4.py",
"type": "Python"
} | import sys, getopt
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.patches import Rectangle
from astropy.io import ascii
from scipy.interpolate import interp1d
import exorings3 as exorings
# set sensible imshow defaults
mpl.rc('image',... | mkenworthyREPO_NAMEexoringsPATH_START.@exorings_extracted@exorings-master@plot_fig4.py@.PATH_END.py |
{
"filename": "configuration.py",
"repo_name": "AWehrhahn/PyReduce",
"repo_path": "PyReduce_extracted/PyReduce-master/pyreduce/configuration.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""Loads configuration files
This module loads json configuration files from disk,
and combines them with the default settings,
to create one dict that contains all parameters.
It also checks that all parameters exists, and that
no new parameters have been added by accident.
"""
import json
im... | AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@pyreduce@configuration.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ML4GW/hermes",
"repo_path": "hermes_extracted/hermes-main/hermes/aeriel/serve/__init__.py",
"type": "Python"
} | from .serve import serve
| ML4GWREPO_NAMEhermesPATH_START.@hermes_extracted@hermes-main@hermes@aeriel@serve@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/redis/py3/redis/commands/__init__.py",
"type": "Python"
} | from .cluster import READ_COMMANDS, AsyncRedisClusterCommands, RedisClusterCommands
from .core import AsyncCoreCommands, CoreCommands
from .helpers import list_or_args
from .redismodules import AsyncRedisModuleCommands, RedisModuleCommands
from .sentinel import AsyncSentinelCommands, SentinelCommands
__all__ = [
"... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@redis@py3@redis@commands@__init__.py@.PATH_END.py |
{
"filename": "reference_pixels.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/refpix/reference_pixels.py",
"type": "Python"
} | # Module for handling Reference Pixels
# Final CCWG Recommendation of 6/2013:
#
# The reference pixel correction for the NIR detectors should be done\
# immediately following the zero frame subtraction. We recommend that
# the following steps be taken in order for each frame of each exposure,
# with the option to tu... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@refpix@reference_pixels.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/violin/stream/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._token import TokenValidator
from ._maxpoints import MaxpointsValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@violin@stream@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/colorbar/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._yref import YrefValidator
from ._ypad import YpadValidator
from ._yanchor import YanchorValidator
from ._y import YValidator
from ._xref import XrefValidator
from ._xpad import XpadValidator
fr... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@colorbar@__init__.py@.PATH_END.py |
{
"filename": "harps2kpf.py",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/TemplateFit/tools/harps2kpf.py",
"type": "Python"
} | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@TemplateFit@tools@harps2kpf.py@.PATH_END.py | |
{
"filename": "test_io.py",
"repo_name": "cta-observatory/cta-lstchain",
"repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/io/tests/test_io.py",
"type": "Python"
} | import tempfile
import json
import math
import numpy as np
import pandas as pd
import pytest
import tables
from astropy.table import Table, QTable
from ctapipe.instrument import SubarrayDescription
from lstchain.io import add_config_metadata
from lstchain.io.io import get_resource_path
from pathlib import PosixPath
fro... | cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@io@tests@test_io.py@.PATH_END.py |
{
"filename": "_volume.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/_volume.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="volume", parent_name="", **kwargs):
super(VolumeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_c... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@_volume.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.