metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "cactus_grid_omni.py", "repo_name": "wokast/PyCactus", "repo_path": "PyCactus_extracted/PyCactus-master/PostCactus/postcactus/cactus_grid_omni.py", "type": "Python" }
from builtins import zip from builtins import str from builtins import object from postcactus import cactus_grid_h5 as cgr from postcactus import cactus_grid_ascii as cgra class GridOmniReader(object): """This class provides access to all grid data of given dimensions. This includes hdf5 format and, for 1D d...
wokastREPO_NAMEPyCactusPATH_START.@PyCactus_extracted@PyCactus-master@PostCactus@postcactus@cactus_grid_omni.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/marker/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="choropleth.marker", **kwargs): super(LineValidator, 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@choropleth@marker@_line.py@.PATH_END.py
{ "filename": "train_net.py", "repo_name": "chenwuperth/rgz_rcnn", "repo_path": "rgz_rcnn_extracted/rgz_rcnn-master/tools/train_net.py", "type": "Python" }
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network on a region of int...
chenwuperthREPO_NAMErgz_rcnnPATH_START.@rgz_rcnn_extracted@rgz_rcnn-master@tools@train_net.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/units/__init__.py", "type": "Python" }
__all__ = ["constants", "conversions","vectors"]
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@units@__init__.py@.PATH_END.py
{ "filename": "tpfmodel.py", "repo_name": "lightkurve/lightkurve", "repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/prf/tpfmodel.py", "type": "Python" }
"""Provides tools to model a Kepler image for PRF photometry fitting. Examples -------- %matplotlib inline import numpy as np from lightkurve import KeplerTargetPixelFile, LightCurve from lightkurve.prf import StarPrior, BackgroundPrior, FocusPrior, MotionPrior, TPFModel, PRFPhotometry from oktopus import GaussianPrio...
lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@prf@tpfmodel.py@.PATH_END.py
{ "filename": "nso.py", "repo_name": "AWehrhahn/SME", "repo_path": "SME_extracted/SME-master/src/pysme/nso.py", "type": "Python" }
# -*- coding: utf-8 -*- # Get and read the NSO spectrum import numpy as np from . import large_file_storage as lfs def load_solar_spectrum(ravel=True): """ Load the solar spectrum The data is from the National Solar Observatory Atlas #1, which is an optical, full-disk, FTS spectrum of a relatively i...
AWehrhahnREPO_NAMESMEPATH_START.@SME_extracted@SME-master@src@pysme@nso.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/libs/protobuf/third_party/utf8_range/README.md", "type": "Markdown" }
[![Build Status](https://travis-ci.com/cyb70289/utf8.svg?branch=master)](https://travis-ci.com/cyb70289/utf8) # Fast UTF-8 validation with Range algorithm (NEON+SSE4+AVX2) This is a brand new algorithm to leverage SIMD for fast UTF-8 string validation. Both **NEON**(armv8a) and **SSE4** versions are implemented. **AV...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@protobuf@third_party@utf8_range@README.md@.PATH_END.py
{ "filename": "test.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/setuptools/command/test.py", "type": "Python" }
import os import operator import sys import contextlib import itertools import unittest from distutils.errors import DistutilsError, DistutilsOptionError from distutils import log from unittest import TestLoader from setuptools.extern import six from setuptools.extern.six.moves import map, filter from pkg_resources i...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@setuptools@command@test.py@.PATH_END.py
{ "filename": "test_canonical_constraint.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_equal, assert_equal from scipy.optimize._constraints import (NonlinearConstraint, Bounds, PreparedConstraint) from scipy.optimize._trustregion_constr.canoni...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@optimize@_trustregion_constr@tests@test_canonical_constraint.py@.PATH_END.py
{ "filename": "donz_SV3.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/scripts/SV3/donz_SV3.py", "type": "Python" }
import sys,os import argparse #sys.path.append('../py') #this requires running from LSS/bin, *something* must allow linking without this but is not present in code yet #from this package #try: #import LSS.SV3.cattools as ct import LSS.common_tools as common parser = argparse.ArgumentParser() parser.add_argument("--b...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@SV3@donz_SV3.py@.PATH_END.py
{ "filename": "pylab.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/core/magics/pylab.py", "type": "Python" }
"""Implementation of magic functions for matplotlib/pylab support. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distri...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@core@magics@pylab.py@.PATH_END.py
{ "filename": "example.ipynb", "repo_name": "musevlt/origin", "repo_path": "origin_extracted/origin-master/docs/example.ipynb", "type": "Jupyter Notebook" }
## Example notebook This notebook shows how to run ORIGIN on a sub-cube from the UDF10 (http://muse-vlt.eu/science/udf/). ```python %matplotlib inline import numpy as np import matplotlib.pyplot as plt from mpdaf.obj import Image, Cube from mpdaf.sdetect import Catalog import muse_origin from muse_origin import OR...
musevltREPO_NAMEoriginPATH_START.@origin_extracted@origin-master@docs@example.ipynb@.PATH_END.py
{ "filename": "live_pastro.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/population/live_pastro.py", "type": "Python" }
import logging import h5py import numpy from pycbc.tmpltbank import bank_conversions as bankconv from pycbc.events import triggers from pycbc import conversions as conv from . import fgmc_functions as fgmcfun _s_per_yr = 1. / conv.sec_to_year(1.) logger = logging.getLogger('pycbc.population.live_pastro') def check...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@population@live_pastro.py@.PATH_END.py
{ "filename": "_ticktext.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/colorbar/_ticktext.py", "type": "Python" }
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatter.marker.colorbar", **kwargs ): super(TicktextValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@colorbar@_ticktext.py@.PATH_END.py
{ "filename": "essplot.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/plots/backends/matplotlib/essplot.py", "type": "Python" }
"""Matplotlib energyplot.""" import matplotlib.pyplot as plt import numpy as np from scipy.stats import rankdata from ...plot_utils import _scale_fig_size from . import backend_kwarg_defaults, backend_show, create_axes_grid, matplotlib_kwarg_dealiaser def plot_ess( ax, plotters, xdata, ess_tail_data...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@plots@backends@matplotlib@essplot.py@.PATH_END.py
{ "filename": "wdmerger.py", "repo_name": "AMReX-Astro/wdmerger", "repo_path": "wdmerger_extracted/wdmerger-main/analysis/wdmerger.py", "type": "Python" }
# # Return the CASTRO directory on the current machine, based on your environment variables. # def get_castro_dir(): """Return the location of the CASTRO directory.""" import os CASTRO_HOME = os.getenv('CASTRO_HOME') return CASTRO_HOME # Return the name of the current inputs file in a directory....
AMReX-AstroREPO_NAMEwdmergerPATH_START.@wdmerger_extracted@wdmerger-main@analysis@wdmerger.py@.PATH_END.py
{ "filename": "gravsphere_initialise_PlumCoreOm.py", "repo_name": "justinread/gravsphere", "repo_path": "gravsphere_extracted/gravsphere-master/gravsphere_initialise_PlumCoreOm.py", "type": "Python" }
import numpy as np from constants import * from functions import * #This file contains all the code options and choices for #running a given model. Throughout, -1 means auto-calculate. #Data files and output base filename: nstars = 1000 if (nstars == 1000): whichgal = 'PlumCoreOm' elif (nstars == 100): whi...
justinreadREPO_NAMEgravspherePATH_START.@gravsphere_extracted@gravsphere-master@gravsphere_initialise_PlumCoreOm.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/query_constructor/base.py", "type": "Python" }
"""LLM Chain for turning a user text query into a structured query.""" from __future__ import annotations import json from typing import Any, Callable, List, Optional, Sequence, Tuple, Union, cast from langchain_core._api import deprecated from langchain_core.exceptions import OutputParserException from langchain_co...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@query_constructor@base.py@.PATH_END.py
{ "filename": "_linecolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/_linecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.scene.xaxis", **kwargs ): super(LinecolorValidator, self).__init__( plotly_name=plotly_name, paren...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@_linecolor.py@.PATH_END.py
{ "filename": "stages.py", "repo_name": "LCOGT/banzai", "repo_path": "banzai_extracted/banzai-main/banzai/stages.py", "type": "Python" }
import abc import itertools from collections.abc import Iterable from banzai import logs from banzai.frames import ObservationFrame logger = logs.get_logger() class Stage(abc.ABC): def __init__(self, runtime_context): self.runtime_context = runtime_context @property def stage_name(self): ...
LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@stages.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/keras/__init__.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@keras@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/test/app2/README.md", "type": "Markdown" }
This app subscribes to the core set of WAMP meta events and logs events as received. To run: ```console python client.py --realm $CBREALM --url $CBURL ```
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@app2@README.md@.PATH_END.py
{ "filename": "which_law_should_i_use.py", "repo_name": "nespinoza/ld-exosim", "repo_path": "ld-exosim_extracted/ld-exosim-master/which_law_should_i_use.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import multiprocessing as mp import os import pyfits import lmfit import sys import Utils ##################### CUSTOMIZABLE OPTIONS ########################### # Define ld laws to simulate transits from: ld_laws = ['linear','quadratic','logarithmic','...
nespinozaREPO_NAMEld-exosimPATH_START.@ld-exosim_extracted@ld-exosim-master@which_law_should_i_use.py@.PATH_END.py
{ "filename": "Dai_2015_raw_to_yaml.py", "repo_name": "NickSwainston/pulsar_spectra", "repo_path": "pulsar_spectra_extracted/pulsar_spectra-main/pulsar_spectra/catalogue_papers/Dai_2015_raw_to_yaml.py", "type": "Python" }
import json with open("Dai_2015_raw.txt", "r") as raw_file: lines = raw_file.readlines() print(lines) pulsar_dict = {} for row in lines: row = row.replace(" ± ", "±").split(" ") print(row) pulsar = row[0].replace("−", "-") freqs = [] bands = [] fluxs = [] flux_errs = [] if len...
NickSwainstonREPO_NAMEpulsar_spectraPATH_START.@pulsar_spectra_extracted@pulsar_spectra-main@pulsar_spectra@catalogue_papers@Dai_2015_raw_to_yaml.py@.PATH_END.py
{ "filename": "backend.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/test/test_backend/cf2/backend.py", "type": "Python" }
# Copyright (c) typedef int GmbH, licensed under The MIT License (MIT) import os from twisted.internet.defer import inlineCallbacks from autobahn.wamp.types import RegisterOptions from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner class MyComponent(ApplicationSession): @inlineCallbacks ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@test_backend@cf2@backend.py@.PATH_END.py
{ "filename": "test_wcs.py", "repo_name": "astropy/photutils", "repo_path": "photutils_extracted/photutils-main/photutils/datasets/tests/test_wcs.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the wcs module. """ import pytest from numpy.testing import assert_allclose from photutils.datasets import make_gwcs, make_wcs from photutils.utils._optional_deps import HAS_GWCS def test_make_wcs(): shape = (100, 200) wcs = make_...
astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@datasets@tests@test_wcs.py@.PATH_END.py
{ "filename": "navigate.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/playwright/navigate.py", "type": "Python" }
from __future__ import annotations from typing import Optional, Type from urllib.parse import urlparse from langchain_core.callbacks import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, ) from pydantic import BaseModel, Field, model_validator from langchain_community.tools.playwright.base impo...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@playwright@navigate.py@.PATH_END.py
{ "filename": "srclist.py", "repo_name": "HERA-Team/aipy", "repo_path": "aipy_extracted/aipy-main/scripts/srclist.py", "type": "Python" }
#!/usr/bin/env python """ A script for listing sources (and optionally source parameters) from catalogs. """ from __future__ import print_function, division, absolute_import import aipy as a, ephem, sys, optparse,logging o = optparse.OptionParser() o.set_usage('srclist.py [options]') o.set_description(__doc__) a.sc...
HERA-TeamREPO_NAMEaipyPATH_START.@aipy_extracted@aipy-main@scripts@srclist.py@.PATH_END.py
{ "filename": "_ticklen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/colorbar/_ticklen.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="surface.colorbar", **kwargs): super(TicklenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@colorbar@_ticklen.py@.PATH_END.py
{ "filename": "java-reference_catboostmodel__predictnumericfeaturescatfeaturehashes.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-java/java-reference_catboostmodel__predictnumericfeaturescatfeaturehashes.md", "type": "Markdown...
Apply the model to a batch of objects. Uses a matrix of numerical features and a matrix of hashes of categorical features.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-java@java-reference_catboostmodel__predictnumericfeaturescatfeaturehashes.md@.PATH_END.py
{ "filename": "test_calwebb_image3.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/pipeline/tests/test_calwebb_image3.py", "type": "Python" }
import pytest import os import shutil from jwst.stpipe import Step from jwst.assign_wcs import AssignWcsStep from jwst.datamodels import ImageModel # type: ignore[attr-defined] INPUT_FILE = "dummy_cal.fits" INPUT_FILE_2 = "dummy2_cal.fits" INPUT_ASN = "dummy_asn.json" OUTPUT_PRODUCT = "custom_name" LOGFILE = "run_as...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@pipeline@tests@test_calwebb_image3.py@.PATH_END.py
{ "filename": "message.py", "repo_name": "pynbody/tangos", "repo_path": "tangos_extracted/tangos-master/tangos/parallel_tasks/message.py", "type": "Python" }
reception_timing_monitor = None def _setup_message_reception_timing_monitor(): global reception_timing_monitor from ..util import timing_monitor from . import backend if backend is None or backend.rank() == 0: # server can't gather its own timing information reception_timing_monitor = ...
pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@parallel_tasks@message.py@.PATH_END.py
{ "filename": "test_ghost_spect.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/ghostdr/ghost/test/test_ghost_spect.py", "type": "Python" }
# pytest suite """ Unit tests for :any:`ghostdr.ghost.primitives_ghost_spect`. This is a suite of tests to be run with pytest. """ from __future__ import division import os import numpy as np import astrodata import ghost_instruments from gempy.utils import logutils from six.moves import range # from geminidr.core.t...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@ghostdr@ghost@test@test_ghost_spect.py@.PATH_END.py
{ "filename": "_opacitysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/marker/_opacitysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattermapbox.marker", **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@marker@_opacitysrc.py@.PATH_END.py
{ "filename": "read_yields.py", "repo_name": "oliverphilcox/ChempyMulti", "repo_path": "ChempyMulti_extracted/ChempyMulti-master/Chempy/input/yields/NuGrid/read_yields.py", "type": "Python" }
''' Superclass to extract yield data from tables and from mppnp simulations Christian Ritter 11/2013 Two classes: One for reading and extracting of NuGrid table data, the other one for SN1a data. ''' import matplotlib.pyplot as plt import numpy as np import os color=['r'...
oliverphilcoxREPO_NAMEChempyMultiPATH_START.@ChempyMulti_extracted@ChempyMulti-master@Chempy@input@yields@NuGrid@read_yields.py@.PATH_END.py
{ "filename": "step.py", "repo_name": "toros-astro/corral", "repo_path": "corral_extracted/corral-master/corral/run/step.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of sourc...
toros-astroREPO_NAMEcorralPATH_START.@corral_extracted@corral-master@corral@run@step.py@.PATH_END.py
{ "filename": "xception.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/applications/xception.py", "type": "Python" }
from keras.src import backend from keras.src import layers from keras.src.api_export import keras_export from keras.src.applications import imagenet_utils from keras.src.models import Functional from keras.src.ops import operation_utils from keras.src.utils import file_utils WEIGHTS_PATH = ( "https://storage.googl...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@applications@xception.py@.PATH_END.py
{ "filename": "single-mass_2halo_best-fit_nbatta-2010.py", "repo_name": "dylancromer/maszcal", "repo_path": "maszcal_extracted/maszcal-main/scripts/single-mass_2halo_best-fit_nbatta-2010.py", "type": "Python" }
import datetime import argparse import time import numpy as np import pathos.pools as pp import supercubos from sklearn.gaussian_process.kernels import Matern import emcee import astropy.units as u import maszcal.data.sims import maszcal.data.obs import maszcal.lensing import maszcal.likelihoods import maszcal.fitutils...
dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@scripts@single-mass_2halo_best-fit_nbatta-2010.py@.PATH_END.py
{ "filename": "calculate_nlte_correction_line.py", "repo_name": "TSFitPy-developers/TSFitPy", "repo_path": "TSFitPy_extracted/TSFitPy-main/calculate_nlte_correction_line.py", "type": "Python" }
from __future__ import annotations from sys import argv from scripts.calculate_nlte_correction_line import run_nlte_corrections import datetime import numpy as np if __name__ == '__main__': abundance: float = 0.0 # abundance of element in LTE [X/Fe]; scaled with metallicity if len(argv) > 1: # when calling...
TSFitPy-developersREPO_NAMETSFitPyPATH_START.@TSFitPy_extracted@TSFitPy-main@calculate_nlte_correction_line.py@.PATH_END.py
{ "filename": "_astropy_init.py", "repo_name": "spacetelescope/pystortion", "repo_path": "pystortion_extracted/pystortion-master/pystortion/_astropy_init.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ['__version__', '__githash__'] # this indicates whether or not we are in the package's setup.py try: _ASTROPY_SETUP_ except NameError: from sys import version_info if version_info[0] >= 3: import builtins else: i...
spacetelescopeREPO_NAMEpystortionPATH_START.@pystortion_extracted@pystortion-master@pystortion@_astropy_init.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Henrik-Knierim/py_mesa_helper", "repo_path": "py_mesa_helper_extracted/py_mesa_helper-main/mesa_helper/__init__.py", "type": "Python" }
from mesa_helper.astrophys import * from mesa_helper.Inlist import Inlist from mesa_helper.CompositionGradient import CompositionGradient from mesa_helper.Rn import Rn from mesa_helper.Simulation import Simulation from mesa_helper.SimulationSeries import SimulationSeries
Henrik-KnierimREPO_NAMEpy_mesa_helperPATH_START.@py_mesa_helper_extracted@py_mesa_helper-main@mesa_helper@__init__.py@.PATH_END.py
{ "filename": "troposphere_delay.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/src/pint/models/troposphere_delay.py", "type": "Python" }
"""Delay due to Earth's troposphere""" import astropy.constants as const import astropy.units as u import numpy as np import scipy.interpolate from astropy.coordinates import AltAz, SkyCoord from loguru import logger as log from pint.models.parameter import boolParameter from pint.models.timing_model import DelayComp...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@models@troposphere_delay.py@.PATH_END.py
{ "filename": "synthesis.py", "repo_name": "andycasey/smhr", "repo_path": "smhr_extracted/smhr-master/smh/radiative_transfer/moog/synthesis.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Synthesis functionality with the MOOG(SILENT) radiative transfer code. """ from __future__ import (division, print_function, absolute_import, unicode_literals) import logging import numpy as np import yaml from pkg_resources import resource_s...
andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@smh@radiative_transfer@moog@synthesis.py@.PATH_END.py
{ "filename": "hcam.py", "repo_name": "HiPERCAM/hipercam", "repo_path": "hipercam_extracted/hipercam-master/hipercam/hcam.py", "type": "Python" }
""" Section for handling the raw HiPERCAM data files. These are FITS files with a single HDU containing header information on the window format amonst other things with the data in a "FITS cube" of unusual nature in that it has dimensions of nframe x 1 x lots, where "lots" contains all pixels of all windows of all CCDs...
HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@hcam.py@.PATH_END.py
{ "filename": "cli-usages-examples.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/cli-usages-examples.md", "type": "Markdown" }
# Usage examples ## Train and apply a classification model {#class-model} Train a classification model with default parameters in silent mode and then calculate model predictions on a custom dataset. The output contains the evaluated class1 probability: ```no-highlight catboost fit --learn-set train.tsv --test-set t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@cli-usages-examples.md@.PATH_END.py
{ "filename": "_tickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/aaxis/_tickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="carpet.aaxis", **kwargs): super(TickprefixValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@aaxis@_tickprefix.py@.PATH_END.py
{ "filename": "readme.md", "repo_name": "bd-j/forcepho", "repo_path": "forcepho_extracted/forcepho-main/demo/demo_basic/readme.md", "type": "Markdown" }
# Test: Basic Generate a galsim image with specific parameters and fit it with forcepho. ## setup ```sh # get some common info ln -s ../demo_utils.py demo_utils.py ln -s ../data/sersic_splinedata_large.h5 sersic_splinedata_large.h5 ``` ## usage Generate image, fit it, and plot corner, trace, and residuals ```sh py...
bd-jREPO_NAMEforcephoPATH_START.@forcepho_extracted@forcepho-main@demo@demo_basic@readme.md@.PATH_END.py
{ "filename": "colorbar.py", "repo_name": "macrocosme/shwirl", "repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/scene/widgets/colorbar.py", "type": "Python" }
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@scene@widgets@colorbar.py@.PATH_END.py
{ "filename": "_triangulation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/tri/_triangulation.py", "type": "Python" }
import sys import numpy as np from matplotlib import _api class Triangulation: """ An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automatically generated using a Delaunay triangulation. Parameters ------...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@tri@_triangulation.py@.PATH_END.py
{ "filename": "shapeannotation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/shapeannotation.py", "type": "Python" }
# some functions defined here to avoid numpy import def _mean(x): if len(x) == 0: raise ValueError("x must have positive length") return float(sum(x)) / len(x) def _argmin(x): return sorted(enumerate(x), key=lambda t: t[1])[0][0] def _argmax(x): return sorted(enumerate(x), key=lambda t: t[...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@shapeannotation.py@.PATH_END.py
{ "filename": "_tickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/angularaxis/_tickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.polar.angularaxis", **kwargs ): super(TickprefixValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@angularaxis@_tickprefix.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/aaxis/title/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.aaxis.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@aaxis@title@font@_color.py@.PATH_END.py
{ "filename": "broadcast_to_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/array_ops/broadcast_to_ops_test.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@array_ops@broadcast_to_ops_test.py@.PATH_END.py
{ "filename": "_scaleratio.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/_scaleratio.py", "type": "Python" }
import _plotly_utils.basevalidators class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="scaleratio", parent_name="layout.xaxis", **kwargs): super(ScaleratioValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@_scaleratio.py@.PATH_END.py
{ "filename": "cpp_message.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/protobuf/py3/google/protobuf/pyext/cpp_message.py", "type": "Python" }
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@protobuf@py3@google@protobuf@pyext@cpp_message.py@.PATH_END.py
{ "filename": "tutorials.md", "repo_name": "markfortune/luas", "repo_path": "luas_extracted/luas-main/docs/source/tutorials.md", "type": "Markdown" }
(tutorials_index)= # Tutorials Included below are tutorials introducing Gaussian processes and their extension to 2D data sets. The optimised method used by `luas` to calculate the log-likelihood and its derivatives is first demonstrated using an implementation in NumPy in ["An Introduction to 2D Gaussian Processes"...
markfortuneREPO_NAMEluasPATH_START.@luas_extracted@luas-main@docs@source@tutorials.md@.PATH_END.py
{ "filename": "DEMBoundaryPolicyInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/DEM/SolidBoundary/DEMBoundaryPolicyInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "DEM/SolidBoundary/DEMBoundaryPolicy.cc" namespace Spheral { template class...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@DEM@SolidBoundary@DEMBoundaryPolicyInst.cc.py@.PATH_END.py
{ "filename": "modelsML_utils.py", "repo_name": "eogarvin/MLCCS", "repo_path": "MLCCS_extracted/MLCCS-main/ml_spectroscopy/modelsML_utils.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Sun Nov 14 03:10:34 2021 Models for Machine learning , cross validation @author: emily """ ## LIBRARIES import concurrent.futures import pandas as pd import numpy as np import random import os import sys import gc import matplotlib.pyplot as plt import math from scipy.stats...
eogarvinREPO_NAMEMLCCSPATH_START.@MLCCS_extracted@MLCCS-main@ml_spectroscopy@modelsML_utils.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="contour.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "test_docs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/f2py/tests/test_docs.py", "type": "Python" }
import os import pytest import numpy as np from numpy.testing import assert_array_equal, assert_equal from . import util def get_docdir(): # assuming that documentation tests are run from a source # directory return os.path.abspath(os.path.join( os.path.dirname(__file__), '..', '..', '..',...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@f2py@tests@test_docs.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/autolens/quantity/model/__init__.py", "type": "Python" }
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@autolens@quantity@model@__init__.py@.PATH_END.py
{ "filename": "test_data.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/arviz/tests/base_tests/test_data.py", "type": "Python" }
# pylint: disable=no-member, invalid-name, redefined-outer-name # pylint: disable=too-many-lines import importlib import os from collections import namedtuple from copy import deepcopy from html import escape from typing import Dict from tempfile import TemporaryDirectory from urllib.parse import urlunsplit import nu...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@arviz@tests@base_tests@test_data.py@.PATH_END.py
{ "filename": "_hovertext.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/_hovertext.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="hovertext", parent_name="contour", **kwargs): super(HovertextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@_hovertext.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/telemetry/conftest.py", "type": "Python" }
from uuid import UUID import pytest from opentelemetry.test.globals_test import ( reset_logging_globals, reset_metrics_globals, reset_trace_globals, ) from prefect.settings import ( PREFECT_API_KEY, PREFECT_API_URL, PREFECT_EXPERIMENTS_TELEMETRY_ENABLED, temporary_settings, ) ACCOUNT_ID =...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@telemetry@conftest.py@.PATH_END.py
{ "filename": "_buttons.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/rangeselector/_buttons.py", "type": "Python" }
import _plotly_utils.basevalidators class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="buttons", parent_name="layout.xaxis.rangeselector", **kwargs ): super(ButtonsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@rangeselector@_buttons.py@.PATH_END.py
{ "filename": "stepback-qa.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/cookbook/stepback-qa.ipynb", "type": "Jupyter Notebook" }
# Step-Back Prompting (Question-Answering) One prompting technique called "Step-Back" prompting can improve performance on complex questions by first asking a "step back" question. This can be combined with regular question-answering applications by then doing retrieval on both the original and step-back question. Re...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@stepback-qa.ipynb@.PATH_END.py
{ "filename": "test_item.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_item.py", "type": "Python" }
""" Series.item method, mainly testing that we get python scalars as opposed to numpy scalars. """ import pytest from pandas import ( Series, Timedelta, Timestamp, date_range, ) class TestItem: def test_item(self): # We are testing that we get python scalars as opposed to numpy scalars ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_item.py@.PATH_END.py
{ "filename": "n2hp_cube_example.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/examples/n2hp_cube_example.py", "type": "Python" }
import astropy import pyspeckit import os import astropy.units as u import warnings from astropy import wcs if not os.path.exists('n2hp_cube.fit'): import astropy.utils.data as aud from astropy.io import fits try: f = aud.download_file('ftp://cdsarc.u-strasbg.fr/pub/cats/J/A%2BA/472/519/fits/opha_...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@examples@n2hp_cube_example.py@.PATH_END.py
{ "filename": "2D_GP_intro.ipynb", "repo_name": "markfortune/luas", "repo_path": "luas_extracted/luas-main/docs/source/tutorials/2D_GP_intro.ipynb", "type": "Jupyter Notebook" }
(numpy_tutorial)= # An Introduction into 2D Gaussian Processes The goal of this tutorial will be to explain 2D Gaussian processes (GPs) and the optimisations implemented in luas to calculate the log-likelihood as well as the GP predictive mean and covariance. It has been implemented through ``NumPy`` instead of ``jax...
markfortuneREPO_NAMEluasPATH_START.@luas_extracted@luas-main@docs@source@tutorials@2D_GP_intro.ipynb@.PATH_END.py
{ "filename": "_text.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="scattercarpet.marker.colorbar.title", **kwargs, ): super(TextValidator, self).__init__( plotly_name=pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@title@_text.py@.PATH_END.py
{ "filename": "lsl_comparison.py", "repo_name": "oorb/oorb", "repo_path": "oorb_extracted/oorb-master/.github/CI_files/lsl_comparison.py", "type": "Python" }
#!/usr/bin/env python # A script used within CI to check if the results of lsl have changed. import sys file1 = open(sys.argv[1],'r') file2 = open(sys.argv[2],'r') eps = 0.0001 for i in file1: if(i[0] == "#"): pass else: f1_results = i.split() for i in file2: if(i[0] == "#"): pass...
oorbREPO_NAMEoorbPATH_START.@oorb_extracted@oorb-master@.github@CI_files@lsl_comparison.py@.PATH_END.py
{ "filename": "planck.py", "repo_name": "JALusk/Lumiere", "repo_path": "Lumiere_extracted/Lumiere-master/superbol/planck.py", "type": "Python" }
import numpy as np from astropy import constants as const from astropy import units as u def planck_function(wavelength, temperature): """Planck function at given `wavelength` and `temperature` in cgs. The specific intensity of radiation from a blackbody source is given by: :math:`B_{\\lambda}(\\lambda,...
JALuskREPO_NAMELumierePATH_START.@Lumiere_extracted@Lumiere-master@superbol@planck.py@.PATH_END.py
{ "filename": "test_mp.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/utils/tests/test_mp.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@utils@tests@test_mp.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Rithwik-G/AstroMCAD", "repo_path": "AstroMCAD_extracted/AstroMCAD-main/astromcad/__init__.py", "type": "Python" }
from astromcad.astromcad import Detect from astromcad.astromcad import Custom from astromcad.astromcad import mcif
Rithwik-GREPO_NAMEAstroMCADPATH_START.@AstroMCAD_extracted@AstroMCAD-main@astromcad@__init__.py@.PATH_END.py
{ "filename": "_templateitemname.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py", "type": "Python" }
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): super(TemplateitemnameValidator, self)._...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py
{ "filename": "database.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/inout/database.py", "type": "Python" }
# -*- coding: utf-8 -*- """ A simple interface to work with a database saved on the hard disk. Author: Robin Lombaert """ import pickle import time class Database(dict): ''' A database class. The class creates and manages a dictionary saved to the hard disk. It functions as a python dictionary w...
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@inout@database.py@.PATH_END.py
{ "filename": "fdpexpect.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pexpect/py3/pexpect/fdpexpect.py", "type": "Python" }
'''This is like :mod:`pexpect`, but it will work with any file descriptor that you pass it. You are responsible for opening and close the file descriptor. This allows you to use Pexpect with sockets and named pipes (FIFOs). .. note:: socket.fileno() does not give a readable file descriptor on windows. Use :mod...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pexpect@py3@pexpect@fdpexpect.py@.PATH_END.py
{ "filename": "wheel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py2/setuptools/wheel.py", "type": "Python" }
"""Wheels support.""" from distutils.util import get_platform from distutils import log import email import itertools import os import posixpath import re import zipfile import pkg_resources import setuptools from pkg_resources import parse_version from setuptools.extern.packaging.tags import sys_tags from setuptools...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py2@setuptools@wheel.py@.PATH_END.py
{ "filename": "_dtype_ctypes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/_core/_dtype_ctypes.py", "type": "Python" }
from numpy.core import _dtype_ctypes _globals = globals() for item in _dtype_ctypes.__dir__(): _globals[item] = getattr(_dtype_ctypes, item)
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@_core@_dtype_ctypes.py@.PATH_END.py
{ "filename": "_namelengthsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="isosurface.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@hoverlabel@_namelengthsrc.py@.PATH_END.py
{ "filename": "acknowledgments.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/doc/acknowledgments.md", "type": "Markdown" }
# Acknowledgments This 3.0 version of the MPI-AMRVAC software was released in November 2022, with the aid of Beatrice Popescu Braileanu, Niels Claes and various core contributors (Chun Xia, Guo Yang, Yuhao Zhou, Wenzhi Ruan, Fabio Bacchini). The team effort is managed by [Rony Keppens](http://perswww.kuleuven.be/~u0...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@doc@acknowledgments.md@.PATH_END.py
{ "filename": "tf_text_graph_faster_rcnn.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/dnn/tf_text_graph_faster_rcnn.py", "type": "Python" }
import argparse import numpy as np from tf_text_graph_common import * def createFasterRCNNGraph(modelPath, configPath, outputPath): scopesToKeep = ('FirstStageFeatureExtractor', 'Conv', 'FirstStageBoxPredictor/BoxEncodingPredictor', 'FirstStageBoxPredictor/ClassPredictor', ...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@tf_text_graph_faster_rcnn.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/xaxis/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.xaxis", **kwargs ): super(ShowticklabelsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@xaxis@_showticklabels.py@.PATH_END.py
{ "filename": "make_paper_lum_plot_appendix.py", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/papers/Vvmax/make_paper_lum_plot_appendix.py", "type": "Python" }
""" This project takes in V/Vmax data from Wayne, creates a histogram, and generates errorbars on the data. It does this by reading in host galaxy FRB data ("loc_data.dat") and DM-z relation data ("macquart_data.dat") """ import numpy as np from matplotlib import pyplot as plt from scipy.optimize import curve_fit f...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@Vvmax@make_paper_lum_plot_appendix.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/colorbar/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@colorbar@tickfont@_weight.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ja-vazquez/SimpleMC", "repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/tools/__init__.py", "type": "Python" }
from .cosmich import cosmochain from .ToyModels import ToyModels
ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@tools@__init__.py@.PATH_END.py
{ "filename": "test_hierarchy.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/cluster/tests/test_hierarchy.py", "type": "Python" }
# # Author: Damian Eads # Date: April 17, 2008 # # Copyright (C) 2008 Damian Eads # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@cluster@tests@test_hierarchy.py@.PATH_END.py
{ "filename": "write_calibration.py", "repo_name": "cosmo-ethz/hide", "repo_path": "hide_extracted/hide-master/hide/plugins/write_calibration.py", "type": "Python" }
# HIDE 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. # # HIDE is distributed in the hope that it will be useful, # but WITHOUT ANY W...
cosmo-ethzREPO_NAMEhidePATH_START.@hide_extracted@hide-master@hide@plugins@write_calibration.py@.PATH_END.py
{ "filename": "index.md", "repo_name": "antoinemarchal/ROHSA", "repo_path": "ROHSA_extracted/ROHSA-master/docs/user_guide/03_algorithm/index.md", "type": "Markdown" }
title: Algorithm # Algorithm ![ROHSA](|media|/LogoMakr_0dTJ9B.png) {: style="text-align: center" } ![](|media|/main_white.png){: width="400" } {: style="float: left"} ## ROHSA algorithm <p style="text-align:justify;"> Coming Soon
antoinemarchalREPO_NAMEROHSAPATH_START.@ROHSA_extracted@ROHSA-master@docs@user_guide@03_algorithm@index.md@.PATH_END.py
{ "filename": "_connectgaps.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/_connectgaps.py", "type": "Python" }
import _plotly_utils.basevalidators class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scattercarpet", **kwargs ): super(ConnectgapsValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@_connectgaps.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/domain/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="sunburst.domain", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@domain@_y.py@.PATH_END.py
{ "filename": "igimf_epoch_33.py", "repo_name": "juzikong/photGalIMF", "repo_path": "photGalIMF_extracted/photGalIMF-main/simulation_results_from_galaxy_evol/example/igimf_epoch_33.py", "type": "Python" }
# File to define a custom IMF # The return value represents the chosen IMF value for the input mass def custom_imf(mass, time): # there is no time dependence for IGIMF if mass < 0.08: return 0 elif mass < 0.101: return -881912095498.0004 * mass + 126349388048.4443 elif mass < 0.10201: ...
juzikongREPO_NAMEphotGalIMFPATH_START.@photGalIMF_extracted@photGalIMF-main@simulation_results_from_galaxy_evol@example@igimf_epoch_33.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/astropy/io/tests/__init__.py", "type": "Python" }
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@io@tests@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tslearn-team/tslearn", "repo_path": "tslearn_extracted/tslearn-main/README.md", "type": "Markdown" }
<!-- Our title --> <div align="center"> <h3>tslearn </h3> </div> <!-- Short description --> <p align="center"> The machine learning toolkit for time series analysis in Python </p> <!-- The badges --> <p align="center"> <a href="https://badge.fury.io/py/tslearn"> <img alt="PyPI" src="https://badge.fur...
tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@README.md@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatter3d.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@colorbar@_xpad.py@.PATH_END.py
{ "filename": "_ambient.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/volume/lighting/_ambient.py", "type": "Python" }
import _plotly_utils.basevalidators class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="ambient", parent_name="volume.lighting", **kwargs): super(AmbientValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@volume@lighting@_ambient.py@.PATH_END.py
{ "filename": "_showticklabels.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/_showticklabels.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="surface.colorbar", **kwargs ): super(ShowticklabelsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@_showticklabels.py@.PATH_END.py
{ "filename": "test_datatype.py", "repo_name": "h5py/h5py", "repo_path": "h5py_extracted/h5py-master/h5py/tests/test_datatype.py", "type": "Python" }
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ File-resident datatype tests. Tests "co...
h5pyREPO_NAMEh5pyPATH_START.@h5py_extracted@h5py-master@h5py@tests@test_datatype.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/xaxis/autorangeoptions/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._minallowed import MinallowedValidator from ._maxallowed import MaxallowedValidator from ._includesrc import IncludesrcValidator from ._include import IncludeValidator from ._clipmin import ClipminValid...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@xaxis@autorangeoptions@__init__.py@.PATH_END.py
{ "filename": "test_representation.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/mapper/info/test_representation.py", "type": "Python" }
import autofit as af from autofit.mapper.prior_model.representative import find_groups def test_find_groups(): info_paths = [((i, 1), 2) for i in range(3)] groups = find_groups(info_paths) assert groups == [(("0 - 2", 1), 2)] def test_two_groups(): info_paths = [((i, 1), 2) for i in range(3)] + [((i...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@mapper@info@test_representation.py@.PATH_END.py