metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "model.py", "repo_name": "andreicuceu/vega", "repo_path": "vega_extracted/vega-master/vega/model.py", "type": "Python" }
from . import power_spectrum from . import pktoxi from . import correlation_func as corr_func from . import metals from . import broadband_poly class Model: """ Class for computing Lyman-alpha forest correlation function models. """ def __init__(self, corr_item, fiducial, scale_params, data=None): ...
andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@vega@model.py@.PATH_END.py
{ "filename": "lahey.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/distutils/fcompiler/lahey.py", "type": "Python" }
import os from numpy.distutils.fcompiler import FCompiler compilers = ['LaheyFCompiler'] class LaheyFCompiler(FCompiler): compiler_type = 'lahey' description = 'Lahey/Fujitsu Fortran 95 Compiler' version_pattern = r'Lahey/Fujitsu Fortran 95 Compiler Release (?P<version>[^\s*]*)' executables = { ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@distutils@fcompiler@lahey.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/waterfall/connector/_line.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall.connector" _path_str = "waterfall.connector.line" _valid_props = {"color", "dash", "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@waterfall@connector@_line.py@.PATH_END.py
{ "filename": "test_boundary.py", "repo_name": "hannorein/REBOUND", "repo_path": "REBOUND_extracted/REBOUND-main/rebound/tests/test_boundary.py", "type": "Python" }
import rebound import unittest class TestBoundary(unittest.TestCase): def test_open(self): sim = rebound.Simulation() sim.boundary = "open" sim.configure_box(10.) sim.add(m=0.1,x=1., vx=5.0) sim.add(m=0.1,x=-1., vx=-5.0) sim.add(m=0.1,y=1., vx=6.0) sim.a...
hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@rebound@tests@test_boundary.py@.PATH_END.py
{ "filename": "kinetica.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/kinetica.py", "type": "Python" }
from __future__ import annotations import asyncio import enum import json import logging import struct import uuid from collections import OrderedDict from enum import Enum from functools import partial from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type import numpy as np from langchain_cor...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@kinetica.py@.PATH_END.py
{ "filename": "initializers.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/linen/initializers.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@flax@linen@initializers.py@.PATH_END.py
{ "filename": "mag.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/static/files/mag.py", "type": "Python" }
""" Computing apparent magnitude from difference magnitudes for ZTF Adapted by Roy Williams from Eric Bellm's notebook https://github.com/ZwickyTransientFacility/ztf-avro-alert/blob/master/notebooks/Variable_star_lightcurves.ipynb """ import math def dc_mag_dict(fid, magpsf,sigmapsf, magnr,sigmagnr, magzps...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@static@files@mag.py@.PATH_END.py
{ "filename": "sixdf_2011_bao.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/bao/sixdf_2011_bao.py", "type": "Python" }
from cobaya.likelihoods.base_classes import BAO class sixdf_2011_bao(BAO): r""" Likelihood of the BAO detection of the 6dF Galaxy Survey \cite{Beutler:2012px}. """ pass
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@bao@sixdf_2011_bao.py@.PATH_END.py
{ "filename": "_ids.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnelarea/_ids.py", "type": "Python" }
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="funnelarea", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnelarea@_ids.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "bradkav/NbodyIMRI", "repo_path": "NbodyIMRI_extracted/NbodyIMRI-main/test_snapshots/README.md", "type": "Markdown" }
#### Test Snapshots
bradkavREPO_NAMENbodyIMRIPATH_START.@NbodyIMRI_extracted@NbodyIMRI-main@test_snapshots@README.md@.PATH_END.py
{ "filename": "_insidetextfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_insidetextfont.py", "type": "Python" }
import _plotly_utils.basevalidators class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="funnel", **kwargs): super(InsidetextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@_insidetextfont.py@.PATH_END.py
{ "filename": "_ticklabelposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="volume.colorbar", **kwargs ): super(TicklabelpositionValidator, self).__init__( plotly_name=plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "toast_cache_test.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/pipelines/toast_cache_test.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """Test the ability to free memory from a toast.Cache. This stores the following objects per detector...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@pipelines@toast_cache_test.py@.PATH_END.py
{ "filename": "imshow3d.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/mplot3d/imshow3d.py", "type": "Python" }
""" =============== 2D images in 3D =============== This example demonstrates how to plot 2D color coded images (similar to `.Axes.imshow`) as a plane in 3D. Matplotlib does not have a native function for this. Below we build one by relying on `.Axes3D.plot_surface`. For simplicity, there are some differences to `.Ax...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@mplot3d@imshow3d.py@.PATH_END.py
{ "filename": "parallel.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/lax/parallel.py", "type": "Python" }
# Copyright 2019 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@lax@parallel.py@.PATH_END.py
{ "filename": "terminal.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/_pytest/terminal.py", "type": "Python" }
""" terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ from __future__ import absolute_import, division, print_function import itertools import platform import sys import time import pluggy import py import six import pytest from _pytest import node...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@_pytest@terminal.py@.PATH_END.py
{ "filename": "ellipse.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/photutils/aperture/ellipse.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines elliptical and elliptical-annulus apertures in both pixel and sky coordinates. """ import math import astropy.units as u import numpy as np from photutils.aperture.attributes import (PixelPositions, PositiveScalar, ...
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@aperture@ellipse.py@.PATH_END.py
{ "filename": "test_simulation_util.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Util/test_simulation_util.py", "type": "Python" }
# import main simulation class of lenstronomy import lenstronomy.Util.simulation_util as sim_util from lenstronomy.Data.imaging_data import ImageData import pytest class TestSimulation(object): def setup_method(self): pass def test_data_configure_simple(self): # data specifics sigma_b...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Util@test_simulation_util.py@.PATH_END.py
{ "filename": "_sizemode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/marker/_sizemode.py", "type": "Python" }
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scatterpolar.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@marker@_sizemode.py@.PATH_END.py
{ "filename": "shelve.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/shelve.py", "type": "Python" }
"""Manage shelves of pickled objects. A "shelf" is a persistent, dictionary-like object. The difference with dbm databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python objects -- anything that the "pickle" module can handle. This includes most class instances, recursive data type...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@shelve.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "mseitzer/pytorch-fid", "repo_path": "pytorch-fid_extracted/pytorch-fid-master/setup.py", "type": "Python" }
import os import setuptools def read(rel_path): base_path = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(base_path, rel_path), "r") as f: return f.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.startswith("__version__"): ...
mseitzerREPO_NAMEpytorch-fidPATH_START.@pytorch-fid_extracted@pytorch-fid-master@setup.py@.PATH_END.py
{ "filename": "_type.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/baxis/_type.py", "type": "Python" }
import _plotly_utils.basevalidators class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="carpet.baxis", **kwargs): super(TypeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@baxis@_type.py@.PATH_END.py
{ "filename": "train_regressor_CNN.py", "repo_name": "epfl-radio-astro/LiSA", "repo_path": "LiSA_extracted/LiSA-main/utils/train_regressor_CNN.py", "type": "Python" }
import numpy as np import sys, time, os import matplotlib.pyplot as plt import tensorflow as tf from pathlib import Path from modules.truth_info import TruthSource from modules.domain_reader import BinaryDomainReader as DenoisedReader from modules.domain_reader import AstropyDomainReader as Reader from modules.ai....
epfl-radio-astroREPO_NAMELiSAPATH_START.@LiSA_extracted@LiSA-main@utils@train_regressor_CNN.py@.PATH_END.py
{ "filename": "gmosaicparam.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/gemini/eti/gmosaicparam.py", "type": "Python" }
import os from pyraf import iraf from gempy.utils import logutils from gempy.eti_core.pyrafetiparam import PyrafETIParam, IrafStdout log = logutils.get_logger(__name__) class GmosaicParam(PyrafETIParam): """This class coordinates the ETI parameters as it pertains to the IRAF task gireduce directly. """ ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@gemini@eti@gmosaicparam.py@.PATH_END.py
{ "filename": "_labelssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/_labelssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="treemap", **kwargs): super(LabelssrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@_labelssrc.py@.PATH_END.py
{ "filename": "quasiperiodic_cosine_kernel.md", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/docs/gaussian_process/quasiperiodic_cosine_kernel.md", "type": "Markdown" }
(quasiperiodic_cosine_kernel)= # Quasi-periodic with cosine kernel This kernel has been introduced by [Perger et al. 2021](https://ui.adsabs.harvard.edu/abs/2021A%26A...645A..58P/abstract). The kernel has been implemented in `PyORBIT` without relying on any other package. If we define $\tau = t_i-t_j$ : ```{math} ...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@docs@gaussian_process@quasiperiodic_cosine_kernel.md@.PATH_END.py
{ "filename": "single_trapezoid_event.py", "repo_name": "rice-solar-physics/ebtelPlusPlus", "repo_path": "ebtelPlusPlus_extracted/ebtelPlusPlus-main/examples/single_trapezoid_event.py", "type": "Python" }
""" Using an Asymmetric Heating Profile Under the Single-fluid Approximation ======================================================================== In this example, we force the electron and ion populations to have the same temperature to illustrate the single fluid case. """ import astropy.units as u import matplotl...
rice-solar-physicsREPO_NAMEebtelPlusPlusPATH_START.@ebtelPlusPlus_extracted@ebtelPlusPlus-main@examples@single_trapezoid_event.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/yaxis/title/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.yaxis.title" _path_str = "layout.yaxis.title.font" _valid_props = { "color",...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@yaxis@title@_font.py@.PATH_END.py
{ "filename": "test_migration.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/_internal/compatibility/test_migration.py", "type": "Python" }
import importlib import pytest from prefect._internal.compatibility.migration import MOVED_IN_V3, REMOVED_IN_V3 from prefect.exceptions import PrefectImportError def import_from(dotted_path: str): """ Import an object from a dotted path. This function dynamically imports an object (such as a class, fun...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@_internal@compatibility@test_migration.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tcollett/LensPop", "repo_path": "LensPop_extracted/LensPop-master/pylens/__init__.py", "type": "Python" }
import massmodel,pylens,MassModels
tcollettREPO_NAMELensPopPATH_START.@LensPop_extracted@LensPop-master@pylens@__init__.py@.PATH_END.py
{ "filename": "test_threshold.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/test/test_threshold.py", "type": "Python" }
# Copyright (C) 2012 Alex Nitz, Josh Willis # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distr...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@test@test_threshold.py@.PATH_END.py
{ "filename": "INSTALL.md", "repo_name": "veusz/veusz", "repo_path": "veusz_extracted/veusz-master/INSTALL.md", "type": "Markdown" }
# Veusz Installation ## Installation methods 1. Provided binaries for x86-64 Linux, Windows and MacOS - please go to the [download page](https://veusz.github.io/download/). See also below for further information. 2. Packages for your Linux distribution, provided by the distribution. These are often older th...
veuszREPO_NAMEveuszPATH_START.@veusz_extracted@veusz-master@INSTALL.md@.PATH_END.py
{ "filename": "splitpol_FASTpsrfits.py", "repo_name": "qianlivan/RPPPS", "repo_path": "RPPPS_extracted/RPPPS-master/splitpol_FASTpsrfits.py", "type": "Python" }
#!/usr/bin/env python import numpy as np import pyfits import os import datetime import time import sys from array import array import matplotlib as mpl import matplotlib.pyplot as plt from pylab import * #------------------------------------------------------------------ # Written by Lei QIAN # version 20190529 # 2...
qianlivanREPO_NAMERPPPSPATH_START.@RPPPS_extracted@RPPPS-master@splitpol_FASTpsrfits.py@.PATH_END.py
{ "filename": "_legendrank.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/mesh3d/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="mesh3d", **kwargs): super(LegendrankValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@mesh3d@_legendrank.py@.PATH_END.py
{ "filename": "_b.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/_b.py", "type": "Python" }
import _plotly_utils.basevalidators class BValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="carpet", **kwargs): super(BValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@_b.py@.PATH_END.py
{ "filename": "_interpolative_backend.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/linalg/_interpolative_backend.py", "type": "Python" }
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain t...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@linalg@_interpolative_backend.py@.PATH_END.py
{ "filename": "_version.py", "repo_name": "SNEWS2/snewpy", "repo_path": "snewpy_extracted/snewpy-main/python/snewpy/_version.py", "type": "Python" }
__version__ = '1.6b1'
SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@python@snewpy@_version.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/optimize/_lsq/__init__.py", "type": "Python" }
"""This module contains least-squares algorithms.""" from __future__ import division, print_function, absolute_import from .least_squares import least_squares from .lsq_linear import lsq_linear __all__ = ['least_squares', 'lsq_linear']
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@optimize@_lsq@__init__.py@.PATH_END.py
{ "filename": "filters.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/sed/filters.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Functions relevant for photometric calibration Table of contents: 1. Available response functions 2. Adding filters on the fly - Defining a new filter - Temporarily modifying an existing filter 3. Adding filters permanently Section 1. Available response functio...
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@sed@filters.py@.PATH_END.py
{ "filename": "test_mpi_fail.py", "repo_name": "adrn/schwimmbad", "repo_path": "schwimmbad_extracted/schwimmbad-main/tests/test_mpi_fail.py", "type": "Python" }
# type: ignore """ I couldn't figure out how to get py.test and MPI to play nice together, so this is a script that tests the MPIPool """ # Standard library import random import pytest from schwimmbad.mpi import MPIPool def worker_error(task): raise AttributeError("Derp") @pytest.mark.skip(True, reason="WTF"...
adrnREPO_NAMEschwimmbadPATH_START.@schwimmbad_extracted@schwimmbad-main@tests@test_mpi_fail.py@.PATH_END.py
{ "filename": "jsonpickle.py", "repo_name": "sdss/cluplus", "repo_path": "cluplus_extracted/cluplus-main/python/cluplus/parsers/jsonpickle.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: Florian Briegel (briegel@mpia.de) # @Date: 2021-08-12 # @Filename: jsonpickle.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) ''' ''' from __future__ import annotations import click from clu.command import Command from clu.parse...
sdssREPO_NAMEcluplusPATH_START.@cluplus_extracted@cluplus-main@python@cluplus@parsers@jsonpickle.py@.PATH_END.py
{ "filename": "hp_utils_test.py", "repo_name": "keras-team/keras-tuner", "repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/engine/hyperparameters/hp_utils_test.py", "type": "Python" }
# Copyright 2019 The KerasTuner 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 ...
keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@engine@hyperparameters@hp_utils_test.py@.PATH_END.py
{ "filename": "kl.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/distributions/kl.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math from torch.distributions import ( Independent, MultivariateNormal, Normal, kl_divergence, register_kl, ) from pyro.distributions.delta import Delta from pyro.distributions.distribution import Distr...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@distributions@kl.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "arjunsavel/cortecs", "repo_path": "cortecs_extracted/cortecs-main/src/cortecs/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*-
arjunsavelREPO_NAMEcortecsPATH_START.@cortecs_extracted@cortecs-main@src@cortecs@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/sankey/link/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._colorscale import Colorscale from ._hoverlabel import Hoverlabel from ._line import Line from . import hoverlabel else: from _plotly_utils.importers import relative_import __all__, __getattr__, __...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@sankey@link@__init__.py@.PATH_END.py
{ "filename": "_legendwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/_legendwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="table", **kwargs): super(LegendwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@_legendwidth.py@.PATH_END.py
{ "filename": "test_gridspec.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/tests/test_gridspec.py", "type": "Python" }
import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import pytest def test_equal(): gs = gridspec.GridSpec(2, 1) assert gs[0, 0] == gs[0, 0] assert gs[:, 0] == gs[:, 0] def test_width_ratios(): """ Addresses issue #5835. See at https://github.com/matplotlib/matplotlib/issu...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@tests@test_gridspec.py@.PATH_END.py
{ "filename": "update_test.py", "repo_name": "deepmind/optax", "repo_path": "optax_extracted/optax-main/optax/_src/update_test.py", "type": "Python" }
# Copyright 2019 DeepMind Technologies Limited. 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 ...
deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@_src@update_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tomasstolker/species", "repo_path": "species_extracted/species-main/species/data/phot_data/__init__.py", "type": "Python" }
tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@data@phot_data@__init__.py@.PATH_END.py
{ "filename": "testplot_planet_growth.py", "repo_name": "miosta/drift_composition", "repo_path": "drift_composition_extracted/drift_composition-main/drift_composition/testplot_planet_growth.py", "type": "Python" }
from drift_composition.constants import Mearth, Msun, Rau, yr from drift_composition.grid import Grid from drift_composition.disc import DiscModel from drift_composition.molecule import get_molecular_properties from drift_composition.simple_planet import Planet, PlanetEnv from drift_composition.atoms import atoms_in_mo...
miostaREPO_NAMEdrift_compositionPATH_START.@drift_composition_extracted@drift_composition-main@drift_composition@testplot_planet_growth.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py3/ipywidgets/tests/__init__.py", "type": "Python" }
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py3@ipywidgets@tests@__init__.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/colorbar/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="histogram2dcontour.colorbar", **kwargs, ): super(TickformatValidator, self).__init__( plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@colorbar@_tickformat.py@.PATH_END.py
{ "filename": "x_p_sbi.ipynb", "repo_name": "xpsi-group/xpsi", "repo_path": "xpsi_extracted/xpsi-main/docs/source/x_p_sbi.ipynb", "type": "Jupyter Notebook" }
# Posterior Inference using SBI Simulation-Based Inference (SBI) with Neural Posterior Estimation (NPE) is a statistical framework for parameter inference in complex models. Instead of relying on an explicit likelihood function, NPE uses simulations to generate synthetic data and trains neural networks to learn an app...
xpsi-groupREPO_NAMExpsiPATH_START.@xpsi_extracted@xpsi-main@docs@source@x_p_sbi.ipynb@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="contour.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "matfuncs.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/linalg/matfuncs.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.linalg` namespace for importing the functions # included below. from scipy._lib.deprecation import _sub_module_deprecation __all__ = [ # noqa: F822 'expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm', 'tanhm', 'logm',...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@matfuncs.py@.PATH_END.py
{ "filename": "vi_posterior.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/inference/posteriors/vi_posterior.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> import copy from copy import deepcopy from typing import Callable, Dict, Iterable, Optional, Union import numpy as np import torch from torch import Tens...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@posteriors@vi_posterior.py@.PATH_END.py
{ "filename": "plot3_fit_Trot-Tvib-molfrac.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/examples/3_Fitting/plot3_fit_Trot-Tvib-molfrac.py", "type": "Python" }
# -*- coding: utf-8 -*- """ ================================================================================ Example #3: non-equilibrium spectrum (Tvib, Trot, x_CO) ================================================================================ With the new fitting module introduced in :py:func:`~radis.tools.new_fit...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@examples@3_Fitting@plot3_fit_Trot-Tvib-molfrac.py@.PATH_END.py
{ "filename": "test_sky_coord_builder.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/mivot/tests/test_sky_coord_builder.py", "type": "Python" }
''' The first service in operation that annotates query responses in the fly is Vizier https://cds/viz-bin/mivotconesearch/VizierParams Data are mapped on the mango:EpochPropagtion class as it is implemented in the current code. This test case is based on 2 VOTables: Both tests check the generation of SkyCoord instance...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@mivot@tests@test_sky_coord_builder.py@.PATH_END.py
{ "filename": "julia_set.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/docs/source/mayavi/auto/julia_set.py", "type": "Python" }
""" An example showing the Julia set displayed as a z-warped surface. The Julia set is a fractal (see http://en.wikipedia.org/wiki/Julia_set ). We display it here in a canyon-like view using mlab's surf function: :func:`mayavi.mlab.surf`. """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Copyright (c) 20...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@docs@source@mayavi@auto@julia_set.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/libs/lcms2/README.md", "type": "Markdown" }
![Little CMS](doc/logo-small.png) # About Little CMS [www.littlecms.com](https://www.littlecms.com) Little CMS intends to be an **OPEN SOURCE** small-footprint color management engine, with special focus on accuracy and performance. It uses the International Color Consortium standard (ICC), which is the modern stand...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@lcms2@README.md@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/legend/grouptitlefont/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.legend.grouptitlefont", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@legend@grouptitlefont@_shadow.py@.PATH_END.py
{ "filename": "sensitivity_cube.py", "repo_name": "HETDEX/hetdex_api", "repo_path": "hetdex_api_extracted/hetdex_api-master/hetdex_api/flux_limits/sensitivity_cube.py", "type": "Python" }
""" Sensitivity Cube Reader Read in Karl's sensitivity cubes and produce expected detection fractions from the Fleming (Fleming et al 1995) parameterisation References ---------- - Fleming et al. 1995 Fleming D.~E.~B., Harris W.~E., Pritchet C.~J., Hanes D.~A., 1995, AJ, 109, 1044. doi:10.1086/117340 htt...
HETDEXREPO_NAMEhetdex_apiPATH_START.@hetdex_api_extracted@hetdex_api-master@hetdex_api@flux_limits@sensitivity_cube.py@.PATH_END.py
{ "filename": "_textcasesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/hoverlabel/font/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="table.hoverlabel.font", **kwargs ): super(TextcasesrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@hoverlabel@font@_textcasesrc.py@.PATH_END.py
{ "filename": "core_correlation.py", "repo_name": "leungcalvin/pyfx-public", "repo_path": "pyfx-public_extracted/pyfx-public-main/src/pyfx/core_correlation.py", "type": "Python" }
""" Fringestops station B to station A and cross correlates baseband data from station A and B. The "core" module that should be called by the "outer layer" corr_job.py All bugs are the responsibility of Shion Andrew """ import numpy as np from astropy.time import Time, TimeDelta from decimal import Decimal import...
leungcalvinREPO_NAMEpyfx-publicPATH_START.@pyfx-public_extracted@pyfx-public-main@src@pyfx@core_correlation.py@.PATH_END.py
{ "filename": "test_my_cmd.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/tests/unit/services/test_my_cmd.py", "type": "Python" }
import context import my_cmd import unittest class MyCmdTest(unittest.TestCase): """Placeholder""" if __name__ == '__main__': import xmlrunner runner = xmlrunner.XMLTestRunner(output='test-reports') unittest.main(testRunner=runner)
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@services@test_my_cmd.py@.PATH_END.py
{ "filename": "testFortran.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/tools/swig/test/testFortran.py", "type": "Python" }
#!/usr/bin/env python3 # System imports import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeError else: BadListError = ValueError import Fortran ########################################################...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@tools@swig@test@testFortran.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspy/src/Acspy/Clients/__init__.py", "type": "Python" }
''' The Clients subpackage exists for one purpose - providing implementations of the MACI Client IDL interface for Python. Most developers will only care about looking at the SimpleClient module as it contains the documentation for PySimpleClient, but the BaseClient module can be quite interesting also. The final thing...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspy@src@Acspy@Clients@__init__.py@.PATH_END.py
{ "filename": "interface.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/sparse/linalg/interface.py", "type": "Python" }
"""Abstract linear algebra library. This module defines a class hierarchy that implements a kind of "lazy" matrix representation, called the ``LinearOperator``. It can be used to do linear algebra with extremely large sparse or structured matrices, without representing those explicitly in memory. Such matrices can be ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@sparse@linalg@interface.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="funnel.marker", **kwargs): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@_colorscale.py@.PATH_END.py
{ "filename": "definitions.py", "repo_name": "hgrecco/pint", "repo_path": "pint_extracted/pint-master/pint/definitions.py", "type": "Python" }
""" pint.definitions ~~~~~~~~~~~~~~~~ Kept for backwards compatibility :copyright: 2022 by Pint Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import annotations import flexparser as fp from . import errors from .delegates import ParserCo...
hgreccoREPO_NAMEpintPATH_START.@pint_extracted@pint-master@pint@definitions.py@.PATH_END.py
{ "filename": "_fillcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/_fillcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattermap", **kwargs): super(FillcolorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@_fillcolor.py@.PATH_END.py
{ "filename": "2396-rnn.md", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs_nnx/flip/2396-rnn.md", "type": "Markdown" }
# RNN Flip - Start Date: 2022-08-18 - FLIP PR: [#2604](https://github.com/google/flax/pull/2604) - FLIP Issue: [#2396](https://github.com/google/flax/issues/2396) - Authors: Jasmijn Bastings (@bastings) and Cristian Garcia (@cgarciae) ## Summary This FLIP adds support for higher-level recurrent layers (RNN, GRU, LSTM...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs_nnx@flip@2396-rnn.md@.PATH_END.py
{ "filename": "plot_diag_fold.py", "repo_name": "petigura/terra", "repo_path": "terra_extracted/terra-master/scripts/plot_diag_fold.py", "type": "Python" }
#!/usr/bin/env python # # Create a diagnostic plot based on the Kepler team KOI ephemeris # import matplotlib from argparse import ArgumentParser prsr = ArgumentParser() prsr.add_argument('koi' ,type=str,) prsr.add_argument('-o',type=str,default=None,help='png') args = prsr.parse_args() koi = args.koi if args.o:...
petiguraREPO_NAMEterraPATH_START.@terra_extracted@terra-master@scripts@plot_diag_fold.py@.PATH_END.py
{ "filename": "test_util.py", "repo_name": "tnakazato/priism", "repo_path": "priism_extracted/priism-main/tests/test_util.py", "type": "Python" }
# Copyright (C) 2019-2022 # Inter-University Research Institute Corporation, National Institutes of Natural Sciences # 2-21-1, Osawa, Mitaka, Tokyo, 181-8588, Japan. # # This file is part of PRIISM. # # PRIISM is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
tnakazatoREPO_NAMEpriismPATH_START.@priism_extracted@priism-main@tests@test_util.py@.PATH_END.py
{ "filename": "callables.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/utilities/callables.py", "type": "Python" }
""" Utilities for working with Python callables. """ import ast import importlib.util import inspect import warnings from collections import OrderedDict from collections.abc import Iterable from functools import partial from logging import Logger from pathlib import Path from typing import Any, Callable, Optional, Uni...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@utilities@callables.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/SpinWeight_minus2_SphHarmonics/__init__.py", "type": "Python" }
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@SpinWeight_minus2_SphHarmonics@__init__.py@.PATH_END.py
{ "filename": "openggcm_gm_4Dcdf.py", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/kamodo_ccmc/readers/openggcm_gm_4Dcdf.py", "type": "Python" }
''' Original version: Lutz Raestatter Oct 1(?), 2021 Modify to work with flythrough: Oct 5, 2021 (Rebecca Ringuette) ''' from datetime import datetime, timezone # standard model dictionary for reference model_varnames = {'bx': ['B_x', 'x component of magnetic field', 0, 'GSE', 'car', ['time', ...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@kamodo_ccmc@readers@openggcm_gm_4Dcdf.py@.PATH_END.py
{ "filename": "adam_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/tests/adam_test.py", "type": "Python" }
# Copyright 2017 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@compiler@tests@adam_test.py@.PATH_END.py
{ "filename": "self_query_hotel_search.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/cookbook/self_query_hotel_search.ipynb", "type": "Jupyter Notebook" }
# Building hotel room search with self-querying retrieval In this example we'll walk through how to build and iterate on a hotel room search service that leverages an LLM to generate structured filter queries that can then be passed to a vector store. For an introduction to self-querying retrieval [check out the docs...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@self_query_hotel_search.ipynb@.PATH_END.py
{ "filename": "program-options.md", "repo_name": "STEllAR-GROUP/octotiger", "repo_path": "octotiger_extracted/octotiger-master/doc/content/program-options.md", "type": "Markdown" }
# Program Options
STEllAR-GROUPREPO_NAMEoctotigerPATH_START.@octotiger_extracted@octotiger-master@doc@content@program-options.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "grburgess/popsynth", "repo_path": "popsynth_extracted/popsynth-master/popsynth/distributions/__init__.py", "type": "Python" }
from .bpl_distribution import BPLDistribution from .cosmological_distribution import ( CosmologicalDistribution, SFRDistribution, ZPowerCosmoDistribution, ) from .delta_distribution import DeltaDistribution from .flatland_distribution import FlatlandDistribution from .log10_normal_distribution import Log10N...
grburgessREPO_NAMEpopsynthPATH_START.@popsynth_extracted@popsynth-master@popsynth@distributions@__init__.py@.PATH_END.py
{ "filename": "acssimBaseRepresentation.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acssim/test/acssimBaseRepresentation.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acssim@test@acssimBaseRepresentation.py@.PATH_END.py
{ "filename": "astropy_helpers.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/io/astropy_helpers.py", "type": "Python" }
#!/usr/bin/env python3 """ Functions to help adapt internal ctapipe data to astropy formats and conventions """ import os from contextlib import ExitStack from uuid import uuid4 import numpy as np import tables from astropy.table import Table, join from astropy.time import Time from .hdf5tableio import ( DEFAULT_...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@io@astropy_helpers.py@.PATH_END.py
{ "filename": "input_processor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/input_processor.py", "type": "Python" }
# *** encoding: utf-8 *** """ An :class:`~.InputProcessor` receives callbacks for the keystrokes parsed from the input in the :class:`~prompt_toolkit.inputstream.InputStream` instance. The `InputProcessor` will according to the implemented keybindings call the correct callbacks when new key presses are feed through `f...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py2@prompt_toolkit@key_binding@input_processor.py@.PATH_END.py
{ "filename": "nonlin.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/optimize/nonlin.py", "type": "Python" }
r""" Nonlinear solvers ----------------- .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines ~~~~~~~~ Large-scale nonlinear solvers: .. autosummary:: newto...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@optimize@nonlin.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/splom/unselected/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._size import SizeValidator from ._opacity import OpacityValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_i...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@unselected@marker@__init__.py@.PATH_END.py
{ "filename": "test_verifyStats.py", "repo_name": "lsst/cp_verify", "repo_path": "cp_verify_extracted/cp_verify-main/tests/test_verifyStats.py", "type": "Python" }
# This file is part of cp_verify. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you c...
lsstREPO_NAMEcp_verifyPATH_START.@cp_verify_extracted@cp_verify-main@tests@test_verifyStats.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/delta/decreasing/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._symbol import SymbolValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] )...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@delta@decreasing@__init__.py@.PATH_END.py
{ "filename": "test_theil_sen.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/linear_model/tests/test_theil_sen.py", "type": "Python" }
""" Testing for Theil-Sen module (sklearn.linear_model.theil_sen) """ # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import os import re import sys from contextlib import contextmanager import numpy as np import pytest from numpy.testing import ( assert_array_almost_equal, ass...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@linear_model@tests@test_theil_sen.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "PhaseTracer/PhaseTracer", "repo_path": "PhaseTracer_extracted/PhaseTracer-master/README.md", "type": "Markdown" }
<h1 align="center"> PhaseTracer </h1> <div align="center"> <i>Trace cosmological phases, phase transitions, and gravitational waves in scalar-field theories</i> </div> <br> <div align="center"> <img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/PhaseTracer/PhaseTracer/...
PhaseTracerREPO_NAMEPhaseTracerPATH_START.@PhaseTracer_extracted@PhaseTracer-master@README.md@.PATH_END.py
{ "filename": "_labels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/_labels.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="pie", **kwargs): super(LabelsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@_labels.py@.PATH_END.py
{ "filename": "test_config.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/unittests/test_config.py", "type": "Python" }
# keep it first # due to stupid astropy units/constants implementation from unittests import set_astropy_units import numpy as np from numpy.testing import assert_array_equal from elisa import settings from unittests.utils import ElisaTestCase set_astropy_units() class TestConfig(ElisaTestCase): def test_LD_LA...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@unittests@test_config.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.title", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@title@_text.py@.PATH_END.py
{ "filename": "test_geometry.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/instrument/camera/tests/test_geometry.py", "type": "Python" }
""" Tests for CameraGeometry """ from copy import deepcopy import numpy as np import pytest from astropy import units as u from astropy.coordinates import AltAz, SkyCoord from ctapipe.instrument import CameraGeometry, PixelShape from ctapipe.instrument.warnings import FromNameWarning def test_construct(): """Ch...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@instrument@camera@tests@test_geometry.py@.PATH_END.py
{ "filename": "test_gsl_splines.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/tests/test_gsl_splines.py", "type": "Python" }
import pyccl as ccl import numpy as np def test_spline1d(): cosmo = ccl.CosmologyVanillaLCDM() cosmo.compute_distances() chi_gsl_spline = cosmo.cosmo.data.chi a_arr, chi_arr = ccl.pyutils._get_spline1d_arrays(chi_gsl_spline) chi = ccl.comoving_radial_distance(cosmo, a_arr) assert np.allclose...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@tests@test_gsl_splines.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="ohlc", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array_ok=k...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@_text.py@.PATH_END.py
{ "filename": "driver.py", "repo_name": "California-Planet-Search/rvsearch", "repo_path": "rvsearch_extracted/rvsearch-master/rvsearch/driver.py", "type": "Python" }
""" Driver functions for the rvsearch pipeline.\ These functions are meant to be used only with\ the `cli.py` command line interface. """ from __future__ import print_function import warnings import os import copy import pandas as pd import pickle import radvel from radvel.utils import working_directory import rvsearc...
California-Planet-SearchREPO_NAMErvsearchPATH_START.@rvsearch_extracted@rvsearch-master@rvsearch@driver.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/chemistry/__init__.py", "type": "Python" }
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@chemistry@__init__.py@.PATH_END.py
{ "filename": "training.ipynb", "repo_name": "b-biswas/MADNESS", "repo_path": "MADNESS_extracted/MADNESS-main/docs/tutorial_notebooks/training.ipynb", "type": "Jupyter Notebook" }
# Training ## Load modules ```python import os import numpy as np import tensorflow as tf import tensorflow_probability as tfp from madness_deblender.callbacks import define_callbacks from madness_deblender.FlowVAEnet import FlowVAEnet from madness_deblender.losses import ( deblender_encoder_loss_wrapper, ...
b-biswasREPO_NAMEMADNESSPATH_START.@MADNESS_extracted@MADNESS-main@docs@tutorial_notebooks@training.ipynb@.PATH_END.py
{ "filename": "test_scaling_converter.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/core_tests/test_scaling_converter.py", "type": "Python" }
from amuse.units import scaling_converter from amuse.units import nbody_system from amuse.test import amusetest class TestScalingConverter(amusetest.TestCase): def test1(self): converter = scaling_converter.ScalingConverter( length=0.2, time=0.1, ) input = 1 | nbo...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@core_tests@test_scaling_converter.py@.PATH_END.py