metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/legendgrouptitle/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="font", parent_name="barpolar.legendgrouptitle", **kwargs
):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@legendgrouptitle@_font.py@.PATH_END.py |
{
"filename": "pad_expander.py",
"repo_name": "CU-NESS/pylinex",
"repo_path": "pylinex_extracted/pylinex-master/examples/expander/pad_expander.py",
"type": "Python"
} | """
File: examples/expander/pad_expander.py
Author: Keith Tauscher
Date: 10 Sep 2017
Description: Example showing how to use PadExpander to have multiplicative or
additive padding regions and any pad value.
"""
import os
import numpy as np
from pylinex import PadExpander, load_expander_from_hdf5_file
arr... | CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@expander@pad_expander.py@.PATH_END.py |
{
"filename": "Plot_benchmark1.py",
"repo_name": "pw31/GGchem",
"repo_path": "GGchem_extracted/GGchem-master/tools/Plot_benchmark1.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
from matplotlib.backends.backend_pdf import PdfPages
plt.rcParams['axes.linewidth'] = 2
pp = PdfPages('ggchem.pdf')
single_figures = 0 # 1 for pdf, 2 for png
file = 'Static_Conc.dat'
data = open... | pw31REPO_NAMEGGchemPATH_START.@GGchem_extracted@GGchem-master@tools@Plot_benchmark1.py@.PATH_END.py |
{
"filename": "types.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/wsgiref/types.py",
"type": "Python"
} | """WSGI-related types for static type checking"""
from collections.abc import Callable, Iterable, Iterator
from types import TracebackType
from typing import Any, Protocol, TypeAlias
__all__ = [
"StartResponse",
"WSGIEnvironment",
"WSGIApplication",
"InputStream",
"ErrorStream",
"FileWrapper",... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@wsgiref@types.py@.PATH_END.py |
{
"filename": "test_version.py",
"repo_name": "simonsobs/nextline-schedule",
"repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/test_version.py",
"type": "Python"
} | import nextline_schedule
def test_version() -> None:
'''Confirm that the version string is attached to the module'''
nextline_schedule.__version__
| simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@test_version.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/line/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="bar.marker.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@line@_colorscale.py@.PATH_END.py |
{
"filename": "test_mark_flares.py",
"repo_name": "afeinstein20/stella",
"repo_path": "stella_extracted/stella-main/stella/tests/test_mark_flares.py",
"type": "Python"
} | import numpy as np
from stella import ConvNN
from stella import FitFlares
from lightkurve.search import search_lightcurve
from numpy.testing import assert_almost_equal
lk = search_lightcurve(target='tic62124646', mission='TESS',
exptime=120, sector=13, author='SPOC')
lk = lk.download(download_di... | afeinstein20REPO_NAMEstellaPATH_START.@stella_extracted@stella-main@stella@tests@test_mark_flares.py@.PATH_END.py |
{
"filename": "mpi_pool.py",
"repo_name": "igomezv/simplemc_tests",
"repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/analyzers/emcee/mpi_pool.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
try:
from schwimmbad import MPIPool
except ImportError:
class MPIPool(object):
def __init__(self, *args, **kwargs):
raise ImportError(
"The MPIPool from emcee has been forked to "
"https://github.com/adrn/schwimmbad, "
... | igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@analyzers@emcee@mpi_pool.py@.PATH_END.py |
{
"filename": "faq.md",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/docs/user_guide/faq.md",
"type": "Markdown"
} | <!--
# Copyright 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this l... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@docs@user_guide@faq.md@.PATH_END.py |
{
"filename": "rws.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/infer/rws.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import math
import torch
import pyro
import pyro.poutine as poutine
from pyro.infer.elbo import ELBO
from pyro.infer.enum import get_importance_trace
from pyro.infer.util import is_validation_enabled
from pyro.poutine.util import... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@infer@rws.py@.PATH_END.py |
{
"filename": "rename_pulsar.py",
"repo_name": "plazar/TOASTER",
"repo_path": "TOASTER_extracted/TOASTER-master/toolkit/pulsars/rename_pulsar.py",
"type": "Python"
} | #!/usr/bin/env python
import utils
import errors
import database
SHORTNAME = 'rename'
DESCRIPTION = "Change the name of a pulsar entry. " \
"The old name will remain a valid alias."
def add_arguments(parser):
parser.add_argument('-n', '--name', dest='newname', type=str, \
he... | plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@toolkit@pulsars@rename_pulsar.py@.PATH_END.py |
{
"filename": "anchored_artists.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/axes_grid/anchored_artists.py",
"type": "Python"
} | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\
TextArea, AnchoredText, DrawingArea, AnnotationBbox
from mpl_toolkits.axes_grid1.anchored_artists import \
AnchoredD... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@axes_grid@anchored_artists.py@.PATH_END.py |
{
"filename": "sn_sl_metric.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/metrics/sn_sl_metric.py",
"type": "Python"
} | __all__ = ("SNSLMetric",)
import healpy as hp
import numpy as np
from rubin_scheduler.utils import calc_season
import rubin_sim.maf.metrics as metrics
from rubin_sim.maf.utils import collapse_night
from rubin_sim.phot_utils import DustValues
class SNSLMetric(metrics.BaseMetric):
"""Calculate the number of expe... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@metrics@sn_sl_metric.py@.PATH_END.py |
{
"filename": "wx_gradient_editor.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/tvtk/util/wx_gradient_editor.py",
"type": "Python"
} | """ A wxPython based color gradient editor for vtkLookupTables and
color transfer functions.
This code is distributed under the conditions of the BSD license.
Based on a Tk version of this widget by Gerald Knizia <cgk.d@gmx.net>
Ported to wxPython by Pete Schmitt <schmitt@colorado.edu>
Cleaned up and enhanced for use... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@tvtk@util@wx_gradient_editor.py@.PATH_END.py |
{
"filename": "schedule.py",
"repo_name": "BRML/climin",
"repo_path": "climin_extracted/climin-master/climin/schedule.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""This module holds various schedules for parameters such as the step
rate or momentum for gradient descent.
A schedule is implemented as an iterator. This allows it to have iterators
of infinite length. It also makes it possible to manipulate scheduls with
the ``itertools`` python module, e.... | BRMLREPO_NAMEcliminPATH_START.@climin_extracted@climin-master@climin@schedule.py@.PATH_END.py |
{
"filename": "g3_sim.py",
"repo_name": "simonsobs/sotodlib",
"repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/g3_sim.py",
"type": "Python"
} | # Copyright (c) 2018-2020 Simons Observatory.
# Full license can be found in the top level "LICENSE" file.
"""Data simulation.
This module contains code for simulating data.
"""
import numpy as np
from spt3g import core
from .core.g3_core import DataG3Module
class PipelineSeeder(list):
"""
A way to introd... | simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@g3_sim.py@.PATH_END.py |
{
"filename": "perspective-effect.ipynb",
"repo_name": "smoh/kinesis",
"repo_path": "kinesis_extracted/kinesis-master/notebooks/perspective-effect.ipynb",
"type": "Jupyter Notebook"
} | This notebook verifies math in Appendix A. Perspective effect in Oh & Evans 2020.
```python
from sympy import symbols, simplify, latex
from sympy import cos, sin, Matrix, diff, N
import numpy as np
ra, dec = symbols('alpha, delta')
vra,vdec,vr = symbols(r'v_\alpha, v_\delta, v_r')
vx,vy,vz = symbols('v_x v_y v_z')
d... | smohREPO_NAMEkinesisPATH_START.@kinesis_extracted@kinesis-master@notebooks@perspective-effect.ipynb@.PATH_END.py |
{
"filename": "_hoverlabel.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/mesh3d/_hoverlabel.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Hoverlabel(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "mesh3d"
_path_str = "mesh3d.hoverlabel"
_valid_props = {
"align",
"align... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@mesh3d@_hoverlabel.py@.PATH_END.py |
{
"filename": "_xaxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/_xaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="xaxis", parent_name="funnel", **kwargs):
super(XaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
df... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@_xaxis.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "davidwhogg/NoDataInterpolation",
"repo_path": "NoDataInterpolation_extracted/NoDataInterpolation-main/python/ndi/__init__.py",
"type": "Python"
} | import numpy as np
import warnings
from collections import OrderedDict
from typing import List, Tuple, Optional
from itertools import cycle
def resample_spectrum(
resample_wavelength: np.array,
wavelength: np.array,
flux: np.array,
ivar: Optional[np.array] = None,
flags: Optional[np.array] = None,
... | davidwhoggREPO_NAMENoDataInterpolationPATH_START.@NoDataInterpolation_extracted@NoDataInterpolation-main@python@ndi@__init__.py@.PATH_END.py |
{
"filename": "_intensity.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/mesh3d/_intensity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IntensityValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="intensity", parent_name="mesh3d", **kwargs):
super(IntensityValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@mesh3d@_intensity.py@.PATH_END.py |
{
"filename": "conditional_spherical_isolation.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/isolation_functions/conditional_spherical_isolation.py",
"type": "Python"
} | r"""
Module containing the `~halotools.mock_observables.conditional_spherical_isolation` function
used to apply a a variety of 3d isolation criteria to a set of points in a periodic box.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from functools import part... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@isolation_functions@conditional_spherical_isolation.py@.PATH_END.py |
{
"filename": "Untitled-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_noMesSmear/.ipynb_checkpoints/Untitled-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
import scipy.special as spec
import pandas as pd
from astropy.io import ascii
from astropy.table import Table, vstack
import pickle
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from ipywidgets import FloatProgress
from IPython.display i... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_noMesSmear@.ipynb_checkpoints@Untitled-checkpoint.ipynb@.PATH_END.py |
{
"filename": "_config.py",
"repo_name": "SBU-COSMOLIKE/CAMBLateDE",
"repo_path": "CAMBLateDE_extracted/CAMBLateDE-main/build/lib/camb/_config.py",
"type": "Python"
} | import os
from .baseconfig import import_property, CAMBError
from ctypes import c_char, c_int, c_bool, c_double
lensing_method_curv_corr = 1
lensing_method_flat_corr = 2
lensing_method_harmonic = 3
class _config:
# print feedback if > 0 (note in Jupyter notebook this will appear in the terminal, not the notebook... | SBU-COSMOLIKEREPO_NAMECAMBLateDEPATH_START.@CAMBLateDE_extracted@CAMBLateDE-main@build@lib@camb@_config.py@.PATH_END.py |
{
"filename": "fitting.ipynb",
"repo_name": "PetroFit/petrofit",
"repo_path": "petrofit_extracted/petrofit-main/docs/fitting.ipynb",
"type": "Jupyter Notebook"
} | # Image Fitting
Most galaxy light profiles can be well described by PSF-convolved models like the Sérsic profile. PetroFit uses the `astropy` `modeling` sub-module to provide tools to perform two-dimensional fits of galaxy light profiles. To this end, we use the PetroFit ` PSFConvolvedModel2D` class, which applies P... | PetroFitREPO_NAMEpetrofitPATH_START.@petrofit_extracted@petrofit-main@docs@fitting.ipynb@.PATH_END.py |
{
"filename": "test_svmlight_format.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/datasets/tests/test_svmlight_format.py",
"type": "Python"
} | import gzip
import os
import shutil
from bz2 import BZ2File
from importlib import resources
from io import BytesIO
from tempfile import NamedTemporaryFile
import numpy as np
import pytest
import scipy.sparse as sp
import sklearn
from sklearn.datasets import dump_svmlight_file, load_svmlight_file, load_svmlight_files
... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@datasets@tests@test_svmlight_format.py@.PATH_END.py |
{
"filename": "update_det_cal.py",
"repo_name": "simonsobs/sotodlib",
"repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/site_pipeline/update_det_cal.py",
"type": "Python"
} | """
This module is used to compute detector calibration parameters from sodetlib
data products.
The naive computation is described in the `sodetlib documentation. <https://sodetlib.readthedocs.io/en/latest/operations/bias_steps.html#in-transition>`_
Details about the RP and loopgain correction `can be found on our co... | simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@site_pipeline@update_det_cal.py@.PATH_END.py |
{
"filename": "crawler.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chains/natbot/crawler.py",
"type": "Python"
} | from langchain.chains.natbot.crawler import (
Crawler,
ElementInViewPort,
black_listed_elements,
)
__all__ = ["ElementInViewPort", "Crawler", "black_listed_elements"]
| langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chains@natbot@crawler.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/hoverlabel/font/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="sunburst.hoverlabel.font", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@hoverlabel@font@_size.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pathlib2/py3/pathlib2/__init__.py",
"type": "Python"
} | # Copyright (c) 2014-2021 Matthias C. M. Troffaes and contributors
# Copyright (c) 2012-2014 Antoine Pitrou and contributors
# Distributed under the terms of the MIT License.
import ctypes
import fnmatch
import functools
import io
import ntpath
import os
import posixpath
import re
from typing import (
TypeVar, Typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pathlib2@py3@pathlib2@__init__.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattercarpet.marker.line", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@line@_color.py@.PATH_END.py |
{
"filename": "SlideSurfaceInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/FSISPH/SlideSurfaceInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explict instantiation.
//------------------------------------------------------------------------------
#include "FSISPH/SlideSurface.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
template class SlideSurface< Di... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@FSISPH@SlideSurfaceInst.cc.py@.PATH_END.py |
{
"filename": "test_pixsim.py",
"repo_name": "desihub/desisim",
"repo_path": "desisim_extracted/desisim-main/py/desisim/test/test_pixsim.py",
"type": "Python"
} | import unittest, os, sys
import tempfile
from uuid import uuid1
from shutil import rmtree
import numpy as np
from astropy.io import fits
import desimodel.io
import desispec.io
from desisim import io
from desisim import obs
from desisim import pixsim
import desisim.scripts.pixsim
from desiutil.log import get_logger
... | desihubREPO_NAMEdesisimPATH_START.@desisim_extracted@desisim-main@py@desisim@test@test_pixsim.py@.PATH_END.py |
{
"filename": "demo_parasite_axes2.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/axisartist/demo_parasite_axes2.py",
"type": "Python"
} | """
==================
Parasite axis demo
==================
This example demonstrates the use of parasite axis to plot multiple datasets
onto one single plot.
Notice how in this example, *par1* and *par2* are both obtained by calling
``twinx()``, which ties their x-limits with the host's x-axis. From there, each
of ... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@axisartist@demo_parasite_axes2.py@.PATH_END.py |
{
"filename": "analysis.py",
"repo_name": "samuelyeewl/specmatch-emp",
"repo_path": "specmatch-emp_extracted/specmatch-emp-master/specmatchemp/analysis.py",
"type": "Python"
} | """
@filename analysis.py
Helper functions for analysis of results
"""
import numpy as np
from specmatchemp.library import Library
def generate_sm_values(params, results, method='lincomb', suffix='_sm',
cscol='chi_squared', refcol='ref_idxs', coeffcol='coeffs'):
"""Generate the derived valu... | samuelyeewlREPO_NAMEspecmatch-empPATH_START.@specmatch-emp_extracted@specmatch-emp-master@specmatchemp@analysis.py@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showticksuffix",
parent_name="scattergeo.marker.colorbar",
**kwargs,
):
super(ShowticksuffixValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@marker@colorbar@_showticksuffix.py@.PATH_END.py |
{
"filename": "p2d.py",
"repo_name": "EmmanuelSchaan/HaloGen",
"repo_path": "HaloGen_extracted/HaloGen-master/p2d.py",
"type": "Python"
} | from headers import *
##################################################################################
class P2dAuto(object):
def __init__(self, U, P3dAuto, Weight, name="", pNoise=lambda l: 0., save=False, nProc=1):
# copy classes
self.U = U
self.Pn = P3dAuto
self.Weight = Weight
... | EmmanuelSchaanREPO_NAMEHaloGenPATH_START.@HaloGen_extracted@HaloGen-master@p2d.py@.PATH_END.py |
{
"filename": "plot_Quintom_DR12.py",
"repo_name": "ja-vazquez/SimpleMC",
"repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/plots/plot_Quintom_DR12.py",
"type": "Python"
} | #!/usr/bin/env python
#TODO Add Omega_de to the plots
from simplemc.plots.plot_Quintom_variables import *
from simplemc.models.QuintomCosmology import QuintomCosmology
from simplemc.models.LCDMCosmology import LCDMCosmology
from simplemc.cosmo.paramDefs import *
import matplotlib.pyplot as plt
import matplotlib as mp... | ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@plots@plot_Quintom_DR12.py@.PATH_END.py |
{
"filename": "thin.py",
"repo_name": "rometsch/fargocpt",
"repo_path": "fargocpt_extracted/fargocpt-master/Tools/thin.py",
"type": "Python"
} | #!/usr/bin/env python3
"""Thin out the output of a fargocpt simulation. E.g. keep only every 100th snapshot.
"""
import os
import argparse
import numpy as np
from pathlib import Path
import shutil
from typing import List
def main():
opts = parse_args()
if not hasattr(opts, "Nptrn"):
mode = "inspect"... | rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@Tools@thin.py@.PATH_END.py |
{
"filename": "flowers102.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/torchvision/datasets/flowers102.py",
"type": "Python"
} | from pathlib import Path
from typing import Any, Callable, Optional, Tuple, Union
import PIL.Image
from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg
from .vision import VisionDataset
class Flowers102(VisionDataset):
"""`Oxford 102 Flower <https://www.robots.ox.ac.uk/... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@datasets@flowers102.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "StingraySoftware/HENDRICS",
"repo_path": "HENDRICS_extracted/HENDRICS-main/hendrics/io.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Functions to perform input/output operations."""
from __future__ import annotations
import copy
import glob
import importlib
import logging
import os
import os.path
import pickle
import shutil
import sys
import warnings
from collections.abc import Ite... | StingraySoftwareREPO_NAMEHENDRICSPATH_START.@HENDRICS_extracted@HENDRICS-main@hendrics@io.py@.PATH_END.py |
{
"filename": "lsq.py",
"repo_name": "ricardoclandim/NIRVANA",
"repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/tests/lsq.py",
"type": "Python"
} |
from IPython import embed
import numpy
from nirvana.data import manga
from nirvana.tests.util import remote_data_file
from nirvana.models.oned import HyperbolicTangent
from nirvana.models.axisym import AxisymmetricDisk
# Benchmarking test for the least-squares fit
def test_lsq_nopsf():
# Read the data to fit
... | ricardoclandimREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@tests@lsq.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/contours/y/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="size", parent_name="surface.contours.y", **kwargs):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@contours@y@_size.py@.PATH_END.py |
{
"filename": "distribute.py",
"repo_name": "litebird/litebird_sim",
"repo_path": "litebird_sim_extracted/litebird_sim-master/litebird_sim/distribute.py",
"type": "Python"
} | # -*- encoding: utf-8 -*-
from collections import namedtuple
from typing import List
Span = namedtuple("Span", ["start_idx", "num_of_elements"])
"""A sub-range in a sequence of elements.
It has two fields: `start_idx` and `num_of_elements`.
"""
def distribute_evenly(num_of_elements, num_of_groups):
"""Evenly ... | litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@litebird_sim@distribute.py@.PATH_END.py |
{
"filename": "aperture.py",
"repo_name": "HiPERCAM/hipercam",
"repo_path": "hipercam_extracted/hipercam-master/hipercam/aperture.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Defines classes to represent photometric apertures.
The classes support JSON-style serialisation to allow apertures to be
saved to disk in a fairly easily read and editable format.
"""
import numpy as np
import json
from collections import OrderedDic... | HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@aperture.py@.PATH_END.py |
{
"filename": "find_inventories.py",
"repo_name": "AishwaryaC26/RIS-Vis",
"repo_path": "RIS-Vis_extracted/RIS-Vis-main/app/find_inventories.py",
"type": "Python"
} | import os
from dotenv import load_dotenv
import ast
from obspy.clients.fdsn import Client
## finds and saves all inventories for seismic stations
load_dotenv()
stations = ast.literal_eval(os.environ["SEISMIC_STATIONS"])
#create list of stations from "stations" dict
stationsoptions = list(stations.keys())
client = Cl... | AishwaryaC26REPO_NAMERIS-VisPATH_START.@RIS-Vis_extracted@RIS-Vis-main@app@find_inventories.py@.PATH_END.py |
{
"filename": "test_pyintegrators.py",
"repo_name": "adrn/gala",
"repo_path": "gala_extracted/gala-main/gala/integrate/tests/test_pyintegrators.py",
"type": "Python"
} | """
Test the integrators.
"""
import os
# Third-party
import pytest
import numpy as np
from astropy.utils.exceptions import AstropyDeprecationWarning
# Project
from .. import (
LeapfrogIntegrator,
RK5Integrator,
DOPRI853Integrator,
Ruth4Integrator,
)
from gala.tests.optional_deps import HAS_TQDM
... | adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@integrate@tests@test_pyintegrators.py@.PATH_END.py |
{
"filename": "test_quantity_annotations.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/units/tests/test_quantity_annotations.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# ruff: noqa: FA100, FA102
import pytest
from astropy import units as u
from astropy.units import Quantity
def test_ignore_generic_type_annotations():
"""Test annotations that are not unit related are ignored.
This test passes if the function ... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@units@tests@test_quantity_annotations.py@.PATH_END.py |
{
"filename": "_showwhiskers.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_showwhiskers.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowwhiskersValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showwhiskers", parent_name="box", **kwargs):
super(ShowwhiskersValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_showwhiskers.py@.PATH_END.py |
{
"filename": "latex_symbols.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/core/latex_symbols.py",
"type": "Python"
} | # encoding: utf-8
# DO NOT EDIT THIS FILE BY HAND.
# To update this file, run the script /tools/gen_latex_symbols.py using Python 3
# This file is autogenerated from the file:
# https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
# This original list is filtered to remove any unicode chara... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@core@latex_symbols.py@.PATH_END.py |
{
"filename": "test.py",
"repo_name": "bolverk/huji-rich",
"repo_path": "huji-rich_extracted/huji-rich-master/tests/newtonian/two_dimensional/conservation_lagrangian/test.py",
"type": "Python"
} | #! /usr/bin/python
def all_equal(ar):
"""
Checks that all terms in the array are equal
Input:
ar - Numerical array
"""
for i in ar:
if i!=ar[0]:
return False
return True
def main():
import numpy
mass, xmom, ymom, enr, tracer = \
numpy.loadtxt('res.txt... | bolverkREPO_NAMEhuji-richPATH_START.@huji-rich_extracted@huji-rich-master@tests@newtonian@two_dimensional@conservation_lagrangian@test.py@.PATH_END.py |
{
"filename": "_cauto.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/_cauto.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CautoValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="cauto", parent_name="isosurface", **kwargs):
super(CautoValidator, 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@isosurface@_cauto.py@.PATH_END.py |
{
"filename": "event_selection.py",
"repo_name": "icecube/skyllh",
"repo_path": "skyllh_extracted/skyllh-master/skyllh/core/event_selection.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import abc
import inspect
import numpy as np
import scipy.sparse
from skyllh.core.py import (
classname,
float_cast,
issequenceof,
)
from skyllh.core.source_hypo_grouping import (
SourceHypoGroupManager,
)
from skyllh.core.source_model import (
SourceModel,
)
from skyllh.co... | icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@skyllh@core@event_selection.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="bar", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok=kw... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@_text.py@.PATH_END.py |
{
"filename": "_side.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/_side.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="side", parent_name="layout.xaxis", **kwargs):
super(SideValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@_side.py@.PATH_END.py |
{
"filename": "_textfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram/unselected/_textfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Textfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram.unselected"
_path_str = "histogram.unselected.textfont"
_valid_props = {"color"}... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram@unselected@_textfont.py@.PATH_END.py |
{
"filename": "CITATION.md",
"repo_name": "Huang-CL/Magrathea",
"repo_path": "Magrathea_extracted/Magrathea-master/CITATION.md",
"type": "Markdown"
} | # Citation
If you use MAGRATHEA, please cite the following article that has been published in MNRAS.
```
Huang, C., Rice, D.R., Steffen, J.H. 2022. MAGRATHEA: an open-source spherical symmetric planet interior structure code. MNRAS 513, 5256–5269. doi:10.1093/mnras/stac1133.
```
BibTeX:
```
@ARTICLE{Huang2022,
... | Huang-CLREPO_NAMEMagratheaPATH_START.@Magrathea_extracted@Magrathea-master@CITATION.md@.PATH_END.py |
{
"filename": "obsset_ql.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/quicklook/obsset_ql.py",
"type": "Python"
} | import os
import numpy as np
import pandas as pd
import hashlib
import json
import inspect
from collections import OrderedDict
from ..storage_interface.db_file import load_key, save_key
from ..pipeline.driver import get_obsset as _get_obsset
from ..pipeline.argh_helper import argh, arg, wrap_multi
from ..igrins_li... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@quicklook@obsset_ql.py@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="autocolorscale", parent_name="contourcarpet", **kwargs
):
super(AutocolorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@_autocolorscale.py@.PATH_END.py |
{
"filename": "test_fringing.py",
"repo_name": "LSSTDESC/Imsim",
"repo_path": "Imsim_extracted/Imsim-main/tests/test_fringing.py",
"type": "Python"
} | import numpy as np
import hashlib
import pytest
from imsim import make_batoid_wcs, CCD_Fringing, get_camera
import galsim
def test_fringing():
"""
Test the fringing model.
"""
# Set a random center ra/dec
cra = 54.9348753510528
cdec = -35.8385705255579
world_center = galsim.CelestialCoord(c... | LSSTDESCREPO_NAMEImsimPATH_START.@Imsim_extracted@Imsim-main@tests@test_fringing.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/sandbox/datarich/__init__.py",
"type": "Python"
} | '''
Econometrics for a Datarich Environment
=======================================
Introduction
------------
In many cases we are performing statistical analysis when many observed variables are
available, when we are in a data rich environment. Machine learning has a wide variety
of tools for dimension reduction an... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@sandbox@datarich@__init__.py@.PATH_END.py |
{
"filename": "logoSingularity.py",
"repo_name": "mhardcastle/ddf-pipeline",
"repo_path": "ddf-pipeline_extracted/ddf-pipeline-master/misc/logoSingularity.py",
"type": "Python"
} | import os
try:
import DDFacet.Other.ModColor as MC
def Str(*args,**kwargs):
return MC.Str(*args,**kwargs)
except:
def Str(ss,**kwargs):
return ss
import shutil
from subprocess import check_output
from subprocess import Popen, PIPE
import subprocess
def getVersion(Name):
try:
... | mhardcastleREPO_NAMEddf-pipelinePATH_START.@ddf-pipeline_extracted@ddf-pipeline-master@misc@logoSingularity.py@.PATH_END.py |
{
"filename": "bitmask.py",
"repo_name": "desihub/desiutil",
"repo_path": "desiutil_extracted/desiutil-main/py/desiutil/bitmask.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
================
desiutil.bitmask
================
Mask bits for the spectro pipeline.
Individual packages will define their own mask bits and use this as a utility
access wrapper. Typical users will get their bitmasks pre-ma... | desihubREPO_NAMEdesiutilPATH_START.@desiutil_extracted@desiutil-main@py@desiutil@bitmask.py@.PATH_END.py |
{
"filename": "check_drx2drxi_result.py",
"repo_name": "lwa-project/pulsar_archive_pipeline",
"repo_path": "pulsar_archive_pipeline_extracted/pulsar_archive_pipeline-main/check_drx2drxi_result.py",
"type": "Python"
} | from __future__ import print_function
import sys
with open(sys.argv[1],'r') as fh:
print("file opened")
for line in fh.readlines():
if '\r' in line:
pars = line.split('\r')
print("got pars")
res = pars[len(pars)-2].split()
print(res)
drx2drxi... | lwa-projectREPO_NAMEpulsar_archive_pipelinePATH_START.@pulsar_archive_pipeline_extracted@pulsar_archive_pipeline-main@check_drx2drxi_result.py@.PATH_END.py |
{
"filename": "results_varmax.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/tests/results/results_varmax.py",
"type": "Python"
} | """
Results for VARMAX tests
Results from Stata using script `test_varmax_stata.do`.
See also Stata time series documentation, in particular `dfactor`.
Data from:
http://www.jmulti.de/download/datasets/e1.dat
Author: Chad Fulton
License: Simplified-BSD
"""
# See http://www.jmulti.de/download/datasets/e1.dat
# 1960... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@tests@results@results_varmax.py@.PATH_END.py |
{
"filename": "comp_zstats_specrels.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/comp_zstats_specrels.py",
"type": "Python"
} | import numpy as np
#!pip install astropy
#!pip install fitsio
from scipy import stats
from scipy.stats import norm
import fitsio
import glob
import os
import sys
import matplotlib.pyplot as plt
import statistics
import argparse
import astropy
from astropy.table import Table,join
from astropy.time import Time
from astro... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@comp_zstats_specrels.py@.PATH_END.py |
{
"filename": "make_allowed_ngrids.py",
"repo_name": "johnh2o2/ggadt",
"repo_path": "ggadt_extracted/ggadt-master/make_allowed_ngrids.py",
"type": "Python"
} | import numpy as np
from math import *
max_gridsize= 10000
fname = "allowed_ngrid_values.txt"
n = max_gridsize/2
sizes = []
for i in range(n):
q = 2**i
if q > max_gridsize: break
for j in range(n):
p = 3**j
if p*q > max_gridsize: break
for k in range(n):
r = 5**k
if p*q*r > max_gridsize: break
sizes... | johnh2o2REPO_NAMEggadtPATH_START.@ggadt_extracted@ggadt-master@make_allowed_ngrids.py@.PATH_END.py |
{
"filename": "_parents.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/_parents.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="parents", parent_name="icicle", **kwargs):
super(ParentsValidator, 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@icicle@_parents.py@.PATH_END.py |
{
"filename": "_widthsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/line/_widthsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="widthsrc", parent_name="treemap.marker.line", **kwargs
):
super(WidthsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@line@_widthsrc.py@.PATH_END.py |
{
"filename": "particles.md",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/docs/particles.md",
"type": "Markdown"
} | # Particle structure
A particle is represented by the `reb_particle` structure in C.
The python class `Particle` is an abstraction of the `reb_particle` structure in C.
We will refer to both the C structure and the python object interchangeably as the *particle structure* and *particle object*.
The particle object con... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@docs@particles.md@.PATH_END.py |
{
"filename": "unitsystem.py",
"repo_name": "sbird/fake_spectra",
"repo_path": "fake_spectra_extracted/fake_spectra-master/fake_spectra/unitsystem.py",
"type": "Python"
} | """Unit system for the spectral code."""
import math
import numpy as np
class UnitSystem(object):
"""Class to store the various physical constants and units that are relevant here. Factored out of Spectra."""
def __init__(self, UnitMass_in_g=1.98892e43, UnitLength_in_cm=3.085678e21, UnitVelocity_in_cm_per_s = ... | sbirdREPO_NAMEfake_spectraPATH_START.@fake_spectra_extracted@fake_spectra-master@fake_spectra@unitsystem.py@.PATH_END.py |
{
"filename": "descriptors.py",
"repo_name": "facebookresearch/faiss",
"repo_path": "faiss_extracted/faiss-main/benchs/bench_fw/descriptors.py",
"type": "Python"
} | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
from dataclasses import dataclass
from typing import Any, Dict, List, Optional
import faiss # @manual=//faiss/pyt... | facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@benchs@bench_fw@descriptors.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "astro-datalab/notebooks-latest",
"repo_path": "notebooks-latest_extracted/notebooks-latest-master/06_EPO/e-TeenAstronomyCafe_Spanish/08_Breaking_the_Solar_System/README.md",
"type": "Markdown"
} | **08 Breaking the Solar System**
For information about the program, please visit: http://www.teenastronomycafe.org/
If you want to test this notebook you can:
[](https://colab.research.google.com/github/astro-datalab/notebooks-latest/blob/mas... | astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@06_EPO@e-TeenAstronomyCafe_Spanish@08_Breaking_the_Solar_System@README.md@.PATH_END.py |
{
"filename": "alpbetMpi.py",
"repo_name": "jronayne/PyTransport",
"repo_path": "PyTransport_extracted/PyTransport-master/Examples/QuartAx/alpbetMpi.py",
"type": "Python"
} | #################### generate alpha beta bispectrum using PyTransAxQrt ############################################################
from matplotlib import pyplot as plt
from pylab import *
import sys
import math
import numpy as np
from mpi4py import MPI
location = "/Users/david/Dropbox/PyTransportDist/PyTransport... | jronayneREPO_NAMEPyTransportPATH_START.@PyTransport_extracted@PyTransport-master@Examples@QuartAx@alpbetMpi.py@.PATH_END.py |
{
"filename": "test_frames.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_frames.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import re
from copy import deepcopy
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import (
EarthLocation,
SkyCoord,
galactocentric_frame_defaults,
)
from astropy.coordinates import representation as... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_frames.py@.PATH_END.py |
{
"filename": "plotting.py",
"repo_name": "ChrisBoettner/plato",
"repo_path": "plato_extracted/plato-main/plato/visualisation/plotting.py",
"type": "Python"
} | from typing import Any
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.axes import Axes
from matplotlib.figure import Figure
from matplotlib.colorbar import Colorbar
def contour_plot(
x: np.ndarray,
y: np.ndarray,
z: np.ndarray,
colorbar: bool = True,
contour_kwargs: dict[str, ... | ChrisBoettnerREPO_NAMEplatoPATH_START.@plato_extracted@plato-main@plato@visualisation@plotting.py@.PATH_END.py |
{
"filename": "Test_Model_Performance.ipynb",
"repo_name": "swagnercarena/ovejero",
"repo_path": "ovejero_extracted/ovejero-master/demos/Test_Model_Performance.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
from tqdm import tqdm
from matplotlib import pyplot as plt
import matplotlib.lines as mlines
import matplotlib
%matplotlib inline
from ovejero import model_trainer, data_tools, bnn_inference
import corner
import os
def NOTIMPLEMENTED():
raise NotImplementedError('Must specify config/sa... | swagnercarenaREPO_NAMEovejeroPATH_START.@ovejero_extracted@ovejero-master@demos@Test_Model_Performance.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/box/marker/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._line import Line
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"])
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@box@marker@__init__.py@.PATH_END.py |
{
"filename": "tSplit.py",
"repo_name": "lofar-astron/DP3",
"repo_path": "DP3_extracted/DP3-master/steps/test/integration/tSplit.py",
"type": "Python"
} | # Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
# Append current directory to system path in order to import testconfig
import sys
from subprocess import check_call
import pytest
sys.path.append(".")
import testconfig as tcf
from utils import asser... | lofar-astronREPO_NAMEDP3PATH_START.@DP3_extracted@DP3-master@steps@test@integration@tSplit.py@.PATH_END.py |
{
"filename": "test_flow_runs.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/tests/deployment/test_flow_runs.py",
"type": "Python"
} | import re
from typing import TYPE_CHECKING
from unittest import mock
from uuid import uuid4
import pendulum
import pytest
import respx
from httpx import Response
from prefect import flow
from prefect.context import FlowRunContext
from prefect.deployments import run_deployment
from prefect.server.schemas.core import T... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@deployment@test_flow_runs.py@.PATH_END.py |
{
"filename": "report.md",
"repo_name": "toros-astro/corral",
"repo_path": "corral_extracted/corral-master/docs/qareport_output_examples/report.md",
"type": "Markdown"
} | # pipeline Quality Report
- **Created at:** 2017-04-10 20:20:14.275414
- **Corral Version:** 0.2.6
## 1. Summary
- **Tests Success:** `Yes`
- **Tests Ran:** `1`
- **Processors:** `6`
- **Coverage:** `62.63%`
- **Maintainability & Style Errors:** `8`
<!-- -->
- **QA Index:** `8.64%`
- **QA Qualification:** `F`
#... | toros-astroREPO_NAMEcorralPATH_START.@corral_extracted@corral-master@docs@qareport_output_examples@report.md@.PATH_END.py |
{
"filename": "test_stride_tricks.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/lib/tests/test_stride_tricks.py",
"type": "Python"
} | import numpy as np
from numpy.core._rational_tests import rational
from numpy.testing import (
assert_equal, assert_array_equal, assert_raises, assert_,
assert_raises_regex, assert_warns,
)
from numpy.lib.stride_tricks import (
as_strided, broadcast_arrays, _broadcast_shape, broadcast_to,
broadcast_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@lib@tests@test_stride_tricks.py@.PATH_END.py |
{
"filename": "poly.py",
"repo_name": "lpsinger/ligo.skymap",
"repo_path": "ligo.skymap_extracted/ligo.skymap-main/ligo/skymap/plot/poly.py",
"type": "Python"
} | #
# Copyright (C) 2012-2024 Leo Singer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distribute... | lpsingerREPO_NAMEligo.skymapPATH_START.@ligo.skymap_extracted@ligo.skymap-main@ligo@skymap@plot@poly.py@.PATH_END.py |
{
"filename": "test_core_resources.py",
"repo_name": "simonsobs/sotodlib",
"repo_path": "sotodlib_extracted/sotodlib-master/tests/test_core_resources.py",
"type": "Python"
} | import os
import unittest
import json
import shutil
import pytest
from sotodlib.core.resources import get_local_file
class TestCoreResources(unittest.TestCase):
def test_get_local_file(self):
# t = get_local_file("de421.bsp", cache=True)
# expected_path = os.path.join(
# os.path.exp... | simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@tests@test_core_resources.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "cmbant/CosmoMC",
"repo_path": "CosmoMC_extracted/CosmoMC-master/python/paramgrid/__init__.py",
"type": "Python"
} | __author__ = 'Antony Lewis'
| cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@python@paramgrid@__init__.py@.PATH_END.py |
{
"filename": "_hoverinfosrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/candlestick/_hoverinfosrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="hoverinfosrc", parent_name="candlestick", **kwargs):
super(HoverinfosrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@candlestick@_hoverinfosrc.py@.PATH_END.py |
{
"filename": "custom_kernels.ipynb",
"repo_name": "exoclam/gaspery",
"repo_path": "gaspery_extracted/gaspery-main/tutorials/custom_kernels.ipynb",
"type": "Jupyter Notebook"
} | ### Custom kernels
Let's say you don't want to be stuck with vanilla quasi-periodic Gaussian Process kernels to describe your correlated noise. We want to be agnostic about your noise so that we can generalize to diverse science use cases, after all!
Enter: tinygp (https://tinygp.readthedocs.io/en/stable/; Dan Forem... | exoclamREPO_NAMEgasperyPATH_START.@gaspery_extracted@gaspery-main@tutorials@custom_kernels.ipynb@.PATH_END.py |
{
"filename": "_xaxes.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/grid/_xaxes.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(self, plotly_name="xaxes", parent_name="layout.grid", **kwargs):
super(XaxesValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@grid@_xaxes.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "NASA-Planetary-Science/sbpy",
"repo_path": "sbpy_extracted/sbpy-main/sbpy/activity/tests/__init__.py",
"type": "Python"
} | NASA-Planetary-ScienceREPO_NAMEsbpyPATH_START.@sbpy_extracted@sbpy-main@sbpy@activity@tests@__init__.py@.PATH_END.py | |
{
"filename": "README.md",
"repo_name": "mattkjames7/libinternalfield",
"repo_path": "libinternalfield_extracted/libinternalfield-main/test/README.md",
"type": "Markdown"
} | # libinternalfield
This is a C++ library for various internal magnetic field models which use spherical harmonics.
## Dependencies
The following things are required for building this library:
- Python 3
- numpy
- make
- g++
- binutils
## Building
Clone the repo and build in Linux or Mac OS:
```bash
git clone... | mattkjames7REPO_NAMElibinternalfieldPATH_START.@libinternalfield_extracted@libinternalfield-main@test@README.md@.PATH_END.py |
{
"filename": "parallel_copy_test.py",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/qa/L0_parallel_copy/parallel_copy_test.py",
"type": "Python"
} | #!/usr/bin/env python3
# Copyright 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_parallel_copy@parallel_copy_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/indicator/legendgrouptitle/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@indicator@legendgrouptitle@__init__.py@.PATH_END.py |
{
"filename": "summary.py",
"repo_name": "michaelhb/superplot",
"repo_path": "superplot_extracted/superplot-master/superplot/summary.py",
"type": "Python"
} | """
Summary of chain
================
A stand-alone script to print summary statistics about a chain.
"""
import os
from argparse import ArgumentParser as arg_parser
# External modules
from prettytable import PrettyTable as pt
# superplot modules
import data_loader
from plot_options import default
import superplot.... | michaelhbREPO_NAMEsuperplotPATH_START.@superplot_extracted@superplot-master@superplot@summary.py@.PATH_END.py |
{
"filename": "template_subtraction_and_WCS.ipynb",
"repo_name": "Astro-Sean/autophot",
"repo_path": "autophot_extracted/autophot-master/example_notebooks/template_subtraction_and_WCS.ipynb",
"type": "Jupyter Notebook"
} | <h1 align="center"> Using Template Subtraction and updating WCS in AutoPhoT </h1>
This notebook will cover how to run AutoPhoT with template subtraction. Additional this notebook will explain now to setup AutoPhoT such that it can update an image's WCS automatically
To review the basic operations of AutoPHoT, see (... | Astro-SeanREPO_NAMEautophotPATH_START.@autophot_extracted@autophot-master@example_notebooks@template_subtraction_and_WCS.ipynb@.PATH_END.py |
{
"filename": "toas_controller.py",
"repo_name": "plazar/TOASTER",
"repo_path": "TOASTER_extracted/TOASTER-master/webtoaster/app/controllers/toas_controller.py",
"type": "Python"
} | from django.http import Http404
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import *
from django.template import Context, RequestContext
from django.template import loader
from app.models import *
from httplib import HTTPResponse
from lib.toaster import Pulsar... | plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@webtoaster@app@controllers@toas_controller.py@.PATH_END.py |
{
"filename": "test_linearize.py",
"repo_name": "lsst/ip_isr",
"repo_path": "ip_isr_extracted/ip_isr-main/tests/test_linearize.py",
"type": "Python"
} | # This file is part of ip_isr.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can ... | lsstREPO_NAMEip_isrPATH_START.@ip_isr_extracted@ip_isr-main@tests@test_linearize.py@.PATH_END.py |
{
"filename": "mips.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/mips.py",
"type": "Python"
} | """
pygments.lexers.mips
~~~~~~~~~~~~~~~~~~~~
Lexers for MIPS assembly.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, words
from pygments.token import Whitespace, Comment, String, Keyword, Name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@mips.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "desihub/desitarget",
"repo_path": "desitarget_extracted/desitarget-main/setup.py",
"type": "Python"
} | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
#
# Standard imports
#
import glob
import os
import sys
from setuptools import setup, find_packages
#
# DESI support code.
#
from desiutil.setup import DesiTest, DesiVer... | desihubREPO_NAMEdesitargetPATH_START.@desitarget_extracted@desitarget-main@setup.py@.PATH_END.py |
{
"filename": "_texttemplatesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/_texttemplatesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="texttemplatesrc", parent_name="scatter3d", **kwargs
):
super(TexttemplatesrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@_texttemplatesrc.py@.PATH_END.py |
{
"filename": "_scattergl.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/template/data/_scattergl.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ScatterglValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="scattergl", parent_name="layout.template.data", **kwargs
):
super(ScatterglValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@template@data@_scattergl.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.