metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_jwsttap.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/esa/jwst/tests/test_jwsttap.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ =============== eJWST TAP tests =============== European Space Astronomy Centre (ESAC) European Space Agency (ESA) """ import os import shutil from pathlib import Path from unittest.mock import MagicMock, patch import sys import io import astropy.un...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@esa@jwst@tests@test_jwsttap.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Tests/__init__.py", "type": "Python" }
# empty file
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Tests@__init__.py@.PATH_END.py
{ "filename": "read_h5.py", "repo_name": "piernik-dev/piernik", "repo_path": "piernik_extracted/piernik-master/python/read_h5.py", "type": "Python" }
#!/usr/bin/python # -*- coding: utf-8 -*- import h5py import os import sys from colored_io import prtinfo, prtwarn, read_var, die if (sys.version[0:3] != "2.7"): raw_input = input not_py27 = True else: not_py27 = False # For use with PIERNIK. # Script recognizes integers, floats, logical and string variabl...
piernik-devREPO_NAMEpiernikPATH_START.@piernik_extracted@piernik-master@python@read_h5.py@.PATH_END.py
{ "filename": "opticalPath.py", "repo_name": "ExObsSim/ExoRad2-public", "repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/exorad/models/optics/opticalPath.py", "type": "Python" }
import copy from collections import OrderedDict import astropy.constants as const import astropy.units as u import numpy as np from astropy.table import hstack from astropy.table import QTable from exorad.log import Logger from exorad.models.optics.opticalElement import OpticalElement from exorad.models.signal import...
ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@exorad@models@optics@opticalPath.py@.PATH_END.py
{ "filename": "05aDensitySensitivity.py", "repo_name": "MehrnooshTahani/MC-BLOS", "repo_path": "MC-BLOS_extracted/MC-BLOS-main/MolecularClouds/05aDensitySensitivity.py", "type": "Python" }
""" This is the fifth stage of the BLOSMapping method where the dependence on density is assessed. - All parameters except for density are held constant, and the magnetic field is calculated with electron abundances corresponding to changes of 0 and +/- 1, 2.5, 5, 10, 20, 20, 40, and 50 % the fiducial input den...
MehrnooshTahaniREPO_NAMEMC-BLOSPATH_START.@MC-BLOS_extracted@MC-BLOS-main@MolecularClouds@05aDensitySensitivity.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "MikeSWang/Harmonia", "repo_path": "Harmonia_extracted/Harmonia-master/docs/source/conf.py", "type": "Python" }
import os import sys sys.path.insert(0, os.path.abspath('../../')) # -- Project information ----------------------------------------------------- author = 'Mike Shengbo Wang' copyright = ' Copyright 2020, Mike Shengbo Wang' project = 'Harmonia' release = '0.1' # -- General configuration --------------------------...
MikeSWangREPO_NAMEHarmoniaPATH_START.@Harmonia_extracted@Harmonia-master@docs@source@conf.py@.PATH_END.py
{ "filename": "cfis-cat.py", "repo_name": "legacysurvey/imagine", "repo_path": "imagine_extracted/imagine-main/cfis-cat.py", "type": "Python" }
import numpy as np from astrometry.util.fits import * from argparse import ArgumentParser def main(): parser = ArgumentParser() parser.add_argument('infns', nargs='+') opts = parser.parse_args() Nap = 20 cols = (('cfis_id x_image y_image ra dec ' + 'u_mag_auto u_magerr_auto u_mag_best...
legacysurveyREPO_NAMEimaginePATH_START.@imagine_extracted@imagine-main@cfis-cat.py@.PATH_END.py
{ "filename": "rfi_inspect_2458097.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/rfi_inspect/rfi_inspect_2458097.ipynb", "type": "Jupyter Notebook" }
# RFI Inspection Daily RTP Notebook ```python import numpy as np import matplotlib.pyplot as plt import matplotlib import glob import os from astropy import units from copy import deepcopy from pyuvdata import UVFlag import matplotlib.colors as colors from matplotlib import cm %matplotlib inline %config InlineBacken...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@rfi_inspect@rfi_inspect_2458097.ipynb@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@colorbar@title@font@_family.py@.PATH_END.py
{ "filename": "pols.md", "repo_name": "MWATelescope/mwa_hyperdrive", "repo_path": "mwa_hyperdrive_extracted/mwa_hyperdrive-main/mdbook/src/defs/pols.md", "type": "Markdown" }
# Instrumental polarisations In `hyperdrive` (and [`mwalib`](https://github.com/MWATelescope/mwalib) and [`hyperbeam`](https://github.com/MWATelescope/mwa_hyperbeam)), the X polarisation refers to the East-West dipoles and the Y refers to North-South. Note that this contrasts with the IAU definition of X and Y, which ...
MWATelescopeREPO_NAMEmwa_hyperdrivePATH_START.@mwa_hyperdrive_extracted@mwa_hyperdrive-main@mdbook@src@defs@pols.md@.PATH_END.py
{ "filename": "paper.md", "repo_name": "afeinstein20/stella", "repo_path": "stella_extracted/stella-main/paper.md", "type": "Markdown" }
--- title: '\texttt{stella}: Convolutional Neural Networks for Flare Identification in \textit{TESS}' tags: - Python - astronomy - PMS stars - stellar activity - stellar rotation authors: - name: Adina D. Feinstein orcid: 0000-0002-9464-8101 affiliation: "1, 2" - name: Benjamin T. Montet orci...
afeinstein20REPO_NAMEstellaPATH_START.@stella_extracted@stella-main@paper.md@.PATH_END.py
{ "filename": "conf.py", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/pygrale/doc/source/conf.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pygrale documentation build configuration file, created by # sphinx-quickstart on Fri May 13 17:36:32 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@doc@source@conf.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="parcoords.line.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_tickvals.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/choroplethmapbox/colorbar/tickformatstop/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@colorbar@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "application.py", "repo_name": "xraypy/xraylarch", "repo_path": "xraylarch_extracted/xraylarch-master/larch/qtrixs/application.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ RIXS GUI APPLICATION ==================== """ import sys import argparse import signal from larch.utils.logging import getLogger _logger = getLogger('lach.qtrixs.application') def createParser(): """Application parser""" parser = argparse.ArgumentParser(descr...
xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@larch@qtrixs@application.py@.PATH_END.py
{ "filename": "_cmin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/marker/_cmin.py", "type": "Python" }
import _plotly_utils.basevalidators class CminValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="sunburst.marker", **kwargs): super(CminValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@marker@_cmin.py@.PATH_END.py
{ "filename": "dataloader.py", "repo_name": "DaneSpaeth/pyoscillot", "repo_path": "pyoscillot_extracted/pyoscillot-main/pyoscillot/dataloader.py", "type": "Python" }
from astropy.io import fits from pathlib import Path import matplotlib.pyplot as plt import numpy as np from numpy.polynomial import Polynomial import wget import pandas as pd from cfg import parse_global_ini # import idlsave global_dict = parse_global_ini() DATAROOT = global_dict["datapath"] def phoenix_spectrum(Te...
DaneSpaethREPO_NAMEpyoscillotPATH_START.@pyoscillot_extracted@pyoscillot-main@pyoscillot@dataloader.py@.PATH_END.py
{ "filename": "extract_chart_studio.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/_plotly_future_/extract_chart_studio.py", "type": "Python" }
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@_plotly_future_@extract_chart_studio.py@.PATH_END.py
{ "filename": "plot_fNL_local.py", "repo_name": "ds283/CppTransport", "repo_path": "CppTransport_extracted/CppTransport-master/Documentation/Examples/plot_fNL_local.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import csv with open('/Users/ds283/Desktop/fNL_local.csv') as f: time = [] fNL_local = [] reader = csv.DictReader(f) for row in reader: time.append(float(row['time'])) fNL_local.append(float(row['fNL'])) time...
ds283REPO_NAMECppTransportPATH_START.@CppTransport_extracted@CppTransport-master@Documentation@Examples@plot_fNL_local.py@.PATH_END.py
{ "filename": "generic_ecsv_reader.py", "repo_name": "astropy/specutils", "repo_path": "specutils_extracted/specutils-main/specutils/io/default_loaders/generic_ecsv_reader.py", "type": "Python" }
import os from astropy.table import Table from ...spectra import Spectrum1D from ..registers import data_loader from ..parsing_utils import (generic_spectrum_from_table, spectrum_from_column_mapping) def identify_ecsv(origin, *args, **kwargs): """Check if it's an ECSV file.""" r...
astropyREPO_NAMEspecutilsPATH_START.@specutils_extracted@specutils-main@specutils@io@default_loaders@generic_ecsv_reader.py@.PATH_END.py
{ "filename": "test_priors.py", "repo_name": "mj-will/nessai", "repo_path": "nessai_extracted/nessai-main/tests/test_priors.py", "type": "Python" }
""" Test the prior functions. """ import numpy as np import pytest from nessai import priors def test_uniform_in_bounds(): """Test behaviour if x is out of bounds""" assert priors.log_uniform_prior(0) == 0.0 def test_uniform_out_of_bounds(): """Test behaviour if x is out of bounds""" assert priors...
mj-willREPO_NAMEnessaiPATH_START.@nessai_extracted@nessai-main@tests@test_priors.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/annotation/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="y", parent_name="layout.annotation", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@annotation@_y.py@.PATH_END.py
{ "filename": "variable.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/mapper/variable.py", "type": "Python" }
from itertools import chain, count from typing import Optional, Tuple, Dict, Set, Union, List, TYPE_CHECKING import operator from abc import ABC, abstractmethod from functools import wraps, reduce from math import sqrt import numpy as np from autoconf import cached_property from autofit.mapper.model_object import Mod...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@mapper@variable.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "qubvel/segmentation_models", "repo_path": "segmentation_models_extracted/segmentation_models-master/setup.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'segmentation_models' DESCRIPTION = 'Image...
qubvelREPO_NAMEsegmentation_modelsPATH_START.@segmentation_models_extracted@segmentation_models-master@setup.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/hoverlabel/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sunburst.hoverlabel", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@hoverlabel@_bgcolor.py@.PATH_END.py
{ "filename": "versioneer.py", "repo_name": "Smithsonian/ngehtsim", "repo_path": "ngehtsim_extracted/ngehtsim-main/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 * [![Latest Versio...
SmithsonianREPO_NAMEngehtsimPATH_START.@ngehtsim_extracted@ngehtsim-main@versioneer.py@.PATH_END.py
{ "filename": "_value.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="value", parent_name="splom.marker.colorbar.tickformatstop", **kwargs ): super(ValueValidator, self).__init__( plotly_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@colorbar@tickformatstop@_value.py@.PATH_END.py
{ "filename": "WASP-62b_sim_data_retrieval.py", "repo_name": "MartianColonist/POSEIDON", "repo_path": "POSEIDON_extracted/POSEIDON-main/docs/content/notebooks/WASP-62b_sim_data_retrieval.py", "type": "Python" }
from POSEIDON.constants import R_Sun, R_J from POSEIDON.core import create_star, create_planet, load_data, define_model, \ wl_grid_constant_R, set_priors, read_opacities from POSEIDON.visuals import plot_data, plot_spectra_retrieved, plot_PT_retrieved, \ plot_chem_...
MartianColonistREPO_NAMEPOSEIDONPATH_START.@POSEIDON_extracted@POSEIDON-main@docs@content@notebooks@WASP-62b_sim_data_retrieval.py@.PATH_END.py
{ "filename": "test_core.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/photutils/morphology/tests/test_core.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the core module. """ import numpy as np import pytest from numpy.testing import assert_allclose from photutils.datasets import make_wcs from photutils.morphology import data_properties from photutils.utils._optional_deps import HAS_SKIMAGE ...
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@morphology@tests@test_core.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-translator/setup.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2020 # 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-translator@setup.py@.PATH_END.py
{ "filename": "rrattrap.py", "repo_name": "scottransom/presto", "repo_path": "presto_extracted/presto-master/bin/rrattrap.py", "type": "Python" }
../python/presto/singlepulse/rrattrap.py
scottransomREPO_NAMEprestoPATH_START.@presto_extracted@presto-master@bin@rrattrap.py@.PATH_END.py
{ "filename": "test_python_sockets_implementation.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/compile_tests/test_python_sockets_implementation.py", "type": "Python" }
from amuse.support.interface import InCodeComponentImplementation from amuse.test.amusetest import TestWithMPI, TestCase import numpy import sys import os import time from amuse.units import nbody_system from amuse.units import units from amuse import datamodel from amuse.rfi import python_code from amuse.rfi.core im...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@compile_tests@test_python_sockets_implementation.py@.PATH_END.py
{ "filename": "simulation_attributes.py", "repo_name": "dnarayanan/caesar", "repo_path": "caesar_extracted/caesar-master/caesar/simulation_attributes.py", "type": "Python" }
import numpy as np from yt.funcs import mylog class SimulationAttributes(object): """A class to hold simulation attributes.""" def __init__(self): pass def create_attributes(self, obj): """After loading in a yt dataset, store local attributes here.""" ds = obj.yt_dataset s...
dnarayananREPO_NAMEcaesarPATH_START.@caesar_extracted@caesar-master@caesar@simulation_attributes.py@.PATH_END.py
{ "filename": "test_engdb_tools.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/lib/tests/test_engdb_tools.py", "type": "Python" }
""" Test suite for engdb_tools Notes ----- This file has been named specifically so it is not automatically found by py.test. This is because, to test, a connection to the internal engineering service is needed, which is generally not available. """ import os import pytest import requests from astropy.time import Tim...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@lib@tests@test_engdb_tools.py@.PATH_END.py
{ "filename": "ISSUE_TEMPLATE.md", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/.github/ISSUE_TEMPLATE.md", "type": "Markdown" }
* nannyml version: * Python version: * Operating System: ### Description Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. ### What I Did ``` Paste the command(s) you ran and the output. If there was a crash, please include the traceback here. ```
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@.github@ISSUE_TEMPLATE.md@.PATH_END.py
{ "filename": "mypy_plugin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/typing/mypy_plugin.py", "type": "Python" }
"""A mypy_ plugin for managing a number of platform-specific annotations. Its functionality can be split into three distinct parts: * Assigning the (platform-dependent) precisions of certain `~numpy.number` subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and `~numpy.longlong`. See the documentation...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@typing@mypy_plugin.py@.PATH_END.py
{ "filename": "merge_benchmark.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/benchmarks/layer_benchmark/merge_benchmark.py", "type": "Python" }
"""Benchmark merge layers. To run benchmarks, see the following command for an example, please change the flag to your custom value: ``` python3 -m benchmarks.layer_benchmark.merge_benchmark \ --benchmark_name=benchmark_add \ --num_samples=2048 \ --batch_size=256 \ --jit_compile=True ``` """ from abs...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@benchmarks@layer_benchmark@merge_benchmark.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/cffi/py3/cffi/__init__.py", "type": "Python" }
__all__ = ['FFI', 'VerificationError', 'VerificationMissing', 'CDefError', 'FFIError'] from .api import FFI from .error import CDefError, FFIError, VerificationError, VerificationMissing from .error import PkgConfigError __version__ = "1.17.1" __version_info__ = (1, 17, 1) # The verifier module file names...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@cffi@py3@cffi@__init__.py@.PATH_END.py
{ "filename": "_show.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/slices/x/_show.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.slices.x", **kwargs): super(ShowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@slices@x@_show.py@.PATH_END.py
{ "filename": "yandex.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/embeddings/yandex.py", "type": "Python" }
"""Wrapper around YandexGPT embedding models.""" from __future__ import annotations import logging import time from typing import Any, Callable, Dict, List, Sequence from langchain_core.embeddings import Embeddings from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init from pydantic i...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@embeddings@yandex.py@.PATH_END.py
{ "filename": "wave_sol.py", "repo_name": "ideasrule/sparta", "repo_path": "sparta_extracted/sparta-master/wave_sol.py", "type": "Python" }
from astropy.io import fits import os.path import numpy as np from constants import WCS_FILE, LEFT, RIGHT def get_wavelengths(instrument, instrument_filter): #Work in progress if instrument == "MIRI": with fits.open(WCS_FILE) as hdul: #Subtraction is necessary because image is rotated ...
ideasruleREPO_NAMEspartaPATH_START.@sparta_extracted@sparta-master@wave_sol.py@.PATH_END.py
{ "filename": "test_clusters.py", "repo_name": "htjb/margarine", "repo_path": "margarine_extracted/margarine-master/tests/test_clusters.py", "type": "Python" }
import numpy as np from anesthetic import MCMCSamples from margarine.clustered import clusterMAF from margarine.marginal_stats import calculate import pytest from numpy.testing import assert_equal, assert_allclose from scipy.stats import ks_2samp from clustered_distributions import TwoMoons def D_KL(logL, weights): ...
htjbREPO_NAMEmargarinePATH_START.@margarine_extracted@margarine-master@tests@test_clusters.py@.PATH_END.py
{ "filename": "test_angular_separation.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_angular_separation.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the projected separation stuff """ import numpy as np import pytest from astropy import units as u from astropy.coordinates import Angle from astropy.coordinates.builtin_frames import ICRS # lon1, lat1, lon2, lat2 in degrees coords = [ ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_angular_separation.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/contours/x/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="size", parent_name="surface.contours.x", **kwargs): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@contours@x@_size.py@.PATH_END.py
{ "filename": "plot_semi_supervised_versus_svm_iris.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/semi_supervised/plot_semi_supervised_versus_svm_iris.py", "type": "Python" }
""" =============================================================================== Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset =============================================================================== A comparison for the decision boundaries generated on the iris dataset by L...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@semi_supervised@plot_semi_supervised_versus_svm_iris.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._visible import VisibleValidator from ._unselected import UnselectedValidator from ._uirevision import UirevisionValidator from ._uid import UidValidator from ._thetaunit import ThetaunitValidator from ._thetasrc import ThetasrcValidator from ....
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@__init__.py@.PATH_END.py
{ "filename": "validate_onthefly.py", "repo_name": "supernnova/SuperNNova", "repo_path": "SuperNNova_extracted/SuperNNova-main/python/supernnova/validation/validate_onthefly.py", "type": "Python" }
import json import torch import numpy as np import pandas as pd from pathlib import Path from supernnova.utils import data_utils import supernnova.utils.logging_utils as lu from supernnova.conf import get_norm_from_model from supernnova.utils import experiment_settings from supernnova.utils import training_utils as tu ...
supernnovaREPO_NAMESuperNNovaPATH_START.@SuperNNova_extracted@SuperNNova-main@python@supernnova@validation@validate_onthefly.py@.PATH_END.py
{ "filename": "autobatch.py", "repo_name": "ultralytics/yolov5", "repo_path": "yolov5_extracted/yolov5-master/utils/autobatch.py", "type": "Python" }
# Ultralytics YOLOv5 🚀, AGPL-3.0 license """Auto-batch utils.""" from copy import deepcopy import numpy as np import torch from utils.general import LOGGER, colorstr from utils.torch_utils import profile def check_train_batch_size(model, imgsz=640, amp=True): """Checks and computes optimal training batch size...
ultralyticsREPO_NAMEyolov5PATH_START.@yolov5_extracted@yolov5-master@utils@autobatch.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/constants/tests/__init__.py", "type": "Python" }
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@constants@tests@__init__.py@.PATH_END.py
{ "filename": "density_models.py", "repo_name": "spaceml-org/karman", "repo_path": "karman_extracted/karman-main/karman/density_models.py", "type": "Python" }
import torch import pickle as pk import pandas as pd import numpy as np import os from tft_torch import tft from omegaconf import OmegaConf torch.set_default_dtype(torch.float32) from . import nn from . import util from importlib.resources import files #let's load the necessary scalers scalers_dict={} keys_time_serie...
spaceml-orgREPO_NAMEkarmanPATH_START.@karman_extracted@karman-main@karman@density_models.py@.PATH_END.py
{ "filename": "testidefix.py", "repo_name": "idefix-code/idefix", "repo_path": "idefix_extracted/idefix-master/test/Pluto/HD/sod/python/testidefix.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 5 11:29:41 2020 @author: glesur """ import idefixTools as idfx import sod import sys import argparse import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import interp1d parser = argparse.ArgumentParser() parser.add_argument(...
idefix-codeREPO_NAMEidefixPATH_START.@idefix_extracted@idefix-master@test@Pluto@HD@sod@python@testidefix.py@.PATH_END.py
{ "filename": "lowering.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/pallas/mosaic_gpu/lowering.py", "type": "Python" }
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@pallas@mosaic_gpu@lowering.py@.PATH_END.py
{ "filename": "draw_segmentation_masks.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/visualization/draw_segmentation_masks.py", "type": "Python" }
import numpy as np from keras.src import backend from keras.src import ops from keras.src.api_export import keras_export @keras_export("keras.visualization.draw_segmentation_masks") def draw_segmentation_masks( images, segmentation_masks, num_classes=None, color_mapping=None, alpha=0.8, blend...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@visualization@draw_segmentation_masks.py@.PATH_END.py
{ "filename": "regions.py", "repo_name": "PaulHancock/Aegean", "repo_path": "Aegean_extracted/Aegean-main/AegeanTools/regions.py", "type": "Python" }
#! /usr/bin/env python """ Describe sky areas as a collection of HEALPix pixels """ import datetime import os import _pickle as cPickle import astropy.units as u import healpy as hp import numpy as np from astropy.coordinates import SkyCoord from astropy.io import fits __author__ = "Paul Hancock" class Region(obje...
PaulHancockREPO_NAMEAegeanPATH_START.@Aegean_extracted@Aegean-main@AegeanTools@regions.py@.PATH_END.py
{ "filename": "mu_minorticks.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/mu_minorticks.py", "type": "Python" }
from kapteyn import maputils from matplotlib import pyplot as plt fitsobj = maputils.FITSimage("m101.fits") fig = plt.figure() fig.subplots_adjust(left=0.18, bottom=0.10, right=0.90, top=0.90, wspace=0.95, hspace=0.20) for i in range(4): f = fig.add_subplot(2,2,i+1) mplim = fitsobj.Annotat...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@mu_minorticks.py@.PATH_END.py
{ "filename": "niriss_ghosts.py", "repo_name": "spacetelescope/mirage", "repo_path": "mirage_extracted/mirage-master/mirage/ghosts/niriss_ghosts.py", "type": "Python" }
#! /usr/bin/env python """This module contains functions related to the addition of ghosts to NIRISS simulations. Code originally written by Takahiro Morishita. """ import logging import numpy as np from astropy.io import fits, ascii from astropy.table import Table from mirage.utils.constants import DEFAULT_NIRISS_PT...
spacetelescopeREPO_NAMEmiragePATH_START.@mirage_extracted@mirage-master@mirage@ghosts@niriss_ghosts.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/analysis_modules/level_sets/api.py", "type": "Python" }
raise RuntimeError( "The level_sets module has been moved to yt.data_objects.level_sets." "Please, change the import in your scripts from " "'from yt.analysis_modules.level_sets' to " "'from yt.data_objects.level_sets.'." )
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@analysis_modules@level_sets@api.py@.PATH_END.py
{ "filename": "carma_sim.py", "repo_name": "ywx649999311/EzTao", "repo_path": "EzTao_extracted/EzTao-master/src/eztao/ts/carma_sim.py", "type": "Python" }
""" A collection of functions for simulating CARMA processes. """ import numpy as np from math import ceil import celerite from celerite import GP from eztao.ts.utils import add_season, downsample_byN, downsample_byTime from eztao.carma.CARMATerm import DRW_term, CARMA_term __all__ = ["gpSimFull", "gpSimRand", "gpSim...
ywx649999311REPO_NAMEEzTaoPATH_START.@EzTao_extracted@EzTao-master@src@eztao@ts@carma_sim.py@.PATH_END.py
{ "filename": "interval_gain_machine.py", "repo_name": "ratt-ru/CubiCal", "repo_path": "CubiCal_extracted/CubiCal-master/cubical/machines/interval_gain_machine.py", "type": "Python" }
# CubiCal: a radio interferometric calibration suite # (c) 2017 Rhodes University & Jonathan S. Kenyon # http://github.com/ratt-ru/CubiCal # This code is distributed under the terms of GPLv2, see LICENSE.md for details from __future__ import print_function from builtins import range import numpy as np from cubical.flag...
ratt-ruREPO_NAMECubiCalPATH_START.@CubiCal_extracted@CubiCal-master@cubical@machines@interval_gain_machine.py@.PATH_END.py
{ "filename": "rate_calculator.py", "repo_name": "SNEWS2/snewpy", "repo_path": "snewpy_extracted/snewpy-main/python/snewpy/rate_calculator.py", "type": "Python" }
""" The module :mod:`snewpy.rate_calculator` defines a Python interface for calculating event rates using data from SNOwGLoBES Reference --------- .. autoclass:: RateCalculator :members: run """ import numpy as np from snewpy.snowglobes_interface import SnowglobesData, guess_material from snewpy.neutrino import Fl...
SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@python@snewpy@rate_calculator.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/misc/setup.py", "type": "Python" }
from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('misc',parent_package,top_path) config.add_data_files('*.dat') config.add_data_dir('tests') return config ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@misc@setup.py@.PATH_END.py
{ "filename": "feasible_gls.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/regression/feasible_gls.py", "type": "Python" }
""" Created on Tue Dec 20 20:24:20 2011 Author: Josef Perktold License: BSD-3 """ import numpy as np from statsmodels.regression.linear_model import OLS, GLS, WLS def atleast_2dcols(x): x = np.asarray(x) if x.ndim == 1: x = x[:,None] return x class GLSHet2(GLS): '''WLS with heteroscedast...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@regression@feasible_gls.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/GraphicsScene/__init__.py", "type": "Python" }
from .GraphicsScene import *
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@GraphicsScene@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/contourpy/contourpy/util/__init__.py", "type": "Python" }
from __future__ import annotations from contourpy.util._build_config import build_config __all__ = ["build_config"]
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@contourpy@contourpy@util@__init__.py@.PATH_END.py
{ "filename": "elixer_widget_lae.py", "repo_name": "HETDEX/hetdex_api", "repo_path": "hetdex_api_extracted/hetdex_api-master/hetdex_api/elixer_widget_lae.py", "type": "Python" }
from __future__ import print_function """ ELiXer Widget Classify Supriod Detections Based on Dr. Erin Mentuch Cooper's original elixer_widgets.py #*** PLACE HOLDER ***# Classify the type of real detection, primarily LAE or not LAE Options: No Imaging -- cannot make any determination because there is no imagin...
HETDEXREPO_NAMEhetdex_apiPATH_START.@hetdex_api_extracted@hetdex_api-master@hetdex_api@elixer_widget_lae.py@.PATH_END.py
{ "filename": "io.py", "repo_name": "freelunchtheorem/Conditional_Density_Estimation", "repo_path": "Conditional_Density_Estimation_extracted/Conditional_Density_Estimation-master/cde/utils/io.py", "type": "Python" }
import os import pickle import pandas as pd from datetime import datetime def store_dataframe(dataframe, output_dir, file_name=None): suffix = ".pickle" full_path = get_full_path(output_dir=output_dir, suffix=suffix, file_name=file_name) dataframe.to_pickle(full_path) print("Dumped dataframe pickle to", full_...
freelunchtheoremREPO_NAMEConditional_Density_EstimationPATH_START.@Conditional_Density_Estimation_extracted@Conditional_Density_Estimation-master@cde@utils@io.py@.PATH_END.py
{ "filename": "example_new_metrics.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/maf_contrib/example_new_metrics.py", "type": "Python" }
# Example of a new metric added to the repo. # ljones@astro.washington.edu __all__ = ("NightsWithNFiltersMetric",) import numpy as np from rubin_sim.maf.metrics import BaseMetric class NightsWithNFiltersMetric(BaseMetric): """Count how many times more than NFilters are used within the same night, for this ...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@maf_contrib@example_new_metrics.py@.PATH_END.py
{ "filename": "proximal_adagrad.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/proximal_adagrad.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@training@proximal_adagrad.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/link/line/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.link.line", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@link@line@_colorsrc.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "astrodee/threadcount", "repo_path": "threadcount_extracted/threadcount-master/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...
astrodeeREPO_NAMEthreadcountPATH_START.@threadcount_extracted@threadcount-master@docs@source@conf.py@.PATH_END.py
{ "filename": "tube.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/filters/tube.py", "type": "Python" }
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Instance from tvtk.api import tvtk # Local imports from mayavi.filters.filter_base import FilterBase from mayavi.core.pipeline_info import PipelineIn...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@filters@tube.py@.PATH_END.py
{ "filename": "StarGalQsoLSDR9.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/03_ScienceExamples/StarGalQSOSeparation/StarGalQsoLSDR9.ipynb", "type": "Jupyter Notebook" }
```python __nbid__ = '0030' __author__ = 'Stephanie Juneau <stephanie.juneau@noirlab.edu>, Robert Nikutta <robert.nikutta@noirlab.edu>, Knut Olsen <knut.olsen@noirlab.edu>, Astro Data Lab Team <datalab@noirlab.edu>' __version__ = '20240603' # yyyymmdd __datasets__ = ['ls_dr9', 'sdss_dr13', 'sdss_dr17'] __keywords__ = [...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@03_ScienceExamples@StarGalQSOSeparation@StarGalQsoLSDR9.ipynb@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.marker.colorbar.title.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@marker@colorbar@title@font@_size.py@.PATH_END.py
{ "filename": "kernels.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/smc/kernels.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@smc@kernels.py@.PATH_END.py
{ "filename": "basics.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/radis/misc/basics.py", "type": "Python" }
# -*- coding: utf-8 -*- """Created on Wed Nov 5 12:59:37 2014. @author: Erwan Small functions used in other procedures ------------------------------------------------------------------------------- """ import os import sys from io import StringIO from itertools import filterfalse, tee from os.path import abspath, ...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@radis@misc@basics.py@.PATH_END.py
{ "filename": "Example8.py", "repo_name": "delphes/delphes", "repo_path": "delphes_extracted/delphes-master/examples/Example8.py", "type": "Python" }
#!/usr/bin/env python import sys import ROOT, math from collections import OrderedDict from ROOT import TLorentzVector import array # _______________________________________________________________________________ def print_part(p, all_particles, basespace): print( "{}i: {}, PID: {}, Q: {}, Status: {}, E:...
delphesREPO_NAMEdelphesPATH_START.@delphes_extracted@delphes-master@examples@Example8.py@.PATH_END.py
{ "filename": "_t_r_a_k.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/ttLib/tables/_t_r_a_k.py", "type": "Python" }
from fontTools.misc import sstruct from fontTools.misc.fixedTools import ( fixedToFloat as fi2fl, floatToFixed as fl2fi, floatToFixedToStr as fl2str, strToFixedToFloat as str2fl, ) from fontTools.misc.textTools import bytesjoin, safeEval from fontTools.ttLib import TTLibError from . import DefaultTable ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@ttLib@tables@_t_r_a_k.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/barpolar/unselected/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "barpolar.unselected" _path_str = "barpolar.unselected.textfont" _valid_props = {"color"} ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@barpolar@unselected@_textfont.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/pattern/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="icicle.marker.pattern", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@pattern@_bgcolor.py@.PATH_END.py
{ "filename": "run-tests.py", "repo_name": "bccp/nbodykit", "repo_path": "nbodykit_extracted/nbodykit-master/run-tests.py", "type": "Python" }
import sys; sys.path.pop(0) from runtests.mpi import Tester import os.path tester = Tester(os.path.abspath(__file__), "nbodykit") tester.main(sys.argv[1:])
bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@run-tests.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distMultiNorm/getMultiNormLogPDF/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import math import glob import sys linewidth = 2 fontsize = 17 marker ={ "CK" : "-" , "IK" : "." , "RK" : "-" } xlab = { "CK" : "X ( real/imaginary components )" , "IK" : "X ( integer-valued ...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distMultiNorm@getMultiNormLogPDF@main.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "dgerosa/spops", "repo_path": "spops_extracted/spops-master/README.md", "type": "Markdown" }
# spops Data release supporting: * *Spin orientations of merging black holes formed from the evolution of stellar binaries.* Davide Gerosa, Emanuele Berti, Richard O’Shaughnessy, Krzysztof Belczynski, Michael Kesden, Daniel Wysocki, Wojciech Gladysz. Physical Review D 98 (2018) [084036](https://journals.aps.org/prd...
dgerosaREPO_NAMEspopsPATH_START.@spops_extracted@spops-master@README.md@.PATH_END.py
{ "filename": "_textcasesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmap/hoverlabel/font/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): super(TextcasesrcValidator, self).__init__( pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmap@hoverlabel@font@_textcasesrc.py@.PATH_END.py
{ "filename": "datasets.py", "repo_name": "tslearn-team/tslearn", "repo_path": "tslearn_extracted/tslearn-main/tslearn/datasets/datasets.py", "type": "Python" }
""" The :mod:`tslearn.datasets` module provides simplified access to standard time series datasets. """ import zipfile import tempfile import shutil import os import warnings from urllib.request import urlretrieve __author__ = 'Romain Tavenard romain.tavenard[at]univ-rennes2.fr' def extract_from_zip_url(url, target...
tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@datasets@datasets.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/scatterpolargl/marker/_colorbar.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolargl.marker" _path_str = "scatterpolargl.marker.colorbar" _valid_props = { ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterpolargl@marker@_colorbar.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/python-package/README.md", "type": "Markdown" }
CatBoost Python Package ====================== [![PyPI version](https://badge.fury.io/py/catboost.svg)](https://pypi.org/project/catboost) Installation ------------ For stable version, please install using pip: - ``pip install catboost`` For the latest version from GitHub: - [Build python package from source](https...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@python-package@README.md@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/colorbar/_tickfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="volume.colorbar", **kwargs): super(TickfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@colorbar@_tickfont.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "desihub/desiutil", "repo_path": "desiutil_extracted/desiutil-main/py/desiutil/setup.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ ============== desiutil.setup ============== This module supplies :command:`desi_update_version`, which simplifies setting and updating version strings in Python packages. This module also supports *deprecated* ``python setup....
desihubREPO_NAMEdesiutilPATH_START.@desiutil_extracted@desiutil-main@py@desiutil@setup.py@.PATH_END.py
{ "filename": "gpu_performance_tips.md", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/docs/gpu_performance_tips.md", "type": "Markdown" }
# GPU performance tips <!--* freshness: { reviewed: '2024-06-10' } *--> This document focuses on performance tips for neural network workloads ## Matmul precision On recent GPU generations, such as the Nvidia A100 generation or later, it can be a good idea to perform most computations in `bfloat16` precision. For e...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@gpu_performance_tips.md@.PATH_END.py
{ "filename": "test_misc.py", "repo_name": "mperrin/poppy", "repo_path": "poppy_extracted/poppy-master/poppy/tests/test_misc.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import scipy from ..misc import airy_1d, airy_2d, sinc2_2d, _RADtoARCSEC, _ARCSECtoRAD airy_zeros = np.asarray([3.8317, 7.0156, 10.1735, 13.3237, 16.4706])/np.pi # first several zeros of the Bessel function J1. See e.g. http://en.wikipedia.org/wiki/Airy_disk#Mathem...
mperrinREPO_NAMEpoppyPATH_START.@poppy_extracted@poppy-master@poppy@tests@test_misc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jfoster17/extinction-distances", "repo_path": "extinction-distances_extracted/extinction-distances-master/extinction_distance/images/__init__.py", "type": "Python" }
# placeholder
jfoster17REPO_NAMEextinction-distancesPATH_START.@extinction-distances_extracted@extinction-distances-master@extinction_distance@images@__init__.py@.PATH_END.py
{ "filename": "optional.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/components/optional.py", "type": "Python" }
"""A meta-component that allows a component to be optionally enabled or disabled. This component is mostly for illustration and is not used anywhere. This is because it is usually much easier to simply add a trait in the module to enable/disable a particular component. """ # Author: Prabhu Ramachandran <prabhu@aero....
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@components@optional.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/fast/config.py", "type": "Python" }
import os CONFIG = { "local_data_dir": "fast_data/", "remote_data_dir": "https://spdf.gsfc.nasa.gov/pub/data/fast/", } # override local data directory with environment variables if os.environ.get("FAST_DATA_DIR"): CONFIG["local_data_dir"] = os.environ["FAST_DATA_DIR"] elif os.environ.get("SPEDAS_DATA_DIR"...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@fast@config.py@.PATH_END.py
{ "filename": "EXAMPLE_main_WFIRST_LC.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/examples/EXAMPLE_main_WFIRST_LC.py", "type": "Python" }
# import sys # sys.path.insert(0,"../") from copy import deepcopy # import numpy as np import falco import EXAMPLE_config_WFIRST_LC as CONFIG # %% Load/run config script mp = deepcopy(CONFIG.mp) # %% Set Output Data Directories mp.path = falco.config.Object() # mp.path.config = './' # Location of config files and...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@examples@EXAMPLE_main_WFIRST_LC.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/threeML/io/__init__.py", "type": "Python" }
from .logging import (activate_logs, activate_progress_bars, activate_warnings, debug_mode, loud_mode, quiet_mode, setup_logger, silence_logs, silence_progress_bars, silence_warnings, toggle_progress_bars, update_logging_level) from .plotting.get_style i...
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@io@__init__.py@.PATH_END.py
{ "filename": "promql.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/promql.py", "type": "Python" }
""" pygments.lexers.promql ~~~~~~~~~~~~~~~~~~~~~~ Lexer for Prometheus Query 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 Comment,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@promql.py@.PATH_END.py
{ "filename": "chat_models.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/cli/langchain_cli/integration_template/integration_template/chat_models.py", "type": "Python" }
"""__ModuleName__ chat models.""" from typing import Any, Dict, Iterator, List, Optional from langchain_core.callbacks import ( CallbackManagerForLLMRun, ) from langchain_core.language_models import BaseChatModel from langchain_core.messages import ( AIMessage, AIMessageChunk, BaseMessage, ) from lang...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@langchain_cli@integration_template@integration_template@chat_models.py@.PATH_END.py
{ "filename": "_scale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/projection/x/_scale.py", "type": "Python" }
import _plotly_utils.basevalidators class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="scale", parent_name="scatter3d.projection.x", **kwargs ): super(ScaleValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@projection@x@_scale.py@.PATH_END.py
{ "filename": "panstarrs1.py", "repo_name": "mkelley/calviacat", "repo_path": "calviacat_extracted/calviacat-main/calviacat/panstarrs1.py", "type": "Python" }
# Licensed with the MIT License, see LICENSE for details __all__ = [ 'PanSTARRS1' ] import io import requests import numpy as np from astropy.io import votable from .catalog import Catalog, TableDefinition # column names and SQLite type COLUMN_DEFS = ( ('objname', 'TEXT'), ('objid', 'INTEGER PRIMARY KEY'...
mkelleyREPO_NAMEcalviacatPATH_START.@calviacat_extracted@calviacat-main@calviacat@panstarrs1.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/baxis/tickfont/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@baxis@tickfont@_family.py@.PATH_END.py