metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "crossing_orbits.py", "repo_name": "j-faria/kima", "repo_path": "kima_extracted/kima-master/pykima/crossing_orbits.py", "type": "Python" }
# -*- coding: utf-8 -*- # original author Matthew Standing mxs1263@student.bham.ac.uk # https://github.com/j-faria/kima/pull/57 import os import numpy as np from .results import KimaResults # from astropy.constants G = 6.67408e-11 # m3/(kg s2) Msun = 1.9884754153381438e+30 # kg Rsun = 695700000.0 # m RHOsun = 1.4...
j-fariaREPO_NAMEkimaPATH_START.@kima_extracted@kima-master@pykima@crossing_orbits.py@.PATH_END.py
{ "filename": "mw.py", "repo_name": "astro-informatics/s2let", "repo_path": "s2let_extracted/s2let-main/src/test/python/mw.py", "type": "Python" }
import healpy as hp from pys2let import * import math import matplotlib.pyplot as plt import os import numpy as np L = 32 spin = 0 # fname = '/Users/bl/Dropbox/Astrodata/SDSS/Fields/Planck_EBV_256rQ.fits' fname = os.path.join( os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, "data", ...
astro-informaticsREPO_NAMEs2letPATH_START.@s2let_extracted@s2let-main@src@test@python@mw.py@.PATH_END.py
{ "filename": "figure.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/codegen/figure.py", "type": "Python" }
from io import StringIO from os import path as opath from codegen.datatypes import ( reindent_validator_description, add_constructor_params, add_docstring, ) from codegen.utils import write_source_py import inflect from plotly.basedatatypes import BaseFigure def build_figure_py( trace_node, base...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@codegen@figure.py@.PATH_END.py
{ "filename": "srd_batch.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/batches/srd_batch.py", "type": "Python" }
"""Metrics to investigate quantities related to SRD. Potentially could diverge from versions in scienceRadar. """ __all__ = ("fOBatch", "astrometryBatch", "rapidRevisitBatch") import warnings import healpy as hp import numpy as np import rubin_sim.maf.metric_bundles as mb import rubin_sim.maf.metrics as metrics imp...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@batches@srd_batch.py@.PATH_END.py
{ "filename": "demo_FEA_loads_static.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/fea/demo_FEA_loads_static.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@fea@demo_FEA_loads_static.py@.PATH_END.py
{ "filename": "utils.ipynb", "repo_name": "NOAO/nat-nb", "repo_path": "nat-nb_extracted/nat-nb-master/utils.ipynb", "type": "Jupyter Notebook" }
[![alt text](moon-snail.jpg "Moon Snail, Natica catena" )](http://www.aphotomarine.com/snail_euspira_catena_necklace_shell.html) ## Goals This notebook is intended to be loaded (using %run) into other notebooks in the same directory. It provides common configuration variables to the notebooks that load it. It is used...
NOAOREPO_NAMEnat-nbPATH_START.@nat-nb_extracted@nat-nb-master@utils.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "brinckmann/montepython_public", "repo_path": "montepython_public_extracted/montepython_public-master/montepython/likelihoods/bao_boss_aniso_gauss_approx/__init__.py", "type": "Python" }
import os import numpy as np import warnings import montepython.io_mp as io_mp from montepython.likelihood_class import Likelihood import scipy.constants as conts class bao_boss_aniso_gauss_approx(Likelihood): # initialization routine def __init__(self, path, data, command_line): Likelihood.__init__...
brinckmannREPO_NAMEmontepython_publicPATH_START.@montepython_public_extracted@montepython_public-master@montepython@likelihoods@bao_boss_aniso_gauss_approx@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "deepmind/optax", "repo_path": "optax_extracted/optax-main/optax/contrib/__init__.py", "type": "Python" }
# Copyright 2021 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@contrib@__init__.py@.PATH_END.py
{ "filename": "module.py", "repo_name": "guillochon/MOSFiT", "repo_path": "MOSFiT_extracted/MOSFiT-master/mosfit/modules/module.py", "type": "Python" }
"""Definitions for the ``Module`` class.""" import json from collections import OrderedDict import numpy as np from mosfit.printer import Printer class Module(object): """Base ``Module`` class.""" _REFERENCES = [] def __init__(self, name, model, **kwargs): """Initialize module. This i...
guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@mosfit@modules@module.py@.PATH_END.py
{ "filename": "_align.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/hoverlabel/_align.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="splom.hoverlabel", **kwargs): super(AlignValidator, 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@splom@hoverlabel@_align.py@.PATH_END.py
{ "filename": "_diffuse.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/lighting/_diffuse.py", "type": "Python" }
import _plotly_utils.basevalidators class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="diffuse", parent_name="isosurface.lighting", **kwargs ): super(DiffuseValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@lighting@_diffuse.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/utils/setup.py", "type": "Python" }
import os from os.path import join from sklearn._build_utils import get_blas_info def configuration(parent_package='', top_path=None): import numpy from numpy.distutils.misc_util import Configuration config = Configuration('utils', parent_package, top_path) config.add_subpackage('sparsetools') ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@utils@setup.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/hoverlabel/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="streamtube.hoverlabel.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@hoverlabel@font@_lineposition.py@.PATH_END.py
{ "filename": "sis_truncate.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/Profiles/sis_truncate.py", "type": "Python" }
__author__ = "sibirrer" import numpy as np from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase __all__ = ["SIS_truncate"] class SIS_truncate(LensProfileBase): """This class contains the function and the derivatives of the Singular Isothermal Sphere.""" param_names = ["theta_E", "r_t...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@Profiles@sis_truncate.py@.PATH_END.py
{ "filename": "cartesian.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/cartesian.py", "type": "Python" }
import numpy as np from cosmo import cosmo from scipy.spatial.transform import Rotation as R def rotate(ras, decs, pos): phi = np.radians(ras) theta = np.pi/2. - np.radians(decs) mean_phi = np.median(phi) mean_theta = np.median(theta) rot = R.from_rotvec(-mean_phi * np....
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@cartesian.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chains/pebblo_retrieval/base.py", "type": "Python" }
""" Pebblo Retrieval Chain with Identity & Semantic Enforcement for question-answering against a vector database. """ import datetime import inspect import logging from importlib.metadata import version from typing import Any, Dict, List, Optional from langchain.chains.base import Chain from langchain.chains.combine_...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chains@pebblo_retrieval@base.py@.PATH_END.py
{ "filename": "test_variablepsf.py", "repo_name": "quatrope/ProperImage", "repo_path": "ProperImage_extracted/ProperImage-master/drafts/test_variablepsf.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # test_recoverstats.py # # Copyright 2016 Bruno S <bruno.sanchez.63@gmail.com> # import os import shlex import subprocess import sys import numpy as np import matplotlib.pyplot as plt from properimage import simtools from properimage import propercoadd as pc from pro...
quatropeREPO_NAMEProperImagePATH_START.@ProperImage_extracted@ProperImage-master@drafts@test_variablepsf.py@.PATH_END.py
{ "filename": "test_repeat.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimes/methods/test_repeat.py", "type": "Python" }
import numpy as np import pytest from pandas import ( DatetimeIndex, Timestamp, date_range, ) import pandas._testing as tm class TestRepeat: def test_repeat_range(self, tz_naive_fixture): rng = date_range("1/1/2000", "1/1/2001") result = rng.repeat(5) assert result.freq is No...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimes@methods@test_repeat.py@.PATH_END.py
{ "filename": "dist.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/_distutils/dist.py", "type": "Python" }
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import contextlib import logging import os import pathlib import re import sys from collections.abc import Iterable from email import message_from_file from ._vendor.packaging.utils impo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@_distutils@dist.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mit-ll/spacegym-kspdg", "repo_path": "spacegym-kspdg_extracted/spacegym-kspdg-main/src/kspdg/private_src/python3_12/Windows_x86_64/kspdg_envs/lbg1/__init__.py", "type": "Python" }
# Pyarmor 8.5.11 (trial), 000000, non-profits, 2024-12-09T10:19:38.025174 from kspdg.private_src.python3_12.Windows_x86_64.pyarmor_runtime_000000 import __pyarmor__ __pyarmor__(__name__, __file__, b'PY000000\x00\x03\x0c\x00\xcb\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00\x89\x00\x00\x00\x12\t\x04...
mit-llREPO_NAMEspacegym-kspdgPATH_START.@spacegym-kspdg_extracted@spacegym-kspdg-main@src@kspdg@private_src@python3_12@Windows_x86_64@kspdg_envs@lbg1@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "vpelgrims/Bisp_1", "repo_path": "Bisp_1_extracted/Bisp_1-main/README.md", "type": "Markdown" }
*** BISP-1 Bayesian Inference of Starlight Polarization in 1D *** ``BISP-1`` implements the Bayesian method for tomographic decomposition of the plane-of-sky orientation of the magnetic field with the use of stellar polarimetry and distance developed in [Pelgrims et al., 2022, A&A, (submitted)](https://arxiv.org/ab...
vpelgrimsREPO_NAMEBisp_1PATH_START.@Bisp_1_extracted@Bisp_1-main@README.md@.PATH_END.py
{ "filename": "data_download.py", "repo_name": "EoRImaging/FHD", "repo_path": "FHD_extracted/FHD-master/data_download.py", "type": "Python" }
#!/usr/bin/python import os from astropy.time import Time from astropy.io import fits import psycopg2 import sys import socket from optparse import OptionParser import subprocess import datetime import time import zipfile import numpy as np #******************************** #Script that downloads GPU box files, runs ...
EoRImagingREPO_NAMEFHDPATH_START.@FHD_extracted@FHD-master@data_download.py@.PATH_END.py
{ "filename": "info_theory.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/stats/info_theory.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains simple functions for model selection. """ from __future__ import annotations import numpy as np __all__ = [ "akaike_info_criterion", "akaike_info_criterion_lsq", "bayesian_info_criterion", "bayesian_info_criteri...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@stats@info_theory.py@.PATH_END.py
{ "filename": "special_parse.py", "repo_name": "gmbrandt/HTOF", "repo_path": "HTOF_extracted/HTOF-main/htof/special_parse.py", "type": "Python" }
import numpy as np import warnings import pkg_resources from pandas import DataFrame, Series from shutil import copy from copy import deepcopy from astropy.time import Time from astropy.coordinates import Angle from astropy import units as u from scipy import stats, special from astropy.table import Table from htof.fi...
gmbrandtREPO_NAMEHTOFPATH_START.@HTOF_extracted@HTOF-main@htof@special_parse.py@.PATH_END.py
{ "filename": "lonlat.py", "repo_name": "NeoGeographyToolkit/StereoPipeline", "repo_path": "StereoPipeline_extracted/StereoPipeline-master/graveyard/ngt_utils/lonlat.py", "type": "Python" }
## __BEGIN_LICENSE__ ## Copyright (C) 2006-2010 United States Government as represented by ## the Administrator of the National Aeronautics and Space Administration ## All Rights Reserved. ## __END_LICENSE__ import sys import math import numpy def w2e_deg(lon): '''Convert positive-west longitude to positive-east ...
NeoGeographyToolkitREPO_NAMEStereoPipelinePATH_START.@StereoPipeline_extracted@StereoPipeline-master@graveyard@ngt_utils@lonlat.py@.PATH_END.py
{ "filename": "activations.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/activations/activations.py", "type": "Python" }
from keras.src import backend from keras.src import ops from keras.src.api_export import keras_export @keras_export("keras.activations.relu") def relu(x, negative_slope=0.0, max_value=None, threshold=0.0): """Applies the rectified linear unit activation function. With default values, this returns the standar...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@activations@activations.py@.PATH_END.py
{ "filename": "parse.py", "repo_name": "Caltech-IPAC/Montage", "repo_path": "Montage_extracted/Montage-main/python/MontagePy/macos_wheels/parse.py", "type": "Python" }
import os import glob import json from jinja2 import Template MONTAGELIB = os.path.join('Montage', 'MontageLib') CTYPE = {} CTYPE['int'] = 'int ' CTYPE['int*'] = 'int *' CTYPE['integer'] = 'int ' CTYPE['char'] = 'char ' CTYPE['string'] = 'char *' CTYPE['string*'] = 'char *' CTYPE['boolean'] = 'int ' CTYPE['boolean*']...
Caltech-IPACREPO_NAMEMontagePATH_START.@Montage_extracted@Montage-main@python@MontagePy@macos_wheels@parse.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jotaylor/acdc-hst", "repo_path": "acdc-hst_extracted/acdc-hst-main/src/acdc/data/__init__.py", "type": "Python" }
jotaylorREPO_NAMEacdc-hstPATH_START.@acdc-hst_extracted@acdc-hst-main@src@acdc@data@__init__.py@.PATH_END.py
{ "filename": "trackzone.py", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/solutions/trackzone.py", "type": "Python" }
# Ultralytics YOLO 🚀, AGPL-3.0 license import cv2 import numpy as np from ultralytics.solutions.solutions import BaseSolution from ultralytics.utils.plotting import Annotator, colors class TrackZone(BaseSolution): """ A class to manage region-based object tracking in a video stream. This class extends...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@solutions@trackzone.py@.PATH_END.py
{ "filename": "driver.py", "repo_name": "radiocosmology/driftscan", "repo_path": "driftscan_extracted/driftscan-master/examples/disharray/driver.py", "type": "Python" }
from drift.core import beamtransfer, manager from drift.pipeline import timestream from simplearray import DishArray ### Make the analysis products for the telescope. This examples focuses only ### on the m-mode products for mapmaking # Create telescope object and set zenith tel = DishArray(latitude=30.0, longitude=...
radiocosmologyREPO_NAMEdriftscanPATH_START.@driftscan_extracted@driftscan-master@examples@disharray@driver.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/ollama/tests/unit_tests/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@ollama@tests@unit_tests@__init__.py@.PATH_END.py
{ "filename": "plot_violin.py", "repo_name": "vblanka24/Ba_star_classification_PaperIII", "repo_path": "Ba_star_classification_PaperIII_extracted/Ba_star_classification_PaperIII-main/plotting_resids_correls/plot_violin.py", "type": "Python" }
import sys, os import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from collections import defaultdict import seaborn as sns import numpy as np import pandas as pd import seaborn as sns # from process_data_lib import * from processplot_data_lib import * from plot_lib import * allt...
vblanka24REPO_NAMEBa_star_classification_PaperIIIPATH_START.@Ba_star_classification_PaperIII_extracted@Ba_star_classification_PaperIII-main@plotting_resids_correls@plot_violin.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattergl.stream", **kwargs ): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@stream@_maxpoints.py@.PATH_END.py
{ "filename": "compiler.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/contrib/regular_languages/compiler.py", "type": "Python" }
r""" Compiler for a regular grammar. Example usage:: # Create and compile grammar. p = compile('add \s+ (?P<var1>[^\s]+) \s+ (?P<var2>[^\s]+)') # Match input string. m = p.match('add 23 432') # Get variables. m.variables().get('var1') # Returns "23" m.variables().get('var2') # Return...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@contrib@regular_languages@compiler.py@.PATH_END.py
{ "filename": "driver.py", "repo_name": "EmmanuelSchaan/HaloGen", "repo_path": "HaloGen_extracted/HaloGen-master/driver.py", "type": "Python" }
import universe reload(universe) from universe import * import mass_function reload(mass_function) from mass_function import * import profile reload(profile) from profile import * import i_halo_model reload(i_halo_model) from i_halo_model import * import p3d reload(p3d) from p3d import * import projection_kernel r...
EmmanuelSchaanREPO_NAMEHaloGenPATH_START.@HaloGen_extracted@HaloGen-master@driver.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/reproject", "repo_path": "reproject_extracted/reproject-main/reproject/adaptive/tests/__init__.py", "type": "Python" }
astropyREPO_NAMEreprojectPATH_START.@reproject_extracted@reproject-main@reproject@adaptive@tests@__init__.py@.PATH_END.py
{ "filename": "test_stub.py", "repo_name": "gotsunami/Youpi", "repo_path": "Youpi_extracted/Youpi-master/terapix/unittesting/test_stub.py", "type": "Python" }
""" Tests for the Condor Stub library """ import unittest, types, time import base64, marshal, sys from mock import Mock # from terapix.lib.cluster import condor from terapix.lib.cluster.stub import StubCondorQueue, StubCondorClient from terapix.lib.cluster.condor import CondorJob # class StubCondorQueueTest(unittest...
gotsunamiREPO_NAMEYoupiPATH_START.@Youpi_extracted@Youpi-master@terapix@unittesting@test_stub.py@.PATH_END.py
{ "filename": "_itertools.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/pkg_resources/_vendor/importlib_resources/_itertools.py", "type": "Python" }
from itertools import filterfalse from typing import ( Callable, Iterable, Iterator, Optional, Set, TypeVar, Union, ) # Type and type variable definitions _T = TypeVar('_T') _U = TypeVar('_U') def unique_everseen( iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None ) -> ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@pkg_resources@_vendor@importlib_resources@_itertools.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/geometry/__init__.py", "type": "Python" }
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@geometry@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "gotsunami/Youpi", "repo_path": "Youpi_extracted/Youpi-master/terapix/youpi/templatetags/__init__.py", "type": "Python" }
gotsunamiREPO_NAMEYoupiPATH_START.@Youpi_extracted@Youpi-master@terapix@youpi@templatetags@__init__.py@.PATH_END.py
{ "filename": "test_spectrum.py", "repo_name": "gammapy/gammapy", "repo_path": "gammapy_extracted/gammapy-main/gammapy/datasets/tests/test_spectrum.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose, assert_equal import astropy.units as u from astropy.io import fits from astropy.table import Table from astropy.time import Time from astropy.utils.exceptions import AstropyUserWar...
gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@datasets@tests@test_spectrum.py@.PATH_END.py
{ "filename": "_data.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/sparse/_data.py", "type": "Python" }
"""Base class for sparse matrice with a .data attribute subclasses must provide a _with_data() method that creates a new matrix with the same sparsity pattern as self but with a different data array """ import math import numpy as np from ._base import _spbase, sparray, _ufuncs_with_fixed_point_at_zero ...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@_data.py@.PATH_END.py
{ "filename": "_traceref.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/error_y/_traceref.py", "type": "Python" }
import _plotly_utils.basevalidators class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="histogram.error_y", **kwargs ): super(TracerefValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@error_y@_traceref.py@.PATH_END.py
{ "filename": "paper.md", "repo_name": "steven-murray/powerbox", "repo_path": "powerbox_extracted/powerbox-main/paper/paper.md", "type": "Markdown" }
--- title: 'powerbox: A Python package for creating structured fields with isotropic power spectra' tags: - Python - astronomy - power spectrum - signal analysis authors: - name: Steven G. Murray orcid: 0000-0003-3059-3823 affiliation: 1, 2 affiliations: - name: International Centre for Radio Astrono...
steven-murrayREPO_NAMEpowerboxPATH_START.@powerbox_extracted@powerbox-main@paper@paper.md@.PATH_END.py
{ "filename": "copy_injection_recovery.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_NRTv2/injection_42/copy_injection_recovery.py", "type": "Python" }
""" Idea: try different learning rate schemes to try and fix the injections """ import psutil p = psutil.Process() p.cpu_affinity([0]) import os os.environ['CUDA_VISIBLE_DEVICES'] = "3" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10" import numpy as np import argparse # Regular imports import argparse import cop...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_NRTv2@injection_42@copy_injection_recovery.py@.PATH_END.py
{ "filename": "test_apply_background.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/mrs_imatch/tests/test_apply_background.py", "type": "Python" }
""" Unit test for mrs_imatch apply background """ import pytest from stdatamodels.jwst import datamodels from jwst.datamodels import ModelContainer from jwst.assign_wcs import AssignWcsStep from jwst.mrs_imatch.mrs_imatch_step import apply_background_2d import numpy as np wcsinfo = { 'dec_ref': 0.0, 'ra_ref...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@mrs_imatch@tests@test_apply_background.py@.PATH_END.py
{ "filename": "log.py", "repo_name": "purmortal/galcraft", "repo_path": "galcraft_extracted/galcraft-main/GalCraft/modules/log.py", "type": "Python" }
import logging class Logger: def __init__(self, logfile, logger=None, level=logging.INFO, mode='a'): self.logger = logging.getLogger(logger) self.logger.propagate = False self.logger.setLevel(level) fh = logging.FileHandler(logfile, mode=mode, encoding='utf-8') fh.setLevel(...
purmortalREPO_NAMEgalcraftPATH_START.@galcraft_extracted@galcraft-main@GalCraft@modules@log.py@.PATH_END.py
{ "filename": "profiler.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/mosaic/gpu/profiler.py", "type": "Python" }
# Copyright 2024 The JAX 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 applicable law...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@mosaic@gpu@profiler.py@.PATH_END.py
{ "filename": "multiprocessing.py", "repo_name": "adrn/schwimmbad", "repo_path": "schwimmbad_extracted/schwimmbad-main/src/schwimmbad/multiprocessing.py", "type": "Python" }
# type: ignore import functools import signal import multiprocess from multiprocess.pool import Pool __all__ = ["MultiPool"] def _initializer_wrapper(actual_initializer, *rest): """ We ignore SIGINT. It's up to our parent to kill us in the typical condition of this arising from ``^C`` on a terminal. If ...
adrnREPO_NAMEschwimmbadPATH_START.@schwimmbad_extracted@schwimmbad-main@src@schwimmbad@multiprocessing.py@.PATH_END.py
{ "filename": "bindata.py", "repo_name": "scottransom/presto", "repo_path": "presto_extracted/presto-master/python/binopttest/bindata.py", "type": "Python" }
from future import standard_library standard_library.install_aliases() from builtins import range def catvar(col): ret = [] global a, b, c, d, e for i in range(shape(a)[0]): ret.append(a[i][col]) for i in range(shape(b)[0]): ret.append(b[i][col]) for i in range(shape(c)[0]): ...
scottransomREPO_NAMEprestoPATH_START.@presto_extracted@presto-master@python@binopttest@bindata.py@.PATH_END.py
{ "filename": "hugging_face_model.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/hugging_face_model.py", "type": "Python" }
from typing import Iterator, List, Optional import requests from langchain_core.documents import Document from langchain_community.document_loaders.base import BaseLoader class HuggingFaceModelLoader(BaseLoader): """ Load model information from `Hugging Face Hub`, including README content. This loader ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@hugging_face_model.py@.PATH_END.py
{ "filename": "mathutils.py", "repo_name": "cmbant/CAMB", "repo_path": "CAMB_extracted/CAMB-master/camb/mathutils.py", "type": "Python" }
""" This module contains some fast utility functions that are useful in the same contexts as camb. They are entirely independent of the main camb code. """ from ctypes import c_int, c_double, c_bool, POINTER from .baseconfig import camblib, numpy_1d, numpy_2d, numpy_3d import numpy as np _chi2 = camblib.__mathutils_...
cmbantREPO_NAMECAMBPATH_START.@CAMB_extracted@CAMB-master@camb@mathutils.py@.PATH_END.py
{ "filename": "_iconsize.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/map/layer/symbol/_iconsize.py", "type": "Python" }
import _plotly_utils.basevalidators class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="iconsize", parent_name="layout.map.layer.symbol", **kwargs ): super(IconsizeValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@map@layer@symbol@_iconsize.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/colorbar/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._yref import YrefValidator from ._ypad import YpadValidator from ._yanchor import YanchorValidator from ._y import YValidator from ._xref import XrefValidator from ._xpad import XpadValidator fr...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@colorbar@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/tests/__init__.py", "type": "Python" }
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@tests@__init__.py@.PATH_END.py
{ "filename": "_ticklabelposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/colorbar/_ticklabelposition.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="barpolar.marker.colorbar", **kwargs ): super(TicklabelpositionValidator, self).__ini...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@colorbar@_ticklabelposition.py@.PATH_END.py
{ "filename": "binomialFPEffectiveness.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline/binomialFPEffectiveness.ipynb", "type": "Jupyter Notebook" }
Reliability is given by $$ R = \frac{N_{\mathrm{truePC}}}{N_{\mathrm{obsPC}}} = 1 - \frac{N_{\mathrm{obsFP}}}{N_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) = 1 - \frac{F_{\mathrm{obsFP}}}{F_{\mathrm{obsPC}}} \left( \frac{1 - E}{E} \right) $$ where $E = N_{\mathrm{obsFP}}/N_{\mathrm{trueFP}}$ is the false positiv...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline@binomialFPEffectiveness.ipynb@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattermap.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@_xpad.py@.PATH_END.py
{ "filename": "SkyBrightness.py", "repo_name": "ZwickyTransientFacility/ztf_sim", "repo_path": "ztf_sim_extracted/ztf_sim-master/ztf_sim/SkyBrightness.py", "type": "Python" }
"""Sky brightness model.""" import sklearn from sklearn import model_selection, ensemble, preprocessing, pipeline from sklearn import neighbors, svm, linear_model from sklearn_pandas import DataFrameMapper import joblib import xgboost as xgb import pandas as pd import numpy as np from .constants import FILTER_NAME_TO_...
ZwickyTransientFacilityREPO_NAMEztf_simPATH_START.@ztf_sim_extracted@ztf_sim-master@ztf_sim@SkyBrightness.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/style/core.py", "type": "Python" }
from __future__ import absolute_import, division, print_function import six """ Core functions and attributes for the matplotlib style library: ``use`` Select style sheet to override the current matplotlib settings. ``context`` Context manager to use a style sheet temporarily. ``available`` List availabl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@style@core.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "nanograv/enterprise_extensions", "repo_path": "enterprise_extensions_extracted/enterprise_extensions-master/README.md", "type": "Markdown" }
# enterprise_extensions A set of extensions, utilities, and scripts for the [enterprise](https://github.com/nanograv/enterprise) PTA analysis code. ## installation `enterprise_extensions` is not yet available on the Python Package Index (PyPI), but you can still install it directly from GitHub using `pip`. To install ...
nanogravREPO_NAMEenterprise_extensionsPATH_START.@enterprise_extensions_extracted@enterprise_extensions-master@README.md@.PATH_END.py
{ "filename": "wfAlgorithmFactory.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/python/lsst/ts/wep/estimation/wfAlgorithmFactory.py", "type": "Python" }
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@python@lsst@ts@wep@estimation@wfAlgorithmFactory.py@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/colorbar/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="histogram2dcontour.colorbar", **kwargs ): super(TickmodeValidator, self).__init__( plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@colorbar@_tickmode.py@.PATH_END.py
{ "filename": "numpyro_ext.py", "repo_name": "markfortune/luas", "repo_path": "luas_extracted/luas-main/src/luas/numpyro_ext.py", "type": "Python" }
import numpyro.distributions as dist from numpyro.distributions.util import promote_shapes, validate_sample from jax import lax __all__ = [ "LuasNumPyro", ] class LuasNumPyro(dist.Distribution): """Custom ``NumPyro`` distribution which allows a ``luas.GPClass.GP`` object to be used with ``NumPyro``. ...
markfortuneREPO_NAMEluasPATH_START.@luas_extracted@luas-main@src@luas@numpyro_ext.py@.PATH_END.py
{ "filename": "_ygap.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/_ygap.py", "type": "Python" }
import _plotly_utils.basevalidators class YgapValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="ygap", parent_name="heatmap", **kwargs): super(YgapValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@_ygap.py@.PATH_END.py
{ "filename": "CompositeLikelihood.py", "repo_name": "igomezv/simplemc_tests", "repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/likelihoods/CompositeLikelihood.py", "type": "Python" }
from simplemc.likelihoods.BaseLikelihood import BaseLikelihood import scipy as sp class CompositeLikelihood(BaseLikelihood): def __init__(self, llist=[]): """ This thing takes likelihoods and cooks one which is a composite of many. Parameters ---------- llist ...
igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@likelihoods@CompositeLikelihood.py@.PATH_END.py
{ "filename": "test_upfirdn.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/signal/tests/test_upfirdn.py", "type": "Python" }
# Code adapted from "upfirdn" python library with permission: # # Copyright (c) 2009, Motorola, Inc # # 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 re...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@signal@tests@test_upfirdn.py@.PATH_END.py
{ "filename": "Composite_model.ipynb", "repo_name": "andreatramacere/jetset", "repo_path": "jetset_extracted/jetset-master/doc/documentation_notebooks/notebooks/composite_model/Composite_model.ipynb", "type": "Jupyter Notebook" }
.. _composite_models: # Composite Models and depending pars ```python from jetset.jet_model import Jet from jetset.plot_sedfit import PlotSED from jetset.model_manager import FitModel ``` Composite models allow combining different models, such as Jet, and templates, including additive or multiplicative models and gi...
andreatramacereREPO_NAMEjetsetPATH_START.@jetset_extracted@jetset-master@doc@documentation_notebooks@notebooks@composite_model@Composite_model.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "SPARTA-dev/SPARTA", "repo_path": "SPARTA_extracted/SPARTA-master/sparta/UNICOR/__init__.py", "type": "Python" }
from .Spectrum import Spectrum from .Template import Template from .CCF1d import CCF1d
SPARTA-devREPO_NAMESPARTAPATH_START.@SPARTA_extracted@SPARTA-master@sparta@UNICOR@__init__.py@.PATH_END.py
{ "filename": "eos.py", "repo_name": "geodynamics/burnman", "repo_path": "burnman_extracted/burnman-main/burnman/tools/eos.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for # the Earth and Planetary Sciences # Copyright (C) 2012 - 2021 by the BurnMan team, released under the GNU # GPL v2 or later. import numpy as np import warnings from scipy.linalg import logm def check_eos_consistency( m, P=1.0e9, ...
geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@burnman@tools@eos.py@.PATH_END.py
{ "filename": "_histogram2dcontour.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/template/data/_histogram2dcontour.py", "type": "Python" }
import _plotly_utils.basevalidators class Histogram2DcontourValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="histogram2dcontour", parent_name="layout.template.data", **kwargs ): super(Histogram2DcontourValidator, self).__i...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@template@data@_histogram2dcontour.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/unselected/marker/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.unselected.marker", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@unselected@marker@_size.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/hoverlabel/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.hoverlabel.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@hoverlabel@font@_lineposition.py@.PATH_END.py
{ "filename": "redcal_inspect_2458086.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458086.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Redundant Calibration Nightly Notebook **Josh Dillon**, Last Revised 7/30/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal from hera_qm.metrics_io import load_metric_file import glob import os from copy import deepcopy import inspe...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@redcal_inspect@redcal_inspect_2458086.ipynb@.PATH_END.py
{ "filename": "talk_plots.ipynb", "repo_name": "ojhall94/halletal2019", "repo_path": "halletal2019_extracted/halletal2019-master/code/Scripts/talk_plots.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import matplotlib from mpl_toolkits.axes_grid1.inset_locator import inset_axes, mark_inset from mpl_toolkits.axes_grid1.colorbar import colorbar matplotlib.rcParams['text.usetex'] = False sns.set_palette('colorblind',...
ojhall94REPO_NAMEhalletal2019PATH_START.@halletal2019_extracted@halletal2019-master@code@Scripts@talk_plots.ipynb@.PATH_END.py
{ "filename": "name.py", "repo_name": "jkluter/MLG", "repo_path": "MLG_extracted/MLG-master/name.py", "type": "Python" }
import numpy as np __all__ = ['name'] def name(event_id, no_name = True, silent = False): '''------------------------------------------------------------ Description: --------------------------------------------------------------- Input: --------------------------------------------------------------- Output:...
jkluterREPO_NAMEMLGPATH_START.@MLG_extracted@MLG-master@name.py@.PATH_END.py
{ "filename": "_tickformatstopdefaults.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.scene.yaxis", **kwargs, ): super(TickformatstopdefaultsValidator, sel...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@_tickformatstopdefaults.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distExpGamma/getExpGammaLogPDF/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np import glob import sys fontsize = 17 marker ={ "CK" : "-" , "IK" : "." , "RK" : "-" } xlab = { "CK" : "X ( real/imaginary components )" , "IK" : "X ( integer-valued )" , "RK" : "X ( r...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distExpGamma@getExpGammaLogPDF@main.py@.PATH_END.py
{ "filename": "physics.py", "repo_name": "johannesulf/dsigma", "repo_path": "dsigma_extracted/dsigma-main/dsigma/physics.py", "type": "Python" }
"""Physics functions for the dsigma pipeline.""" import numpy as np from astropy import constants as c from astropy import units as u from scipy.special import jv, jn_zeros from astropy.cosmology import FlatLambdaCDM __all__ = ['mpc_per_degree', 'projection_angle', 'critical_surface_density', 'effective_c...
johannesulfREPO_NAMEdsigmaPATH_START.@dsigma_extracted@dsigma-main@dsigma@physics.py@.PATH_END.py
{ "filename": "nse.py", "repo_name": "nuc-astro/winnet", "repo_path": "winnet_extracted/winnet-master/test/nse.py", "type": "Python" }
#!/usr/bin/env python t.checklist = { \ 'finab.dat' : { 'method':'default', 'tolerance':2.0e-4 }, \ } t.program = t.basedir + "/bin/winnet" t.testdir = t.basedir + "/test/" + t.testname t.logfile = t.testdir + ".log" t.arcfile = t.testdir + ".tar.gz"
nuc-astroREPO_NAMEwinnetPATH_START.@winnet_extracted@winnet-master@test@nse.py@.PATH_END.py
{ "filename": "_tracerefminus.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/error_y/_tracerefminus.py", "type": "Python" }
import _plotly_utils.basevalidators class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter.error_y", **kwargs ): super(TracerefminusValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@error_y@_tracerefminus.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "joezuntz/cosmosis", "repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/samplers/pmc/__init__.py", "type": "Python" }
joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@samplers@pmc@__init__.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/selected/marker/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermap.selected.marker", **kwargs ): super(OpacityValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@selected@marker@_opacity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "JulianBMunoz/RelicFast", "repo_path": "RelicFast_extracted/RelicFast-master/CAMB_Current/pycamb/camb/__init__.py", "type": "Python" }
# coding: utf8 """ Python CAMB interface (http://camb.info) """ __author__ = "Antony Lewis" __contact__ = "antony at cosmologist dot info" __status__ = "beta" __version__ = "0.1.6.1" from .baseconfig import dll_import from .camb import CAMBdata, MatterTransferData, get_results, get_transfer_functions, get_background...
JulianBMunozREPO_NAMERelicFastPATH_START.@RelicFast_extracted@RelicFast-master@CAMB_Current@pycamb@camb@__init__.py@.PATH_END.py
{ "filename": "overview.md", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/docs/source/getting-started/overview.md", "type": "Markdown" }
# Overview ```{eval-rst} .. currentmodule:: plonk ``` This document gives an overview of using Plonk for analysis and visualization of smoothed particle hydrodynamics data. For a further guide see {doc}`../../user-guide/usage`. ```{toctree} :maxdepth: 1 overview/data overview/visualization overview/analysis ``` ``...
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@docs@source@getting-started@overview.md@.PATH_END.py
{ "filename": "migrate-to-maplibre.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/doc/python/migrate-to-maplibre.md", "type": "Markdown" }
--- jupyter: jupytext: notebook_metadata_filter: all text_representation: extension: .md format_name: markdown format_version: '1.3' jupytext_version: 1.16.1 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3 language_info: codemirror_mode...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@python@migrate-to-maplibre.md@.PATH_END.py
{ "filename": "_templateitemname.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py", "type": "Python" }
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.xaxis.tickformatstop", **kwargs, ): super(TemplateitemnameValidator, self).__init__...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@xaxis@tickformatstop@_templateitemname.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "RadioAstronomySoftwareGroup/pyuvdata", "repo_path": "pyuvdata_extracted/pyuvdata-main/tests/uvbeam/__init__.py", "type": "Python" }
# Copyright (c) 2019 Radio Astronomy Software Group # Licensed under the 2-clause BSD License
RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@tests@uvbeam@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jaxlib/README.md", "type": "Markdown" }
# jaxlib: support library for JAX jaxlib is the support library for JAX. While JAX itself is a pure Python package, jaxlib contains the binary (C/C++) parts of the library, including Python bindings, the XLA compiler, the PJRT runtime, and a handful of handwritten kernels. For more information, including installation ...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jaxlib@README.md@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "tardis-sn/tardis", "repo_path": "tardis_extracted/tardis-main/tardis/montecarlo/tests/conftest.py", "type": "Python" }
import os import pytest from tardis.io import config_reader from ctypes import ( CDLL, byref, c_int64, c_double, c_ulong, ) from tardis.montecarlo.struct import ( RPacket, StorageModel, RKState, TARDIS_PACKET_STATUS_IN_PROCESS, CONTINUUM_OFF, BoundFreeTreatment, ) from tar...
tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@montecarlo@tests@conftest.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Nikhel1/Gal-DINO", "repo_path": "Gal-DINO_extracted/Gal-DINO-main/models/dino/ops/functions/__init__.py", "type": "Python" }
# ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. # Licensed under the Apache License, Version 2.0 [see LICENSE for details] # -------------------------------------------------------------------------...
Nikhel1REPO_NAMEGal-DINOPATH_START.@Gal-DINO_extracted@Gal-DINO-main@models@dino@ops@functions@__init__.py@.PATH_END.py
{ "filename": "_range.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/radialaxis/_range.py", "type": "Python" }
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="layout.polar.radialaxis", **kwargs ): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@radialaxis@_range.py@.PATH_END.py
{ "filename": "simple_radial_profile.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/doc/source/cookbook/simple_radial_profile.py", "type": "Python" }
import yt # Load the dataset. ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030") # Create a sphere of radius 100 kpc in the center of the box. my_sphere = ds.sphere("c", (100.0, "kpc")) # Create a profile of the average density vs. radius. plot = yt.ProfilePlot( my_sphere, ("index", "radius"), ("gas", ...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@simple_radial_profile.py@.PATH_END.py
{ "filename": "velociraptor_test.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/tests/velociraptor_test.py", "type": "Python" }
import numpy as np import pytest import pynbody import pynbody.test_utils @pytest.fixture(scope='module', autouse=True) def get_data(): pynbody.test_utils.ensure_test_data_available("swift") @pytest.mark.parametrize("load_all", [True, False]) def test_swift_velociraptor(load_all): f = pynbody.load("testdat...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@tests@velociraptor_test.py@.PATH_END.py
{ "filename": "test_c_sockets_implementation.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/compile_tests/test_c_sockets_implementation.py", "type": "Python" }
from amuse.support.interface import InCodeComponentImplementation from amuse.test.amusetest import TestWithMPI from amuse.support import exceptions from amuse.support import options import os import time from amuse.units import nbody_system from amuse.units import units from amuse import datamodel from amuse.rfi.tool...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@compile_tests@test_c_sockets_implementation.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/waterfall/decreasing/marker/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._line import LineValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._line.LineValidator", "._color.ColorValidator"] )
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@waterfall@decreasing@marker@__init__.py@.PATH_END.py
{ "filename": "SDSS.py", "repo_name": "mjuric/lsd", "repo_path": "lsd_extracted/lsd-master/src/lsd/builtins/SDSS.py", "type": "Python" }
import os from .misc import FileTable class RunToMJD(object): def __init__(self, runlist=None): if runlist is None: runlist = os.getenv('SDSS_RUNLIST', None) if runlist is None: from .. import config runlist = os.path.join(config.data_dir, 'sdss', 'opRunlist.par') self.run2mjd = FileTable(runlist).ma...
mjuricREPO_NAMElsdPATH_START.@lsd_extracted@lsd-master@src@lsd@builtins@SDSS.py@.PATH_END.py
{ "filename": "_outlinewidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/colorbar/_outlinewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="streamtube.colorbar", **kwargs ): super(OutlinewidthValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@colorbar@_outlinewidth.py@.PATH_END.py
{ "filename": "setup-mpf.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/tractor/setup-mpf.py", "type": "Python" }
from distutils.core import setup, Extension import numpy import os numpy_inc = [numpy.get_include()] cflags = os.environ.get('CFLAGS') kwargs = {} if os.environ.get('CC') == 'icc': if cflags is None: cflags = '-g -xhost -axMIC-AVX512' else: print('mp_fourier: using user-specified CFLAGS') ...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@tractor@setup-mpf.py@.PATH_END.py
{ "filename": "WaveToy.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/CarpetX/WaveToy.py", "type": "Python" }
import os import sys import re import grid from cactusthorn import CactusThorn, loop from sympy import sympify, sin, cos, pi import NRPy_param_funcs as par from subprocess import call import numpy as np from fstr import f from outputC import lhrh par.set_parval_from_str("outputC::PRECISION", "CCTK_REALVEC") pre_kerne...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@CarpetX@WaveToy.py@.PATH_END.py