metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "export.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/export.py", "type": "Python" }
__author__ = 'maartenbreddels' import os import sys import collections import logging import concurrent.futures import threading import numpy as np import pyarrow as pa import vaex import vaex.utils import vaex.execution from vaex.column import ColumnStringArrow, _to_string_sequence max_length = int(1e5) on_rtd = ...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@export.py@.PATH_END.py
{ "filename": "DiffTreeWidget.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/widgets/DiffTreeWidget.py", "type": "Python" }
import numpy as np from .. import functions as fn from ..Qt import QtWidgets from .DataTreeWidget import DataTreeWidget __all__ = ['DiffTreeWidget'] class DiffTreeWidget(QtWidgets.QWidget): """ Widget for displaying differences between hierarchical python data structures (eg, nested dicts, lists, and ar...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@widgets@DiffTreeWidget.py@.PATH_END.py
{ "filename": "test_history_aware_retriever.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/chains/test_history_aware_retriever.py", "type": "Python" }
from langchain_core.documents import Document from langchain_core.language_models import FakeListLLM from langchain_core.prompts import PromptTemplate from langchain.chains import create_history_aware_retriever from tests.unit_tests.retrievers.parrot_retriever import FakeParrotRetriever def test_create() -> None: ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@chains@test_history_aware_retriever.py@.PATH_END.py
{ "filename": "Results.py", "repo_name": "TommasoRonconi/galapy", "repo_path": "galapy_extracted/galapy-main/galapy/sampling/Results.py", "type": "Python" }
""" Implements the class used for storing sampling results. """ ############################################################################################# # External imports import warnings import numpy import pickle from collections.abc import MutableMapping as MM ################################################...
TommasoRonconiREPO_NAMEgalapyPATH_START.@galapy_extracted@galapy-main@galapy@sampling@Results.py@.PATH_END.py
{ "filename": "test_launchpad_244811.py", "repo_name": "brandon-rhodes/pyephem", "repo_path": "pyephem_extracted/pyephem-master/ephem/tests/test_launchpad_244811.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import ephem # Make sure that a series of next-risings does not keep returning the # same time over and over again. class Launchpad244811Tests(unittest.TestCase): def runTest(self): boston = ephem.city("Boston") boston.pressure = 1010....
brandon-rhodesREPO_NAMEpyephemPATH_START.@pyephem_extracted@pyephem-master@ephem@tests@test_launchpad_244811.py@.PATH_END.py
{ "filename": "_showlegend.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/_showlegend.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="pie", **kwargs): super(ShowlegendValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@_showlegend.py@.PATH_END.py
{ "filename": "_textcasesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/insidetextfont/_textcasesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnelarea.insidetextfont", **kwargs, ): super(TextcasesrcValidator, self).__init__( plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnelarea@insidetextfont@_textcasesrc.py@.PATH_END.py
{ "filename": "copy_injection_recovery.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_NRTv2/injection_77/copy_injection_recovery.py", "type": "Python" }
""" Idea: try different learning rate schemes to try and fix the injections """ import psutil p = psutil.Process() p.cpu_affinity([0]) import os os.environ['CUDA_VISIBLE_DEVICES'] = "2" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10" import numpy as np import argparse # Regular imports import argparse import cop...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_NRTv2@injection_77@copy_injection_recovery.py@.PATH_END.py
{ "filename": "parsnip.py", "repo_name": "LSSTDESC/parsnip", "repo_path": "parsnip_extracted/parsnip-main/parsnip/parsnip.py", "type": "Python" }
from tqdm import tqdm import functools import multiprocessing import numpy as np import os import sys from astropy.cosmology import Planck18 import astropy.table import extinction import sncosmo import pkg_resources import lcdata import torch import torch.utils.data from torch import nn, optim from torch.nn import fu...
LSSTDESCREPO_NAMEparsnipPATH_START.@parsnip_extracted@parsnip-main@parsnip@parsnip.py@.PATH_END.py
{ "filename": "generate_shift_script.py", "repo_name": "samuelyeewl/specmatch-emp", "repo_path": "specmatch-emp_extracted/specmatch-emp-master/specmatchemp/buildlib/generate_shift_script.py", "type": "Python" }
#!/usr/bin/env python """ @filename generate_shift_script.py Generate script lines for shifting spectra """ from __future__ import print_function import os import pandas as pd from argparse import ArgumentParser from specmatchemp import SPECMATCHDIR if __name__ == '__main__': psr = ArgumentParser(description="...
samuelyeewlREPO_NAMEspecmatch-empPATH_START.@specmatch-emp_extracted@specmatch-emp-master@specmatchemp@buildlib@generate_shift_script.py@.PATH_END.py
{ "filename": "uvotplot.py", "repo_name": "PaulKuin/uvotpy", "repo_path": "uvotpy_extracted/uvotpy-master/uvotpy/uvotplot.py", "type": "Python" }
''' These are function for making plots of UVOT grism stuff. binplot(*args, **kwargs) Bin up the arrays with the keyword bin=<number> waveAccPlot( wave_obs,pix_obs, wave_zmx, pix_zmx, disp_coef, acc, order=None) display a figure of the accuracy of the wavelength solution contourp...
PaulKuinREPO_NAMEuvotpyPATH_START.@uvotpy_extracted@uvotpy-master@uvotpy@uvotplot.py@.PATH_END.py
{ "filename": "_pad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/slider/_pad.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Pad(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.pad" _valid_props = {"b", "l", "r", "t"} # b ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@slider@_pad.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "kpenev/poet", "repo_path": "poet_extracted/poet-master/documentation/sphinx/source/conf.py", "type": "Python" }
"""Configuration for SPHINX to generate documentation.""" import sys import inspect # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/maste...
kpenevREPO_NAMEpoetPATH_START.@poet_extracted@poet-master@documentation@sphinx@source@conf.py@.PATH_END.py
{ "filename": "test_qnm.py", "repo_name": "duetosymmetry/qnm", "repo_path": "qnm_extracted/qnm-master/test/test_qnm.py", "type": "Python" }
import pytest import qnm import numpy as np try: from pathlib import Path # py 3 except ImportError: from pathlib2 import Path # py 2 class QnmTestDownload(object): """ Base class so that each test will automatically download_data """ @classmethod def setup_class(cls): """ D...
duetosymmetryREPO_NAMEqnmPATH_START.@qnm_extracted@qnm-master@test@test_qnm.py@.PATH_END.py
{ "filename": "_stepdefaults.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/slider/_stepdefaults.py", "type": "Python" }
import _plotly_utils.basevalidators class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="stepdefaults", parent_name="layout.slider", **kwargs ): super(StepdefaultsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@slider@_stepdefaults.py@.PATH_END.py
{ "filename": "2112.09586.ipynb", "repo_name": "DMGW-Goethe/imripy", "repo_path": "imripy_extracted/imripy-main/examples/2112.09586.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from scipy.interpolate import interp1d from scipy.integrate import quad from scipy.special import gamma from imripy import halo, constants as c, merger_system as ms, inspiral, waveform, detector, plot_utils as pu, kepler from imripy....
DMGW-GoetheREPO_NAMEimripyPATH_START.@imripy_extracted@imripy-main@examples@2112.09586.ipynb@.PATH_END.py
{ "filename": "line_flux.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/spectroscopy/line_flux.py", "type": "Python" }
from ..constants.physics import c from ..constants.math import pi from ..constants.astronomy import Jy from numpy import arange,ones,concatenate,sqrt,exp,where,array,mat,sin,log from numpy import abs as absv from scipy.optimize import leastsq import matplotlib.pyplot as plt def line_flux(data,lines,nleft=8,nright=8,pl...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@spectroscopy@line_flux.py@.PATH_END.py
{ "filename": "structure2feff.py", "repo_name": "xraypy/xraylarch", "repo_path": "xraylarch_extracted/xraylarch-master/larch/xrd/structure2feff.py", "type": "Python" }
import os from random import Random from xraydb import atomic_symbol, atomic_number, xray_edge from larch.utils.strutils import fix_varname, strict_ascii from larixite.amcsd_utils import (SpacegroupAnalyzer, Molecule, IMolecule, IStructure) rng = Random() def get_atom_map(struc...
xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@larch@xrd@structure2feff.py@.PATH_END.py
{ "filename": "get_fink_data.py", "repo_name": "nikhil-sarin/redback", "repo_path": "redback_extracted/redback-master/examples/get_fink_data.py", "type": "Python" }
#An example to get data from FINK and plot it import redback name = 'ZTF22abdjqlm' data = redback.get_data.get_fink_data(transient=name, transient_type='supernova') # FINK and OAC have the same data format, so we can just use the OAC class method to load this data supernova = redback.supernova.Supernova.from_open_acc...
nikhil-sarinREPO_NAMEredbackPATH_START.@redback_extracted@redback-master@examples@get_fink_data.py@.PATH_END.py
{ "filename": "testUVSub.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/testScripts/testUVSub.py", "type": "Python" }
# Test interferometric model subtraction /division script # The argument, if given, is the data directory, defaults to "../testIt" # Output UVdata should have ~zero phase and ~unit amplitude. # Need some automated uv data comparison import Obit, OSystem, OErr, sys if len(sys.argv)>=2: dataDir = sys.argv[1] else: ...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@testScripts@testUVSub.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/ned/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is the old namespace for querying the NASA Extragalactic Database (NED). Please update your imports and use it from astroquery.ipac.ned .. deprecated:: 0.4.4 """ import warnings warnings.warn("the ``ned`` module has been moved to astroquery.ipac...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ned@__init__.py@.PATH_END.py
{ "filename": "stagger.py", "repo_name": "andycasey/smhr", "repo_path": "smhr_extracted/smhr-master/smh/photospheres/stagger.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Functions for dealing with the Stagger model photospheres. """ from __future__ import division, absolute_import, print_function __author__ = "Andy Casey <arc@ast.cam.ac.uk>" import logging import numpy as np from .interpolator import BaseInterpolator logger = logg...
andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@smh@photospheres@stagger.py@.PATH_END.py
{ "filename": "wheel.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/pip/vendor/distlib/wheel.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from_file...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@pip@vendor@distlib@wheel.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="carpet.baxis.tickformatstop", **kwargs ): super(DtickrangeValidator, self).__init__( pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@baxis@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "spec.md", "repo_name": "EranOfek/AstroPack", "repo_path": "AstroPack_extracted/AstroPack-main/matlab/astro/+astro/+spec/spec.md", "type": "Markdown" }
# Overview # List of Subpackages # Subpackages # Usage # Notes # Known Issues # See Also
EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@astro@+astro@+spec@spec.md@.PATH_END.py
{ "filename": "property_modifiers.py", "repo_name": "CaymanUnterborn/ExoPlex", "repo_path": "ExoPlex_extracted/ExoPlex-master/ExoPlex/burnman/eos/property_modifiers.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU # GPL v2 or later. from __future__ import absolute_import import numpy as np import scipy.optimize as opt from ..constants import gas_c...
CaymanUnterbornREPO_NAMEExoPlexPATH_START.@ExoPlex_extracted@ExoPlex-master@ExoPlex@burnman@eos@property_modifiers.py@.PATH_END.py
{ "filename": "cosmology_fields.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/fields/cosmology_fields.py", "type": "Python" }
from .derived_field import ValidateParameter from .field_exceptions import NeedsConfiguration, NeedsParameter from .field_plugin_registry import register_field_plugin @register_field_plugin def setup_cosmology_fields(registry, ftype="gas", slice_info=None): unit_system = registry.ds.unit_system # slice_info w...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@cosmology_fields.py@.PATH_END.py
{ "filename": "galsim_config.py", "repo_name": "gbernstein/pixmappy", "repo_path": "pixmappy_extracted/pixmappy-master/pixmappy/galsim_config.py", "type": "Python" }
# This class makes the pixmappy.GalSimWCS usable as a GalSim config wcs type. # To use it, just add pixmappy to the modules section of a config file. # Then in the config file, the wcs type is called 'Pixmappy'. try: import galsim from .GalSimWCS import GalSimWCS class PixmappyBuilder(galsim.config.WCSBu...
gbernsteinREPO_NAMEpixmappyPATH_START.@pixmappy_extracted@pixmappy-master@pixmappy@galsim_config.py@.PATH_END.py
{ "filename": "plot_demo_distributions.py", "repo_name": "andrewmbuchan4/PyllutedWD_Public", "repo_path": "PyllutedWD_Public_extracted/PyllutedWD_Public-main/src/plot_demo_distributions.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from enum import Enum import csv import geology_info as gi import model_parameters as mp import numpy as np def load_hollands_distributions(): teffs = list() loggs = list() teff_bins = np.linspace(4000, 9000, 11) logg_bins = np.linspace(7.1, 8.7, 9) # imp...
andrewmbuchan4REPO_NAMEPyllutedWD_PublicPATH_START.@PyllutedWD_Public_extracted@PyllutedWD_Public-main@src@plot_demo_distributions.py@.PATH_END.py
{ "filename": "ldmodel.py", "repo_name": "hpparvi/ldtk", "repo_path": "ldtk_extracted/ldtk-master/ldtk/ldmodel.py", "type": "Python" }
""" Limb darkening toolkit Copyright (C) 2015 Hannu Parviainen <hpparvi@gmail.com> 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 2 of the License, or (at your option) any later vers...
hpparviREPO_NAMEldtkPATH_START.@ldtk_extracted@ldtk-master@ldtk@ldmodel.py@.PATH_END.py
{ "filename": "caltables.py", "repo_name": "caracal-pipeline/caracal", "repo_path": "caracal_extracted/caracal-master/caracal/dispatch_crew/caltables.py", "type": "Python" }
import caracal.dispatch_crew.catalog_parser as cp import caracal import os __DB_FILENAME = os.path.join( caracal.pckgdir, "data/southern_calibrators.txt") __DB_CASA_FILENAME = os.path.join( caracal.pckgdir, "data/casa_calibrators.txt") __CALIBRATOR_DB = None __CASA_CALIBRATOR_DB = None def calibrator_databa...
caracal-pipelineREPO_NAMEcaracalPATH_START.@caracal_extracted@caracal-master@caracal@dispatch_crew@caltables.py@.PATH_END.py
{ "filename": "ClassSmearSM.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Imager/SSD/GA/ClassSmearSM.py", "type": "Python" }
from __future__ import absolute_import from __future__ import division from __future__ import print_function from DDFacet.compatibility import range import numpy as np import scipy.signal from DDFacet.Imager.SSD import ClassConvMachine from DDFacet.Other import logger log=logger.getLogger("ClassSmearSM") import multi...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@Imager@SSD@GA@ClassSmearSM.py@.PATH_END.py
{ "filename": "test_langsmith.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/document_loaders/test_langsmith.py", "type": "Python" }
import datetime import uuid from unittest.mock import MagicMock, patch from langsmith.schemas import Example from langchain_core.document_loaders import LangSmithLoader from langchain_core.documents import Document def test_init() -> None: LangSmithLoader(api_key="secret") EXAMPLES = [ Example( in...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@document_loaders@test_langsmith.py@.PATH_END.py
{ "filename": "subtitle.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/document_loaders/subtitle.ipynb", "type": "Jupyter Notebook" }
# Subtitle >[The SubRip file format](https://en.wikipedia.org/wiki/SubRip#SubRip_file_format) is described on the `Matroska` multimedia container format website as "perhaps the most basic of all subtitle formats." `SubRip (SubRip Text)` files are named with the extension `.srt`, and contain formatted lines of plain te...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@document_loaders@subtitle.ipynb@.PATH_END.py
{ "filename": "HIPfromSimbad.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/EXOSIMS/StarCatalog/HIPfromSimbad.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord from EXOSIMS.Prototypes.StarCatalog import StarCatalog from astroquery.simbad import Simbad from astroquery.vizier import Vizier v = Vizier(columns=["Plx", "B-V", "Hpmag"], catalog="I/311/hip2") # Simbad.reset...
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@EXOSIMS@StarCatalog@HIPfromSimbad.py@.PATH_END.py
{ "filename": "V1_7_Samples.md", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googletest/docs/V1_7_Samples.md", "type": "Markdown" }
If you're like us, you'd like to look at some Google Test sample code. The [samples folder](../samples) has a number of well-commented samples showing how to use a variety of Google Test features. * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. * [Sa...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googletest@docs@V1_7_Samples.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/unselected/marker/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._size import SizeValidator from ._opacity import OpacityValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], [ ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@unselected@marker@__init__.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "jpierel14/space_phot", "repo_path": "space_phot_extracted/space_phot-main/space_phot/util.py", "type": "Python" }
import warnings,os,sys,time,glob,shutil import numpy as np import urllib.request import scipy import webbpsf import sncosmo import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import astropy from astropy import wcs from astropy.io import fits from astropy.table import Table,vstack...
jpierel14REPO_NAMEspace_photPATH_START.@space_phot_extracted@space_phot-main@space_phot@util.py@.PATH_END.py
{ "filename": "BoundingBox.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/task/processor/BoundingBox.md", "type": "Markdown" }
page_type: reference description: An integer bounding box, axis aligned. <link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.task.processor....
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@task@processor@BoundingBox.md@.PATH_END.py
{ "filename": "DDsmu_mocks.py", "repo_name": "manodeep/Corrfunc", "repo_path": "Corrfunc_extracted/Corrfunc-master/Corrfunc/mocks/DDsmu_mocks.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python wrapper around the C extension for the pair counter in ``mocks/DDsmu``. This python wrapper is :py:mod:`Corrfunc.mocks.DDsmu_mocks` """ from __future__ import (division, print_function, absolute_import, unicode_literals) import warnings ...
manodeepREPO_NAMECorrfuncPATH_START.@Corrfunc_extracted@Corrfunc-master@Corrfunc@mocks@DDsmu_mocks.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/__init__.py", "type": "Python" }
"""Modules copied from Python 3 standard libraries, for internal use only. Individual classes and functions are found in d2._backport.misc. Intended usage is to always import things missing from 3.1 from that module: the built-in/stdlib objects will be used if found. """
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@distlib@_backport@__init__.py@.PATH_END.py
{ "filename": "unbatch_benchmark.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/experimental/benchmarks/unbatch_benchmark.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@python@data@experimental@benchmarks@unbatch_benchmark.py@.PATH_END.py
{ "filename": "residuals_grid_CA.py", "repo_name": "annayqho/TheCannon", "repo_path": "TheCannon_extracted/TheCannon-master/code/lamost/xcalib_5labels/paper_plots/residuals_grid_CA.py", "type": "Python" }
import matplotlib.pyplot as plt from matplotlib import rc import matplotlib.gridspec as gridspec from matplotlib.colors import LogNorm from math import log10, floor plt.rc('text', usetex=True) plt.rc('font', family='serif') import numpy as np from pylab import rcParams def round_sig(x, sig=1): if x < 0: re...
annayqhoREPO_NAMETheCannonPATH_START.@TheCannon_extracted@TheCannon-master@code@lamost@xcalib_5labels@paper_plots@residuals_grid_CA.py@.PATH_END.py
{ "filename": "test_massfunction.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/tests/test_massfunction.py", "type": "Python" }
import numpy as np import pytest import pyccl as ccl COSMO = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96, transfer_function='bbks', matter_power_spectrum='halofit') @pytest.mark.parametrize('m', [ 1e14, int(1e14), [1e14, 1e15], np.array([1e14, 1e15])]) def test_m...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@tests@test_massfunction.py@.PATH_END.py
{ "filename": "version.py", "repo_name": "cpiaulet/smint", "repo_path": "smint_extracted/smint-master/smint/version.py", "type": "Python" }
__version__ = "1.0.0"
cpiauletREPO_NAMEsmintPATH_START.@smint_extracted@smint-master@smint@version.py@.PATH_END.py
{ "filename": "browserless.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/document_loaders/browserless.ipynb", "type": "Jupyter Notebook" }
# Browserless Browserless is a service that allows you to run headless Chrome instances in the cloud. It's a great way to run browser-based automation at scale without having to worry about managing your own infrastructure. To use Browserless as a document loader, initialize a `BrowserlessLoader` instance as shown in...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@document_loaders@browserless.ipynb@.PATH_END.py
{ "filename": "server.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/xmlrpc/server.py", "type": "Python" }
r"""XML-RPC Servers. This module can be used to create simple XML-RPC servers by creating a server and either installing functions, a class instance, or by extending the SimpleXMLRPCServer class. It can also be used to handle XML-RPC requests in a CGI environment using CGIXMLRPCRequestHandler. The Doc* classes can b...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@xmlrpc@server.py@.PATH_END.py
{ "filename": "agnvar_example-checkpoint.ipynb", "repo_name": "scotthgn/AGNvar", "repo_path": "AGNvar_extracted/AGNvar-main/.ipynb_checkpoints/agnvar_example-checkpoint.ipynb", "type": "Jupyter Notebook" }
A quick tutoial using agnvar. We will be using the agnsed mode (AGNsed_var), comprising of an outer standard disc (i.e multi-colour black-body), followed by a warm Comptonizing region, and then the hot Comptonizing corona. See Kubota & Done (2018) for details on the SED model. ```python #Generic imports import numpy ...
scotthgnREPO_NAMEAGNvarPATH_START.@AGNvar_extracted@AGNvar-main@.ipynb_checkpoints@agnvar_example-checkpoint.ipynb@.PATH_END.py
{ "filename": "test_hilbert.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/ramses/tests/test_hilbert.py", "type": "Python" }
import numpy as np from numpy.testing import assert_equal import yt from yt.frontends.ramses.hilbert import get_cpu_list_cuboid, hilbert3d from yt.testing import requires_file def test_hilbert3d(): # 8 different cases, checked against RAMSES' own implementation inputs = [ [0, 0, 0], [1, 0, 0]...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@ramses@tests@test_hilbert.py@.PATH_END.py
{ "filename": "run_dyn_single.py", "repo_name": "dynamics-of-stellar-systems/dynamite", "repo_path": "dynamite_extracted/dynamite-master/dev_tests/run_dyn_single.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 15 08:54:48 2021 @author: sabine """ import os import dynamite as dyn from dynamite import physical_system as physys print('DYNAMITE') print(' version', dyn.__version__) print(' installed at ', dyn.__path__) fname = 'FCC047_2kin/FCC047_conf...
dynamics-of-stellar-systemsREPO_NAMEdynamitePATH_START.@dynamite_extracted@dynamite-master@dev_tests@run_dyn_single.py@.PATH_END.py
{ "filename": "scipy_stats_test.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/tests/scipy_stats_test.py", "type": "Python" }
# Copyright 2018 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@tests@scipy_stats_test.py@.PATH_END.py
{ "filename": "sql.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/table/io/sql.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Scott Coughlin (2017-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@table@io@sql.py@.PATH_END.py
{ "filename": "rvs.py", "repo_name": "tamarervin/SolAster", "repo_path": "SolAster_extracted/SolAster-main/SolAster/tools/rvs.py", "type": "Python" }
""" Tamar Ervin Date: October 7, 2021 pipeline function to calculate 'sun-as-a-star' RVs """ import os import datetime import numpy as np import sunpy.map from sunpy.net import Fido from sunpy.net import attrs as a from sunpy.coordinates import frames import SolAster.tools.calculation_funcs as sfuncs import SolAs...
tamarervinREPO_NAMESolAsterPATH_START.@SolAster_extracted@SolAster-main@SolAster@tools@rvs.py@.PATH_END.py
{ "filename": "paperfigs.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/docs/macro/paperfigs.py", "type": "Python" }
# Copyright (C) 2022, the ixpeobssim team. # # 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 distrib...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@docs@macro@paperfigs.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/layout/polar/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._uirevision import UirevisionValidator from ._sector import SectorValidator from ._radialaxis import RadialaxisValidator from ._hole import HoleValidator from ._gridshape import GridshapeValidator f...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/packaging/__init__.py", "type": "Python" }
"""SCons.Tool.Packaging SCons Packaging Tool. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Softwa...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@packaging@__init__.py@.PATH_END.py
{ "filename": "flat_fielding_test.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/tests/regression/flat_fielding_test.py", "type": "Python" }
import numpy as np from astropy.io import fits import matplotlib.pyplot as plt import os from dotenv import load_dotenv load_dotenv() #importing test files test_flat = os.getenv('KPFPIPE_TEST_DATA')+ '/NEIDdata/FLAT/neidTemp_2D20191214T001924.fits' test_raw= os.getenv('KPFPIPE_TEST_DATA') + '/NEIDdata/TAUCETI_20191217...
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@tests@regression@flat_fielding_test.py@.PATH_END.py
{ "filename": "_textsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_textsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="volume", **kwargs): super(TextsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_textsrc.py@.PATH_END.py
{ "filename": "test_fitting.py", "repo_name": "andycasey/smhr", "repo_path": "smhr_extracted/smhr-master/smh/tests/test_fitting.py", "type": "Python" }
""" Based on Andy's pull request example Currently just fits a bunch of individual lines with both synthesis and EW TODO expand to do synthesis with multiple lines TODO calculate abundances TODO export tables """ import os import smh.linelists import smh.photospheres import smh.radiative_transfer as rt import smh.sp...
andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@smh@tests@test_fitting.py@.PATH_END.py
{ "filename": "test_visual.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/core/tests/test_visual.py", "type": "Python" }
from glue.core.visual import VisualAttributes from glue.utils.matplotlib import MATPLOTLIB_GE_36 if MATPLOTLIB_GE_36: from matplotlib import colormaps else: from matplotlib.cm import get_cmap import pytest def test_VA_preferred_cmap(): # Not a real CMAP array - errors with pytest.raises(TypeError, m...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@core@tests@test_visual.py@.PATH_END.py
{ "filename": "bz2.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/bz2.py", "type": "Python" }
"""Interface to the libbzip2 compression library. This module provides a file interface, classes for incremental (de)compression, and functions for one-shot (de)compression. """ __all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"] __author__ = "Nadeem Vawda <nadeem.v...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@bz2.py@.PATH_END.py
{ "filename": "sdss-catalog.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/projects/desi/sdss-catalog.py", "type": "Python" }
from __future__ import print_function import fitsio from astrometry.util.util import * from astrometry.sdss.fields import * from astrometry.sdss import * from tractor import * from tractor.sdss import * from desi_common import * if __name__ == '__main__': import optparse import sys import desi_common ...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@projects@desi@sdss-catalog.py@.PATH_END.py
{ "filename": "time_distributed.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/rnn/time_distributed.py", "type": "Python" }
"""Wrapper layer to apply every temporal slice of an input.""" from keras.src import backend from keras.src import ops from keras.src.api_export import keras_export from keras.src.layers.core.wrapper import Wrapper from keras.src.layers.layer import Layer @keras_export("keras.layers.TimeDistributed") class TimeDistr...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@rnn@time_distributed.py@.PATH_END.py
{ "filename": "toolmanager_sgskip.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/user_interfaces/toolmanager_sgskip.py", "type": "Python" }
""" ============ Tool Manager ============ This example demonstrates how to * modify the Toolbar * create tools * add tools * remove tools using `matplotlib.backend_managers.ToolManager`. """ import matplotlib.pyplot as plt from matplotlib.backend_tools import ToolBase, ToolToggleBase plt.rcParams['toolbar'] = 't...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@user_interfaces@toolmanager_sgskip.py@.PATH_END.py
{ "filename": "eclipse.py", "repo_name": "hippke/pandora", "repo_path": "pandora_extracted/pandora-main/pandoramoon/eclipse.py", "type": "Python" }
import numpy as np from numpy import sqrt, pi, arccos, abs, ceil, fliplr, flipud from numba import jit @jit(cache=True, nopython=True, fastmath=True, parallel=False) def cci(r1, r2, d): """Calculates area of asymmetric "lens" in which two circles intersect Source: http://mathworld.wolfram.com/Circle-CircleInt...
hippkeREPO_NAMEpandoraPATH_START.@pandora_extracted@pandora-main@pandoramoon@eclipse.py@.PATH_END.py
{ "filename": "gaia_predict_decam_mag.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/imaging/veto_masks/reference/gaia_predict_decam_mag.py", "type": "Python" }
# Add predicted DECam mags from __future__ import division, print_function import sys, os, glob, time, warnings, gc import numpy as np # import matplotlib # matplotlib.use("Agg") # import matplotlib.pyplot as plt from astropy.table import Table, vstack, hstack import fitsio # from astropy.io import fits # Coefficien...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@imaging@veto_masks@reference@gaia_predict_decam_mag.py@.PATH_END.py
{ "filename": "test_models_detection_anchor_utils.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/test/test_models_detection_anchor_utils.py", "type": "Python" }
import pytest import torch from common_utils import assert_equal from torchvision.models.detection.anchor_utils import AnchorGenerator, DefaultBoxGenerator from torchvision.models.detection.image_list import ImageList class Tester: def test_incorrect_anchors(self): incorrect_sizes = ( (2, 4, 8...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@test@test_models_detection_anchor_utils.py@.PATH_END.py
{ "filename": "_tickwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/colorbar/_tickwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="choropleth.colorbar", **kwargs ): super(TickwidthValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@colorbar@_tickwidth.py@.PATH_END.py
{ "filename": "test_initial_conditions.py", "repo_name": "21cmfast/21cmFAST", "repo_path": "21cmFAST_extracted/21cmFAST-master/tests/test_initial_conditions.py", "type": "Python" }
""" Various tests of the initial_conditions() function and InitialConditions class. """ import pytest import numpy as np from multiprocessing import cpu_count from py21cmfast import wrapper def test_box_shape(ic): """Test basic properties of the InitialConditions struct""" shape = (35, 35, 35) hires_sh...
21cmfastREPO_NAME21cmFASTPATH_START.@21cmFAST_extracted@21cmFAST-master@tests@test_initial_conditions.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/title/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): super(TextcaseValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@title@font@_textcase.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/mistralai/tests/unit_tests/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@mistralai@tests@unit_tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/selected/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._textfont import TextfontValidator from ._marker import MarkerValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValid...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@selected@__init__.py@.PATH_END.py
{ "filename": "periodic.ipynb", "repo_name": "lgrcia/nuance", "repo_path": "nuance_extracted/nuance-main/docs/notebooks/periodic.ipynb", "type": "Jupyter Notebook" }
# Periodic transit search In this notebook, we use `nuance` to search for a periodic transit. ```python # in order to run on all CPUs import os import jax jax.config.update("jax_enable_x64", True) os.environ["XLA_FLAGS"] = f"--xla_force_host_platform_device_count={os.cpu_count()}" ``` ## Generating the data Let's...
lgrciaREPO_NAMEnuancePATH_START.@nuance_extracted@nuance-main@docs@notebooks@periodic.ipynb@.PATH_END.py
{ "filename": "binomialObsFPRate-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_gaiaRadCut/.ipynb_checkpoints/binomialObsFPRate-checkpoint.ipynb", "type": "Jupyter Notebook" }
Reliability is given by $$ R = \frac{N_{\mathrm{truePC}}}{N_{\mathrm{obsPC}}} = 1 - \frac{N_{\mathrm{obsFP}}}{N_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) = 1 - \frac{F_{\mathrm{obsFP}}}{F_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) $$ where $E = N_{\mathrm{obsFP}}/N_{\mathrm{trueFP}}$ is the false positiv...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_gaiaRadCut@.ipynb_checkpoints@binomialObsFPRate-checkpoint.ipynb@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/tests/conftest.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # import os import pathlib import json import yaml import pytest import copy import itertools from flask_jwt_extended import tokens from brain import bconfig from marvin import config, marvindb from marvin.utils.datamodel.dap import datamodel from marvin.api.api import I...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@tests@conftest.py@.PATH_END.py
{ "filename": "S_get_number_DL.py", "repo_name": "SJ001/AI-Feynman", "repo_path": "AI-Feynman_extracted/AI-Feynman-master/aifeynman/S_get_number_DL.py", "type": "Python" }
# Calculates the complexity of a number to be used for the Pareto frontier import numpy as np def get_number_DL(n): epsilon = 1e-10 # check if integer if np.isnan(n): return 1000000 elif np.abs(n - int(n)) < epsilon: return np.log2(1+abs(n)) elif np.abs(n - np.pi) < epsilon: ...
SJ001REPO_NAMEAI-FeynmanPATH_START.@AI-Feynman_extracted@AI-Feynman-master@aifeynman@S_get_number_DL.py@.PATH_END.py
{ "filename": "finder.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jedi/py3/jedi/evaluate/finder.py", "type": "Python" }
""" Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. If you want to understand name resolution, please read the first few chapters in http://blog.ionelmc.ro/2015/02/0...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jedi@py3@jedi@evaluate@finder.py@.PATH_END.py
{ "filename": "python-reference_catboostipythonwidget_update_widget.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboostipythonwidget_update_widget.md", "type": "Markdown" }
# start {% include [sections-with-methods-desc-catboostipythonwidget__purpose__full__div](../_includes/work_src/reusage/catboostipythonwidget__purpose__full__div.md) %} ## {{ dl--invoke-format }} {#call-formmat} ```python start() ```
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboostipythonwidget_update_widget.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "Goobley/crtaf-py", "repo_path": "crtaf-py_extracted/crtaf-py-main/README.md", "type": "Markdown" }
# crtaf: python utilities for the [Common Radiative Transfer Atomic Format](https://github.com/Goobley/CommonRTAtomicFormat). | | | | | |---|---|---|---| | __Maintainer__ | Chris Osborne | __Institution__ | University of Glasgow | | __License__ | ![License: Apache 2.0](https://img.shields.io/badge/License-Ap...
GoobleyREPO_NAMEcrtaf-pyPATH_START.@crtaf-py_extracted@crtaf-py-main@README.md@.PATH_END.py
{ "filename": "urls.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/apps/mma_watchmap/urls.py", "type": "Python" }
from . import views from django.urls import path urlpatterns = [ path('mma_watchmaps/', views.mma_watchmap_index, name='mma_watchmap_index'), path('mma_watchmaps/<int:mw_id>/', views.mma_watchmap_detail, name='mma_watchmap_detail'), # path('mma_watchmaps/<int:mw_id>/file/', views.mma_watchmap_download, name...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@apps@mma_watchmap@urls.py@.PATH_END.py
{ "filename": "ds_test.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/com/win32comext/directsound/test/ds_test.py", "type": "Python" }
import os import struct import sys import unittest import pythoncom import pywintypes import win32api import win32com.directsound.directsound as ds import win32event from pywin32_testutil import TestSkipped, find_test_fixture # next two lines are for for debugging: # import win32com # import directsound as ds WAV_FO...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@com@win32comext@directsound@test@ds_test.py@.PATH_END.py
{ "filename": "_fill.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/_fill.py", "type": "Python" }
import _plotly_utils.basevalidators class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scatterpolar", **kwargs): super(FillValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@_fill.py@.PATH_END.py
{ "filename": "terminal.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py3/_pytest/terminal.py", "type": "Python" }
"""Terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ import argparse import dataclasses import datetime import inspect import platform import sys import textwrap import warnings from collections import Counter from functools import partial from pathli...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py3@_pytest@terminal.py@.PATH_END.py
{ "filename": "_sizeref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/_sizeref.py", "type": "Python" }
import _plotly_utils.basevalidators class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scattergl.marker", **kwargs): super(SizerefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@_sizeref.py@.PATH_END.py
{ "filename": "mosaic.py", "repo_name": "mhardcastle/ddf-pipeline", "repo_path": "ddf-pipeline_extracted/ddf-pipeline-master/scripts/mosaic.py", "type": "Python" }
#!/usr/bin/env python # Mosaic final images # arguments are directories with final images from __future__ import print_function from __future__ import division from builtins import zip from builtins import range from pipeline_version import version from reproject import reproject_interp,reproject_exact from reproj_t...
mhardcastleREPO_NAMEddf-pipelinePATH_START.@ddf-pipeline_extracted@ddf-pipeline-master@scripts@mosaic.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@waterfall@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "determine_version.py", "repo_name": "scottransom/presto", "repo_path": "presto_extracted/presto-master/determine_version.py", "type": "Python" }
import subprocess import sys # Determine the version info from git result = subprocess.run( ["git", "describe", "--tags", "--long"], capture_output=True, text=True ).stdout tag, nplus, commit = result.split("-") if len(sys.argv) > 1 and sys.argv[1] in ["-v", "--show"]: print(f"Last tag: {tag}") print(f"Nu...
scottransomREPO_NAMEprestoPATH_START.@presto_extracted@presto-master@determine_version.py@.PATH_END.py
{ "filename": "test_interpolate_flat.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/flatfield/tests/test_interpolate_flat.py", "type": "Python" }
""" Test for flat_field.interpolate_flat """ import numpy as np from jwst.flatfield.flat_field import interpolate_flat nz = 6 ny = 5 nx = 7 image_wl = np.arange(nz, dtype=np.float32) + 4.5 wl = np.arange(nx * ny, dtype=np.float32).reshape(ny, nx) - 5.0 def test_interpolate_flat_1(): image_flat = np.arange(nx...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@flatfield@tests@test_interpolate_flat.py@.PATH_END.py
{ "filename": "ascii2mpw.py", "repo_name": "Caltech-IPAC/Montage", "repo_path": "Montage_extracted/Montage-main/lib/src/freetype-2.9.1/builds/mac/ascii2mpw.py", "type": "Python" }
#!/usr/bin/env python import sys import string if len( sys.argv ) == 1 : for asc_line in sys.stdin.readlines(): mpw_line = string.replace(asc_line, "\\xA5", "\245") mpw_line = string.replace(mpw_line, "\\xB6", "\266") mpw_line = string.replace(mpw_line, "\\xC4", "\304") mpw_line = string.replace(mpw_...
Caltech-IPACREPO_NAMEMontagePATH_START.@Montage_extracted@Montage-main@lib@src@freetype-2.9.1@builds@mac@ascii2mpw.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/line/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.line", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@line@_color.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/layout/scene/camera/eye/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._z import ZValidator from ._y import YValidator from ._x import XValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@camera@eye@__init__.py@.PATH_END.py
{ "filename": "sstphot_info.py", "repo_name": "kevin218/POET", "repo_path": "POET_extracted/POET-master/code/lib/sstphot_info.py", "type": "Python" }
import numpy as np # properties for GJ436b; def gj436b(info): # measured stellar parameters #info.ra = sexi2dec('11:42:11.0941') / 12e0 * pi # SIMBAD #info.dec = sexi2dec('+26:42:23.652') / 180e0 * pi # SIMBAD info.parallax = 97.73e-3 # mas, SIMBAD info.parallaxerr = 2.27e-3 # ", SIM...
kevin218REPO_NAMEPOETPATH_START.@POET_extracted@POET-master@code@lib@sstphot_info.py@.PATH_END.py
{ "filename": "nsc_coadd.py", "repo_name": "astro-datalab/nsc", "repo_path": "nsc_extracted/nsc-master/python/nsc/nsc_coadd.py", "type": "Python" }
#!/usr/bin/env python # # NSC_COADD.PY This is used to create coadds for the NSC. # __authors__ = 'David Nidever <dnidever@montana.edu>' __version__ = '20170911' # yyyymmdd """ Software to create an NSC coadd. """ import os import sys import numpy as np #import scipy import socket import warnings from astr...
astro-datalabREPO_NAMEnscPATH_START.@nsc_extracted@nsc-master@python@nsc@nsc_coadd.py@.PATH_END.py
{ "filename": "eclipses.py", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/pytransit/utils/eclipses.py", "type": "Python" }
# PyTransit: fast and easy exoplanet transit modelling in Python. # Copyright (C) 2010-2019 Hannu Parviainen # # 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 Licen...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@pytransit@utils@eclipses.py@.PATH_END.py
{ "filename": "titan_takeoff.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/llms/titan_takeoff.ipynb", "type": "Jupyter Notebook" }
# Titan Takeoff `TitanML` helps businesses build and deploy better, smaller, cheaper, and faster NLP models through our training, compression, and inference optimization platform. Our inference server, [Titan Takeoff](https://docs.titanml.co/docs/intro) enables deployment of LLMs locally on your hardware in a single ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@llms@titan_takeoff.ipynb@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="isosurface.colorbar", **kwargs): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@colorbar@_xpad.py@.PATH_END.py
{ "filename": "transforms.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Gravity/transforms.py", "type": "Python" }
import scipy.base as sb import scipy pi = scipy.pi # fast discrete cosine transforms of real sequences (using the fft) # These implement the DCT-II and inverse DCT-II (DCT-III) # described at http://en.wikipedia.org/wiki/Discrete_cosine_transform def dct(x,axis=-1): """Discrete cosine transform based on the FFT...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Gravity@transforms.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "brinckmann/montepython_public", "repo_path": "montepython_public_extracted/montepython_public-master/montepython/likelihoods/fake_planck_realistic_lowl/__init__.py", "type": "Python" }
# there is no specific likelihood code for this experiment, because it # falls in the category of CMB experiments described in the "mock CMB" # format. The class below inherits the properties of a general class # "Likelihood_mock_cmb", which knows how to deal with all experiments in # "mock CMB" format. from montepyth...
brinckmannREPO_NAMEmontepython_publicPATH_START.@montepython_public_extracted@montepython_public-master@montepython@likelihoods@fake_planck_realistic_lowl@__init__.py@.PATH_END.py
{ "filename": "plotTEA_analytical.py", "repo_name": "exoclime/HELIOS", "repo_path": "HELIOS_extracted/HELIOS-master/supplementary/reproducing_Fig4_of_Malik2017/TEA_compendium/plotTEA_analytical.py", "type": "Python" }
#! /usr/bin/env python from readconf import * import numpy as np import matplotlib.pyplot as plt import os import sys #from PIL import Image import Image # Correct directory names if location_out[-1] != '/': location_out += '/' CtoO_list = np.logspace(-1,1,100) def plotTEA(): ''' This code plots a ...
exoclimeREPO_NAMEHELIOSPATH_START.@HELIOS_extracted@HELIOS-master@supplementary@reproducing_Fig4_of_Malik2017@TEA_compendium@plotTEA_analytical.py@.PATH_END.py
{ "filename": "encoder_ellastic.py", "repo_name": "alercebroker/ATAT", "repo_path": "ATAT_extracted/ATAT-main/layers/encoder_ellastic.py", "type": "Python" }
''' Encoder model ''' import functools import math import torch import torch.nn as nn from torch.nn import init import torch.optim as optim import torch.nn.functional as F from torch.nn import Parameter as P from . import time_modulator as tmod from . import init_model as itmodel from . import mha from . import optimi...
alercebrokerREPO_NAMEATATPATH_START.@ATAT_extracted@ATAT-main@layers@encoder_ellastic.py@.PATH_END.py