metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "README.md", "repo_name": "lupitatovar/Llamaradas-Estelares", "repo_path": "Llamaradas-Estelares_extracted/Llamaradas-Estelares-main/README.md", "type": "Markdown" }
# Llamaradas Estelares [![DOI](https://zenodo.org/badge/408974483.svg)](https://zenodo.org/badge/latestdoi/408974483) A flare template [Flare_model.py] to model the morphology of white-light flare events. The shape of the flare model is parameterized by the convolution of a Gaussian and a double exponential. Meanwhile...
lupitatovarREPO_NAMELlamaradas-EstelaresPATH_START.@Llamaradas-Estelares_extracted@Llamaradas-Estelares-main@README.md@.PATH_END.py
{ "filename": "defaults_source_provider.py", "repo_name": "ratt-ru/montblanc", "repo_path": "montblanc_extracted/montblanc-master/montblanc/impl/rime/tensorflow/sources/defaults_source_provider.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 Simon Perkins # # This file is part of montblanc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the L...
ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@impl@rime@tensorflow@sources@defaults_source_provider.py@.PATH_END.py
{ "filename": "test_pickle.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/constants/tests/test_pickle.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import pytest from ... import constants as const from ...tests.helper import pickle_protocol, check_pickling_recovery # noqa from ...extern.six.moves import zip original...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@constants@tests@test_pickle.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram2d/_stream.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.stream" _valid_props = {"maxpoints", "token"} # m...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram2d@_stream.py@.PATH_END.py
{ "filename": "likelihood_helpers.py", "repo_name": "adrn/thejoker", "repo_path": "thejoker_extracted/thejoker-main/thejoker/likelihood_helpers.py", "type": "Python" }
# Third-party import numpy as np # Project from .logging import logger def get_constant_term_design_matrix(data, ids=None): """ Construct the portion of the design matrix relevant for the linear parameters of The Joker beyond the amplitude, ``K``. """ if ids is None: ids = np.zeros(len(d...
adrnREPO_NAMEthejokerPATH_START.@thejoker_extracted@thejoker-main@thejoker@likelihood_helpers.py@.PATH_END.py
{ "filename": "user_input_checks_test.py", "repo_name": "mackelab/sbi", "repo_path": "sbi_extracted/sbi-main/tests/user_input_checks_test.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> from __future__ import annotations from typing import Callable, Tuple import numpy as np import pytest import torch from pyknos.mdn.mdn import Multivari...
mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@tests@user_input_checks_test.py@.PATH_END.py
{ "filename": "plotGrid-freq-dOmega.py", "repo_name": "folsomcp/ZDIpy", "repo_path": "ZDIpy_extracted/ZDIpy-main/utils/plotGrid-freq-dOmega.py", "type": "Python" }
#!/usr/bin/python3 # import numpy as np import matplotlib.pyplot as plt plt.rcParams['pdf.fonttype'] = 42 plt.rcParams['ps.fonttype'] = 42 plt.rcParams['ps.useafm'] = True #plt.rcParams['text.usetex'] = True import scipy.special as specialf import scipy.optimize as optimize # P (prob.) of a delta chi^2 from chi^2 mi...
folsomcpREPO_NAMEZDIpyPATH_START.@ZDIpy_extracted@ZDIpy-main@utils@plotGrid-freq-dOmega.py@.PATH_END.py
{ "filename": "least_squares_cont_model.py", "repo_name": "igmhub/picca", "repo_path": "picca_extracted/picca-master/py/picca/delta_extraction/least_squares/least_squares_cont_model.py", "type": "Python" }
"""This module defines the class LeastsSquaresContModel""" import numpy as np from picca.delta_extraction.errors import LeastSquaresError class LeastsSquaresContModel: """This class deals with the continuum fitting. It is passed to iminuit and when called it will return the chi2 for a given set of param...
igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@py@picca@delta_extraction@least_squares@least_squares_cont_model.py@.PATH_END.py
{ "filename": "test_basics.py", "repo_name": "SISPO-developers/sispo", "repo_path": "sispo_extracted/sispo-master/test_basics.py", "type": "Python" }
# SPDX-FileCopyrightText: 2021 Gabriel J. Schwarzkopf <sispo-devs@outlook.com> # # SPDX-License-Identifier: GPL-3.0-or-later """Test suite.""" import unittest from pathlib import Path import numpy as np from sispo.sim import utils class TestUtils(unittest.TestCase): """Basic unit tests""" def test_check_d...
SISPO-developersREPO_NAMEsispoPATH_START.@sispo_extracted@sispo-master@test_basics.py@.PATH_END.py
{ "filename": "jolideco-deconvolution.ipynb", "repo_name": "jolideco/jolideco-chandra-examples", "repo_path": "jolideco-chandra-examples_extracted/jolideco-chandra-examples-main/workflow/notebooks/jolideco-deconvolution.ipynb", "type": "Jupyter Notebook" }
# Jolideco Analysis of Chandra Data of E0102 ```python import numpy as np from pathlib import Path from matplotlib import pyplot as plt import matplotlib as mpl from astropy.visualization import simple_norm from astropy.wcs.wcs import FITSFixedWarning from jolideco.core import MAPDeconvolver, MAPDeconvolverResult fro...
jolidecoREPO_NAMEjolideco-chandra-examplesPATH_START.@jolideco-chandra-examples_extracted@jolideco-chandra-examples-main@workflow@notebooks@jolideco-deconvolution.ipynb@.PATH_END.py
{ "filename": "SphereSolidBoundaryInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/DEM/SolidBoundary/SphereSolidBoundaryInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explict instantiation. //------------------------------------------------------------------------------ #include "DEM/SolidBoundary/SphereSolidBoundary.cc" #include "Geometry/Dimension.hh" namespace Spheral { template clas...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@DEM@SolidBoundary@SphereSolidBoundaryInst.cc.py@.PATH_END.py
{ "filename": "_dimension.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/splom/_dimension.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Dimension(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "splom" _path_str = "splom.dimension" _valid_props = { "axis", "label", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@splom@_dimension.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/hoverlabel/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@hoverlabel@font@_size.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ply/py2/README.md", "type": "Markdown" }
# PLY (Python Lex-Yacc) Version 3.11 [![Build Status](https://travis-ci.org/dabeaz/ply.svg?branch=master)](https://travis-ci.org/dabeaz/ply) Copyright (C) 2001-2018 David M. Beazley (Dabeaz LLC) All rights reserved. Redistribution and use in source and binary forms, with or without modification, ar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ply@py2@README.md@.PATH_END.py
{ "filename": "convert_peft_sd_lora_to_kohya_ss.py", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/examples/lora_dreambooth/convert_peft_sd_lora_to_kohya_ss.py", "type": "Python" }
import argparse import os from typing import Dict import torch from diffusers import UNet2DConditionModel from safetensors.torch import save_file from transformers import CLIPTextModel from peft import PeftModel, get_peft_model_state_dict # Default kohya_ss LoRA replacement modules # https://github.com/kohya-ss/sd-...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@examples@lora_dreambooth@convert_peft_sd_lora_to_kohya_ss.py@.PATH_END.py
{ "filename": "test_galactic_fk4.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/coordinates/tests/accuracy/test_galactic_fk4.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from .... import units as u from ...builtin_frames import Galactic, FK4 from ....time import Time from ....table import Table...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@coordinates@tests@accuracy@test_galactic_fk4.py@.PATH_END.py
{ "filename": "test_stokes_randomization.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_stokes_randomization.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2022, the ixpeobssim team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # #...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@tests@test_stokes_randomization.py@.PATH_END.py
{ "filename": "secondary_axis.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/subplots_axes_and_figures/secondary_axis.py", "type": "Python" }
""" ============== Secondary Axis ============== Sometimes we want a secondary axis on a plot, for instance to convert radians to degrees on the same plot. We can do this by making a child axes with only one axis visible via `.axes.Axes.secondary_xaxis` and `.axes.Axes.secondary_yaxis`. This secondary axis can have ...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@subplots_axes_and_figures@secondary_axis.py@.PATH_END.py
{ "filename": "plotting_nd.py", "repo_name": "shbhuk/mrexo", "repo_path": "mrexo_extracted/mrexo-master/mrexo/plotting_nd.py", "type": "Python" }
import matplotlib.pyplot as plt import os, sys import numpy as np import matplotlib matplotlib.rcParams['xtick.labelsize'] = 25 matplotlib.rcParams['ytick.labelsize'] = 25 save_path = r"C:\Users\skanodia\Documents\GitHub\mrexo\examples\CKS-X\CKS-X_radius_stm" # _ = Plot2DJointDistribution(save_path) # _ = Plot2DWei...
shbhukREPO_NAMEmrexoPATH_START.@mrexo_extracted@mrexo-master@mrexo@plotting_nd.py@.PATH_END.py
{ "filename": "instance_seg.py", "repo_name": "BiaPyX/BiaPy", "repo_path": "BiaPy_extracted/BiaPy-master/biapy/engine/instance_seg.py", "type": "Python" }
import os import torch import numpy as np import pandas as pd from tqdm import tqdm from skimage.segmentation import clear_border from skimage.transform import resize import torch.distributed as dist from biapy.data.post_processing.post_processing import ( watershed_by_channels, voronoi_on_mask, measure_mo...
BiaPyXREPO_NAMEBiaPyPATH_START.@BiaPy_extracted@BiaPy-master@biapy@engine@instance_seg.py@.PATH_END.py
{ "filename": "temperature_slice.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/docs/tutorials/example_code/temperature_slice.py", "type": "Python" }
import matplotlib.pylab as plt import pynbody import pynbody.plot.sph as sph # load the snapshot and set to physical units s = pynbody.load('testdata/gasoline_ahf/g15784.lr.01024.gz') s.physical_units() # load the halos halos = s.halos() # center on the largest halo and align the disk pynbody.analysis.angmom.sideon...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@docs@tutorials@example_code@temperature_slice.py@.PATH_END.py
{ "filename": "photutils.py", "repo_name": "fjaellet/gaia_edr3_photutils", "repo_path": "gaia_edr3_photutils_extracted/gaia_edr3_photutils-main/photutils.py", "type": "Python" }
# F. Anders (2020-21) # Just some useful functions inherited from https://github.com/fjaellet/pysvo: import numpy as np # THE COEFFICIENTS ARE THE ONES CORRESPONDING TO Gaia EDR3 TRANSMISSION CURVES: # http://svo2.cab.inta-csic.es/theory/fps3/index.php?mode=browse&gname=GAIA&gname2=GAIA3&asttype= def AG(AV, Teff): ...
fjaelletREPO_NAMEgaia_edr3_photutilsPATH_START.@gaia_edr3_photutils_extracted@gaia_edr3_photutils-main@photutils.py@.PATH_END.py
{ "filename": "aegean.py", "repo_name": "PaulHancock/Aegean", "repo_path": "Aegean_extracted/Aegean-main/AegeanTools/CLI/aegean.py", "type": "Python" }
#! /usr/bin/env python import argparse import logging import logging.config import multiprocessing import os import sys import astropy import lmfit import numpy as np import scipy from AegeanTools import __citation__, __date__, __version__ from AegeanTools.catalogs import (check_table_formats, save_catalog, ...
PaulHancockREPO_NAMEAegeanPATH_START.@Aegean_extracted@Aegean-main@AegeanTools@CLI@aegean.py@.PATH_END.py
{ "filename": "init_ops_v2_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/init_ops_v2_test.py", "type": "Python" }
# Copyright 2018 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@init_ops_v2_test.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="mesh3d.stream", **kwargs): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@stream@_maxpoints.py@.PATH_END.py
{ "filename": "compareRestarts.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Hydro/Noh/compareRestarts.py", "type": "Python" }
def readRestartData(file): f = open(file, 'r') data = f.readlines() f.close m = data[1].split()[2:] r = data[2].replace('(', '').replace(')', '').split()[2:] v = data[3].replace('(', '').replace(')', '').split()[2:] rho = data[4].split()[2:] eps = data[5].split()[2:] H = data[6].rep...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Hydro@Noh@compareRestarts.py@.PATH_END.py
{ "filename": "financial_datasets.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/utilities/financial_datasets.py", "type": "Python" }
""" Util that calls several of financial datasets stock market REST APIs. Docs: https://docs.financialdatasets.ai/ """ import json from typing import Any, List, Optional import requests from langchain_core.utils import get_from_dict_or_env from pydantic import BaseModel FINANCIAL_DATASETS_BASE_URL = "https://api.fin...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@utilities@financial_datasets.py@.PATH_END.py
{ "filename": "deterministic.py", "repo_name": "gabefreedman/etudes", "repo_path": "etudes_extracted/etudes-main/etudes/deterministic.py", "type": "Python" }
# -*- coding: utf-8 -*- """Contains custom PyTree object for deterministic signal modeling. Continuous wave delay functions (full frequency evolution vs phase approximation) are defined at class initialization. """ import jax import jax.numpy as jnp from jax.tree_util import register_pytree_node_class import etudes.co...
gabefreedmanREPO_NAMEetudesPATH_START.@etudes_extracted@etudes-main@etudes@deterministic.py@.PATH_END.py
{ "filename": "test_lisa.py", "repo_name": "Mauropieroni/GW_response", "repo_path": "GW_response_extracted/GW_response-main/testing/test_lisa.py", "type": "Python" }
import unittest import jax.numpy as jnp import gw_response as gwr import os import numpy as np TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), "test_data/") class TestLISA(unittest.TestCase): def test_lisa_analytical_positions(self): time_in_years = jnp.linspace(0, 1.0, 100) lisa_analyti...
MauropieroniREPO_NAMEGW_responsePATH_START.@GW_response_extracted@GW_response-main@testing@test_lisa.py@.PATH_END.py
{ "filename": "spectralLib.py", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/pyasl/resBased/spectralLib.py", "type": "Python" }
from __future__ import print_function, division from PyAstronomy.pyaC import pyaPermanent as pp from PyAstronomy.pyaC import pyaErrors as PE import os from .. import readFitsSpec import numpy as np import astropy.io.fits as pyfits class SpectralLib: def refreshDescription(self): """ (Re-)Down...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@pyasl@resBased@spectralLib.py@.PATH_END.py
{ "filename": "_util.py", "repo_name": "esa/thermonets", "repo_path": "thermonets_extracted/thermonets-main/thermonets/_util.py", "type": "Python" }
import numpy as np import heyoka as hy import torch import spaceweather import pyatmos # WGS84 values a_earth = 6378137.0 b_earth = 6356752.314245 def cart2geo( x, y, z, e2=1 - b_earth**2 / a_earth**2, R_eq=a_earth, iters=4, symbolic=False ): """Converts from Cartesian to Geodetic coordinates We use th...
esaREPO_NAMEthermonetsPATH_START.@thermonets_extracted@thermonets-main@thermonets@_util.py@.PATH_END.py
{ "filename": "tracemalloc.py", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/examples/boft_controlnet/utils/tracemalloc.py", "type": "Python" }
import gc import threading import psutil import torch # Converting Bytes to Megabytes def b2mb(x): return int(x / 2**20) # This context manager is used to track the peak memory usage of the process class TorchTracemalloc: def __enter__(self): gc.collect() torch.cuda.empty_cache() to...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@examples@boft_controlnet@utils@tracemalloc.py@.PATH_END.py
{ "filename": "fixtures_ccl.py", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/tests/fixtures_ccl.py", "type": "Python" }
#!/usr/bin/env python # # fixtures_ccl.py # # Thu Aug 01 11:44:12 2024 # Copyright 2024 Sandro Dias Pinto Vitenti # <vitenti@uel.br> # # fixtures_ccl.py # Copyright (C) 2024 Sandro Dias Pinto Vitenti <vitenti@uel.br> # # numcosmo is free software: you can redistribute it and/or modify it # under the terms of the GNU ...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@tests@fixtures_ccl.py@.PATH_END.py
{ "filename": "run_acs_cookbook.py", "repo_name": "spacetelescope/hstaxe", "repo_path": "hstaxe_extracted/hstaxe-main/hstaxe/tests/run_acs_cookbook.py", "type": "Python" }
""" Run the commands from nor's axe cookbook example but setup for hstaxe See LICENSE.txt """ import os import shutil from drizzlepac import astrodrizzle from hstaxe import axetasks cwd = os.getcwd() print("We are in %s" % (cwd)) os.system("cp ./cookbook_data/F775W/F775W.cat .") os.system("rm ./DATA/jdql01jxq_flc.fi...
spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@hstaxe@tests@run_acs_cookbook.py@.PATH_END.py
{ "filename": "quickstart-cmake.md", "repo_name": "google/googletest", "repo_path": "googletest_extracted/googletest-main/docs/quickstart-cmake.md", "type": "Markdown" }
# Quickstart: Building with CMake This tutorial aims to get you up and running with GoogleTest using CMake. If you're using GoogleTest for the first time or need a refresher, we recommend this tutorial as a starting point. If your project uses Bazel, see the [Quickstart for Bazel](quickstart-bazel.md) instead. ## Pre...
googleREPO_NAMEgoogletestPATH_START.@googletest_extracted@googletest-main@docs@quickstart-cmake.md@.PATH_END.py
{ "filename": "manager.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/manager.py", "type": "Python" }
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2006-2024 Paulo Henrique Silva <ph.silva@gmail.com> from chimera.core.classloader import ClassLoader from chimera.core.server import Server from chimera.core.resources import ResourcesManager from chimera.core.location import Location fro...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@manager.py@.PATH_END.py
{ "filename": "dummy.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/src/nextline_schedule/dummy.py", "type": "Python" }
import random from datetime import datetime class DummyRequestStatement: '''A mock scheduler for tests. >>> async def main(): ... scheduler = DummyRequestStatement() ... return await scheduler() >>> import asyncio >>> script = asyncio.run(main()) >>> code = compile(script, '<stri...
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@src@nextline_schedule@dummy.py@.PATH_END.py
{ "filename": "test_spfuncs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/sparse/tests/test_spfuncs.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from numpy import array, kron, diag from numpy.testing import assert_, assert_equal from scipy.sparse import spfuncs from scipy.sparse import csr_matrix, csc_matrix, bsr_matrix from scipy.sparse._sparsetools import (csr_scale_rows, csr_scale_columns, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@sparse@tests@test_spfuncs.py@.PATH_END.py
{ "filename": "fakes_plot.ipynb", "repo_name": "snad-space/zwad", "repo_path": "zwad_extracted/zwad-master/notebooks/fakes_plot.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline import matplotlib import matplotlib.pyplot as plt import pandas as pd import os import re from matplotlib.ticker import EngFormatter, MultipleLocator from glob import glob from itertools import count matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['font.family'] = 'serif' m...
snad-spaceREPO_NAMEzwadPATH_START.@zwad_extracted@zwad-master@notebooks@fakes_plot.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/parcats/line/colorbar/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._tickfont import Tickfont from ._tickformatstop import Tickformatstop from ._title import Title from . import title else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@parcats@line@colorbar@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NASA-Planetary-Science/sbpy", "repo_path": "sbpy_extracted/sbpy-main/sbpy/activity/gas/tests/__init__.py", "type": "Python" }
NASA-Planetary-ScienceREPO_NAMEsbpyPATH_START.@sbpy_extracted@sbpy-main@sbpy@activity@gas@tests@__init__.py@.PATH_END.py
{ "filename": "download_hmi_continuum.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/download/download_hmi_continuum.py", "type": "Python" }
import argparse import logging import multiprocessing import os from datetime import datetime, timedelta from urllib import request import drms import numpy as np import pandas as pd from astropy.io import fits from sunpy.io._fits import header_to_fits from sunpy.util import MetaDict class HMIContinuumDownloader: ...
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@download@download_hmi_continuum.py@.PATH_END.py
{ "filename": "test_populate.py", "repo_name": "transientskp/tkp", "repo_path": "tkp_extracted/tkp-master/tests/test_database/test_sql/test_populate.py", "type": "Python" }
import unittest from tkp.testutil.decorators import requires_test_db_managed import tkp.db.sql.populate import os import getpass config = { 'engine': os.environ.get('TKP_DBENGINE', 'postgresql'), 'database': 'test_management', 'user': os.environ.get('TKP_DBUSER', getpass.getuser()), 'password': os.en...
transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tests@test_database@test_sql@test_populate.py@.PATH_END.py
{ "filename": "_deprecations.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_deprecations.py", "type": "Python" }
import warnings warnings.filterwarnings( "default", r"plotly\.graph_objs\.\w+ is deprecated", DeprecationWarning ) class Data(list): """ plotly.graph_objs.Data is deprecated. Please replace it with a list or tuple of instances of the following types - plotly.graph_objs.Scatter - plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_deprecations.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/utils.py", "type": "Python" }
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@hypothesis@py3@hypothesis@internal@conjecture@utils.py@.PATH_END.py
{ "filename": "viewer.py", "repo_name": "fred3m/toyz", "repo_path": "toyz_extracted/toyz-master/toyz/web/viewer.py", "type": "Python" }
# Copyright 2015 by Fred Moolekamp # License: BSD 3-clause from __future__ import print_function, division from collections import OrderedDict from toyz.utils.errors import ToyzJobError import math import os import numpy as np from toyz.utils import core from toyz.web import session_vars # Set the default values for t...
fred3mREPO_NAMEtoyzPATH_START.@toyz_extracted@toyz-master@toyz@web@viewer.py@.PATH_END.py
{ "filename": "many_times.py", "repo_name": "mcataneo/mochi_class_public", "repo_path": "mochi_class_public_extracted/mochi_class_public-main/scripts/many_times.py", "type": "Python" }
#!/usr/bin/env python # coding: utf-8 # In[ ]: # import necessary modules # uncomment to get plots displayed in notebook #get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class from scipy.optimize import fsolve from scipy.int...
mcataneoREPO_NAMEmochi_class_publicPATH_START.@mochi_class_public_extracted@mochi_class_public-main@scripts@many_times.py@.PATH_END.py
{ "filename": "HAPI_KamodoRealFlight_JSONs.py", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/kamodo_ccmc/hapi/HAPI_KamodoRealFlight_JSONs.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Fri Mar 31 13:35:57 2023 @author: rringuet """ import json import urllib.request import kamodo_ccmc.flythrough.model_wrapper as MW # user determined inputs for JSON creation dataset = 'CTIPe_D:/CTIPe/Storm_201303/_grace1' variables_requested = ['v_nup_ilev', 'T_n', 'T_e', 'TEC',...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@kamodo_ccmc@hapi@HAPI_KamodoRealFlight_JSONs.py@.PATH_END.py
{ "filename": "gd1_util.py", "repo_name": "jobovy/streamgap-pepper", "repo_path": "streamgap-pepper_extracted/streamgap-pepper-main/gd1_util.py", "type": "Python" }
from galpy.df import streamdf, streamgapdf from streampepperdf import streampepperdf from galpy.orbit import Orbit from galpy.potential import LogarithmicHaloPotential from galpy.actionAngle import actionAngleIsochroneApprox from galpy.util import bovy_conversion #for unit conversions R0, V0= 8., 220. def setup_gd1mode...
jobovyREPO_NAMEstreamgap-pepperPATH_START.@streamgap-pepper_extracted@streamgap-pepper-main@gd1_util.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "test.py", "repo_name": "bolverk/huji-rich", "repo_path": "huji-rich_extracted/huji-rich-master/tests/newtonian/one_dimensional/periodic_bc/test.py", "type": "Python" }
#! /usr/bin/python import math def goodness_of_fit(a1, a2): import math diff2 = [(x-y)**2 for x,y in zip(a1,a2)] return math.sqrt(sum(diff2)/(max(a1)-min(a1))**2/len(a1)) def density_prof(x): return 1+1e-6*math.sin(2*math.pi*x) def pressure_prof(x): return 3./5.+1e-6*math.sin(2*math.pi*x) d...
bolverkREPO_NAMEhuji-richPATH_START.@huji-rich_extracted@huji-rich-master@tests@newtonian@one_dimensional@periodic_bc@test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "smirik/resonances", "repo_path": "resonances_extracted/resonances-main/resonances/resonance/__init__.py", "type": "Python" }
smirikREPO_NAMEresonancesPATH_START.@resonances_extracted@resonances-main@resonances@resonance@__init__.py@.PATH_END.py
{ "filename": "binary_system.py", "repo_name": "matthiasfabry/spinOS", "repo_path": "spinOS_extracted/spinOS-master/modules/binary_system.py", "type": "Python" }
""" Copyright 2020-2024 Matthias Fabry This file is part of spinOS. spinOS 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. spinOS is distri...
matthiasfabryREPO_NAMEspinOSPATH_START.@spinOS_extracted@spinOS-master@modules@binary_system.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "miguelcarcamov/csromer", "repo_path": "csromer_extracted/csromer-master/src/csromer/optimization/__init__.py", "type": "Python" }
from .methods import * from .optimizer import *
miguelcarcamovREPO_NAMEcsromerPATH_START.@csromer_extracted@csromer-master@src@csromer@optimization@__init__.py@.PATH_END.py
{ "filename": "model_test_pipeline.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/dnn/dnn_model_runner/dnn_conversion/common/test/model_test_pipeline.py", "type": "Python" }
import os import numpy as np from .configs.test_config import CommonConfig from ..utils import create_parser, plot_acc class ModelTestPipeline: def __init__( self, network_model, model_processor, dnn_model_processor ): self._net_model = network_model ...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@dnn_model_runner@dnn_conversion@common@test@model_test_pipeline.py@.PATH_END.py
{ "filename": "table_row.py", "repo_name": "LSSTDESC/Imsim", "repo_path": "Imsim_extracted/Imsim-main/imsim/table_row.py", "type": "Python" }
import astropy.units as u import galsim from astropy.table import QTable from galsim.config import ( GetAllParams, GetInputObj, InputLoader, RegisterInputType, RegisterValueType, ) class TableRow: """Class to extract one row from an astropy QTable and make it available to the galsim config...
LSSTDESCREPO_NAMEImsimPATH_START.@Imsim_extracted@Imsim-main@imsim@table_row.py@.PATH_END.py
{ "filename": "trace.py", "repo_name": "hannorein/REBOUND", "repo_path": "REBOUND_extracted/REBOUND-main/rebound/integrators/trace.py", "type": "Python" }
import ctypes from ctypes import cast from .. import clibrebound from ..simulation import Simulation from ..particle import Particle from ..vectors import Vec3dBasic TRACE_PERI_MODES = {"FULL_BS": 1, "PARTIAL_BS": 0, "FULL_IAS15": 2} class IntegratorTRACE(ctypes.Structure): """ This class is an abstraction o...
hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@rebound@integrators@trace.py@.PATH_END.py
{ "filename": "example_module2.py", "repo_name": "joezuntz/cosmosis", "repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/test/example_module2.py", "type": "Python" }
from cosmosis.runtime import register_new_parameter def setup(options): # example of how to register a new parameter in the pipeline # from where. register_new_parameter( options, # the options datablock we were just passed "new_parameters", # section "p3", # name -1.0, # ...
joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@test@example_module2.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/database/modules/query_db_before_after_master_files/src/__init__.py", "type": "Python" }
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@database@modules@query_db_before_after_master_files@src@__init__.py@.PATH_END.py
{ "filename": "moduleCheck.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/helpers/moduleCheck.py", "type": "Python" }
from modulefinder import ModuleFinder import sys, os import filecmp mod_name = sys.argv[1] mod_file = sys.argv[2] finder = ModuleFinder() finder.run_script(mod_file) current_stamp_name = mod_name + "_stamp.cmake" tmp_stamp_name = current_stamp_name + ".tmp" newF = open(tmp_stamp_name, "w") newF.write("set("+mod_nam...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@helpers@moduleCheck.py@.PATH_END.py
{ "filename": "_position.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/title/_position.py", "type": "Python" }
import _plotly_utils.basevalidators class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="position", parent_name="pie.title", **kwargs): super(PositionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@title@_position.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/imagingbase/imagingbase/solvers/utils.py", "type": "Python" }
from scipy.optimize import curve_fit from imagingbase.operators.msi import DOGDictionary from regpy.discrs import Discretization import numpy as np from copy import deepcopy class BuildMerger(): def __init__(self, obj): self.obj = deepcopy(obj) def _build_merger(self): widths = se...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@imagingbase@imagingbase@solvers@utils.py@.PATH_END.py
{ "filename": "debugging.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/g3doc/reference/debugging.md", "type": "Markdown" }
# AutoGraph reference [Index](index.md) ## Debugging AutoGraph code The recommended way to debug AutoGraph code is to run it eagerly (see below). AutoGraph generates a new function, rather than directly executing the input function. Non-code elements, such as breakpoints, do not transfer to the generated code. You...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@autograph@g3doc@reference@debugging.md@.PATH_END.py
{ "filename": "charged_particle_radiography_particle_tracing_wire_mesh.ipynb", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/docs/notebooks/diagnostics/charged_particle_radiography_particle_tracing_wire_mesh.ipynb", "type": "Jupyter Notebook" }
# Synthetic Charged Particle Radiographs with a Wire Mesh [Tracker]: ../../api/plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.Tracker.rst#plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.Tracker [add_wire_mesh()]: ../../api/plasmapy.diagnostics.charged_particle_radiogra...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@docs@notebooks@diagnostics@charged_particle_radiography_particle_tracing_wire_mesh.ipynb@.PATH_END.py
{ "filename": "config.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipykernel/py2/ipykernel/pylab/config.py", "type": "Python" }
"""Configurable for configuring the IPython inline backend This module does not import anything from matplotlib. """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full lice...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipykernel@py2@ipykernel@pylab@config.py@.PATH_END.py
{ "filename": "RMClip.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/share/scripts/RMClip.py", "type": "Python" }
# Clip RM and EVLA planes in RMFit cube by ppol import Image, FArray, ImageUtil, FArray, OSystem, OErr import History # filename = 'J1723+6547_AK_PB.fits' # inMF = Image.newPFImage('in', filename, 0, True, err) # OSystem.PAllowThreads(24) # exec(open('PBCorImageMF.py').read()) #RMClip (inMF, err, minPPol=50.0e-6) RMCl...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@share@scripts@RMClip.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/zaxis/title/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.zaxis.title.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@zaxis@title@font@_family.py@.PATH_END.py
{ "filename": "help.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/interactive/fit/help.py", "type": "Python" }
__all__ = ["PLOT_TOOLS_WITH_SELECT_HELP_SUBTEXT", "PLOT_TOOLS_HELP_SUBTEXT", "REGION_EDITING_HELP_SUBTEXT", "CALCULATE_SENSITIVITY_HELP_TEXT", "DETERMINE_WAVELENGTH_SOLUTION_HELP_TEXT", "NORMALIZE_FLAT_HELP_TEXT", "DEFAULT_HELP", "TRACE_APERTURES", "SKY_CORRECT_FROM_SLIT_HELP_TEXT"] def _plot_...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@interactive@fit@help.py@.PATH_END.py
{ "filename": "fig1.ipynb", "repo_name": "maho3/ltu-ili", "repo_path": "ltu-ili_extracted/ltu-ili-main/paper/fig1_example/fig1.ipynb", "type": "Jupyter Notebook" }
```python import os from os.path import join import matplotlib as mpl import matplotlib.pyplot as plt mpl.style.use('paper.mcstyle') import seaborn as sns import numpy as np ``` ```python import ili ``` ## Posterior/Likelihood example ```python from sklearn.datasets import make_s_curve from scipy.stats import ga...
maho3REPO_NAMEltu-iliPATH_START.@ltu-ili_extracted@ltu-ili-main@paper@fig1_example@fig1.ipynb@.PATH_END.py
{ "filename": "RVSInterpolator.py", "repo_name": "segasai/rvspecfit", "repo_path": "rvspecfit_extracted/rvspecfit-master/py/rvspecfit/nn/RVSInterpolator.py", "type": "Python" }
from . import NNInterpolator import torch import scipy.spatial import numpy as np import os import logging device_env_name = 'RVS_NN_DEVICE' if device_env_name in os.environ: device_env = os.environ[device_env_name] else: device_env = None class RVSInterpolator: def __init__(self, kwargs): self....
segasaiREPO_NAMErvspecfitPATH_START.@rvspecfit_extracted@rvspecfit-master@py@rvspecfit@nn@RVSInterpolator.py@.PATH_END.py
{ "filename": "test_regularized_covariance.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/stats/tests/test_regularized_covariance.py", "type": "Python" }
import numpy as np from numpy.testing import assert_equal, assert_ from statsmodels.stats.regularized_covariance import ( _calc_nodewise_row, _calc_nodewise_weight, _calc_approx_inv_cov, RegularizedInvCovariance) def test_calc_nodewise_row(): np.random.seed(435265) X = np.random.normal(size=(50, 3)) ...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@stats@tests@test_regularized_covariance.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/textfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.textfont", **kwargs ): super(WeightValidator, self).__init__( plotly_name=plotly_name, parent_na...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@textfont@_weight.py@.PATH_END.py
{ "filename": "test_blender.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/applications/test_blender.py", "type": "Python" }
# 1BPY """ Name: 'sun-earth' Blender: 249 Group:'Add' Tooltip: 'Amuse example' """ from amuse.community.hermite.interface import Hermite from amuse.units import nbody_system from amuse.units import units from amuse.ext.blender import blender # get blender API import numpy as np from amuse import datamodel class Su...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@applications@test_blender.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/colorbar/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="streamtube.colorbar.title.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@colorbar@title@font@_size.py@.PATH_END.py
{ "filename": "11143_pils_absflux.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/Zero/AR_11143/11143_pils_absflux.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 5 22:30:51 2022 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "11143" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@Zero@AR_11143@11143_pils_absflux.py@.PATH_END.py
{ "filename": "test_corrs.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/time/tests/test_corrs.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from ... import units as u from ...coordinates import EarthLocation, SkyCoord, solar_system_ephemeris from .. import Time, TimeDelta from ...tests.helper import remote_data try: import jplephem # pylint: disable=W0611 except ImportErro...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@time@tests@test_corrs.py@.PATH_END.py
{ "filename": "n_inputs3_line_bands.ipynb", "repo_name": "Vital-Fernandez/lime", "repo_path": "lime_extracted/lime-master/examples/inputs/n_inputs3_line_bands.ipynb", "type": "Jupyter Notebook" }
# Line Bands The second input in a $LiMe$ measurement is the line bands. These are the intervales with the line location and two adjacent and featureless continua. This design was inspired by the the Lick indexes by [Worthey et al (1993) and references therein](https://ui.adsabs.harvard.edu/abs/1994ApJS...94..687W/abs...
Vital-FernandezREPO_NAMElimePATH_START.@lime_extracted@lime-master@examples@inputs@n_inputs3_line_bands.ipynb@.PATH_END.py
{ "filename": "misc.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/misc.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Backports for individual classes and functions.""" import os import sys __all__ = ['cache_from_source', 'callable', 'fsencode'] try: from imp import cache_from_source except ImportError: ...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@distlib@_backport@misc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/scene/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._annotation import Annotation from ._aspectratio import Aspectratio from ._camera import Camera from ._domain import Domain from ._xaxis import XAxis from ._yaxis import YAxis from ._zaxis impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@scene@__init__.py@.PATH_END.py
{ "filename": "hfilter.py", "repo_name": "HiPERCAM/hipercam", "repo_path": "hipercam_extracted/hipercam-master/hipercam/scripts/hfilter.py", "type": "Python" }
import sys import os import numpy as np from astropy.convolution import Gaussian2DKernel, convolve, convolve_fft from trm import cline from trm.cline import Cline import hipercam as hcam ####################################### # # hfilter -- filters a multi-CCD image. # ####################################### def...
HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@scripts@hfilter.py@.PATH_END.py
{ "filename": "_unselected.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/_unselected.py", "type": "Python" }
import _plotly_utils.basevalidators class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattergl", **kwargs): super(UnselectedValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@_unselected.py@.PATH_END.py
{ "filename": "survey_window.ipynb", "repo_name": "MikeSWang/Harmonia", "repo_path": "Harmonia_extracted/Harmonia-master/application/publication/survey_window.ipynb", "type": "Jupyter Notebook" }
# Survey Window ```python import os import sys from pathlib import Path repo_root = Path(os.getcwd()).parent sys.path.insert(0, str(repo_root)) ``` ```python import matplotlib.pyplot as plt import healpy as hp import numpy as np from pipeline import harmony from harmonia.algorithms import CartesianArray plt.styl...
MikeSWangREPO_NAMEHarmoniaPATH_START.@Harmonia_extracted@Harmonia-master@application@publication@survey_window.ipynb@.PATH_END.py
{ "filename": "test_diff_mc_halos.py", "repo_name": "ArgonneCPAC/diffmah", "repo_path": "diffmah_extracted/diffmah-main/diffmah/tests/test_diff_mc_halos.py", "type": "Python" }
"""Unit test of the new differentiable Monte Carlo generator """ import numpy as np from jax import jit as jjit from jax import numpy as jnp from jax import random as jran from jax import value_and_grad from ..monte_carlo_halo_population import _mc_halo_mahs, mc_halo_population from ..rockstar_pdf_model import DEFAULT...
ArgonneCPACREPO_NAMEdiffmahPATH_START.@diffmah_extracted@diffmah-main@diffmah@tests@test_diff_mc_halos.py@.PATH_END.py
{ "filename": "NamingService.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/src/Acspy/Util/NamingService.py", "type": "Python" }
# @(#) $Id: NamingService.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $ # # ALMA - Atacama Large Millimiter Array # (c) Associated Universities, Inc. Washington DC, USA, 2001 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, A...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@src@Acspy@Util@NamingService.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/agents/react/base.py", "type": "Python" }
"""Chain that implements the ReAct paper from https://arxiv.org/pdf/2210.03629.pdf.""" from __future__ import annotations from typing import TYPE_CHECKING, Any, List, Optional, Sequence from langchain_core._api import deprecated from langchain_core.documents import Document from langchain_core.language_models import...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@agents@react@base.py@.PATH_END.py
{ "filename": "wd_node_temp.py", "repo_name": "HERA-Team/hera_mc", "repo_path": "hera_mc_extracted/hera_mc-main/scripts/wd_node_temp.py", "type": "Python" }
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2020 the HERA Collaboration # Licensed under the 2-clause BSD license. """ Checks for node over-temperature conditions. """ import argparse from hera_mc import watch_dog parser = argparse.ArgumentParser("Script for cronjob monitoring node tempe...
HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@scripts@wd_node_temp.py@.PATH_END.py
{ "filename": "first_steps_gadget+rockstar.md", "repo_name": "pynbody/tangos", "repo_path": "tangos_extracted/tangos-master/docs/first_steps_gadget+rockstar.md", "type": "Markdown" }
Tangos Tutorial – Gadget+Rockstar ================================= Initial set up -------------- This tutorial imports a gadget-run simulation with a [Rockstar](https://bitbucket.org/gfcstanford/rockstar/) halo catalogue and [consistent-trees](https://bitbucket.org/pbehroozi/consistent-trees) merger information. Ma...
pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@docs@first_steps_gadget+rockstar.md@.PATH_END.py
{ "filename": "intro-to-pymc3.md", "repo_name": "dfm/exoplanet", "repo_path": "exoplanet_extracted/exoplanet-main/docs/tutorials/intro-to-pymc3.md", "type": "Markdown" }
--- orphan: true --- # Intro to PyMC3 This page has moved to {ref}`intro-to-pymc`.
dfmREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@docs@tutorials@intro-to-pymc3.md@.PATH_END.py
{ "filename": "tools.py", "repo_name": "s-ilic/ECLAIR", "repo_path": "ECLAIR_extracted/ECLAIR-master/likelihoods/CMB/Planck/PR4/hillipop_TT_lite/tools.py", "type": "Python" }
# ------------------------------------------------------------------------------------------------ # Hillipop External Tools # ------------------------------------------------------------------------------------------------ import os import astropy.io.fits as fits import numpy as np import scipy.ndimage as nd from num...
s-ilicREPO_NAMEECLAIRPATH_START.@ECLAIR_extracted@ECLAIR-master@likelihoods@CMB@Planck@PR4@hillipop_TT_lite@tools.py@.PATH_END.py
{ "filename": "isofit.py", "repo_name": "webbjj/m2mcluster", "repo_path": "m2mcluster_extracted/m2mcluster-main/examples/isotropic/isofit.py", "type": "Python" }
""" The below script is an example of how to use m2mcluster to fit an M2M model to a previously genereated mock isotropic dataset (mock_cluster.dat). In this example, only the mock clusters three dimensional density profile is being used as the target observable The initial model cluster is purposefully assumed to be ...
webbjjREPO_NAMEm2mclusterPATH_START.@m2mcluster_extracted@m2mcluster-main@examples@isotropic@isofit.py@.PATH_END.py
{ "filename": "record_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/eager/record_test.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@eager@record_test.py@.PATH_END.py
{ "filename": "table.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/table.py", "type": "Python" }
# Original code by: # John Gill <jng@europe.renre.com> # Copyright 2004 John Gill and John Hunter # # Subsequent changes: # The Matplotlib development team # Copyright The Matplotlib development team """ Tables drawing. .. note:: The table implementation in Matplotlib is lightly maintained. For a more...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@table.py@.PATH_END.py
{ "filename": "_tickformatstop.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.coloraxis.colorbar" _path_str = "layout.coloraxis.colorbar.tickformatstop" ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@coloraxis@colorbar@_tickformatstop.py@.PATH_END.py
{ "filename": "radiation_unit_test.py", "repo_name": "libgamera/GAMERA", "repo_path": "GAMERA_extracted/GAMERA-master/unit_tests/radiation_unit_test.py", "type": "Python" }
#/usr/local/bin/python import sys import os import numpy as np sys.path.append(os.path.abspath('../lib')) import gappa as gp import unittest class TestRadiationClass(unittest.TestCase): def grey_body(self,e,t,e_dens): return 15*e_dens*(gp.pi*gp.kb*t)**-4 *e**2 / (np.exp(e /(gp.kb*t))-1) def write_g...
libgameraREPO_NAMEGAMERAPATH_START.@GAMERA_extracted@GAMERA-master@unit_tests@radiation_unit_test.py@.PATH_END.py
{ "filename": "_tickformatstop.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.tickformatstop" _valid_props =...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@bar@marker@colorbar@_tickformatstop.py@.PATH_END.py
{ "filename": "ics_cooling.py", "repo_name": "hongwanliu/DarkHistory", "repo_path": "DarkHistory_extracted/DarkHistory-master/darkhistory/electrons/ics/ics_cooling.py", "type": "Python" }
"""Electron cooling through ICS.""" import numpy as np import pickle import darkhistory.physics as phys import darkhistory.spec.transferfunction as tf import darkhistory.spec.spectools as spectools from darkhistory.spec.spectrum import Spectrum from darkhistory.electrons.ics.ics_spectrum import ics_spec from darkhi...
hongwanliuREPO_NAMEDarkHistoryPATH_START.@DarkHistory_extracted@DarkHistory-master@darkhistory@electrons@ics@ics_cooling.py@.PATH_END.py
{ "filename": "Making_Images4slew.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/imaging/Making_Images4slew.py", "type": "Python" }
import numpy as np import argparse from ..lib.funcs2run_bat_tools import mk_sky_imgs4time_list def cli(): parser = argparse.ArgumentParser() parser.add_argument( "--t0", type=float, help="Min image start time to use (MET (s))", default=None ) parser.add_argument( "--dt", type=...
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@imaging@Making_Images4slew.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._button import Button from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._button.Button", "._font.Fo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@xaxis@rangeselector@__init__.py@.PATH_END.py
{ "filename": "test_fitting.py", "repo_name": "cosmo-ethz/seek", "repo_path": "seek_extracted/seek-master/test/test_fitting.py", "type": "Python" }
# SEEK 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. # # SEEK is distributed in the hope that it will be useful, # but WITHOUT ANY W...
cosmo-ethzREPO_NAMEseekPATH_START.@seek_extracted@seek-master@test@test_fitting.py@.PATH_END.py
{ "filename": "tf_text_graph_common.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/dnn/tf_text_graph_common.py", "type": "Python" }
def tokenize(s): tokens = [] token = "" isString = False isComment = False for symbol in s: isComment = (isComment and symbol != '\n') or (not isString and symbol == '#') if isComment: continue if symbol == ' ' or symbol == '\t' or symbol == '\r' or symbol == '\'...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@tf_text_graph_common.py@.PATH_END.py