metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/colorbar/title/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._text import TextValidator
from ._side import SideValidator
from ._font import FontValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__,
[],
["._text.Text... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@colorbar@title@__init__.py@.PATH_END.py |
{
"filename": "ticks.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/visualization/wcsaxes/ticks.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from collections import defaultdict
import numpy as np
from matplotlib import rcParams
from matplotlib.lines import Line2D, Path
from matplotlib.transforms import Affine2D
class Ticks(Line2D):
"""
Ticks are derived from Line2D, and note that ti... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@visualization@wcsaxes@ticks.py@.PATH_END.py |
{
"filename": "test_ebl.py",
"repo_name": "andreatramacere/jetset",
"repo_path": "jetset_extracted/jetset-master/jetset/tests/test_ebl.py",
"type": "Python"
} | import pytest
from .base_class import TestBase
class TestEBL(TestBase):
def integration_suite(self,plot=False):
self.test_ebl(plot=plot)
self.test_ebl_jet(plot=plot)
def test_ebl(self,plot=True):
import numpy as np
import matplotlib.pyplot as plt
from jetset.template_... | andreatramacereREPO_NAMEjetsetPATH_START.@jetset_extracted@jetset-master@jetset@tests@test_ebl.py@.PATH_END.py |
{
"filename": "_sizemode.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/marker/_sizemode.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="sizemode", parent_name="scattermap.marker", **kwargs
):
super(SizemodeValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@marker@_sizemode.py@.PATH_END.py |
{
"filename": "versioneer.py",
"repo_name": "PAHdb/pyPAHdb",
"repo_path": "pyPAHdb_extracted/pyPAHdb-master/versioneer.py",
"type": "Python"
} |
# Version: 0.22
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible with: Python 3.6, 3.7, 3.8, 3.9, 3.10 and pypy3
* [ and [arXiv](https:/... | ESA-DatalabsREPO_NAMEXAMI-modelPATH_START.@XAMI-model_extracted@XAMI-model-main@xami_model@mobile_sam@README.md@.PATH_END.py |
{
"filename": "ops.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/core/internals/ops.py",
"type": "Python"
} | from __future__ import annotations
from typing import (
TYPE_CHECKING,
NamedTuple,
)
from pandas.core.dtypes.common import is_1d_only_ea_dtype
if TYPE_CHECKING:
from collections.abc import Iterator
from pandas._libs.internals import BlockPlacement
from pandas._typing import ArrayLike
from p... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@core@internals@ops.py@.PATH_END.py |
{
"filename": "_colorbar.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "funnel.marker"
_path_str = "funnel.marker.colorbar"
_valid_props = {
"bgcolor",
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@funnel@marker@_colorbar.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/image/hoverlabel/__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"])
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@image@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "test_create_cat_B_calibration_files.py",
"repo_name": "cta-observatory/cta-lstchain",
"repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/tools/tests/test_create_cat_B_calibration_files.py",
"type": "Python"
} | import numpy as np
from ctapipe.core import run_tool
from ctapipe_io_lst.constants import N_GAINS, N_PIXELS
from ctapipe.io import read_table
from lstchain.onsite import DEFAULT_CONFIG_CAT_B_CALIB
from lstchain.tests.test_lstchain import (
test_systematics_path,
test_calib_path
)
def test_create_catB_calibr... | cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@tools@tests@test_create_cat_B_calibration_files.py@.PATH_END.py |
{
"filename": "test_scalar.py",
"repo_name": "ellawang44/Breidablik",
"repo_path": "Breidablik_extracted/Breidablik-master/breidablik/interpolate/test_scalar.py",
"type": "Python"
} | from breidablik.interpolate.scalar import Scalar
import numpy as np
import pytest
import warnings
def assert_array_eq(x, y):
assert np.array_equal(x, y)
class Test_fit:
@classmethod
def setup_class(cls):
cls.models = Scalar()
def test_input(self):
with pytest.raises(ValueError):
... | ellawang44REPO_NAMEBreidablikPATH_START.@Breidablik_extracted@Breidablik-master@breidablik@interpolate@test_scalar.py@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/marker/_line.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="line", parent_name="funnelarea.marker", **kwargs):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@marker@_line.py@.PATH_END.py |
{
"filename": "package_index.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/package_index.py",
"type": "Python"
} | """PyPI and direct package downloading."""
import sys
import subprocess
import os
import re
import io
import shutil
import socket
import base64
import hashlib
import itertools
import configparser
import html
import http.client
import urllib.parse
import urllib.request
import urllib.error
from functools import wraps
i... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@package_index.py@.PATH_END.py |
{
"filename": "colourcorrection.py",
"repo_name": "lofar-astron/PyBDSF",
"repo_path": "PyBDSF_extracted/PyBDSF-master/test/colourcorrection.py",
"type": "Python"
} | """
This is for PyBDSF for calculating spectral index. We assume a linear spectral index
in log(freq) and then each channel has a flux which is bit wrong because of the colour
correction problem within that band.
Now we average n such channels. There will be another error made, partly because of the
colour correction ... | lofar-astronREPO_NAMEPyBDSFPATH_START.@PyBDSF_extracted@PyBDSF-master@test@colourcorrection.py@.PATH_END.py |
{
"filename": "8_master_out_profiles.py",
"repo_name": "ldolan05/ACID",
"repo_path": "ACID_extracted/ACID-main/.other_scripts/8_master_out_profiles.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 28 12:20:32 2021
@author: lucydolan
"""
import matplotlib.pyplot as plt
from astropy.io import fits
import numpy as np
import math
import glob
from scipy.interpolate import interp1d
from statistics import stdev
import LSD_func_faster as LSD
from sc... | ldolan05REPO_NAMEACIDPATH_START.@ACID_extracted@ACID-main@.other_scripts@8_master_out_profiles.py@.PATH_END.py |
{
"filename": "optimize_qap.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/benchmarks/benchmarks/optimize_qap.py",
"type": "Python"
} | import numpy as np
from .common import Benchmark, safe_import
import os
with safe_import():
from scipy.optimize import quadratic_assignment
# XXX this should probably have an is_xslow with selected tests.
# Even with this, it takes ~30 seconds to collect the ones to run
# (even if they will all be skipped in the... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@benchmarks@benchmarks@optimize_qap.py@.PATH_END.py |
{
"filename": "test_pop_galaxy.py",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/tests/adv/test_pop_galaxy.py",
"type": "Python"
} | """
test_galaxy.py
Author: Jordan Mirocha
Affiliation: University of Colorado at Boulder
Created on: Tue May 26 14:32:20 MDT 2015
Description:
"""
import ares
import numpy as np
import matplotlib.pyplot as pl
from ares.physics.Constants import cm_per_mpc, erg_per_ev, s_per_yr
def test():
z = np.arange(10, 2... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@adv@test_pop_galaxy.py@.PATH_END.py |
{
"filename": "test_relative_risk.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/tests/test_relative_risk.py",
"type": "Python"
} | import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from scipy.stats.contingency import relative_risk
# Test just the calculation of the relative risk, including edge
# cases that result in a relative risk of 0, inf or nan.
@pytest.mark.parametrize(
'exposed_cases, exposed_tot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@tests@test_relative_risk.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/hoverlabel/font/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="layout.hoverlabel.font", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@hoverlabel@font@_variant.py@.PATH_END.py |
{
"filename": "LAX-3D-checkpoint.ipynb",
"repo_name": "sauddy/GRINN",
"repo_path": "GRINN_extracted/GRINN-main/HYDRO-FINITE-DIFF/.ipynb_checkpoints/LAX-3D-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ## 2D hydrodynamics with LAX methods
@author Sayantan
Date: 3 April 2023
### 1.1 Equations
The hydrostatic system with self-gravity--
For an isothermal gas, the dynamics is governed by continuity eqution and momentum equation. They are given as follows,
The mass-continuity equation
$$
\begin{equation}
\fra... | sauddyREPO_NAMEGRINNPATH_START.@GRINN_extracted@GRINN-main@HYDRO-FINITE-DIFF@.ipynb_checkpoints@LAX-3D-checkpoint.ipynb@.PATH_END.py |
{
"filename": "test_algebra.py",
"repo_name": "fgbuster/fgbuster",
"repo_path": "fgbuster_extracted/fgbuster-master/fgbuster/test/test_algebra.py",
"type": "Python"
} | #!/usr/bin/env python
import unittest
import numpy as np
from numpy.random import uniform
from numpy.testing import assert_array_almost_equal as aaae
from numpy.testing import assert_allclose as aac
import fgbuster.component_model as cm
from fgbuster.mixingmatrix import MixingMatrix
from fgbuster.algebra import (W, Wd,... | fgbusterREPO_NAMEfgbusterPATH_START.@fgbuster_extracted@fgbuster-master@fgbuster@test@test_algebra.py@.PATH_END.py |
{
"filename": "test_signal_slot.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/lib/tests/test_signal_slot.py",
"type": "Python"
} | """Test signal_slot.py"""
from jwst.lib import signal_slot as ss
REFLECT_CALLED = 'reflect: called.'
def reflect(*args):
"""Handler function that simply reflects the input args"""
print(REFLECT_CALLED)
return args
def list_append(inlist, new_item):
"""Append new_item to inlist"""
inlist.appen... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@lib@tests@test_signal_slot.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/funnelarea/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._visible import VisibleValidator
from ._valuessrc import ValuessrcValidator
from ._values import ValuesValidator
from ._uirevision import UirevisionValidator
from ._uid import UidValidator
from ._ti... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@__init__.py@.PATH_END.py |
{
"filename": "20191022_Vesta.ipynb",
"repo_name": "ysBach/BachYP_etal_CeresVesta_NHAO",
"repo_path": "BachYP_etal_CeresVesta_NHAO_extracted/BachYP_etal_CeresVesta_NHAO-main/codes_n_data/20191022_Vesta.ipynb",
"type": "Jupyter Notebook"
} | ```python
%config InlineBackend.figure_format = 'retina'
from IPython import InteractiveShell
InteractiveShell.ast_node_interactivity = 'last_expr'
from pathlib import Path
import numpy as np
import nicpolpy as nic
from matplotlib import pyplot as plt
from matplotlib import rcParams
import warnings
from astropy.ut... | ysBachREPO_NAMEBachYP_etal_CeresVesta_NHAOPATH_START.@BachYP_etal_CeresVesta_NHAO_extracted@BachYP_etal_CeresVesta_NHAO-main@codes_n_data@20191022_Vesta.ipynb@.PATH_END.py |
{
"filename": "_ypad.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/_ypad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="ypad", parent_name="volume.colorbar", **kwargs):
super(YpadValidator, 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@volume@colorbar@_ypad.py@.PATH_END.py |
{
"filename": "model_comparison.ipynb",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/docs/source/learn/core_notebooks/model_comparison.ipynb",
"type": "Jupyter Notebook"
} | ```python
import arviz as az
import numpy as np
import pymc as pm
print(f"Running on PyMC v{pm.__version__}")
```
Running on PyMC v5.15.1+68.gc0b060b98.dirty
```python
az.style.use("arviz-darkgrid")
```
(model_comparison)=
# Model comparison
To demonstrate the use of model comparison criteria in PyMC, we im... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@docs@source@learn@core_notebooks@model_comparison.ipynb@.PATH_END.py |
{
"filename": "test_freq_attr.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/period/test_freq_attr.py",
"type": "Python"
} | import pytest
from pandas.compat import PY311
from pandas import (
offsets,
period_range,
)
import pandas._testing as tm
class TestFreq:
def test_freq_setter_deprecated(self):
# GH#20678
idx = period_range("2018Q1", periods=4, freq="Q")
# no warning for getter
with tm.as... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@period@test_freq_attr.py@.PATH_END.py |
{
"filename": "amadeus_full_experiment.py",
"repo_name": "philbull/RadioFisher",
"repo_path": "RadioFisher_extracted/RadioFisher-master/amadeus_full_experiment.py",
"type": "Python"
} | #!/usr/bin/python
"""
Calculate Fisher matrix and P(k) constraints for all redshift bins for a given
experiment.
"""
import numpy as np
import pylab as P
import radiofisher as rf
from radiofisher import experiments
from radiofisher.units import *
from mpi4py import MPI
import sys
comm = MPI.COMM_WORLD
myid = comm.Get_... | philbullREPO_NAMERadioFisherPATH_START.@RadioFisher_extracted@RadioFisher-master@amadeus_full_experiment.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "agurvich/FIRE_studio",
"repo_path": "FIRE_studio_extracted/FIRE_studio-main/docs/source/conf.py",
"type": "Python"
} | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | agurvichREPO_NAMEFIRE_studioPATH_START.@FIRE_studio_extracted@FIRE_studio-main@docs@source@conf.py@.PATH_END.py |
{
"filename": "base_pruner.py",
"repo_name": "alibaba/TinyNeuralNetwork",
"repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/tinynn/prune/base_pruner.py",
"type": "Python"
} | import collections
import typing
from abc import ABC, abstractmethod
from inspect import getsource
from pprint import pformat
import torch
import torch.distributed as dist
import torch.nn as nn
from torch.nn.parallel.data_parallel import DataParallel
from torch.nn.parallel.distributed import DistributedDataParallel
... | alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@tinynn@prune@base_pruner.py@.PATH_END.py |
{
"filename": "python_message.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/protobuf/py3/google/protobuf/internal/python_message.py",
"type": "Python"
} | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@protobuf@py3@google@protobuf@internal@python_message.py@.PATH_END.py |
{
"filename": "mass_light_model.py",
"repo_name": "aymgal/COOLEST",
"repo_path": "COOLEST_extracted/COOLEST-main/coolest/template/classes/mass_light_model.py",
"type": "Python"
} | __author__ = 'aymgal'
from typing import Tuple
from coolest.template.classes.profile_list import ProfileList
from coolest.template.classes.profiles import mass as mass_profiles_module
from coolest.template.classes.profiles import light as light_profiles_module
class MassModel(ProfileList):
"""Describes a mass m... | aymgalREPO_NAMECOOLESTPATH_START.@COOLEST_extracted@COOLEST-main@coolest@template@classes@mass_light_model.py@.PATH_END.py |
{
"filename": "select.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/tornado/tornado-4/tornado/platform/select.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Copyright 2012 Facebook
#
# 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 a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@tornado@tornado-4@tornado@platform@select.py@.PATH_END.py |
{
"filename": "__main__.py",
"repo_name": "astrom-tom/specstack",
"repo_path": "specstack_extracted/specstack-master/specstack/__main__.py",
"type": "Python"
} | '''
########################################################
##### #
##### specstack #
##### R.THOMAS #
##### 2019 #
##### Main ... | astrom-tomREPO_NAMEspecstackPATH_START.@specstack_extracted@specstack-master@specstack@__main__.py@.PATH_END.py |
{
"filename": "_memory.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/edge/worker/monitor/_memory.py",
"type": "Python"
} | ##############################################################################
#
# Crossbar.io
# Copyright (C) Crossbar.io Technologies GmbH. All rights reserved.
#
##############################################################################
from twisted.internet.defer import succeed
from ... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@edge@worker@monitor@_memory.py@.PATH_END.py |
{
"filename": "_sector.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/_sector.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SectorValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(self, plotly_name="sector", parent_name="layout.polar", **kwargs):
super(SectorValidator, 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@layout@polar@_sector.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "jroulet/cogwheel",
"repo_path": "cogwheel_extracted/cogwheel-main/cogwheel/tests/__init__.py",
"type": "Python"
} | jrouletREPO_NAMEcogwheelPATH_START.@cogwheel_extracted@cogwheel-main@cogwheel@tests@__init__.py@.PATH_END.py | |
{
"filename": "paper.md",
"repo_name": "MartianColonist/POSEIDON",
"repo_path": "POSEIDON_extracted/POSEIDON-main/joss/paper.md",
"type": "Markdown"
} | ---
title: '`POSEIDON`: A Multidimensional Atmospheric Retrieval Code for Exoplanet Spectra'
tags:
- Python
- astronomy
- exoplanets
- spectroscopy
- atmospheric retrieval
- atmospheric models
- JWST
authors:
- name: Ryan J. MacDonald
orcid: 0000-0003-4816-3469
affiliation: "1, 2, 3"
affiliation... | MartianColonistREPO_NAMEPOSEIDONPATH_START.@POSEIDON_extracted@POSEIDON-main@joss@paper.md@.PATH_END.py |
{
"filename": "QSO_templates.ipynb",
"repo_name": "desihub/desisim",
"repo_path": "desisim_extracted/desisim-main/doc/nb/QSO_templates.ipynb",
"type": "Jupyter Notebook"
} | # Simple tests for QSO templates
A simple notebook that plays around with the templates.QSO Class.
```python
import numpy as np
import warnings
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
from desisim.templates import QSO
%pylab inline
```
Populating the interactive namespace from ... | desihubREPO_NAMEdesisimPATH_START.@desisim_extracted@desisim-main@doc@nb@QSO_templates.ipynb@.PATH_END.py |
{
"filename": "test_averaging.py",
"repo_name": "HERA-Team/hera_cal",
"repo_path": "hera_cal_extracted/hera_cal-main/hera_cal/lst_stack/tests/test_averaging.py",
"type": "Python"
} | import numpy as np
import pytest
from .. import averaging as avg
from ...tests import mock_uvdata as mockuvd
from hera_cal.lst_stack import LSTStack
from hera_filters.dspec import dpss_operator
from functools import partial
from astropy import units as un
class TestGetMaskedData:
def setup_class(self):
se... | HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@hera_cal@lst_stack@tests@test_averaging.py@.PATH_END.py |
{
"filename": "justplotit.py",
"repo_name": "natashabatalha/virga",
"repo_path": "virga_extracted/virga-master/virga/justplotit.py",
"type": "Python"
} | from bokeh.palettes import viridis,magma
from bokeh.models import ColumnDataSource, Label, LabelSet,CustomJS
from bokeh.layouts import column,row,gridplot
from bokeh.plotting import figure, show
from bokeh.models import LinearColorMapper, LogTicker,BasicTicker, ColorBar,LogColorMapper,Legend
from bokeh.palettes import ... | natashabatalhaREPO_NAMEvirgaPATH_START.@virga_extracted@virga-master@virga@justplotit.py@.PATH_END.py |
{
"filename": "CMB_plots.py",
"repo_name": "CosmicFish/CosmicFish",
"repo_path": "CosmicFish_extracted/CosmicFish-master/camb/mgcamb/tests/python/CAMB_plots_lib/CMB_plots.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
import math
class CMB_plots:
"""
Class that contains the methods to optimally plot the CMB power spectra
"""
# general plot settings:
color = 'red' # default color of the plot
axes_label_position = 'left' ... | CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@camb@mgcamb@tests@python@CAMB_plots_lib@CMB_plots.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/line/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self,
plotly_name="coloraxis",
parent_name="scatterpolargl.marker.line",
**kwargs,
):
super(ColoraxisValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@line@_coloraxis.py@.PATH_END.py |
{
"filename": "generative_inpainting_model.py",
"repo_name": "giuspugl/picasso",
"repo_path": "picasso_extracted/picasso-master/picasso/inpainters/generative_inpainting_model.py",
"type": "Python"
} | #
#
# This module has been slightly modified and imported from
# https://github.com/JiahuiYu/generative_inpainting
#
#
# date: 2019-08-20
# author: Jiahui Yu
# python3.6
# Copyright (C) 2018
#
import logging
import cv2
import neuralgym as ng
import tensorflow as tf
from tensorflow.contrib.framework... | giuspuglREPO_NAMEpicassoPATH_START.@picasso_extracted@picasso-master@picasso@inpainters@generative_inpainting_model.py@.PATH_END.py |
{
"filename": "ChaplyginCDMCosmology.py",
"repo_name": "ja-vazquez/SimpleMC",
"repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/models/ChaplyginCDMCosmology.py",
"type": "Python"
} |
from simplemc.models.LCDMCosmology import LCDMCosmology
from simplemc.cosmo.paramDefs import As_par, Calpha_par, Ok_par
class ChaplyginCDMCosmology(LCDMCosmology):
"""
This is CDM cosmology with Chaplygin gas.
This class inherits LCDMCosmology class as the rest of the cosmological
mod... | ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@models@ChaplyginCDMCosmology.py@.PATH_END.py |
{
"filename": "testSegmentSegmentIntersection.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/unit/Utilities/testSegmentSegmentIntersection.py",
"type": "Python"
} | #ATS:test(SELF, label="2-D line segment intersections unit tests")
from Spheral2d import *
from SpheralTestUtilities import *
import unittest
# Create a global random number generator.
import random
rangen = random.Random()
#===============================================================================
# Test our v... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@Utilities@testSegmentSegmentIntersection.py@.PATH_END.py |
{
"filename": "prompt.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/agent_toolkits/json/prompt.py",
"type": "Python"
} | # flake8: noqa
JSON_PREFIX = """You are an agent designed to interact with JSON.
Your goal is to return a final answer by interacting with the JSON.
You have access to the following tools which help you learn more about the JSON you are interacting with.
Only use the below tools. Only use the information returned by t... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@agent_toolkits@json@prompt.py@.PATH_END.py |
{
"filename": "lit.cfg.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/third_party/xla/xla/lit.cfg.py",
"type": "Python"
} | # Copyright 2019 The OpenXLA 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@third_party@xla@xla@lit.cfg.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "DariaGangardt/pAGN",
"repo_path": "pAGN_extracted/pAGN-main/pagn/__init__.py",
"type": "Python"
} | from .__version__ import *
from .Sirko import *
from .Thompson import *
| DariaGangardtREPO_NAMEpAGNPATH_START.@pAGN_extracted@pAGN-main@pagn@__init__.py@.PATH_END.py |
{
"filename": "bumps.py",
"repo_name": "NNSSA/GALLUMI_public",
"repo_path": "GALLUMI_public_extracted/GALLUMI_public-main/Scripts/Plotting/Ultramassive_galaxies_(raw)/Pk_with_bumps/bumps.py",
"type": "Python"
} | import numpy as np
from classy import Class
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.style.use("scientific")
colors = ['purple', '#306B37', 'darkgoldenrod', '#3F7BB6', '#BF4145', "#cf630a"]
cosmo = Class()
args = {'P_k_max_1/Mpc': 40., 'T_ncdm': 0.71611, 'N_ur': 2.0308, 'N_ncdm': 1... | NNSSAREPO_NAMEGALLUMI_publicPATH_START.@GALLUMI_public_extracted@GALLUMI_public-main@Scripts@Plotting@Ultramassive_galaxies_(raw)@Pk_with_bumps@bumps.py@.PATH_END.py |
{
"filename": "get_objects.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/devel/external/AEGIS/get_objects.py",
"type": "Python"
} | # Copyright (c) 2012-2023 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... | GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@external@AEGIS@get_objects.py@.PATH_END.py |
{
"filename": "_iconsize.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/map/layer/symbol/_iconsize.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="iconsize", parent_name="layout.map.layer.symbol", **kwargs
):
super(IconsizeValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@map@layer@symbol@_iconsize.py@.PATH_END.py |
{
"filename": "readfof.py",
"repo_name": "franciscovillaescusa/Pylians",
"repo_path": "Pylians_extracted/Pylians-master/library/readfof.py",
"type": "Python"
} | #model read_FoF"""
#readfof(Base,snapnum,endian=None)
#Read FoF files from Gadget, P-FoF
#Parameters:
#basedir: where your FoF folder located
#snapnum: snapshot number
#long_ids: whether particles ids are uint32 or uint64
#swap: False or True
#return structures:
#TotNgr... | franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@library@readfof.py@.PATH_END.py |
{
"filename": "test_viewer.py",
"repo_name": "dendrograms/astrodendro",
"repo_path": "astrodendro_extracted/astrodendro-main/astrodendro/tests/test_viewer.py",
"type": "Python"
} | import pytest
import numpy as np
import matplotlib.pyplot as plt
from ..dendrogram import Dendrogram
from matplotlib.backend_bases import MouseEvent
DATA = np.array([[1, 3, 4, 4, 1, 4],
[1, 2, 3, 2, 1, 3],
[2, 1, 1, 3, 1, 2],
[1, 1, 1, 1, 1, 1],
[2,... | dendrogramsREPO_NAMEastrodendroPATH_START.@astrodendro_extracted@astrodendro-main@astrodendro@tests@test_viewer.py@.PATH_END.py |
{
"filename": "snake_sampler.py",
"repo_name": "joezuntz/cosmosis",
"repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/samplers/snake/snake_sampler.py",
"type": "Python"
} | from .. import ParallelSampler
from ...runtime import logs
import numpy as np
from .snake import Snake
def posterior(p_in):
#Check the normalization
if (not np.all(p_in>=0)) or (not np.all(p_in<=1)):
return -np.inf, ([np.nan for i in range(len(snake_pipeline.extra_saves))], -np.inf)
p = snake_pipel... | joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@samplers@snake@snake_sampler.py@.PATH_END.py |
{
"filename": "eventsource.py",
"repo_name": "cta-observatory/ctapipe",
"repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/io/eventsource.py",
"type": "Python"
} | """
Handles reading of different event/waveform containing files
"""
import warnings
from abc import abstractmethod
from collections.abc import Generator
from traitlets.config.loader import LazyConfigValue
from ctapipe.atmosphere import AtmosphereDensityProfile
from ..containers import (
ArrayEventContainer,
... | cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@io@eventsource.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "nanograv/holodeck",
"repo_path": "holodeck_extracted/holodeck-main/README.md",
"type": "Markdown"
} | # holodeck
[//]: # (Badges)
[](https://github.com/nanograv/holodeck/actions/workflows/unit-tests-ci.yaml)
[](https://codecov.io/gh... | nanogravREPO_NAMEholodeckPATH_START.@holodeck_extracted@holodeck-main@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "mikecokina/elisa",
"repo_path": "elisa_extracted/elisa-master/scripts/benchmark/__init__.py",
"type": "Python"
} | mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@scripts@benchmark@__init__.py@.PATH_END.py | |
{
"filename": "sampleFieldListSVPHInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/SVPH/sampleFieldListSVPHInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "SVPH/sampleFieldListSVPH.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
using std::vector;
// Sca... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@SVPH@sampleFieldListSVPHInst.cc.py@.PATH_END.py |
{
"filename": "path.py",
"repo_name": "astroufsc/chimera",
"repo_path": "chimera_extracted/chimera-master/src/chimera/core/path.py",
"type": "Python"
} | import os
from chimera.util.findplugins import find_chimera_plugins
__all__ = ["ChimeraPath"]
class ChimeraPath(object):
def __init__(self):
# Search for chimera plugins on the sys.path
self._controllers_plugins, self._instruments_plugins = find_chimera_plugins()
self._instruments = [os.... | astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@path.py@.PATH_END.py |
{
"filename": "redcal_inspect_2458159.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458159.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Redundant Calibration Nightly Notebook
**Josh Dillon**, Last Revised 7/30/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal
from hera_qm.metrics_io import load_metric_file
import glob
import os
from copy import deepcopy
import inspe... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@redcal_inspect@redcal_inspect_2458159.ipynb@.PATH_END.py |
{
"filename": "compute_olr_h2o.py",
"repo_name": "danielkoll/PyRADS",
"repo_path": "PyRADS_extracted/PyRADS-master/Test01.olr/compute_olr_h2o.py",
"type": "Python"
} | from __future__ import division, print_function
import numpy as np
import sys,os
sys.path.append("..")
import pyrads
from scipy.integrate import trapz,simps,cumtrapz
### -----------------------------------
### Helpers
class Dummy:
pass
### -----------------------------------
# ---
## setup thermodynamic param... | danielkollREPO_NAMEPyRADSPATH_START.@PyRADS_extracted@PyRADS-master@Test01.olr@compute_olr_h2o.py@.PATH_END.py |
{
"filename": "_prefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/number/_prefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class PrefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="prefix", parent_name="indicator.number", **kwargs):
super(PrefixValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@number@_prefix.py@.PATH_END.py |
{
"filename": "survey_data.py",
"repo_name": "FRBs/zdm",
"repo_path": "zdm_extracted/zdm-main/zdm/survey_data.py",
"type": "Python"
} | """ Survey data """
from dataclasses import dataclass, field
from zdm import data_class
import numpy as np
@dataclass
class FRB(data_class.myDataClass):
# None of the fields should start with an X
BW: float = field(
default=0.,
metadata={'help': "Mean Frequency (observed)",
... | FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@zdm@survey_data.py@.PATH_END.py |
{
"filename": "mcgreer.py",
"repo_name": "gkulkarni/QLF",
"repo_path": "QLF_extracted/QLF-master/mcgreer.py",
"type": "Python"
} | import numpy as np
import matplotlib as mpl
mpl.use('Agg')
mpl.rcParams['text.usetex'] = True
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.serif'] = 'cm'
mpl.rcParams['font.size'] = '22'
import matplotlib.pyplot as plt
from astropy.stats import knuth_bin_width as kbw
from astropy.stats import poisson_con... | gkulkarniREPO_NAMEQLFPATH_START.@QLF_extracted@QLF-master@mcgreer.py@.PATH_END.py |
{
"filename": "constants.py",
"repo_name": "einsteinpy/einsteinpy",
"repo_path": "einsteinpy_extracted/einsteinpy-main/src/einsteinpy/symbolic/constants.py",
"type": "Python"
} | from sympy.core.symbol import Symbol
class SymbolicConstant(Symbol):
"""
This class inherits from ~sympy.core.symbol.Symbol
"""
def __new__(cls, name, descriptive_name=None, **assumptions):
"""
Constructor and Initializer
Parameters
----------
name : str
... | einsteinpyREPO_NAMEeinsteinpyPATH_START.@einsteinpy_extracted@einsteinpy-main@src@einsteinpy@symbolic@constants.py@.PATH_END.py |
{
"filename": "txttwilio.py",
"repo_name": "Majoburo/Diagnosis",
"repo_path": "Diagnosis_extracted/Diagnosis-master/txttwilio.py",
"type": "Python"
} | from twilio.rest import Client
def sentxt(account_sid, auth_token, phone, message):
# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
client = Client(account_sid, auth_token)
message = client.messages \
.create(
... | MajoburoREPO_NAMEDiagnosisPATH_START.@Diagnosis_extracted@Diagnosis-master@txttwilio.py@.PATH_END.py |
{
"filename": "test_indexing.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimelike_/test_indexing.py",
"type": "Python"
} | import numpy as np
import pytest
import pandas as pd
from pandas import (
DatetimeIndex,
Index,
)
import pandas._testing as tm
dtlike_dtypes = [
np.dtype("timedelta64[ns]"),
np.dtype("datetime64[ns]"),
pd.DatetimeTZDtype("ns", "Asia/Tokyo"),
pd.PeriodDtype("ns"),
]
@pytest.mark.parametrize("... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimelike_@test_indexing.py@.PATH_END.py |
{
"filename": "constants.py",
"repo_name": "tomasstolker/species",
"repo_path": "species_extracted/species-main/species/core/constants.py",
"type": "Python"
} | """
Physical constants in the International System of Units (SI).
"""
from typing import Final
from astropy import constants
PLANCK: Final = constants.h.value # (m2 kg s-1)
LIGHT: Final = constants.c.value # (m s-1)
BOLTZMANN: Final = constants.k_B.value # (J K-1)
GRAVITY: Final = constants.G.value # (m3 kg−1 s−2... | tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@core@constants.py@.PATH_END.py |
{
"filename": "pgm.py",
"repo_name": "eggplantbren/RJObject",
"repo_path": "RJObject_extracted/RJObject-master/Documents/Paper/pgm.py",
"type": "Python"
} | """
PGM for the general problem using daft (http://daft-pgm.org/)
"""
import matplotlib
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"]
import daft
pgm = daft.PGM([5., 4.], origin=[-2.5, -1.5])
# Create the no... | eggplantbrenREPO_NAMERJObjectPATH_START.@RJObject_extracted@RJObject-master@Documents@Paper@pgm.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "changhoonhahn/provabgs",
"repo_path": "provabgs_extracted/provabgs-main/README.md",
"type": "Markdown"
} | # PRObabilistic Value-Added Bright Galaxy Survey (PROVABGS)
[](https://gitter.im/provabgs/provabgs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://arxiv.org/abs/2202.01809)
[ (*Outil de Réduction Binoculaire pour* [SITELLE](http://www.cfht.hawaii.edu/Instruments/Sitelle)) is a data
reduction software created to process data obtained with
SITELLE. Is it the reduction software used by the CFHT.
Documentation may be found on https://readthedoc... | thomasorbREPO_NAMEorbsPATH_START.@orbs_extracted@orbs-master@README.md@.PATH_END.py |
{
"filename": "simulation_handling.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/frontends/owls/simulation_handling.py",
"type": "Python"
} | import os
from yt.frontends.gadget.simulation_handling import GadgetSimulation
class OWLSSimulation(GadgetSimulation):
r"""
Initialize an OWLS Simulation object.
Upon creation, the parameter file is parsed and the time and redshift
are calculated and stored in all_outputs. A time units dictionary i... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@owls@simulation_handling.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/outputs/__init__.py",
"type": "Python"
} | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@outputs@__init__.py@.PATH_END.py | |
{
"filename": "CONTRIBUTING.md",
"repo_name": "mavrix93/LightCurvesClassifier",
"repo_path": "LightCurvesClassifier_extracted/LightCurvesClassifier-master/CONTRIBUTING.md",
"type": "Markdown"
} | # Contributing
First of all thank you for considering to contribute! The project is quite big for one person a I would really appreciate any help.
## Code style
- Just follow PEP8
- Well because of legacy code package actually use camelCase for class methods (PEP8 alert)
- Function comments are welcomed and should... | mavrix93REPO_NAMELightCurvesClassifierPATH_START.@LightCurvesClassifier_extracted@LightCurvesClassifier-master@CONTRIBUTING.md@.PATH_END.py |
{
"filename": "test_delay.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/testing/tests/gains/test_delay.py",
"type": "Python"
} | from copy import deepcopy
import pytest
import numpy as np
import dask.array as da
from quartical.calibration.calibrate import add_calibration_graph
from testing.utils.gains import apply_gains, reference_gains
@pytest.fixture(scope="module")
def opts(base_opts, select_corr):
# Don't overwrite base config - inste... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@testing@tests@gains@test_delay.py@.PATH_END.py |
{
"filename": "fitting_backend.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/model_fitting/fitting_backend.py",
"type": "Python"
} | from asteval import Interpreter
import multiprocessing as mp
from multiprocessing import Pool
import numpy as np
import astropy.units as u
from specutils import Spectrum1D
from specutils.fitting import fit_lines
__all__ = ['fit_model_to_spectrum']
def fit_model_to_spectrum(spectrum, component_list, expression,
... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@model_fitting@fitting_backend.py@.PATH_END.py |
{
"filename": "run.py",
"repo_name": "ratt-ru/Stimela-classic",
"repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/cargo/cab/ragavi/src/run.py",
"type": "Python"
} | # -*- coding: future_fstrings -*-
import sys
from scabha import config, parse_parameters, prun
args = [config.binary] + parse_parameters(repeat=" ")
# run the command
if prun(args) != 0:
sys.exit(1)
| ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@cargo@cab@ragavi@src@run.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/scatter3d/line/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._colorbar import ColorBar
from . import colorbar
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [".colorbar"], ["._colorbar.Col... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatter3d@line@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ARCLab-MIT/kspdg",
"repo_path": "kspdg_extracted/kspdg-main/src/kspdg/utils/__init__.py",
"type": "Python"
} | # Copyright (c) 2022, MASSACHUSETTS INSTITUTE OF TECHNOLOGY
# Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014).
# SPDX-License-Identifier: MIT
| ARCLab-MITREPO_NAMEkspdgPATH_START.@kspdg_extracted@kspdg-main@src@kspdg@utils@__init__.py@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/colorbar/tickfont/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="family",
parent_name="scatter.marker.colorbar.tickfont",
**kwargs,
):
super(FamilyValidator, self).__init__(
plotly_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@colorbar@tickfont@_family.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "Kamuish/archi",
"repo_path": "archi_extracted/archi-master/pyarchi/utils/optimization/__init__.py",
"type": "Python"
} | KamuishREPO_NAMEarchiPATH_START.@archi_extracted@archi-master@pyarchi@utils@optimization@__init__.py@.PATH_END.py | |
{
"filename": "_customdata.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_customdata.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="customdata", parent_name="volume", **kwargs):
super(CustomdataValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_customdata.py@.PATH_END.py |
{
"filename": "test_wfEstimator.py",
"repo_name": "lsst-ts/ts_wep",
"repo_path": "ts_wep_extracted/ts_wep-main/tests/estimation/test_wfEstimator.py",
"type": "Python"
} | # This file is part of ts_wep.
#
# Developed for the LSST Telescope and Site Systems.
# 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 ... | lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@tests@estimation@test_wfEstimator.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "philbull/FastBox",
"repo_path": "FastBox_extracted/FastBox-main/README.md",
"type": "Markdown"
} | # FastBox
[](https://fastbox.readthedocs.io/en/latest/?badge=latest)
Fast simulations of cosmological density fields,
subject to anisotropic filtering, biasing,
redshift-space distortions, foregrounds etc. This
is intended to be... | philbullREPO_NAMEFastBoxPATH_START.@FastBox_extracted@FastBox-main@README.md@.PATH_END.py |
{
"filename": "data.py",
"repo_name": "POSYDON-code/POSYDON",
"repo_path": "POSYDON_extracted/POSYDON-main/posydon/active_learning/psy_cris/data.py",
"type": "Python"
} | """Module for handling data for PSY-CRIS."""
__authors__ = [
"Kyle Akira Rocha <kylerocha2024@u.northwestern.edu>",
"Scott Coughlin <scottcoughlin2014@u.northwestern.edu>",
]
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import pandas as pd
import math
import time
f... | POSYDON-codeREPO_NAMEPOSYDONPATH_START.@POSYDON_extracted@POSYDON-main@posydon@active_learning@psy_cris@data.py@.PATH_END.py |
{
"filename": "_stepdefaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/_stepdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="stepdefaults", parent_name="layout.slider", **kwargs
):
super(StepdefaultsValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@_stepdefaults.py@.PATH_END.py |
{
"filename": "ffi.md",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/ffi.md",
"type": "Markdown"
} | ---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
(ffi-tutorial)=
# Foreign function interface (FFI)
_This tutorial requir... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@ffi.md@.PATH_END.py |
{
"filename": "scripting_sculptor_3.ipynb",
"repo_name": "jtschindler/sculptor",
"repo_path": "sculptor_extracted/sculptor-main/examples/notebooks/scripting_sculptor_3.ipynb",
"type": "Jupyter Notebook"
} | # Scripting Sculptor 03 - Fitting and Analzying models using MCMC
This tutorial notebook focuses on using *Sculptor's* modules to fit and analyze a model using the maxmimum likelihood Markov Chain Monte Carlo method implemented in [LMFIT](https://lmfit.github.io/lmfit-py/index.html) using the [emcee](https://emcee.rea... | jtschindlerREPO_NAMEsculptorPATH_START.@sculptor_extracted@sculptor-main@examples@notebooks@scripting_sculptor_3.ipynb@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "dmlc/xgboost",
"repo_path": "xgboost_extracted/xgboost-master/demo/CLI/binary_classification/README.md",
"type": "Markdown"
} | Binary Classification
=====================
This is the quick start tutorial for xgboost CLI version.
Here we demonstrate how to use XGBoost for a binary classification task. Before getting started, make sure you compile xgboost in the root directory of the project by typing ```make```.
The script 'runexp.sh' can be us... | dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@demo@CLI@binary_classification@README.md@.PATH_END.py |
{
"filename": "_customdatasrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="customdatasrc", parent_name="treemap", **kwargs):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@_customdatasrc.py@.PATH_END.py |
{
"filename": "_values.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/_values.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="values", parent_name="funnelarea", **kwargs):
super(ValuesValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@_values.py@.PATH_END.py |
{
"filename": "extract_object_files.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/ios/extract_object_files.py",
"type": "Python"
} | # Copyright 2021 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@ios@extract_object_files.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.