metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "test_coag_dustpy.py", "repo_name": "cuDisc/cuDisc", "repo_path": "cuDisc_extracted/cuDisc-main/tests/scripts/test_coag_dustpy.py", "type": "Python" }
import os from constants import * from fileIO import * import numpy as np import matplotlib.pyplot as plt print("Making and running test...\n") os.system('cd ../../ && make -j test_coagdustpy') os.system('../../test_coagdustpy') sim = CuDiscModel("../outputs/coag_dustpy") sizes = sim.load_grain_sizes() gas, dust = s...
cuDiscREPO_NAMEcuDiscPATH_START.@cuDisc_extracted@cuDisc-main@tests@scripts@test_coag_dustpy.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/colorbar/title/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@colorbar@title@font@__init__.py@.PATH_END.py
{ "filename": "_labelalias.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/coloraxis/colorbar/_labelalias.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.coloraxis.colorbar", **kwargs, ): super(LabelaliasValidator, self).__init__( plotly_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@coloraxis@colorbar@_labelalias.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Fermipy/fermipy", "repo_path": "fermipy_extracted/fermipy-master/fermipy/tests/__init__.py", "type": "Python" }
FermipyREPO_NAMEfermipyPATH_START.@fermipy_extracted@fermipy-master@fermipy@tests@__init__.py@.PATH_END.py
{ "filename": "test_bbox.py", "repo_name": "pmelchior/scarlet", "repo_path": "scarlet_extracted/scarlet-master/tests/test_bbox.py", "type": "Python" }
import numpy as np import scarlet class TestBox(object): def test_from_data(self): x = np.arange(25).reshape(5, 5) x[0] = 0 x[:, -2:] = 0 bbox = scarlet.Box.from_data(x) assert bbox == scarlet.Box((4, 3), origin=(1, 0)) x += 10 bbox = scarlet.Box.from_data(...
pmelchiorREPO_NAMEscarletPATH_START.@scarlet_extracted@scarlet-master@tests@test_bbox.py@.PATH_END.py
{ "filename": "SYGMA_SSP_CNO_yield_input.ipynb", "repo_name": "NuGrid/NuPyCEE", "repo_path": "NuPyCEE_extracted/NuPyCEE-master/regression_tests/temp/SYGMA_SSP_CNO_yield_input.ipynb", "type": "Jupyter Notebook" }
# Regression test suite: Test of basic SSP GCE features Test of SSP with artificial yields of C,N,O + Ni provided in tables. C12 only in low-masss stars (up to 3Msun). N14 only in intermediate mass stars (up to 7Msun). O16 only in massive stars. N-58 only in SNIa. Each star produces only 0.1Msun of yields. Focus are...
NuGridREPO_NAMENuPyCEEPATH_START.@NuPyCEE_extracted@NuPyCEE-master@regression_tests@temp@SYGMA_SSP_CNO_yield_input.ipynb@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/CONTRIBUTING.md", "type": "Markdown" }
# Contributing to ArviZ This document outlines only the most common contributions. Please see the [Contributing guide](https://python.arviz.org/en/latest/contributing/index.html) on our documentation for a better view of how can you contribute to ArviZ. We welcome a wide range of contributions, not only code! ## Repor...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@CONTRIBUTING.md@.PATH_END.py
{ "filename": "result.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/nannyml/performance_calculation/result.py", "type": "Python" }
# Author: Niels Nuyttens <niels@nannyml.com> # # License: Apache Software License 2.0 """Contains the results of the realized performance calculation and provides filtering and plotting functionality.""" from __future__ import annotations import copy from typing import Dict, List, Optional, Union, cast import p...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@performance_calculation@result.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/arithmetic/common.py", "type": "Python" }
""" Assertion helpers for arithmetic tests. """ import numpy as np import pytest from pandas import ( DataFrame, Index, Series, array, ) import pandas._testing as tm from pandas.core.arrays import ( BooleanArray, NumpyExtensionArray, ) def assert_cannot_add(left, right, msg="cannot add"): ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@arithmetic@common.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "SKA-INAF/caesar-rest", "repo_path": "caesar-rest_extracted/caesar-rest-master/README.md", "type": "Markdown" }
<p align="left"> <img src="share/CAESAR-REST_Architecture.png" alt="Software architecture"/ width="500" height="500"> </p> # caesar-rest caesar-rest is a REST-ful web service for astronomical source extraction and classification with the caesar source extractor [https://github.com/SKA-INAF/caesar]. The software is d...
SKA-INAFREPO_NAMEcaesar-restPATH_START.@caesar-rest_extracted@caesar-rest-master@README.md@.PATH_END.py
{ "filename": "test_mock_helpers.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/empirical_models/factories/tests/test_mock_helpers.py", "type": "Python" }
""" """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import pytest from astropy.table import Table from ..mock_helpers import infer_mask_from_kwargs from ....custom_exceptions import HalotoolsError __all__ = ('test_infer_mask_from_kwargs_consistency', ) def ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@empirical_models@factories@tests@test_mock_helpers.py@.PATH_END.py
{ "filename": "index.md", "repo_name": "youngjookim/sdr", "repo_path": "sdr_extracted/sdr-master/SITE/content/experiments/2/index.md", "type": "Markdown" }
+++ image = "2.png" date = "2021-01-02" title = "Effect of different hyperparameters using non-Gaussian synthetic data - Lognormal" type = "gallery" +++ Effects of different parameters using 2D non-Gaussian (log-normal, &mu;=0, and &sigma;=1) data with 10K observations. Note that the effects of the parameters are simi...
youngjookimREPO_NAMEsdrPATH_START.@sdr_extracted@sdr-master@SITE@content@experiments@2@index.md@.PATH_END.py
{ "filename": "_cmid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/_cmid.py", "type": "Python" }
import _plotly_utils.basevalidators class CmidValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterpolargl.marker", **kwargs ): super(CmidValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@_cmid.py@.PATH_END.py
{ "filename": "make-contour-plots.ipynb", "repo_name": "marnixlooijmans/shrinkage-estimation-paper", "repo_path": "shrinkage-estimation-paper_extracted/shrinkage-estimation-paper-main/notebooks/make-contour-plots.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import pocomc as pc import os from getdist import plots, MCSamples import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection %matplotlib inline ``` ```python names = ["b", "f"] labels = ["b", "f"] ref_chain = np.load("../output/BOSS_DR12_NGC_z1/samples/n2048/cov_...
marnixlooijmansREPO_NAMEshrinkage-estimation-paperPATH_START.@shrinkage-estimation-paper_extracted@shrinkage-estimation-paper-main@notebooks@make-contour-plots.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/monotonic/py2/README.md", "type": "Markdown" }
monotonic ========= NOTE: **This library is considered stable and complete, and will not receive any further updates. Python versions 3.3 and newer include [``time.monotonic()``][0] in the standard library.** This module provides a ``monotonic()`` function which returns the value (in fractional seconds) of a clock wh...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@monotonic@py2@README.md@.PATH_END.py
{ "filename": "testMSOffice.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/com/win32com/test/testMSOffice.py", "type": "Python" }
# Test MSOffice # # Main purpose of test is to ensure that Dynamic COM objects # work as expected. # Assumes Word and Excel installed on your machine. import traceback import pythoncom import win32api import win32com import win32com.client.dynamic from win32com.client import gencache from win32com.test.util import C...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@com@win32com@test@testMSOffice.py@.PATH_END.py
{ "filename": "EXOTIC-Installation-Instructions-for-Mac-Users.md", "repo_name": "rzellem/EXOTIC", "repo_path": "EXOTIC_extracted/EXOTIC-main/docs/regions/English/EXOTIC-Installation-Instructions-for-Mac-Users.md", "type": "Markdown" }
EXOTIC Installation Instructions for Mac Users There are two ways you can run EXOTIC, either with a Python Notebook in Jupyter or the Google Collab or on your own personal machine using the command line. Please review the details of the two processes below and select the best option for you. Google Collab...
rzellemREPO_NAMEEXOTICPATH_START.@EXOTIC_extracted@EXOTIC-main@docs@regions@English@EXOTIC-Installation-Instructions-for-Mac-Users.md@.PATH_END.py
{ "filename": "fitting.py", "repo_name": "cmccully/lcogtgemini", "repo_path": "lcogtgemini_extracted/lcogtgemini-master/lcogtgemini/fitting.py", "type": "Python" }
import numpy as np from scipy import optimize from statsmodels import robust from lcogtgemini.utils import mad from matplotlib import pyplot def ncor(x, y): """Calculate the normalized correlation of two arrays""" d = np.correlate(x, x) * np.correlate(y, y) return np.correlate(x, y) / d ** 0.5 def xcor...
cmccullyREPO_NAMElcogtgeminiPATH_START.@lcogtgemini_extracted@lcogtgemini-master@lcogtgemini@fitting.py@.PATH_END.py
{ "filename": "networktest.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/tests/networktest.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function import random, os, sys, numpy, time from spt3g import core port = random.randint(10000, 60000) frames = [] for i in range(0, 20): f = core.G3Frame() f['Sequence'] = i f['Data'] = core.G3Timestream(numpy.zeros(100000)) frames.append(f) print('Port: ', po...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@tests@networktest.py@.PATH_END.py
{ "filename": "notebook_setup.py", "repo_name": "rodluger/starry", "repo_path": "starry_extracted/starry-master/notebooks/notebook_setup.py", "type": "Python" }
# Pretty figures get_ipython().magic('config InlineBackend.figure_format = "retina"') import matplotlib import matplotlib.pyplot as plt import warnings # Disable annoying font warnings matplotlib.font_manager._log.setLevel(50) # Disable theano deprecation warnings warnings.filterwarnings("ignore", category=Deprec...
rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@notebooks@notebook_setup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dnarayanan/powderday", "repo_path": "powderday_extracted/powderday-master/powderday/front_ends/__init__.py", "type": "Python" }
from . import enzo2pd from . import front_end_controller from . import gadget2pd from . import tipsy2pd from . import arepo2pd
dnarayananREPO_NAMEpowderdayPATH_START.@powderday_extracted@powderday-master@powderday@front_ends@__init__.py@.PATH_END.py
{ "filename": "train.py", "repo_name": "xwzhang98/SREmulator", "repo_path": "SREmulator_extracted/SREmulator-main/map2map/map2map/train.py", "type": "Python" }
import os import socket import time import sys from pprint import pprint import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.distributed as dist from torch.multiprocessing import spawn from torch.nn.parallel import DistributedDataParallel from t...
xwzhang98REPO_NAMESREmulatorPATH_START.@SREmulator_extracted@SREmulator-main@map2map@map2map@train.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "gomesdasilva/ACTIN", "repo_path": "ACTIN_extracted/ACTIN-master/README.md", "type": "Markdown" }
# ACTIN 1.3.9 *This version is no longer being maintained - please use [ACTIN2](https://github.com/gomesdasilva/ACTIN2) instead.* ### Activity Indices Calculator [![DOI](http://joss.theoj.org/papers/10.21105/joss.00667/status.svg)](https://doi.org/10.21105/joss.00667) [![DOI](https://zenodo.org/badge/DOI/10.5281/ze...
gomesdasilvaREPO_NAMEACTINPATH_START.@ACTIN_extracted@ACTIN-master@README.md@.PATH_END.py
{ "filename": "test_cosmo_docs_basic.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/tests/test_cosmo_docs_basic.py", "type": "Python" }
""" Testing and automatic generation of basic cosmological examples in the docs. """ import os import sys from cobaya.yaml import yaml_dump, yaml_load from cobaya.input import is_equal_info from cobaya.cosmo_input import create_input from cobaya.tools import sort_cosmetic from .test_docs_example_quickstart import doc...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@tests@test_cosmo_docs_basic.py@.PATH_END.py
{ "filename": "response.py", "repo_name": "splus-collab/splus_filters", "repo_path": "splus_filters_extracted/splus_filters-master/archive/response_curves/response_curves_2017/response.py", "type": "Python" }
# Herpich F.R. 12/08/16 from astropy.io import fits import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import InterpolatedUnivariateSpline as IUS from scipy.interpolate import interp1d import os filters = ['20140604C080F062502.fits', '20140606C080F051502.fits', '20140609C080F066002.f...
splus-collabREPO_NAMEsplus_filtersPATH_START.@splus_filters_extracted@splus_filters-master@archive@response_curves@response_curves_2017@response.py@.PATH_END.py
{ "filename": "surface_plot.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/doc/source/cookbook/surface_plot.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D # noqa: F401 from mpl_toolkits.mplot3d.art3d import Poly3DCollection import yt # Load the dataset ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030") # Create a sphere object centered on the highest density point in the simu...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@surface_plot.py@.PATH_END.py
{ "filename": "schedules.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/deployments/schedules.py", "type": "Python" }
from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Union from prefect.client.schemas.actions import DeploymentScheduleCreate from prefect.client.schemas.schedules import is_schedule_type if TYPE_CHECKING: from prefect.client.schemas.schedules import SCHEDULE_TYPES FlexibleScheduleList = Sequence[ ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@deployments@schedules.py@.PATH_END.py
{ "filename": "hdf5.py", "repo_name": "franciscovillaescusa/Pylians", "repo_path": "Pylians_extracted/Pylians-master/Examples/hdf5.py", "type": "Python" }
import numpy as np import h5py z = 3.0 a = np.arange(10) # write a hdf5 file f = h5py.File('my_file_z=%.3f.hdf5'%z, 'w') f.create_dataset('Mass', data=a) f.close() # read hdf5 file f = h5py.File('M_HI_new_75_1820_z=%.3f.hdf5'%z, 'r') M_HI = f['M_HI'][:] M = f['Mass'][:] R = f['R'][:] f.close()
franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@Examples@hdf5.py@.PATH_END.py
{ "filename": "example_XOR_classification.py", "repo_name": "ahmedfgad/GeneticAlgorithmPython", "repo_path": "GeneticAlgorithmPython_extracted/GeneticAlgorithmPython-master/examples/nn/example_XOR_classification.py", "type": "Python" }
import numpy import pygad.nn """ This project creates a neural network where the architecture has input and dense layers only. More layers will be added in the future. The project only implements the forward pass of a neural network and no training algorithm is used. For training a neural network using the genetic al...
ahmedfgadREPO_NAMEGeneticAlgorithmPythonPATH_START.@GeneticAlgorithmPython_extracted@GeneticAlgorithmPython-master@examples@nn@example_XOR_classification.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scattergeo.marker", **kwargs): super(CmaxValidator, 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@scattergeo@marker@_cmax.py@.PATH_END.py
{ "filename": "test_sen2nbar.py", "repo_name": "ESDS-Leipzig/sen2nbar", "repo_path": "sen2nbar_extracted/sen2nbar-main/tests/test_sen2nbar.py", "type": "Python" }
import unittest import cubo import planetary_computer as pc import pystac_client import stackstac import xarray as xr from sen2nbar.nbar import nbar_cubo, nbar_stackstac class Test(unittest.TestCase): """Tests for the sen2nbar package.""" def test_stackstac(self): """Test the nbar_stackstac with Pl...
ESDS-LeipzigREPO_NAMEsen2nbarPATH_START.@sen2nbar_extracted@sen2nbar-main@tests@test_sen2nbar.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.title.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@title@font@_size.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/decreasing/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._line import LineValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._line.LineValidator"] )
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@decreasing@__init__.py@.PATH_END.py
{ "filename": "kmpfit_varreduct_wol.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/kmpfit_varreduct_wol.py", "type": "Python" }
#!/usr/bin/env python # Demonstrate use of variance reduction to examine a model. # Use data example from Bevington & Robinson with 1 outlier from numpy.random import normal import numpy from kapteyn import kmpfit from matplotlib.pyplot import figure, show, rc def model_lin(p, x): a, b = p y = a + b*x return...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@kmpfit_varreduct_wol.py@.PATH_END.py
{ "filename": "rotating_convection.py", "repo_name": "DedalusProject/dedalus", "repo_path": "dedalus_extracted/dedalus-master/examples/evp_shell_rotating_convection/rotating_convection.py", "type": "Python" }
""" Dedalus script solving the linear stability eigenvalue problem for rotating Rayleigh-Benard convection in a shell. This script demonstrates solving an eigenvalue problem with non-constant coefficients that depend on both radius and colatitude. It should take about a minute to run (serial only). The aspect ratio of...
DedalusProjectREPO_NAMEdedalusPATH_START.@dedalus_extracted@dedalus-master@examples@evp_shell_rotating_convection@rotating_convection.py@.PATH_END.py
{ "filename": "test_dask_datasets.py", "repo_name": "rapidsai/cuml", "repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/tests/dask/test_dask_datasets.py", "type": "Python" }
# # Copyright (c) 2020-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@tests@dask@test_dask_datasets.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "transientskp/lpf", "repo_path": "lpf_extracted/lpf-main/lpf/surveys/__init__.py", "type": "Python" }
from .survey import Survey
transientskpREPO_NAMElpfPATH_START.@lpf_extracted@lpf-main@lpf@surveys@__init__.py@.PATH_END.py
{ "filename": "qtransform.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/signal/qtransform.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2016-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@signal@qtransform.py@.PATH_END.py
{ "filename": "snid.py", "repo_name": "MickaelRigault/pysnid", "repo_path": "pysnid_extracted/pysnid-main/pysnid/snid.py", "type": "Python" }
""" Module to handle SNID fit. """ import os import shutil import numpy as np import pandas import warnings def run_snid(filename, phase=None, redshift=None, delta_phase=5, delta_redshift=None, redshift_bounds=[0, None], lbda_range=[4000,8000], set_it=True, verb...
MickaelRigaultREPO_NAMEpysnidPATH_START.@pysnid_extracted@pysnid-main@pysnid@snid.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jkrogager/VoigtFit", "repo_path": "VoigtFit_extracted/VoigtFit-master/VoigtFit/utils/__init__.py", "type": "Python" }
jkrogagerREPO_NAMEVoigtFitPATH_START.@VoigtFit_extracted@VoigtFit-master@VoigtFit@utils@__init__.py@.PATH_END.py
{ "filename": "cphotang.py", "repo_name": "NuSpaceSim/nuSpaceSim", "repo_path": "nuSpaceSim_extracted/nuSpaceSim-main/src/nuspacesim/simulation/eas_optical/cphotang.py", "type": "Python" }
# The Clear BSD License # # Copyright (c) 2021 Alexander Reustle and the NuSpaceSim Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted (subject to the limitations in the disclaimer # below) provided that the following conditions are met: # # ...
NuSpaceSimREPO_NAMEnuSpaceSimPATH_START.@nuSpaceSim_extracted@nuSpaceSim-main@src@nuspacesim@simulation@eas_optical@cphotang.py@.PATH_END.py
{ "filename": "test_linearity.py", "repo_name": "lsst/cp_pipe", "repo_path": "cp_pipe_extracted/cp_pipe-main/tests/test_linearity.py", "type": "Python" }
#!/usr/bin/env python # # LSST Data Management System # # Copyright 2008-2017 AURA/LSST. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
lsstREPO_NAMEcp_pipePATH_START.@cp_pipe_extracted@cp_pipe-main@tests@test_linearity.py@.PATH_END.py
{ "filename": "copy_injection_recovery.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_TF2/injection_85/copy_injection_recovery.py", "type": "Python" }
import os os.environ['CUDA_VISIBLE_DEVICES'] = "2" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.1" import numpy as np import argparse # The following is needed on CIT cluster to avoid an obscure Python error import psutil p = psutil.Process() p.cpu_affinity([0]) # Regular imports import argparse import copy impor...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_TF2@injection_85@copy_injection_recovery.py@.PATH_END.py
{ "filename": "xray_emission_fields.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/fields/xray_emission_fields.py", "type": "Python" }
import os import numpy as np from yt.config import ytcfg from yt.fields.derived_field import DerivedField from yt.funcs import mylog, only_on_root, parse_h5_attr from yt.units.yt_array import YTArray, YTQuantity from yt.utilities.cosmology import Cosmology from yt.utilities.exceptions import YTException, YTFieldNotFo...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@fields@xray_emission_fields.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "migueldvb/cine", "repo_path": "cine_extracted/cine-master/paper/paper.md", "type": "Markdown" }
--- title: 'Cine: Line excitation by infrared fluorescence in cometary atmospheres' tags: - Python - Fluorescence - Comets - Planetary Atmospheres authors: - name: Miguel de Val-Borro orcid: 0000-0002-0455-9384 affiliation: 1,2 - name: Martin A. Cordiner orcid: 0000-0001-8233-2436 affiliatio...
migueldvbREPO_NAMEcinePATH_START.@cine_extracted@cine-master@paper@paper.md@.PATH_END.py
{ "filename": "_pie.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/data/_pie.py", "type": "Python" }
import _plotly_utils.basevalidators class PieValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="pie", parent_name="layout.template.data", **kwargs): super(PieValidator, 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@layout@template@data@_pie.py@.PATH_END.py
{ "filename": "cpp.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/extern/ply/cpp.py", "type": "Python" }
# ----------------------------------------------------------------------------- # cpp.py # # Author: David Beazley (http://www.dabeaz.com) # Copyright (C) 2007 # All rights reserved # # This module implements an ANSI-C style lexical preprocessor for PLY. # --------------------------------------------------------------...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@extern@ply@cpp.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "saopicc/killMS", "repo_path": "killMS_extracted/killMS-master/killMS/Predict/__init__.py", "type": "Python" }
#!/usr/bin/env python """ killMS, a package for calibration in radio interferometry. Copyright (C) 2013-2017 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
saopiccREPO_NAMEkillMSPATH_START.@killMS_extracted@killMS-master@killMS@Predict@__init__.py@.PATH_END.py
{ "filename": "test_PointLens.py", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/source/MulensModel/tests/test_PointLens.py", "type": "Python" }
import unittest import numpy as np import os import MulensModel as mm import fortran_files from test_FitData import create_0939_parallax_model, SAMPLE_FILE_03, SAMPLE_FILE_03_EPH SAMPLE_FILE = os.path.join(mm.DATA_PATH, 'unit_test_files', 'FSPL_test_1.dat') PSPL_SAMPLE_DIR = os.path.join(mm.DATA_PATH, 'unit_test_fil...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@source@MulensModel@tests@test_PointLens.py@.PATH_END.py
{ "filename": "multiproc.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/util/multiproc.py", "type": "Python" }
# This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import multiprocessing class FakeAsyncResult(object): def __init__(self, X): self.X = X def wait(self, *a): pass def get(self, *a): ret...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@util@multiproc.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "sfarrens/sf_deconvolve", "repo_path": "sf_deconvolve_extracted/sf_deconvolve-master/README.md", "type": "Markdown" }
<a href="https://ascl.net/2212.010"><img src="https://img.shields.io/badge/ascl-2212.010-blue.svg?colorB=262255" alt="ascl:2212.010" /></a> SF_DECONVOLVE ============= > Author: **Samuel Farrens** > Year: **2018** > Version: **5.0** > Email: [samuel.farrens@gmail.com](mailto:samuel.farrens@gmail.com) > Websit...
sfarrensREPO_NAMEsf_deconvolvePATH_START.@sf_deconvolve_extracted@sf_deconvolve-master@README.md@.PATH_END.py
{ "filename": "test_field.py", "repo_name": "LSSTDESC/NaMaster", "repo_path": "NaMaster_extracted/NaMaster-master/pymaster/tests/test_field.py", "type": "Python" }
import pytest import numpy as np import pymaster as nmt import healpy as hp import warnings import sys from .utils import normdiff class FieldTester(object): def __init__(self): # This is to avoid showing an ugly warning that # has nothing to do with pymaster if (sys.version_info > (3, 1))...
LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@pymaster@tests@test_field.py@.PATH_END.py
{ "filename": "mnist_test.py", "repo_name": "afarahi/tatter", "repo_path": "tatter_extracted/tatter-master/tatter/tests/mnist_test.py", "type": "Python" }
def mnist_digits_distance(): import numpy as np from sklearn import datasets import matplotlib.pyplot as plt from tatter import two_sample_test from sklearn.metrics import pairwise_distances import os plot_path = './tatter/tests/plots/' if not os.path.exists(plot_path): os.mak...
afarahiREPO_NAMEtatterPATH_START.@tatter_extracted@tatter-master@tatter@tests@mnist_test.py@.PATH_END.py
{ "filename": "_z.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/caps/_z.py", "type": "Python" }
import _plotly_utils.basevalidators class ZValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="z", parent_name="isosurface.caps", **kwargs): super(ZValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@caps@_z.py@.PATH_END.py
{ "filename": "errors.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/samp/errors.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Defines custom errors and exceptions used in `astropy.samp`. """ import xmlrpc.client as xmlrpc from astropy.utils.exceptions import AstropyUserWarning __all__ = ["SAMPClientError", "SAMPHubError", "SAMPProxyError", "SAMPWarning"] class SAMPWarnin...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@samp@errors.py@.PATH_END.py
{ "filename": "FontFile.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py2/PIL/FontFile.py", "type": "Python" }
# # The Python Imaging Library # $Id$ # # base class for raster font file parsers # # history: # 1997-06-05 fl created # 1997-08-19 fl restrict image width # # Copyright (c) 1997-1998 by Secret Labs AB # Copyright (c) 1997-1998 by Fredrik Lundh # # See the README file for information on usage and redistribution. # ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py2@PIL@FontFile.py@.PATH_END.py
{ "filename": "_showline.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/_showline.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showline", parent_name="layout.xaxis", **kwargs): super(ShowlineValidator, 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@layout@xaxis@_showline.py@.PATH_END.py
{ "filename": "_angleref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/_angleref.py", "type": "Python" }
import _plotly_utils.basevalidators class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scatterpolar.marker", **kwargs ): super(AnglerefValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@_angleref.py@.PATH_END.py
{ "filename": "arima211_css_results.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/tests/results/arima211_css_results.py", "type": "Python" }
import numpy as np from statsmodels.tools.tools import Bunch llf = np.array([-240.29558272688]) nobs = np.array([202]) k = np.array([5]) k_exog = np.array([1]) sigma = np.array([.79494581155191]) chi2 = np.array([1213.6019521322]) df_model = np.array([3]) k_ar = np.array([2]) k_ma = np.array([1]) params = np...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@tests@results@arima211_css_results.py@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "handley-lab/lsbi", "repo_path": "lsbi_extracted/lsbi-master/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Create a report to help us improve labels: --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behaviour. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable...
handley-labREPO_NAMElsbiPATH_START.@lsbi_extracted@lsbi-master@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "e-merlin/eMERLIN_CASA_pipeline", "repo_path": "eMERLIN_CASA_pipeline_extracted/eMERLIN_CASA_pipeline-master/README.md", "type": "Markdown" }
1. [ Description ](#description) 1. [ Dependencies ](#dependencies) 1. [ Download ](#download) 1. [ Quick start ](#quickstart) 1. [ Usage ](#usage) 1. [ Additional information ](#information) 1. [ FAQ ](#faq) <a name="description"></a> ## Description ## The e-MERLIN CASA Pipeline (eMCP) is a python pipeline working...
e-merlinREPO_NAMEeMERLIN_CASA_pipelinePATH_START.@eMERLIN_CASA_pipeline_extracted@eMERLIN_CASA_pipeline-master@README.md@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="image.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "USAGE.md", "repo_name": "christophmschaefer/miluphcuda", "repo_path": "miluphcuda_extracted/miluphcuda-main/test_cases/gravity_merging/USAGE.md", "type": "Markdown" }
Gravity merging test case for miluphcuda ---------------------------------------- Christoph Burger christoph.burger@uni-tuebingen.de last updated: 15/Nov/2021 ----------------------------------------- This is a test case of "gently" merging spheres, in a mass range at the transition of the strength and gravity re...
christophmschaeferREPO_NAMEmiluphcudaPATH_START.@miluphcuda_extracted@miluphcuda-main@test_cases@gravity_merging@USAGE.md@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="surface.colorbar", **kwargs): super(Tick0Validator, 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@surface@colorbar@_tick0.py@.PATH_END.py
{ "filename": "test_multi_wavelength_greedy.py", "repo_name": "rodluger/starry", "repo_path": "starry_extracted/starry-master/tests/greedy/test_multi_wavelength_greedy.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Test multi-wavelength maps. """ import starry import pytest import itertools import numpy as np # Params combinations ydeg = [2] udeg = [0] nw = [5] rv = [False, True] reflected = [False, True] params = list(itertools.product(ydeg, udeg, nw, rv, reflected)) # Reflected light + radial vel...
rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@tests@greedy@test_multi_wavelength_greedy.py@.PATH_END.py
{ "filename": "controls.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/layout/controls.py", "type": "Python" }
""" User interface Controls for the layout. """ from __future__ import annotations import time from abc import ABCMeta, abstractmethod from typing import TYPE_CHECKING, Callable, Hashable, Iterable, NamedTuple from prompt_toolkit.application.current import get_app from prompt_toolkit.buffer import Buffer from prompt...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@layout@controls.py@.PATH_END.py
{ "filename": "load_model.py", "repo_name": "vtardugno/TESS-CNN", "repo_path": "TESS-CNN_extracted/TESS-CNN-main/load_model.py", "type": "Python" }
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch.nn.functional as F import os import torch import torch.nn as nn import time import pandas as pd from sklearn import manifold, datasets from sklearn.metrics import precision_recall_fscore_support, roc_curve, con...
vtardugnoREPO_NAMETESS-CNNPATH_START.@TESS-CNN_extracted@TESS-CNN-main@load_model.py@.PATH_END.py
{ "filename": "plot_line_survey.py", "repo_name": "radis/radis", "repo_path": "radis_extracted/radis-master/examples/0_Database_handling/plot_line_survey.py", "type": "Python" }
# -*- coding: utf-8 -*- """ =========== Line Survey =========== Plot details of every single line in a spectrum. Uses the :py:meth:`~radis.spectrum.spectrum.Spectrum.line_survey` function. """ from radis import calc_spectrum s = calc_spectrum( wavenum_min=2380, wavenum_max=2400, mole_fraction=400e-6, ...
radisREPO_NAMEradisPATH_START.@radis_extracted@radis-master@examples@0_Database_handling@plot_line_survey.py@.PATH_END.py
{ "filename": "sklearn.py", "repo_name": "hyperopt/hyperopt", "repo_path": "hyperopt_extracted/hyperopt-master/hyperopt/sklearn.py", "type": "Python" }
"""Scikit-learn integration. This class is based on :class:`sklearn.model_selection._search.BaseSearchCV` and inspired by :class:sklearn.model_selection._search_successive_halving.BaseSuccessiveHalving`. """ import numpy as np from sklearn.model_selection._search import is_classifier from sklearn.model_selection._sea...
hyperoptREPO_NAMEhyperoptPATH_START.@hyperopt_extracted@hyperopt-master@hyperopt@sklearn.py@.PATH_END.py
{ "filename": "tf_tag_sigdef_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_tf_tag_sigdef/tf_tag_sigdef_test.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2021-2023, NVIDIA CORPORATION & AFFILIATES. 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 source code must retain the above copyright ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_tf_tag_sigdef@tf_tag_sigdef_test.py@.PATH_END.py
{ "filename": "tfsa-2022-102.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-102.md", "type": "Markdown" }
## TFSA-2022-102: Segfault in `QuantizedInstanceNorm` ### CVE Number CVE-2022-35970 ### Impact If `QuantizedInstanceNorm` is given `x_min` or `x_max` tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack. ```python import tensorflow as tf output_range_given = Fals...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-102.md@.PATH_END.py
{ "filename": "core.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/time/core.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.time package provides functionality for manipulating times and dates. Specific emphasis is placed on supporting time scales (e.g. UTC, TAI, UT1) and time representations (e.g. JD, MJD, ISO 8601) that are used in astronomy. """ from __futur...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@time@core.py@.PATH_END.py
{ "filename": "medstddev.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/src/eureka/lib/medstddev.py", "type": "Python" }
import numpy as np def medstddev(data, mask=None, medi=False, axis=0): """Compute the stddev with respect to the median. This is rather than the standard method of using the mean. Parameters ---------- data : ndarray An array from which to caculate the median standard deviation. mask...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@lib@medstddev.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatterternary/marker/colorbar/_title.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterternary.marker.colorbar" _path_str = "scatterternary.marker.colorbar.title" _valid_pro...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterternary@marker@colorbar@_title.py@.PATH_END.py
{ "filename": "yamlModelBuilder.py", "repo_name": "xgds/xgds_core", "repo_path": "xgds_core_extracted/xgds_core-master/xgds_core/importer/yamlModelBuilder.py", "type": "Python" }
#! /usr/bin/env python # __BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this fi...
xgdsREPO_NAMExgds_corePATH_START.@xgds_core_extracted@xgds_core-master@xgds_core@importer@yamlModelBuilder.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pointcloud/stream/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._token import TokenValidator from ._maxpoints import MaxpointsValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValid...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pointcloud@stream@__init__.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/gauge/axis/tickfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): super(VariantValidator, self).__init__( plotly_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@gauge@axis@tickfont@_variant.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/labelfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.labelfont", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@labelfont@_variant.py@.PATH_END.py
{ "filename": "almaqa2isg.py", "repo_name": "lucatelli/morphen", "repo_path": "morphen_extracted/morphen-main/analysis_scripts/almaqa2isg.py", "type": "Python" }
# ALMA Quality Assurance Software # QA2 Imaging Script Generator # D. Petry (ESO) # A. Borkar (EU ARC Node, Czech Republic) # G. Bendo (EU ARC Node, UK) # $Id: almaqa2isg.py,v 1.24 2021/10/27 09:52:59 dpetry Exp $ # """ The ALMA QA2 Imaging Script Generator """ from __future__ import print_function import os import s...
lucatelliREPO_NAMEmorphenPATH_START.@morphen_extracted@morphen-main@analysis_scripts@almaqa2isg.py@.PATH_END.py
{ "filename": "axislines.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/mpl_toolkits/axisartist/axislines.py", "type": "Python" }
""" Axislines includes modified implementation of the Axes class. The biggest difference is that the artists responsible for drawing the axis spine, ticks, ticklabels and axis labels are separated out from mpl's Axis class. Originally, this change was motivated to support curvilinear grid. Here are a few reasons that I...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@mpl_toolkits@axisartist@axislines.py@.PATH_END.py
{ "filename": "codediff_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs_nnx/_ext/codediff_test.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs_nnx@_ext@codediff_test.py@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="bar", **kwargs): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@_hovertemplate.py@.PATH_END.py
{ "filename": "pastecat_runner.py", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/shapepipe/modules/pastecat_runner.py", "type": "Python" }
"""PASTECAT RUNNER. Module runner for ``pastecat``. :Author: Martin Kilbinger <martin.kilbinger@cea.fr>, Axel Guinot """ from shapepipe.modules.module_decorator import module_runner from shapepipe.modules.pastecat_package.pastecat import PasteCat @module_runner( version='1.1', input_module='sextractor_run...
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@shapepipe@modules@pastecat_runner.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/sankey/hoverlabel/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "sankey.hoverlabel" _path_str = "sankey.hoverlabel.font" _valid_props = {"color", "colorsrc", "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@sankey@hoverlabel@_font.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/indicator/gauge/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="indicator.gauge", **kwargs): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@indicator@gauge@_bgcolor.py@.PATH_END.py
{ "filename": "exampleHRO.py", "repo_name": "solerjuan/magnetar", "repo_path": "magnetar_extracted/magnetar-master/examples/exampleHRO.py", "type": "Python" }
# Example of the histogram of orientated gradients (HRO) method # applied to the column density and magnetic field orientation observations toward the Taurus molecular cloud # See Planck Collaboration XXXV. A&A, 586 (2016) A138 # # This file is part of Magnetar # # Copyright (C) 2013-2023 Juan Diego Soler import sys i...
solerjuanREPO_NAMEmagnetarPATH_START.@magnetar_extracted@magnetar-master@examples@exampleHRO.py@.PATH_END.py
{ "filename": "google_palm.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/llms/google_palm.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.llms import GooglePalm # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED_LOO...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@llms@google_palm.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/hoverlabel/_font.py", "type": "Python" }
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.hoverlabel", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@hoverlabel@_font.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "exobssim/rapoc-public", "repo_path": "rapoc-public_extracted/rapoc-public-master/rapoc/models/utils/__init__.py", "type": "Python" }
exobssimREPO_NAMErapoc-publicPATH_START.@rapoc-public_extracted@rapoc-public-master@rapoc@models@utils@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "steven-murray/mrpy", "repo_path": "mrpy_extracted/mrpy-master/mrpy/__init__.py", "type": "Python" }
__version__ = "1.1.0" from mrpy.base.stats import TGGD from mrpy.base.core import MRP, dndm from mrpy.extra.physical_dependence import mrp_b13
steven-murrayREPO_NAMEmrpyPATH_START.@mrpy_extracted@mrpy-master@mrpy@__init__.py@.PATH_END.py
{ "filename": "1_create_config_file.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/examples/cr_efficiency_analysis/1_create_config_file.py", "type": "Python" }
import numpy as np import helper_cr_eff as hcr import json import os from NuRadioReco.utilities import units import argparse parser = argparse.ArgumentParser() parser.add_argument('--output_path', type=str, nargs='?', default=os.path.dirname(__file__), help='Path to save output, most likely the pat...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@examples@cr_efficiency_analysis@1_create_config_file.py@.PATH_END.py
{ "filename": "test_scalar_ctors.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_scalar_ctors.py", "type": "Python" }
""" Test the scalar constructors, which also do type-coercion """ import pytest import numpy as np from numpy.testing import ( assert_equal, assert_almost_equal, assert_warns, ) class TestFromString: def test_floating(self): # Ticket #640, floats from string fsingle = np.single('1.234') ...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_scalar_ctors.py@.PATH_END.py
{ "filename": "04_metrics.ipynb", "repo_name": "vortex-exoplanet/VIP", "repo_path": "VIP_extracted/VIP-master/docs/source/tutorials/04_metrics.ipynb", "type": "Jupyter Notebook" }
# 4. Metrics > Authors: *Valentin Christiaens* and *Carlos Alberto Gomez Gonzalez* > Suitable for VIP *v1.0.0* onwards > Last update: *06/06/2024* **Table of contents** * [4.1. Loading ADI data](#4.1.-Loading-ADI-data) * [4.2. Signal-to-noise ratio and significance](#4.2.-Signal-to-noise-ratio-and-significance) ...
vortex-exoplanetREPO_NAMEVIPPATH_START.@VIP_extracted@VIP-master@docs@source@tutorials@04_metrics.ipynb@.PATH_END.py
{ "filename": "data.md", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/docs/source/api/data.md", "type": "Markdown" }
# Data ```{eval-rst} .. currentmodule:: plonk ``` SPH snapshot files are represented by the {class}`Snap` class. This object contains a properties dictionary, particle arrays, which are lazily loaded from file, sink arrays, and additional metadata. There are methods for accessing arrays, sub-sets of particles, plotti...
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@docs@source@api@data.md@.PATH_END.py
{ "filename": "data_structures.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/frontends/eagle/data_structures.py", "type": "Python" }
import numpy as np import yt.units from yt.fields.field_info_container import FieldInfoContainer from yt.frontends.gadget.data_structures import GadgetHDF5Dataset from yt.frontends.owls.fields import OWLSFieldInfo from yt.utilities.on_demand_imports import _h5py as h5py from .fields import EagleNetworkFieldInfo cla...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@eagle@data_structures.py@.PATH_END.py
{ "filename": "micro_benchmarks.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/numpy_ops/integration_test/benchmarks/micro_benchmarks.py", "type": "Python" }
# Copyright 2020 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@ops@numpy_ops@integration_test@benchmarks@micro_benchmarks.py@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "fritz-marshal/fritz", "repo_path": "fritz_extracted/fritz-main/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: '' --- Please fill out relevant sections below; remove those that are unused. **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. C...
fritz-marshalREPO_NAMEfritzPATH_START.@fritz_extracted@fritz-main@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rometsch/fargocpt", "repo_path": "fargocpt_extracted/fargocpt-master/python_module/fargocpt/__init__.py", "type": "Python" }
from .run import run try: from .data import Loader except ImportError: pass try: from .overview import Overview except ImportError: pass
rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@python_module@fargocpt@__init__.py@.PATH_END.py
{ "filename": "test_simulations_gs_fcoll.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/tests/test_simulations_gs_fcoll.py", "type": "Python" }
""" test_gs_backcompat.py Author: Jordan Mirocha Affiliation: UCLA Created on: Wed Apr 4 09:37:25 PDT 2018 Description: Make sure changes in input parameters result in changes in the signal! Also a test of backward compatibility. """ import ares import numpy as np def test(): oldp = ['fstar', 'fX', 'Tmin',...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@test_simulations_gs_fcoll.py@.PATH_END.py
{ "filename": "test_util.py", "repo_name": "casacore/python-casacore", "repo_path": "python-casacore_extracted/python-casacore-master/tests/test_util.py", "type": "Python" }
import unittest from pyrap.util import substitute def f1(arg): a = 3 s = substitute('subs as $a $arg', locals=locals()) print(a, arg, s) class TestUtil(unittest.TestCase): def test_util(self): a = 1 b = 2 p = "$((a+b)*(a+b))" s = substitute(p, locals=locals()) ...
casacoreREPO_NAMEpython-casacorePATH_START.@python-casacore_extracted@python-casacore-master@tests@test_util.py@.PATH_END.py