metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "next_occultation.py",
"repo_name": "rodluger/planetplanet",
"repo_path": "planetplanet_extracted/planetplanet-master/scripts/next_occultation.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
next_occultation.py |github|
----------------------------
Compute the time of the next occultation of a given planet and plot its light curve.
.. plot::
:align: center
from scripts import next_occultation
next_occultation._test()
This is a **d... | rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@next_occultation.py@.PATH_END.py |
{
"filename": "flat_mirror.py",
"repo_name": "mtalapinto/moes",
"repo_path": "feros/optics/flat_mirror.py",
"type": "Python"
} | import numpy as np
from . import transform
def flat_out(H, DC, T):
DC_out = np.zeros([len(DC), 3])
H_out = np.zeros([len(DC), 3])
DC = transform.transform(DC, -T)
H_out = transform.transform(H, -T)
H_out[:, 0] = H[:, 0] - (DC[:, 0] / DC[:, 2]) * (H[:, 2])
H_out[:, 1] = H[:, 1] - (DC[:, 1... | mtalapintoREPO_NAMEmoesPATH_START.@feros@optics@flat_mirror.py@.PATH_END.py |
{
"filename": "loader.py",
"repo_name": "ML4GW/amplfi",
"repo_path": "amplfi_extracted/amplfi-main/amplfi/train/data/waveforms/loader.py",
"type": "Python"
} | from pathlib import Path
import h5py
import torch
from .sampler import WaveformSampler
def x_per_y(x, y):
return int((x - 1) // y) + 1
class WaveformLoader(WaveformSampler):
"""
Torch module for loading waveforms from disk,
performing train/val/test split, and sampling
them during training.
... | ML4GWREPO_NAMEamplfiPATH_START.@amplfi_extracted@amplfi-main@amplfi@train@data@waveforms@loader.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/integration_tests/evaluation/__init__.py",
"type": "Python"
} | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@integration_tests@evaluation@__init__.py@.PATH_END.py | |
{
"filename": "test_kmeans.py",
"repo_name": "rmjarvis/TreeCorr",
"repo_path": "TreeCorr_extracted/TreeCorr-main/tests/test_kmeans.py",
"type": "Python"
} | # Copyright (c) 2003-2024 by Mike Jarvis
#
# TreeCorr is free software: redistribution and use in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condi... | rmjarvisREPO_NAMETreeCorrPATH_START.@TreeCorr_extracted@TreeCorr-main@tests@test_kmeans.py@.PATH_END.py |
{
"filename": "flat_sky_to_healpix.py",
"repo_name": "threeML/hawc_hal",
"repo_path": "hawc_hal_extracted/hawc_hal-master/hawc_hal/healpix_handling/flat_sky_to_healpix.py",
"type": "Python"
} | from builtins import object
import healpy as hp
import numpy as np
import six
from scipy.ndimage import map_coordinates
from astropy.coordinates import Galactic, ICRS
from astropy import units as u
from astropy.coordinates import UnitSphericalRepresentation
from astropy.wcs.utils import wcs_to_celestial_frame
from .... | threeMLREPO_NAMEhawc_halPATH_START.@hawc_hal_extracted@hawc_hal-master@hawc_hal@healpix_handling@flat_sky_to_healpix.py@.PATH_END.py |
{
"filename": "test_regressioncorrector.py",
"repo_name": "lightkurve/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/tests/correctors/test_regressioncorrector.py",
"type": "Python"
} | """Unit tests for the `RegressionCorrector` class."""
import warnings
import numpy as np
from numpy.testing import assert_almost_equal
import pandas as pd
import pytest
from lightkurve import LightCurve, LightkurveWarning
from lightkurve.correctors import RegressionCorrector, DesignMatrix
def test_regressioncorrect... | lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@tests@correctors@test_regressioncorrector.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "JLBLine/CHIPS_wrappers",
"repo_path": "CHIPS_wrappers_extracted/CHIPS_wrappers-main/chips_wrappers/run_chips/__init__.py",
"type": "Python"
} | JLBLineREPO_NAMECHIPS_wrappersPATH_START.@CHIPS_wrappers_extracted@CHIPS_wrappers-main@chips_wrappers@run_chips@__init__.py@.PATH_END.py | |
{
"filename": "ionization_cube.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/doc/source/analyzing/ionization_cube.py",
"type": "Python"
} | import time
import h5py
import numpy as np
import yt
from yt.utilities.parallel_tools.parallel_analysis_interface import communication_system
@yt.derived_field(
name="IonizedHydrogen", units="", display_name=r"\frac{\rho_{HII}}{\rho_H}"
)
def IonizedHydrogen(field, data):
return data["gas", "HII_Density"] /... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@analyzing@ionization_cube.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "simonsobs/socs",
"repo_path": "socs_extracted/socs-main/socs/agents/hwp_encoder/__init__.py",
"type": "Python"
} | simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@hwp_encoder@__init__.py@.PATH_END.py | |
{
"filename": "primitives_gmos_ifu.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/primitives_gmos_ifu.py",
"type": "Python"
} | #
# primtives_gmos_ifu.py
# ------------------------------------------------------------------------------
from .primitives_gmos_spect import GMOSSpect
from .primitives_gmos_nodandshuffle import GMOSNodAndShuffle
from . import parameters_gmos_ifu
from recipe_sys... | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@primitives_gmos_ifu.py@.PATH_END.py |
{
"filename": "mond.py",
"repo_name": "mianbreton/pysco",
"repo_path": "pysco_extracted/pysco-master/pysco/mond.py",
"type": "Python"
} | """
Implementation of QUMOND interpolating functions (Famaey & McGaugh, 2021)
This module implements the inner gradient of the QUMOND interpolating function
with the simple, n-family, beta-family, gamma-family, and delta-family
parameterizations.
"""
import numpy as np
import numpy.typing as npt
from numba import nji... | mianbretonREPO_NAMEpyscoPATH_START.@pysco_extracted@pysco-master@pysco@mond.py@.PATH_END.py |
{
"filename": "slurm_client.py",
"repo_name": "icrar/daliuge",
"repo_path": "daliuge_extracted/daliuge-master/daliuge-engine/dlg/deploy/slurm_client.py",
"type": "Python"
} | #
# ICRAR - International Centre for Radio Astronomy Research
# (c) UWA - The University of Western Australia, 2016
# Copyright by UWA (in the framework of the ICRAR)
# All rights reserved
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser G... | icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-engine@dlg@deploy@slurm_client.py@.PATH_END.py |
{
"filename": "sed_plotting.py",
"repo_name": "temuller/hostphot",
"repo_path": "hostphot_extracted/hostphot-main/src/hostphot/sed_plotting.py",
"type": "Python"
} | import os
from pathlib import Path
import numpy as np
import pandas as pd
from matplotlib import ticker
import matplotlib.pyplot as plt
import hostphot
from hostphot._constants import workdir, font_family
from hostphot.utils import get_survey_filters
path = Path(hostphot.__path__[0])
config_file = path.joinpath('fil... | temullerREPO_NAMEhostphotPATH_START.@hostphot_extracted@hostphot-main@src@hostphot@sed_plotting.py@.PATH_END.py |
{
"filename": "plot.py",
"repo_name": "exoclime/HELIOS-K",
"repo_path": "HELIOS-K_extracted/HELIOS-K-master/plots/Plinth/plot.py",
"type": "Python"
} | import os
import matplotlib
#matplotlib.use('PS')
matplotlib.use('agg')
import pylab as pl
import numpy as np
from matplotlib.patches import Rectangle
pl.rc('font', size=12)
params = {'legend.fontsize': 12}
pl.rcParams.update(params)
pl.figure(figsize=(8, 6))
pl.subplots_adjust(left=0.17, bottom=None, right=None... | exoclimeREPO_NAMEHELIOS-KPATH_START.@HELIOS-K_extracted@HELIOS-K-master@plots@Plinth@plot.py@.PATH_END.py |
{
"filename": "centroidRandomWalk.py",
"repo_name": "lsst-ts/ts_wep",
"repo_path": "ts_wep_extracted/ts_wep-main/python/lsst/ts/wep/centroid/centroidRandomWalk.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@python@lsst@ts@wep@centroid@centroidRandomWalk.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/carpet/baxis/title/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet.baxis.title"
_path_str = "carpet.baxis.title.font"
_valid_props = {
"color",
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@carpet@baxis@title@_font.py@.PATH_END.py |
{
"filename": "meta.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chat_models/meta.py",
"type": "Python"
} | from typing import List
from langchain_core.messages import (
AIMessage,
BaseMessage,
ChatMessage,
HumanMessage,
SystemMessage,
)
def _convert_one_message_to_text_llama(message: BaseMessage) -> str:
if isinstance(message, ChatMessage):
message_text = f"\n\n{message.role.capitalize()}:... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chat_models@meta.py@.PATH_END.py |
{
"filename": "wlm.md",
"repo_name": "pjcigan/multicolorfits",
"repo_path": "multicolorfits_extracted/multicolorfits-master/examples/wlm.md",
"type": "Markdown"
} | # WLM
------- WLM, one of my favorite weird little low-metallicity galaxies -------
You can download the fits files from [the LITTLE THINGS NRAO data page for WLM](https://science.nrao.edu/science/surveys/littlethings/data/wlm.html)
Here, I use the HI, V-band, and near-UV images.
This script creates a combine... | pjciganREPO_NAMEmulticolorfitsPATH_START.@multicolorfits_extracted@multicolorfits-master@examples@wlm.md@.PATH_END.py |
{
"filename": "_marker.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scattercarpet/selected/_marker.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattercarpet.selected"
_path_str = "scattercarpet.selected.marker"
_valid_props = {"color",... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scattercarpet@selected@_marker.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/cluster/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattermapbox.cluster", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@cluster@_color.py@.PATH_END.py |
{
"filename": "_borderwidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sunburst/marker/colorbar/_borderwidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="borderwidth",
parent_name="sunburst.marker.colorbar",
**kwargs
):
super(BorderwidthValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sunburst@marker@colorbar@_borderwidth.py@.PATH_END.py |
{
"filename": "_xsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_xsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="box", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwar... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_xsrc.py@.PATH_END.py |
{
"filename": "_ticklabelposition.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabelposition",
parent_name="choroplethmapbox.colorbar",
**kwargs,
):
super(TicklabelpositionValidator, self).__i... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@colorbar@_ticklabelposition.py@.PATH_END.py |
{
"filename": "test_sky_coord_velocities.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_sky_coord_velocities.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for putting velocity differentials into SkyCoord objects.
Note: the skyoffset velocity tests are in a different file, in
test_skyoffset_transformations.py
"""
import numpy as np
import pytest
from astropy import units as u
from astropy.coordi... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_sky_coord_velocities.py@.PATH_END.py |
{
"filename": "fit_binned_spec.py",
"repo_name": "sdss/mangadap",
"repo_path": "mangadap_extracted/mangadap-main/examples/fit_binned_spec.py",
"type": "Python"
} | import os
import time
from IPython import embed
import numpy
from astropy.io import fits
from matplotlib import pyplot
from mangadap.config import defaults
from mangadap.config import manga
from mangadap.datacube import MaNGADataCube
from mangadap.util.fitsutil import DAPFitsUtil
from mangadap.util.resolution impor... | sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@examples@fit_binned_spec.py@.PATH_END.py |
{
"filename": "faces.md",
"repo_name": "youngjookim/sdr",
"repo_path": "sdr_extracted/sdr-master/Code/packages/tapkee-master/examples/faces/faces.md",
"type": "Markdown"
} | In this example we embed images of faces with
the diffusion map algorithm. The dataset is
pretty small (only 50 vectors) and doesn`t
have explicit latent variables beneath -
this makes it hard for the algorithm to
find an efficient 2d representation.
| youngjookimREPO_NAMEsdrPATH_START.@sdr_extracted@sdr-master@Code@packages@tapkee-master@examples@faces@faces.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/linalg/__init__.py",
"type": "Python"
} | """
====================================
Linear algebra (:mod:`scipy.linalg`)
====================================
.. currentmodule:: scipy.linalg
.. toctree::
:hidden:
linalg.blas
linalg.cython_blas
linalg.cython_lapack
linalg.interpolative
linalg.lapack
Linear algebra functions.
.. eventually, ... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@__init__.py@.PATH_END.py |
{
"filename": "UVLF_IllustrisTNG.py",
"repo_name": "NNSSA/GALLUMI_public",
"repo_path": "GALLUMI_public_extracted/GALLUMI_public-main/Scripts/UVLF_IllustrisTNG/UVLF_IllustrisTNG.py",
"type": "Python"
} | import numpy as np
import h5py
import galcv
data = {}
models = ["A", "B", "C"]
simulations = ["TNG100-1", "TNG300-1", "TNG50-1", "combined"]
redshifts = {33:2, 25:3, 21:4, 17:5, 13:6, 11:7, 8:8, 6:9, 4:10}
quantities = ["bincenters", "luminosity_function", "number_count", "lf_combined"]
## Extract data and store in d... | NNSSAREPO_NAMEGALLUMI_publicPATH_START.@GALLUMI_public_extracted@GALLUMI_public-main@Scripts@UVLF_IllustrisTNG@UVLF_IllustrisTNG.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "ChemaPalencia/M_SMiLe",
"repo_path": "M_SMiLe_extracted/M_SMiLe-main/README.md",
"type": "Markdown"
} | # Magnification Statistics of Micro-Lensing (M_SMiLe)
This repository contains code that computes an approximation of the probability of magnification for a lens system consisting of microlensing by compact objects within a galaxy cluster.
The code specifically focuses on the scenario where the galaxy cluster is strong... | ChemaPalenciaREPO_NAMEM_SMiLePATH_START.@M_SMiLe_extracted@M_SMiLe-main@README.md@.PATH_END.py |
{
"filename": "test_config.py",
"repo_name": "transientskp/tkp",
"repo_path": "tkp_extracted/tkp-master/tests/test_config.py",
"type": "Python"
} | import unittest
import os
import getpass
import datetime
import io
from configparser import ConfigParser
from tkp.testutil.data import (default_job_config, default_pipeline_config,
default_header_inject_config)
from tkp.config import (dt_w_microsecond_format, parse_to_dict,
... | transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tests@test_config.py@.PATH_END.py |
{
"filename": "proxy.py",
"repo_name": "sdss/cluplus",
"repo_path": "cluplus_extracted/cluplus-main/python/cluplus/proxy.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# @Author: Florian Briegel (briegel@mpia.de)
# @Date: 2021-08-18
# @Filename: proxy.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
from __future__ import annotations
import sys
import uuid
import os
import fnmatch
import asyncio
from os.path import basename
f... | sdssREPO_NAMEcluplusPATH_START.@cluplus_extracted@cluplus-main@python@cluplus@proxy.py@.PATH_END.py |
{
"filename": "tests.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Jinja2/py2/jinja2/tests.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""Built-in template tests used with the ``is`` operator."""
import decimal
import operator
import re
from ._compat import abc
from ._compat import integer_types
from ._compat import string_types
from ._compat import text_type
from .runtime import Undefined
number_re = re.compile(r"^-?\d+(\.\d... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Jinja2@py2@jinja2@tests.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/reports/__init__.py",
"type": "Python"
} | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@reports@__init__.py@.PATH_END.py | |
{
"filename": "main.py",
"repo_name": "cdslaborg/paramonte",
"repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distUnif/setUnifRand/main.py",
"type": "Python"
} | #!/usr/bin/env python
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import glob
import sys
linewidth = 2
fontsize = 17
marker ={ "CK" : "-"
, "IK" : "."
, "RK" : "-"
}
xlab = { "CK" : "Uniform Random Value ( real/imaginary components )"
, "IK" : "Uniform Rand... | cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distUnif@setUnifRand@main.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/domain/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(self, plotly_name="y", parent_name="layout.ternary.domain", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@domain@_y.py@.PATH_END.py |
{
"filename": "_xanchor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/line/colorbar/_xanchor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="xanchor", parent_name="parcats.line.colorbar", **kwargs
):
super(XanchorValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcats@line@colorbar@_xanchor.py@.PATH_END.py |
{
"filename": "_tickmode.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="tickmode",
parent_name="scattercarpet.marker.colorbar",
**kwargs,
):
super(TickmodeValidator, self).__init__(
plot... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_tickmode.py@.PATH_END.py |
{
"filename": "_idssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/_idssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="idssrc", parent_name="bar", **kwargs):
super(IdssrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@_idssrc.py@.PATH_END.py |
{
"filename": "test_whfast_testparticles.py",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/rebound/tests/test_whfast_testparticles.py",
"type": "Python"
} | import rebound
import unittest
import rebound.data
import warnings
coordinatelist = ["democraticheliocentric","whds","jacobi"]
class TestIntegratorWHFastTestParticle(unittest.TestCase):
pass
def create_whfast_testparticle(coordinates, N, N_active):
def do_test(self):
sim = rebound.Simulation()
... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@rebound@tests@test_whfast_testparticles.py@.PATH_END.py |
{
"filename": "09_colormag_inclinations.py",
"repo_name": "mlipatov/paint_atmospheres",
"repo_path": "paint_atmospheres_extracted/paint_atmospheres-master/pa/usr/09_colormag_inclinations.py",
"type": "Python"
} | # Requires: a file listing inclinations and corresponding visual magnitudes of a star,
# the same for blue magnitudes;
# Output: a plot of visual magnitude versus color.
# Note: to get the required files run calc_star and calc_spectra for a set of inclinations, then
# run filter_spectra once for each filter to get a s... | mlipatovREPO_NAMEpaint_atmospheresPATH_START.@paint_atmospheres_extracted@paint_atmospheres-master@pa@usr@09_colormag_inclinations.py@.PATH_END.py |
{
"filename": "__main__.py",
"repo_name": "AWehrhahn/SME",
"repo_path": "SME_extracted/SME-master/src/pysme/__main__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import argparse
from .gui import plot_plotly
from .sme import SME_Structure
from .solve import SME_Solver
from .synthesize import Synthesizer
if __name__ == "__main__":
parser = argparse.ArgumentParser(
"PySME",
description=(
"Synthesizes stellar spectra and det... | AWehrhahnREPO_NAMESMEPATH_START.@SME_extracted@SME-master@src@pysme@__main__.py@.PATH_END.py |
{
"filename": "copy_sam_libs.py",
"repo_name": "nanograv/holodeck",
"repo_path": "holodeck_extracted/holodeck-main/scripts/copy_sam_libs.py",
"type": "Python"
} | """Copy holodeck SAM library files from a set of output directories into a single output folder.
For usage information, run:
python copy_sam_libs.py -h
Example:
python holodeck/scripts/copy_sam_libs.py ~/scratch/astro-strong ~/scratch/ -p "astro-strong-*"
Notes
-----
* The search for folders and library f... | nanogravREPO_NAMEholodeckPATH_START.@holodeck_extracted@holodeck-main@scripts@copy_sam_libs.py@.PATH_END.py |
{
"filename": "_dy.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/_dy.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DyValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="dy", parent_name="image", **kwargs):
super(DyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwarg... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@_dy.py@.PATH_END.py |
{
"filename": "template_class.py",
"repo_name": "nuc-astro/winnet",
"repo_path": "winnet_extracted/winnet-master/bin/movie_script/src_files/template_class.py",
"type": "Python"
} | # Author: Moritz Reichert
# Date : 26.09.2024
import numpy as np
class template(object):
"""
Class to read a WinNet template file.
"""
def __init__(self, path):
"""
Initialize the template class.
"""
self.path = path
def read_data(self):
"""
... | nuc-astroREPO_NAMEwinnetPATH_START.@winnet_extracted@winnet-master@bin@movie_script@src_files@template_class.py@.PATH_END.py |
{
"filename": "factor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/factor.py",
"type": "Python"
} | """
pygments.lexers.factor
~~~~~~~~~~~~~~~~~~~~~~
Lexers for the Factor language.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, default, words
from pygments.token import Text, Comment... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@factor.py@.PATH_END.py |
{
"filename": "distribution_lib.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/distribution/distribution_lib.py",
"type": "Python"
} | """Unified high-level distribution APIs across backends.
Currently only the JAX backend is supported. The TensorFlow backend
will be supported in the future (via tf.dtensor API).
"""
import collections
import contextlib
import os
import re
import warnings
import numpy as np
from keras.src.api_export import keras_ex... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@distribution@distribution_lib.py@.PATH_END.py |
{
"filename": "test_coreBurkert.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Profiles/test_coreBurkert.py",
"type": "Python"
} | __author__ = "dgilman"
from lenstronomy.LensModel.Profiles.coreBurkert import CoreBurkert
import numpy as np
import numpy.testing as npt
import pytest
class TestcBurk(object):
"""Tests the Gaussian methods."""
def setup_method(self):
self.cb = CoreBurkert()
def _kappa_integrand(self, x, y, Rs... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Profiles@test_coreBurkert.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/utils/__init__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2014-2020)
#
# This file is part of GWpy.
#
# GWpy 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)... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@utils@__init__.py@.PATH_END.py |
{
"filename": "10_AF_Lep_MCMC.ipynb",
"repo_name": "markusbonse/fours",
"repo_path": "fours_extracted/fours-main/docs/source/04_use_the_fours/paper_experiments/10_AF_Lep_MCMC.ipynb",
"type": "Jupyter Notebook"
} | # MCMC for AF Lep b
## 1. Imports
```python
import os
os.environ['OMP_NUM_THREADS'] = '5'
```
```python
from pathlib import Path
from tqdm import tqdm
import numpy as np
# Plotting
import cmocean
import matplotlib.pylab as plt
color_map = cmocean.cm.ice
import seaborn as sns
from matplotlib.lines import Line2D
... | markusbonseREPO_NAMEfoursPATH_START.@fours_extracted@fours-main@docs@source@04_use_the_fours@paper_experiments@10_AF_Lep_MCMC.ipynb@.PATH_END.py |
{
"filename": "CalcOrbitalElements.ipynb",
"repo_name": "bradkav/BlackHolesDarkDress",
"repo_path": "BlackHolesDarkDress_extracted/BlackHolesDarkDress-master/Nbody/CalcOrbitalElements.ipynb",
"type": "Jupyter Notebook"
} | # Calculating the orbital elements for simulations
```python
%matplotlib inline
from __future__ import division
from pygadgetreader import *
import numpy as np
import matplotlib.pyplot as pl
import matplotlib as mpl
from tqdm import tqdm
import sys
#----- MATPLOTLIB paramaters ---------
mpl.rcParams.update({'fon... | bradkavREPO_NAMEBlackHolesDarkDressPATH_START.@BlackHolesDarkDress_extracted@BlackHolesDarkDress-master@Nbody@CalcOrbitalElements.ipynb@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="colorsrc",
parent_name="scattercarpet.hoverlabel.font",
**kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@hoverlabel@font@_colorsrc.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/densitymap/hoverlabel/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="densitymap.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@hoverlabel@font@_color.py@.PATH_END.py |
{
"filename": "numba_convolution.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/ImSim/Numerics/numba_convolution.py",
"type": "Python"
} | import numpy as np
from lenstronomy.Util import numba_util
from lenstronomy.ImSim.Numerics.partial_image import PartialImage
from lenstronomy.Util import image_util
__all__ = ["NumbaConvolution"]
class NumbaConvolution(object):
"""Class to convolve explicit pixels only.
the convolution is inspired by pyaut... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@ImSim@Numerics@numba_convolution.py@.PATH_END.py |
{
"filename": "APTProgram_simulator_use_examples.ipynb",
"repo_name": "spacetelescope/mirage",
"repo_path": "mirage_extracted/mirage-master/examples/APTProgram_simulator_use_examples.ipynb",
"type": "Jupyter Notebook"
} | # Simulating APT Programs with MIRaGe
---
In this notebook, we will demonstrate how to use MIRAGE (Multi-Instrument Ramp Generator) to simulate exposures from Astronomer's Proposal Tool ([APT](https://jwst-docs.stsci.edu/display/JPP/JWST+Astronomers+Proposal+Tool+Overview)) programs using the `mirage.apt` module. This... | spacetelescopeREPO_NAMEmiragePATH_START.@mirage_extracted@mirage-master@examples@APTProgram_simulator_use_examples.ipynb@.PATH_END.py |
{
"filename": "mode_data.py",
"repo_name": "n-claes/legolas",
"repo_path": "legolas_extracted/legolas-master/post_processing/pylbo/visualisation/modes/mode_data.py",
"type": "Python"
} | from __future__ import annotations
import difflib
from typing import List, Union
import numpy as np
from pylbo.data_containers import LegolasDataSet
from pylbo.exceptions import BackgroundNotPresent
from pylbo.utilities.logger import pylboLogger
from pylbo.visualisation.utils import ef_name_to_latex, validate_ef_name... | n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@post_processing@pylbo@visualisation@modes@mode_data.py@.PATH_END.py |
{
"filename": "_selected.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/box/_selected.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="selected", parent_name="box", **kwargs):
super(SelectedValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@box@_selected.py@.PATH_END.py |
{
"filename": "hwp_pcu.py",
"repo_name": "simonsobs/socs",
"repo_path": "socs_extracted/socs-main/socs/agents/hwp_pcu/drivers/hwp_pcu.py",
"type": "Python"
} | import time
import serial
patterns = {
'off': [0, 0, 0, 0, 0, 0],
'on_1': [1, 1, 1, 0, 0, 0],
'on_2': [1, 1, 1, 1, 1, 1],
'stop': [0, 1, 1, 1, 0, 0],
}
class PCU:
"""Class to communicate with the phase compensation unit.
Args:
port (str): Path to USB device in '/dev/'
Attribute... | simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@hwp_pcu@drivers@hwp_pcu.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/lightposition/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="y", parent_name="streamtube.lightposition", **kwargs
):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@lightposition@_y.py@.PATH_END.py |
{
"filename": "prolog.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/prolog.py",
"type": "Python"
} | """
pygments.lexers.prolog
~~~~~~~~~~~~~~~~~~~~~~
Lexers for Prolog and Prolog-like languages.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups
from pygments.token import Text,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@prolog.py@.PATH_END.py |
{
"filename": "exceptions.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/attrs/py2/attr/exceptions.py",
"type": "Python"
} | from __future__ import absolute_import, division, print_function
class FrozenError(AttributeError):
"""
A frozen/immutable instance or attribute have been attempted to be
modified.
It mirrors the behavior of ``namedtuples`` by using the same error message
and subclassing `AttributeError`.
..... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@attrs@py2@attr@exceptions.py@.PATH_END.py |
{
"filename": "demo_CH_coords.py",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/src/demos/python/core/demo_CH_coords.py",
"type": "Python"
} | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2014 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distr... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@core@demo_CH_coords.py@.PATH_END.py |
{
"filename": "starproperties.py",
"repo_name": "pmaxted/pycheops",
"repo_path": "pycheops_extracted/pycheops-master/pycheops/starproperties.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# 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 Fre... | pmaxtedREPO_NAMEpycheopsPATH_START.@pycheops_extracted@pycheops-master@pycheops@starproperties.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="bgcolorsrc",
parent_name="histogram2dcontour.hoverlabel",
**kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
{
"filename": "plot_utils.py",
"repo_name": "matt77hias/fibpy",
"repo_path": "fibpy_extracted/fibpy-master/src/plot_utils.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
###############################################################################
## Plot Utilities 2D
###############################################################################
def set_equal_aspect_ratio_2D(ax, xs, ys, alph... | matt77hiasREPO_NAMEfibpyPATH_START.@fibpy_extracted@fibpy-master@src@plot_utils.py@.PATH_END.py |
{
"filename": "java-reference_catboostpredictions__get.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/java-reference_catboostpredictions__get.md",
"type": "Markdown"
} | # get
```java
public double get(int objectIndex,
int predictionIndex)
```
#### {{ dl--purpose }}
{% include [reusage-java-java-reference_catboostpredictions__get__desc](../_includes/work_src/reusage-java/java-reference_catboostpredictions__get__desc.md) %}
#### {{ dl--parameters }}
**objectIndex... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@java-reference_catboostpredictions__get.md@.PATH_END.py |
{
"filename": "_funnelarea.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/_funnelarea.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Funnelarea(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "funnelarea"
_valid_props = {
"aspectratio",
"baseratio",
"customdata",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@_funnelarea.py@.PATH_END.py |
{
"filename": "downsample.py",
"repo_name": "AlexandreAdam/score_models",
"repo_path": "score_models_extracted/score_models-master/score_models/layers/downsample.py",
"type": "Python"
} | import torch
import torch.nn.functional as F
from .conv_layers import conv3x3
from .up_or_downsampling import downsample
from .style_gan_conv import StyleGANConv
from ..definitions import default_init
AVGPOOL_FUNC = {1: F.avg_pool1d,
2: F.avg_pool2d,
3: F.avg_pool3d}
class DownsampleLa... | AlexandreAdamREPO_NAMEscore_modelsPATH_START.@score_models_extracted@score_models-master@score_models@layers@downsample.py@.PATH_END.py |
{
"filename": "fhd_cal.py",
"repo_name": "RadioAstronomySoftwareGroup/pyuvdata",
"repo_path": "pyuvdata_extracted/pyuvdata-main/src/pyuvdata/uvcal/fhd_cal.py",
"type": "Python"
} | # Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Class for reading FHD calibration save files."""
import os
import warnings
import numpy as np
from astropy import units
from astropy.coordinates import EarthLocation
from docstring_parser import DocstringStyle
from scipy.... | RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@src@pyuvdata@uvcal@fhd_cal.py@.PATH_END.py |
{
"filename": "_textangle.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/annotation/_textangle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(
self, plotly_name="textangle", parent_name="layout.annotation", **kwargs
):
super(TextangleValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@annotation@_textangle.py@.PATH_END.py |
{
"filename": "_linepositionsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_linepositionsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="linepositionsrc",
parent_name="scattergeo.hoverlabel.font",
**kwargs,
):
super(LinepositionsrcValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@hoverlabel@font@_linepositionsrc.py@.PATH_END.py |
{
"filename": "_showticklabels.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/_showticklabels.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="showticklabels",
parent_name="scattergl.marker.colorbar",
**kwargs,
):
super(ShowticklabelsValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@_showticklabels.py@.PATH_END.py |
{
"filename": "Dewaele_2012.py",
"repo_name": "geodynamics/burnman",
"repo_path": "burnman_extracted/burnman-main/burnman/calibrants/Dewaele_2012.py",
"type": "Python"
} | # This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for
# the Earth and Planetary Sciences
# Copyright (C) 2012 - 2024 by the BurnMan team, released under the GNU
# GPL v2 or later.
from burnman.eos.vinet import Vinet
from burnman.eos.mie_grueneisen_debye import MGDBase
from burnman.classes.cali... | geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@burnman@calibrants@Dewaele_2012.py@.PATH_END.py |
{
"filename": "_sysconfigdata_arcadia.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/_sysconfigdata_arcadia.py",
"type": "Python"
} | # system configuration generated and used by the sysconfig module
build_time_vars = {
'AR': 'x86_64-linux-gnu-gcc-ar',
'ARFLAGS': 'rcs',
'CC': 'x86_64-linux-gnu-gcc -pthread',
'CCSHARED': '-fPIC',
'CFLAGS': '-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@_sysconfigdata_arcadia.py@.PATH_END.py |
{
"filename": "_dtick.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/marker/colorbar/_dtick.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="dtick", parent_name="histogram.marker.colorbar", **kwargs
):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@marker@colorbar@_dtick.py@.PATH_END.py |
{
"filename": "test_voevent_generator.py",
"repo_name": "loostrum/darc",
"repo_path": "darc_extracted/darc-master/test/test_voevent_generator.py",
"type": "Python"
} | #!/usr/bin/env python3
import os
import unittest
from time import sleep
import multiprocessing as mp
from darc import VOEventGenerator, VOEventQueueServer
class TestVOEventGenerator(unittest.TestCase):
def test_generate_VOEvent(self):
"""
Test that the VOEvent generator converts a trigger into ... | loostrumREPO_NAMEdarcPATH_START.@darc_extracted@darc-master@test@test_voevent_generator.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/table/header/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="table.header.font", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@table@header@font@_familysrc.py@.PATH_END.py |
{
"filename": "hpc++.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/hpc++.py",
"type": "Python"
} | """SCons.Tool.hpc++
Tool-specific initialization for c++ on HP/UX.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@hpc++.py@.PATH_END.py |
{
"filename": "DivuDilatation.py",
"repo_name": "mmicromegas/ransX",
"repo_path": "ransX_extracted/ransX-master/EQUATIONS/DivuDilatation.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
from UTILS.Calculus import Calculus
from UTILS.SetAxisLimit import SetAxisLimit
from UTILS.Tools import Tools
from UTILS.Errors import Errors
import sys
from mpl_toolkits.axes_grid1 import make_axes_locatable
import matplotlib.cm as cm
# Theoretical background https:/... | mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EQUATIONS@DivuDilatation.py@.PATH_END.py |
{
"filename": "camera.py",
"repo_name": "mtalapinto/moes",
"repo_path": "feros/optics/camera.py",
"type": "Python"
} | from . import trace
from . import spheric_surface
import numpy as np
from . import transform
from . import refraction_index
import copy
import numpy.linalg as la
#import compare_zemax
#import matplotlib.pyplot as plt
from . import cte
def init():
cam_data = [
-299.99, -26.079,
1e10, -55.821,
... | mtalapintoREPO_NAMEmoesPATH_START.@feros@optics@camera.py@.PATH_END.py |
{
"filename": "libraries.py",
"repo_name": "AndresdPM/BANNJOS",
"repo_path": "BANNJOS_extracted/BANNJOS-main/libraries.py",
"type": "Python"
} | import sys, os
from multiprocessing import Pool, cpu_count
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras.layers import Input, Dense, Dropout
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
from tensorflow.keras import regularizers
from tensor... | AndresdPMREPO_NAMEBANNJOSPATH_START.@BANNJOS_extracted@BANNJOS-main@libraries.py@.PATH_END.py |
{
"filename": "quantization.md",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/docs/source/developer_guides/quantization.md",
"type": "Markdown"
} | <!--Copyright 2023 The HuggingFace Team. 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 applicable law or agreed... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@docs@source@developer_guides@quantization.md@.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/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._namelengthsrc import NamelengthsrcValidator
from ._namelength import NamelengthValidator
from ._font import FontValidator
from ._bordercolorsrc import BordercolorsrcValidator
from ._bordercolor import ... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "proc_characterize.py",
"repo_name": "simonsobs/sotodlib",
"repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/toast/workflows/proc_characterize.py",
"type": "Python"
} | # Copyright (c) 2023-2023 Simons Observatory.
# Full license can be found in the top level "LICENSE" file.
"""Timestream processing filters.
"""
import numpy as np
from astropy import units as u
import toast
import toast.ops
from .. import ops as so_ops
from .job import workflow_timer
def setup_raw_statistics(opera... | simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@toast@workflows@proc_characterize.py@.PATH_END.py |
{
"filename": "_xpad.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/colorbar/_xpad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="xpad", parent_name="volume.colorbar", **kwargs):
super(XpadValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@colorbar@_xpad.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/link/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="sankey.link.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@link@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "mcsed.py",
"repo_name": "wpb-astro/MCSED",
"repo_path": "MCSED_extracted/MCSED-master/mcsed.py",
"type": "Python"
} | """ SED fitting class using emcee for parameter estimation
.. moduleauthor:: Greg Zeimann <gregz@astro.as.utexas.edu>
"""
import logging
import sfh
import dust_abs
import dust_emission
import metallicity
import cosmology
import emcee
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import corne... | wpb-astroREPO_NAMEMCSEDPATH_START.@MCSED_extracted@MCSED-master@mcsed.py@.PATH_END.py |
{
"filename": "Display.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/flowchart/library/Display.py",
"type": "Python"
} | import numpy as np
from ... import ComboBox, PlotDataItem
from ...graphicsItems.ScatterPlotItem import ScatterPlotItem
from ...Qt import QtCore, QtGui, QtWidgets
from ..Node import Node
from .common import CtrlNode
class PlotWidgetNode(Node):
"""Connection to PlotWidget. Will plot arrays, metaarrays, and display... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@flowchart@library@Display.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "CASTOR-telescope/ETC",
"repo_path": "ETC_extracted/ETC-master/castor_etc/data/pickles_spectra/__init__.py",
"type": "Python"
} | """
Pickles spectra files.
---
GNU General Public License v3 (GNU GPLv3)
(c) 2022. (c) 2022.
Government of Canada Gouvernement du Canada
National Research Council Conseil national de recherches
Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
... | CASTOR-telescopeREPO_NAMEETCPATH_START.@ETC_extracted@ETC-master@castor_etc@data@pickles_spectra@__init__.py@.PATH_END.py |
{
"filename": "mpfit.py",
"repo_name": "USNavalResearchLaboratory/eispac",
"repo_path": "eispac_extracted/eispac-main/eispac/extern/mpfit.py",
"type": "Python"
} | """
Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1.
AUTHORS
-------
The original version of this software, called LMFIT, was written in FORTRAN
as part of the MINPACK-1 package by XXX.
Craig Markwardt converted the FORTRAN code to IDL.
The information for the IDL version is:
Craig B. M... | USNavalResearchLaboratoryREPO_NAMEeispacPATH_START.@eispac_extracted@eispac-main@eispac@extern@mpfit.py@.PATH_END.py |
{
"filename": "_docstring_gen.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/_docstring_gen.py",
"type": "Python"
} | from __future__ import absolute_import
import re as _re
import plotly.io as pio
from plotly.basedatatypes import BaseFigure
import sys
# Perform docstrings generation
def copy_doc_without_fig(from_fn, to_method):
"""
Copy docstring from a plotly.io function to a Figure method, removing the
fig argument doc... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@_docstring_gen.py@.PATH_END.py |
{
"filename": "kkr.py",
"repo_name": "PyEllips/pyElli",
"repo_path": "pyElli_extracted/pyElli-master/src/elli/kkr/kkr.py",
"type": "Python"
} | r"""Calculate Kramers-Kronig relations according to Maclaurin's formula [1]_.
Here, the differential formulation is used,
which means that the transformation always diverges to zero at infinity,
leaving a free infinity offset.
This offset is typically referred to as :math:`\epsilon(\infty)` in spectroscopy.
Since the ... | PyEllipsREPO_NAMEpyElliPATH_START.@pyElli_extracted@pyElli-master@src@elli@kkr@kkr.py@.PATH_END.py |
{
"filename": "test_binary_hashindex.py",
"repo_name": "facebookresearch/faiss",
"repo_path": "faiss_extracted/faiss-main/tests/test_binary_hashindex.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 unittest
import numpy as np
import faiss
from common_faiss_tests import make_binary_dataset
def bitvec_shuffle(a, order):
n, d... | facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@tests@test_binary_hashindex.py@.PATH_END.py |
{
"filename": "mpi_test.py",
"repo_name": "EliseJ/astroABC",
"repo_path": "astroABC_extracted/astroABC-master/astroabc/mpi_test.py",
"type": "Python"
} | import numpy as np
import os
import sys
#sys.path.append(os.getcwd())
from .abc_class import *
def dist(d,x):
'''Distance metric: rho'''
return np.sum(np.abs(np.mean(x,axis=0) - np.mean(d,axis=0)))
def simulation(param):
cov = 0.1
return Model("normal",1000).make_mock(param,cov)
cla... | EliseJREPO_NAMEastroABCPATH_START.@astroABC_extracted@astroABC-master@astroabc@mpi_test.py@.PATH_END.py |
{
"filename": "_bgcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/_bgcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="bgcolor", parent_name="layout.ternary", **kwargs):
super(BgcolorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@_bgcolor.py@.PATH_END.py |
{
"filename": "offsetbox.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/offsetbox.py",
"type": "Python"
} | r"""
Container classes for `.Artist`\s.
`OffsetBox`
The base of all container artists defined in this module.
`AnchoredOffsetbox`, `AnchoredText`
Anchor and align an arbitrary `.Artist` or a text relative to the parent
axes or a specific anchor point.
`DrawingArea`
A container with fixed width and he... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@offsetbox.py@.PATH_END.py |
{
"filename": "_z.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/slices/_z.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="z", parent_name="isosurface.slices", **kwargs):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@slices@_z.py@.PATH_END.py |
{
"filename": "ext_signature.py",
"repo_name": "quatrope/feets",
"repo_path": "feets_extracted/feets-master/feets/extractors/ext_signature.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2018 Bruno Sanchez
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including with... | quatropeREPO_NAMEfeetsPATH_START.@feets_extracted@feets-master@feets@extractors@ext_signature.py@.PATH_END.py |
{
"filename": "test_spectral_utils.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/signal/tests/test_spectral_utils.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013-2020)
#
# This file is part of GWpy.
#
# GWpy 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)... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@signal@tests@test_spectral_utils.py@.PATH_END.py |
{
"filename": "test_icrs_observed_transformations.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_icrs_observed_transformations.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Accuracy tests for ICRS transformations, primarily to/from AltAz."""
import numpy as np
from astropy import units as u
from astropy.coordinates import (
CIRS,
ICRS,
AltAz,
EarthLocation,
HADec,
SkyCoord,
frame_transform_gra... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_icrs_observed_transformations.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.