metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "tutorial1.ipynb", "repo_name": "nanograv/la_forge", "repo_path": "la_forge_extracted/la_forge-main/docs/_static/notebooks/tutorial1.ipynb", "type": "Jupyter Notebook" }
# Tutorial #1 Basic Core Usage ```python import la_forge.core as co import matplotlib.pyplot as plt %matplotlib inline %config InlineBackend.figure_format = 'retina' import numpy as np import json ``` ## Loading a Chain Directory ```python chaindir = '/Users/hazboun/software_development/la_forge/tests/data/chains/...
nanogravREPO_NAMEla_forgePATH_START.@la_forge_extracted@la_forge-main@docs@_static@notebooks@tutorial1.ipynb@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="sankey", **kwargs): super(VisibleValidator, 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@sankey@_visible.py@.PATH_END.py
{ "filename": "2.BAT_Data_Download.ipynb", "repo_name": "KenethGarcia/ClassiPyGRB", "repo_path": "ClassiPyGRB_extracted/ClassiPyGRB-master/docs/2.BAT_Data_Download.ipynb", "type": "Jupyter Notebook" }
_This notebook was developed by [Keneth Garcia](https://www.linkedin.com/in/keneth-garcia-a6305b1b9/). Source and license info are on [GitHub](https://github.com/KenethGarcia/ClassiPyGRB)._ # Swift Data Download Results for the Swift/BAT Gamma-Ray Burst (GRBs) on board of The Neil Gehrels Swift Observatory are present...
KenethGarciaREPO_NAMEClassiPyGRBPATH_START.@ClassiPyGRB_extracted@ClassiPyGRB-master@docs@2.BAT_Data_Download.ipynb@.PATH_END.py
{ "filename": "waveforms.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/signal/waveforms.py", "type": "Python" }
# Author: Travis Oliphant # 2003 # # Feb. 2010: Updated by Warren Weckesser: # Rewrote much of chirp() # Added sweep_poly() from __future__ import division, print_function, absolute_import import numpy as np from numpy import asarray, zeros, place, nan, mod, pi, extract, log, sqrt, \ exp, cos, sin, polyval, po...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@signal@waveforms.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "karllark/measure_extinction", "repo_path": "measure_extinction_extracted/measure_extinction-master/measure_extinction/__init__.py", "type": "Python" }
from importlib.metadata import version as _version, PackageNotFoundError try: __version__ = _version(__name__) except PackageNotFoundError: pass
karllarkREPO_NAMEmeasure_extinctionPATH_START.@measure_extinction_extracted@measure_extinction-master@measure_extinction@__init__.py@.PATH_END.py
{ "filename": "redcal_inspect_2458144.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458144.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_2458144.ipynb@.PATH_END.py
{ "filename": "fitForSpecifiedNumberOfLineSegments_standard_deviation.py", "repo_name": "cjekel/piecewise_linear_fit_py", "repo_path": "piecewise_linear_fit_py_extracted/piecewise_linear_fit_py-master/examples/fitForSpecifiedNumberOfLineSegments_standard_deviation.py", "type": "Python" }
# fit for a specified number of line segments # you specify the number of line segments you want, the library does the rest # import our libraries import numpy as np import matplotlib.pyplot as plt import pwlf # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45...
cjekelREPO_NAMEpiecewise_linear_fit_pyPATH_START.@piecewise_linear_fit_py_extracted@piecewise_linear_fit_py-master@examples@fitForSpecifiedNumberOfLineSegments_standard_deviation.py@.PATH_END.py
{ "filename": "_end.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2d/xbins/_end.py", "type": "Python" }
import _plotly_utils.basevalidators class EndValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="end", parent_name="histogram2d.xbins", **kwargs): super(EndValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2d@xbins@_end.py@.PATH_END.py
{ "filename": "_column.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/domain/_column.py", "type": "Python" }
import _plotly_utils.basevalidators class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.polar.domain", **kwargs ): super(ColumnValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@domain@_column.py@.PATH_END.py
{ "filename": "_widthsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/marker/line/_widthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="histogram.marker.line", **kwargs ): super(WidthsrcValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@marker@line@_widthsrc.py@.PATH_END.py
{ "filename": "timestrings.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/tests/timestrings.py", "type": "Python" }
#!/usr/bin/env python from spt3g import core import time, sys # Check round trips assert(str(core.G3Time('20170101_000000')) == '01-Jan-2017:00:00:00.000000000') assert(str(core.G3Time('01-Jan-2017:00:00:00')) == '01-Jan-2017:00:00:00.000000000') assert(str(core.G3Time('170101_000000')) == '01-Jan-2017:00:00:00.00000...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@tests@timestrings.py@.PATH_END.py
{ "filename": "_legendrank.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="bar", **kwargs): super(LegendrankValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@_legendrank.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/cluster/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.cluster", **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@scattermapbox@cluster@_size.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "prajwel/curvit", "repo_path": "curvit_extracted/curvit-main/docs/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
prajwelREPO_NAMEcurvitPATH_START.@curvit_extracted@curvit-main@docs@conf.py@.PATH_END.py
{ "filename": "test_astar.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_astar.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2020, 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_astar.py@.PATH_END.py
{ "filename": "sharding_policies_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/checkpoint/sharding/sharding_policies_test.py", "type": "Python" }
# Copyright 2023 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@checkpoint@sharding@sharding_policies_test.py@.PATH_END.py
{ "filename": "master_flat.py", "repo_name": "JamesKirk11/Tiberius", "repo_path": "Tiberius_extracted/Tiberius-main/src/reduction_utils/master_flat.py", "type": "Python" }
#### Author of this code: James Kirk #### Contact: jameskirk@live.co.uk import matplotlib.pyplot as plt from astropy.io import fits import numpy as np import argparse from scipy.signal import medfilt from scipy.ndimage import filters from scipy.stats import median_abs_deviation as mad import pickle # Prevent matplotl...
JamesKirk11REPO_NAMETiberiusPATH_START.@Tiberius_extracted@Tiberius-main@src@reduction_utils@master_flat.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/src/nextline_schedule/schema/auto/__init__.py", "type": "Python" }
__all__ = [ 'MutationScheduleAutoMode', 'QueryScheduleAutoMode', 'subscribe_auto_mode_mode', 'subscribe_auto_mode_state', ] from .mutation import MutationScheduleAutoMode from .query import QueryScheduleAutoMode from .subscription import subscribe_auto_mode_mode, subscribe_auto_mode_state
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@src@nextline_schedule@schema@auto@__init__.py@.PATH_END.py
{ "filename": "cross_grad_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/math_ops/cross_grad_test.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@math_ops@cross_grad_test.py@.PATH_END.py
{ "filename": "ACCEL_sift.py", "repo_name": "CHIME-Pulsar-Timing/CHIME-Pulsar_automated_filterbank", "repo_path": "CHIME-Pulsar_automated_filterbank_extracted/CHIME-Pulsar_automated_filterbank-main/presto_without_presto/sifting_edits/ACCEL_sift.py", "type": "Python" }
from builtins import map import re import glob import presto.sifting as sifting from operator import itemgetter, attrgetter # Note: You will almost certainly want to adjust # the following variables for your particular search # glob for ACCEL files globaccel = "*ACCEL_*" # glob for .inf files globinf = "*DM*....
CHIME-Pulsar-TimingREPO_NAMECHIME-Pulsar_automated_filterbankPATH_START.@CHIME-Pulsar_automated_filterbank_extracted@CHIME-Pulsar_automated_filterbank-main@presto_without_presto@sifting_edits@ACCEL_sift.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "adrn/thejoker", "repo_path": "thejoker_extracted/thejoker-main/thejoker/__init__.py", "type": "Python" }
from ._version import version as __version__ from .data import RVData from .plot import plot_phase_fold, plot_rv_curves from .prior import JokerPrior from .samples import JokerSamples from .samples_analysis import ( MAP_sample, is_P_Kmodal, is_P_unimodal, max_phase_gap, periods_spanned, phase_co...
adrnREPO_NAMEthejokerPATH_START.@thejoker_extracted@thejoker-main@thejoker@__init__.py@.PATH_END.py
{ "filename": "modeling.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/mangadap/util/modeling.py", "type": "Python" }
""" Module with generic functions used when modeling data. ---- .. include license and copyright .. include:: ../include/copy.rst ---- .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import numpy from .filter import BoxcarFilter def reject_residuals_1d(...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@mangadap@util@modeling.py@.PATH_END.py
{ "filename": "hydro_shocks_hllc.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/sr/hydro_shocks_hllc.py", "type": "Python" }
# Test script for relativistic hydro shock tubes with HLLC # Modules import logging import numpy as np import sys import scripts.utils.athena as athena import scripts.utils.comparison as comparison sys.path.insert(0, '../../vis/python') import athena_read # noqa athena_read.check_nan_flag = True logger = logging.getL...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@sr@hydro_shocks_hllc.py@.PATH_END.py
{ "filename": "stage_utils.py", "repo_name": "LCOGT/banzai", "repo_path": "banzai_extracted/banzai-main/banzai/utils/stage_utils.py", "type": "Python" }
from banzai.utils import import_utils from banzai.context import Context from banzai.logs import get_logger logger = get_logger() def get_stages_for_individual_frame(ordered_stages, last_stage=None, extra_stages=None): """ Parameters ---------- ordered_stages: list of banzai.stages.Stage objects ...
LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@utils@stage_utils.py@.PATH_END.py
{ "filename": "fft.py", "repo_name": "thomasorb/orb", "repo_path": "orb_extracted/orb-master/orb/utils/fft.py", "type": "Python" }
#!/usr/bin/python # *-* coding: utf-8 *-* # Author: Thomas Martin <thomas.martin.1@ulaval.ca> # File: fft.py ## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca> ## ## This file is part of ORB ## ## ORB is free software: you can redistribute it and/or modify it ## under the terms of the GNU General Pu...
thomasorbREPO_NAMEorbPATH_START.@orb_extracted@orb-master@orb@utils@fft.py@.PATH_END.py
{ "filename": "tools.py", "repo_name": "dlinssen/sunbather", "repo_path": "sunbather_extracted/sunbather-main/src/tools.py", "type": "Python" }
import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import glob import re from shutil import copyfile from scipy.interpolate import interp1d from scipy.signal import savgol_filter import scipy.stats as sps from scipy.ndimage import gaussian_filter1d from fractions import Fraction import war...
dlinssenREPO_NAMEsunbatherPATH_START.@sunbather_extracted@sunbather-main@src@tools.py@.PATH_END.py
{ "filename": "KineticEnergyEquation.py", "repo_name": "mmicromegas/ransX", "repo_path": "ransX_extracted/ransX-master/EQUATIONS/KineticEnergyEquation.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Arnett, 2014, Compressible Hyd...
mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EQUATIONS@KineticEnergyEquation.py@.PATH_END.py
{ "filename": "sgilink.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/sgilink.py", "type": "Python" }
"""SCons.Tool.sgilink Tool-specific initialization for the SGI MIPSPro linker on SGI. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Th...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@sgilink.py@.PATH_END.py
{ "filename": "modindex.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pythran/pythran/optimizations/modindex.py", "type": "Python" }
''' Simplify modulo computation based on index''' from pythran.analyses import UseDefChains, Ancestors, Aliases, RangeValues from pythran.analyses import Identifiers from pythran.passmanager import Transformation from pythran.tables import MODULES import gast as ast from copy import deepcopy class ModIndex(Transfor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pythran@pythran@optimizations@modindex.py@.PATH_END.py
{ "filename": "const_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/tests/const_test.py", "type": "Python" }
# Copyright 2022 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@compiler@tests@const_test.py@.PATH_END.py
{ "filename": "LICENSE.md", "repo_name": "anastasia-tsvetkova/lc_pulse_avalanche", "repo_path": "lc_pulse_avalanche_extracted/lc_pulse_avalanche-master/LICENSE.md", "type": "Markdown" }
The MIT License (MIT) Copyright (c) 2021 Anastasia Tsvetkova Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
anastasia-tsvetkovaREPO_NAMElc_pulse_avalanchePATH_START.@lc_pulse_avalanche_extracted@lc_pulse_avalanche-master@LICENSE.md@.PATH_END.py
{ "filename": "utils.py", "repo_name": "bradkav/verne", "repo_path": "verne_extracted/verne-master/plotting/utils.py", "type": "Python" }
#Code for scientific number formatting... import numpy as np def sciformat(x,decimals=0): n = np.floor(np.log10(x)) m = round(x*(10.0**(-n))) str1 = "" if (m > 1.001): str1 = r'$%d \times ' % (m,) str2 = r'10^{%d}$' % n else: str2 = r'$10^{%d}$' % n return str1 + str2 ...
bradkavREPO_NAMEvernePATH_START.@verne_extracted@verne-master@plotting@utils.py@.PATH_END.py
{ "filename": "GWsignal.ipynb", "repo_name": "DMGW-Goethe/imripy", "repo_path": "imripy_extracted/imripy-main/dissertation/GWsignal.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt from imripy import constants as c, merger_system as ms, halo, inspiral, waveform, detector, plot_utils as pu, kepler import plotting ``` This notebook shows an example of the GW signal that an inspiral can emit. It takes two different inspiral, one at lower ...
DMGW-GoetheREPO_NAMEimripyPATH_START.@imripy_extracted@imripy-main@dissertation@GWsignal.ipynb@.PATH_END.py
{ "filename": "precisionStatistic.py", "repo_name": "JxnuLin/GDSolver", "repo_path": "GDSolver_extracted/GDSolver-main/GDSolver/mylib/precisionStatistic.py", "type": "Python" }
# -*- coding: utf-8 -*- import sys ,os sys.path.append("..") import GDSolver.mylib.ioFile_ReadO_C as ioFile import GDSolver.mylib.utils as cons import statistics as stat import numpy as np OUTPUT_PATH=os.path.dirname(__file__) +'/mutualAppximationResults/' inputFileName='38_38_Ref_very_17_c1_pickSameStar.txt' MA...
JxnuLinREPO_NAMEGDSolverPATH_START.@GDSolver_extracted@GDSolver-main@GDSolver@mylib@precisionStatistic.py@.PATH_END.py
{ "filename": "kde.py", "repo_name": "igomezv/simplemc_tests", "repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/analyzers/emcee/moves/kde.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np from .red_blue import RedBlueMove try: from scipy.stats import gaussian_kde except ImportError: gaussian_kde = None __all__ = ["KDEMove"] class KDEMove(RedBlueMove): """A proposal using a KDE of the complementary ensemble This is a simplified version of...
igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@analyzers@emcee@moves@kde.py@.PATH_END.py
{ "filename": "six.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/extern/six.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Handle loading six package from system or from the bundled copy """ import imp from distutils.version import StrictVersion _SIX_MIN_VERSION = StrictVersion('1.10.0') # Update this to prevent Astropy from using its bundled copy of six # (but only i...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@extern@six.py@.PATH_END.py
{ "filename": "quasar_catalogue.py", "repo_name": "igmhub/picca", "repo_path": "picca_extracted/picca-master/py/picca/delta_extraction/quasar_catalogue.py", "type": "Python" }
"""This module defines the abstract class QuasarCatalogue from which all classes loading quasar catalogues must inherit """ import healpy import numpy as np from picca.delta_extraction.errors import QuasarCatalogueError accepted_options = ["lambda max", "lambda max rest frame", "lambda min", "lamb...
igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@py@picca@delta_extraction@quasar_catalogue.py@.PATH_END.py
{ "filename": "timeseries.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/examples/noise/timeseries.py", "type": "Python" }
import matplotlib.pyplot as pp import pycbc.noise import pycbc.psd # The color of the noise matches a PSD which you provide flow = 30.0 delta_f = 1.0 / 16 flen = int(2048 / delta_f) + 1 psd = pycbc.psd.aLIGOZeroDetHighPower(flen, delta_f, flow) # Generate 32 seconds of noise at 4096 Hz delta_t = 1.0 / 4096 tsamples ...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@examples@noise@timeseries.py@.PATH_END.py
{ "filename": "_opacityscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_opacityscale.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="opacityscale", parent_name="volume", **kwargs): super(OpacityscaleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_opacityscale.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/indexes/__init__.py", "type": "Python" }
"""**Index** is used to avoid writing duplicated content into the vectostore and to avoid over-writing content if it's unchanged. Indexes also : * Create knowledge graphs from data. * Support indexing workflows from LangChain data loaders to vectorstores. Importantly, Index keeps on working even if the content bein...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@indexes@__init__.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "jiffyclub/palettable", "repo_path": "palettable_extracted/palettable-master/palettable/test/test_utils.py", "type": "Python" }
from __future__ import absolute_import import inspect import pytest from .. import utils from ..mycarta import mycarta def test_round_as_py3(): assert utils.round_as_py3(2.2) == 2.0 assert utils.round_as_py3(2.5) == 2.0 assert utils.round_as_py3(2.6) == 3.0 assert utils.round_as_py3(3.5) == 4.0 @...
jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@palettable@test@test_utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/histogram2dcontour/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@histogram2dcontour@colorbar@__init__.py@.PATH_END.py
{ "filename": "testMpiSphere.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/unit/NodeGenerators/testMpiSphere.py", "type": "Python" }
from math import * from Spheral import Vector3d from Spheral import Tensor3d from Spheral import SymTensor3d from Spheral import vector_of_int, vector_of_double, vector_of_SymTensor3d, vector_of_vector_of_double import mpi rank = mpi.rank procs = mpi.procs positions = [] nshell = 1000 if (nshell>procs and procs>1)...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@NodeGenerators@testMpiSphere.py@.PATH_END.py
{ "filename": "plasma_factory.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/plasma/plasma_factory.py", "type": "Python" }
""" Module for defining the framework around the plasma factory. .. attention:: |expect-api-changes| """ __all__ = ["PlasmaFactory", "Plasma"] from plasmapy.plasma.plasma_base import GenericPlasma from plasmapy.utils.datatype_factory_base import BasicRegistrationFactory class PlasmaFactory(BasicRegistrationFac...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@plasma@plasma_factory.py@.PATH_END.py
{ "filename": "preprocess.ipynb", "repo_name": "florian-lienhard/MM-LSD", "repo_path": "MM-LSD_extracted/MM-LSD-main/notebooks/preprocess.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np from astropy.io import fits import matplotlib.pyplot as plt import sys import glob import subprocess import os import pandas as pd import subprocess from scipy import interpolate from scipy.interpolate import InterpolatedUnivariateSpline,CubicSpline,UnivariateSpline,LSQUnivariateSpline from...
florian-lienhardREPO_NAMEMM-LSDPATH_START.@MM-LSD_extracted@MM-LSD-main@notebooks@preprocess.ipynb@.PATH_END.py
{ "filename": "_coloraxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/_coloraxis.py", "type": "Python" }
import _plotly_utils.basevalidators class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="choroplethmap", **kwargs): super(ColoraxisValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@_coloraxis.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/igrins/storage_interface/__init__.py", "type": "Python" }
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@storage_interface@__init__.py@.PATH_END.py
{ "filename": "MeanOrbit.py", "repo_name": "wmpg/WesternMeteorPyLib", "repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/Utils/MeanOrbit.py", "type": "Python" }
""" Functions for calculating mean orbital parameters from a given list of orbits. Functions courtesy of Pete Gural and Ivica Skokic. """ from __future__ import print_function, division, absolute_import import numpy as np # Predefined standard epochs JDE_B1900 = 2415020.3135 JDE_B1950 = 2433282.4235 JDE_J200...
wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@Utils@MeanOrbit.py@.PATH_END.py
{ "filename": "fused_batch_norm.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/fused_batch_norm.py", "type": "Python" }
# Copyright 2019 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@lite@testing@op_tests@fused_batch_norm.py@.PATH_END.py
{ "filename": "cached.py", "repo_name": "tslearn-team/tslearn", "repo_path": "tslearn_extracted/tslearn-main/tslearn/datasets/cached.py", "type": "Python" }
import numpy import os class CachedDatasets: """A convenience class to access cached time series datasets. Note, that these *cached datasets* are statically included into *tslearn* and are distinct from the ones in :class:`UCR_UEA_datasets`. When using the Trace dataset, please cite [1]_. See Al...
tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@tslearn@datasets@cached.py@.PATH_END.py
{ "filename": "_showscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/_showscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="bar.marker", **kwargs): super(ShowscaleValidator, 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@bar@marker@_showscale.py@.PATH_END.py
{ "filename": "ndarray_conversion.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/typing/tests/data/pass/ndarray_conversion.py", "type": "Python" }
import os import tempfile import numpy as np nd = np.array([[1, 2], [3, 4]]) scalar_array = np.array(1) # item scalar_array.item() nd.item(1) nd.item(0, 1) nd.item((0, 1)) # tolist is pretty simple # itemset scalar_array.itemset(3) nd.itemset(3, 0) nd.itemset((0, 0), 3) # tobytes nd.tobytes() nd.tobytes("C") nd.t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@typing@tests@data@pass@ndarray_conversion.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "oliverphilcox/HADES", "repo_path": "HADES_extracted/HADES-master/hades/README.md", "type": "Markdown" }
# HADES A Hexadecapolar Analysis for Dust Estimation in Simulations (for CMB B-mode polarisation maps) - Project with Blake Sherwin
oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@hades@README.md@.PATH_END.py
{ "filename": "signal_SpectralAnalysis_PeriodogramWelch.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/doc/source/tutorial/examples/signal_SpectralAnalysis_PeriodogramWelch.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import scipy.signal as signal rng = np.random.default_rng(73625) # seeding for reproducibility fs, n = 10e3, 10_000 f_x, noise_power = 1270, 1e-3 * fs / 2 t = np.arange(n) / fs x = (np.sqrt(2) * np.sin(2 * np.pi * f_x * t) + rng.normal(scale=np.sqrt(noise_power...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@doc@source@tutorial@examples@signal_SpectralAnalysis_PeriodogramWelch.py@.PATH_END.py
{ "filename": "DynamicMassFit.py", "repo_name": "wmpg/WesternMeteorPyLib", "repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/Utils/DynamicMassFit.py", "type": "Python" }
import os import numpy as np import scipy.optimize import matplotlib.pyplot as plt from matplotlib.pyplot import cm from wmpl.Utils.AtmosphereDensity import fitAtmPoly from wmpl.Utils.Math import lineFunc from wmpl.Utils.TrajConversions import cartesian2Geo from wmpl.Utils.Physics import dynamicMass from wmpl.Utils.P...
wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@Utils@DynamicMassFit.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "pcubillos/mc3", "repo_path": "mc3_extracted/mc3-master/mc3/utils/utils.py", "type": "Python" }
# Copyright (c) 2015-2023 Patricio Cubillos and contributors. # mc3 is open-source software under the MIT license (see LICENSE). __all__ = [ 'ROOT', 'parray', 'saveascii', 'loadascii', 'savebin', 'loadbin', 'isfile', 'burn', 'default_parnames', 'tex_parameters', ] from decimal ...
pcubillosREPO_NAMEmc3PATH_START.@mc3_extracted@mc3-master@mc3@utils@utils.py@.PATH_END.py
{ "filename": "random_fields.py", "repo_name": "sheydenreich/threepoint", "repo_path": "threepoint_extracted/threepoint-main/python_scripts/random_fields.py", "type": "Python" }
""" Functions for the creation of Gaussian and lognormal random fields """ from random import gauss import numpy as np from lenstools import GaussianNoiseGenerator import warnings from astropy import units as u from scipy.interpolate import interp1d import scipy.integrate as integrate from scipy.special import jv,j...
sheydenreichREPO_NAMEthreepointPATH_START.@threepoint_extracted@threepoint-main@python_scripts@random_fields.py@.PATH_END.py
{ "filename": "asyncio.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/utilities/asyncio.py", "type": "Python" }
"""Shims for asyncio features that may be missing from older python versions""" import sys if sys.version_info[:2] < (3, 11): from async_timeout import timeout as asyncio_timeout else: from asyncio import timeout as asyncio_timeout __all__ = ["asyncio_timeout"]
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@utilities@asyncio.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/funnelarea/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@funnelarea@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "ll.py", "repo_name": "mlares/hearsay", "repo_path": "hearsay_extracted/hearsay-master/dev/ll.py", "type": "Python" }
class ListNode: def __init__(self, data): "constructor to initiate this object" # store data self.data = data # store reference (next item) self.next = None return def has_value(self, value): "method to compare the value with the node data" if...
mlaresREPO_NAMEhearsayPATH_START.@hearsay_extracted@hearsay-master@dev@ll.py@.PATH_END.py
{ "filename": "intelc.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/intelc.py", "type": "Python" }
"""SCons.Tool.icl Tool-specific initialization for the Intel C/C++ compiler. Supports Linux and Windows compilers, v7 and up. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 200...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@intelc.py@.PATH_END.py
{ "filename": "extract_object_files_main.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/ios/extract_object_files_main.py", "type": "Python" }
# Copyright 2021 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@lite@ios@extract_object_files_main.py@.PATH_END.py
{ "filename": "tests.py", "repo_name": "benjaminpope/drpangloss", "repo_path": "drpangloss_extracted/drpangloss-main/tests/tests.py", "type": "Python" }
import jax.numpy as np import jax.random as random import jax import jax.scipy as jsp jax.config.update("jax_enable_x64", True) import pyoifits as oifits import numpy as onp from functools import partial from drpangloss.models import OIData, BinaryModelAngular, cvis_binary, closure_phases, BinaryModelCartesian from...
benjaminpopeREPO_NAMEdrpanglossPATH_START.@drpangloss_extracted@drpangloss-main@tests@tests.py@.PATH_END.py
{ "filename": "tfsa-2020-005.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2020-005.md", "type": "Markdown" }
## TFSA-2020-005: Out of bounds access in TFLite operators ### CVE Number CVE-2020-15211 ### Impact In TensorFlow Lite, saved models in the flatbuffer format use a double indexing scheme: a model has a set of subgraphs, each subgraph has a set of operators and each operator has a set of input/output tensors. The flat...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2020-005.md@.PATH_END.py
{ "filename": "_selected.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/_selected.py", "type": "Python" }
import _plotly_utils.basevalidators class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattermapbox", **kwargs): super(SelectedValidator, 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@scattermapbox@_selected.py@.PATH_END.py
{ "filename": "autocast_variable.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/keras/mixed_precision/autocast_variable.py", "type": "Python" }
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@keras@mixed_precision@autocast_variable.py@.PATH_END.py
{ "filename": "pdf.py", "repo_name": "icecube/skyllh", "repo_path": "skyllh_extracted/skyllh-master/skyllh/core/pdf.py", "type": "Python" }
# -*- coding: utf-8 -*- import abc import numpy as np from scipy.interpolate import ( RegularGridInterpolator, ) from skyllh.core import ( tool, ) from skyllh.core.binning import ( BinningDefinition, ) from skyllh.core.config import ( HasConfig, ) from skyllh.core.display import ( INDENTATION_WI...
icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@skyllh@core@pdf.py@.PATH_END.py
{ "filename": "jobsetup.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/workflow/jobsetup.py", "type": "Python" }
# Copyright (C) 2013 Ian Harry # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@workflow@jobsetup.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter.marker", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@_colorscale.py@.PATH_END.py
{ "filename": "test_vis_flags_weights.py", "repo_name": "ska-sa/katdal", "repo_path": "katdal_extracted/katdal-master/katdal/test/test_vis_flags_weights.py", "type": "Python" }
################################################################################ # Copyright (c) 2018-2022,2024, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at ...
ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@katdal@test@test_vis_flags_weights.py@.PATH_END.py
{ "filename": "quickstart_whereto.md", "repo_name": "tigerchenlu98/rebound", "repo_path": "rebound_extracted/rebound-main/docs/quickstart_whereto.md", "type": "Markdown" }
# Where to go from here In addition to reading the [API section](api.md), you can learn most about REBOUND by looking at some of the [example problems](examples.md). The C examples are located in the `examples/` directory. The python and iPython examples are located in the `python_examples/` and `ipython_examples/` d...
tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@docs@quickstart_whereto.md@.PATH_END.py
{ "filename": "emu_sklearn2.py", "repo_name": "awsteiner/o2scl", "repo_path": "o2scl_extracted/o2scl-main/data/o2scl/python/emu_sklearn2.py", "type": "Python" }
""" ------------------------------------------------------------------- Copyright (C) 2022-2023, Satyajit Roy and Andrew W. Steiner This file is part of O2scl. O2scl 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...
awsteinerREPO_NAMEo2sclPATH_START.@o2scl_extracted@o2scl-main@data@o2scl@python@emu_sklearn2.py@.PATH_END.py
{ "filename": "_lenmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/colorbar/_lenmode.py", "type": "Python" }
import _plotly_utils.basevalidators class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="contourcarpet.colorbar", **kwargs ): super(LenmodeValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contourcarpet@colorbar@_lenmode.py@.PATH_END.py
{ "filename": "05B_fm_disks.ipynb", "repo_name": "vortex-exoplanet/VIP", "repo_path": "VIP_extracted/VIP-master/docs/source/tutorials/05B_fm_disks.ipynb", "type": "Jupyter Notebook" }
# 5B. ADI forward modeling of disks > Author: *Julien Milli* > Last update: *06/06/2024* > Suitable for VIP *v1.0.3* onwards. **Table of contents** * [5.4. Introduction to forward modeling of disks](#5.4.-Introduction-to-forward-modeling-of-disks) - [5.4.1. Overview](#5.4.1.-Overview) - [5.4.2. Parametri...
vortex-exoplanetREPO_NAMEVIPPATH_START.@VIP_extracted@VIP-master@docs@source@tutorials@05B_fm_disks.ipynb@.PATH_END.py
{ "filename": "test_resampling.py", "repo_name": "astro-informatics/s2fft", "repo_path": "s2fft_extracted/s2fft-main/tests/test_resampling.py", "type": "Python" }
import numpy as np import pytest from s2fft.base_transforms import spherical from s2fft.utils import resampling def test_periodic_extension_invalid_sampling(): f_dummy = np.zeros((2, 2), dtype=np.complex128) with pytest.raises(ValueError): resampling.periodic_extension(f_dummy, L=5, spin=0, sampling...
astro-informaticsREPO_NAMEs2fftPATH_START.@s2fft_extracted@s2fft-main@tests@test_resampling.py@.PATH_END.py
{ "filename": "zorder_demo.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/misc/zorder_demo.py", "type": "Python" }
""" =========== Zorder Demo =========== The drawing order of artists is determined by their ``zorder`` attribute, which is a floating point number. Artists with higher ``zorder`` are drawn on top. You can change the order for individual artists by setting their ``zorder``. The default value depends on the type of the ...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@misc@zorder_demo.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "Zafiirah13/meercrab", "repo_path": "meercrab_extracted/meercrab-main/meerCRAB_code/model.py", "type": "Python" }
#!usr/bin/env python """ Authors : Zafiirah Hosenie Email : zafiirah.hosenie@gmail.com or zafiirah.hosenie@postgrad.manchester.ac.uk Affiliation : The University of Manchester, UK. License : MIT Status : Under Development Description : Python implementation for Classification of Bogus and Real using Deep Learning for M...
Zafiirah13REPO_NAMEmeercrabPATH_START.@meercrab_extracted@meercrab-main@meerCRAB_code@model.py@.PATH_END.py
{ "filename": "detection_limits.py", "repo_name": "cmillion/gPhoton", "repo_path": "gPhoton_extracted/gPhoton-master/calpaper/src/detection_limits.py", "type": "Python" }
import gPhoton.galextools as gt magrange = np.arange(14,24,1) expt_ratio = 0.8 # Estimate of ration of effective to raw exposure time t_raw = np.arange(1,1600,1) t_eff = expt_ratio*t_raw for sigma in [1,3]: fig = plt.figure(figsize=(8*2,6*2)) for i,band in enumerate(['FUV','NUV']): plt.subplot(2,1,i)...
cmillionREPO_NAMEgPhotonPATH_START.@gPhoton_extracted@gPhoton-master@calpaper@src@detection_limits.py@.PATH_END.py
{ "filename": "star_sampler.py", "repo_name": "joezuntz/cosmosis", "repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/samplers/star/star_sampler.py", "type": "Python" }
import itertools import numpy as np from ...runtime import logs from .. import ParallelSampler def task(p): i,p = p results = star_sampler.pipeline.run_results(p) #If requested, save the data to file if star_sampler.save_name and results.block is not None: results.block.save_to_file(star_sampl...
joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@samplers@star@star_sampler.py@.PATH_END.py
{ "filename": "test_gi_plus_projected.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/ia_correlations/tests/test_gi_plus_projected.py", "type": "Python" }
""" Module providing unit-testing for the `~halotools.mock_observables.alignments.w_gplus` function. """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import warnings import pytest from astropy.utils.misc import NumpyRNGContext from ..gi_plus_projected import g...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@ia_correlations@tests@test_gi_plus_projected.py@.PATH_END.py
{ "filename": "train.py", "repo_name": "axgoujon/convex_ridge_regularizers", "repo_path": "convex_ridge_regularizers_extracted/convex_ridge_regularizers-main/training/train.py", "type": "Python" }
import argparse import json import torch import trainer import os # CUDA_LAUNCH_BLOCKING=1 def main(device): # Set up directories for saving results config_path = 'configs/config.json' config = json.load(open(config_path)) exp_dir = os.path.join(config['logging_info']['log_dir'], config['exp_nam...
axgoujonREPO_NAMEconvex_ridge_regularizersPATH_START.@convex_ridge_regularizers_extracted@convex_ridge_regularizers-main@training@train.py@.PATH_END.py
{ "filename": "shape_base.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/core/shape_base.py", "type": "Python" }
def __getattr__(attr_name): from numpy._core import shape_base from ._utils import _raise_warning ret = getattr(shape_base, attr_name, None) if ret is None: raise AttributeError( f"module 'numpy.core.shape_base' has no attribute {attr_name}") _raise_warning(attr_name, "shape_base...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@core@shape_base.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ma-xu/pointMLP-pytorch", "repo_path": "pointMLP-pytorch_extracted/pointMLP-pytorch-main/part_segmentation/util/__init__.py", "type": "Python" }
ma-xuREPO_NAMEpointMLP-pytorchPATH_START.@pointMLP-pytorch_extracted@pointMLP-pytorch-main@part_segmentation@util@__init__.py@.PATH_END.py
{ "filename": "test_rotation.py", "repo_name": "jpinedaf/velocity_tools", "repo_path": "velocity_tools_extracted/velocity_tools-master/velocity_tools/test_rotation.py", "type": "Python" }
%run stream_lines.py import numpy as np import astropy.units as u import matplotlib.pyplot as plt # Initial test: change in PA for vector = showin x- and y-axes x_x = 1. y_x = 0. z_x = 0. x_y = 0. y_y = 1. z_y = 0. x_x_new, y_x_new, z_x_new = rotate_xyz(x_x, y_x, z_x, inc=0*u.deg, PA=45*u.deg) x_y_new, y_y_new, z_y_n...
jpinedafREPO_NAMEvelocity_toolsPATH_START.@velocity_tools_extracted@velocity_tools-master@velocity_tools@test_rotation.py@.PATH_END.py
{ "filename": "test_cuts.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/test/test_cuts.py", "type": "Python" }
""" Unit tests for cuts being applied to trigger and templates """ import unittest import argparse import copy import numpy as np from utils import simple_exit from pycbc.events import cuts, ranking from pycbc.tmpltbank import bank_conversions def parse_args(args): # Helper function to convert a list of flags/op...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@test@test_cuts.py@.PATH_END.py
{ "filename": "vae.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/jax2tf/tests/flax_models/vae.py", "type": "Python" }
# Copyright 2022 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@jax2tf@tests@flax_models@vae.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/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@barpolar@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "cpu_lu_lapack_getrf.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/internal_test_util/export_back_compat_test_data/cpu_lu_lapack_getrf.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@internal_test_util@export_back_compat_test_data@cpu_lu_lapack_getrf.py@.PATH_END.py
{ "filename": "test_d_radial_tidal_heating.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/Tests/Test_Old/Test_SetY_MultiLayer/Test_Matrix/test_d_radial_tidal_heating.py", "type": "Python" }
""" Tests for extracting useful information out of a multilayer tidal propagation """ import numpy as np import TidalPy from TidalPy.constants import G from TidalPy.tides.multilayer.heating import calc_radial_tidal_heating from TidalPy.radial_solver.sensitivity import sensitivity_to_shear as find_sensitivity_to_she...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@Tests@Test_Old@Test_SetY_MultiLayer@Test_Matrix@test_d_radial_tidal_heating.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "hfarias/mask_galaxy", "repo_path": "mask_galaxy_extracted/mask_galaxy-master/mrcnn/__init__.py", "type": "Python" }
hfariasREPO_NAMEmask_galaxyPATH_START.@mask_galaxy_extracted@mask_galaxy-master@mrcnn@__init__.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/moab/api.py", "type": "Python" }
from . import tests from .data_structures import ( MoabHex8Dataset, MoabHex8Hierarchy, MoabHex8Mesh, PyneMoabHex8Dataset, ) from .fields import MoabFieldInfo, PyneFieldInfo from .io import IOHandlerMoabH5MHex8
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@moab@api.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/header/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._widthsrc import WidthsrcValidator from ._width import WidthValidator from ._colorsrc import ColorsrcValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@header@line@__init__.py@.PATH_END.py
{ "filename": "thread_pool_config_32.py", "repo_name": "LSSTDESC/gen3_workflow", "repo_path": "gen3_workflow_extracted/gen3_workflow-master/python/desc/gen3_workflow/config/thread_pool_config_32.py", "type": "Python" }
"""Parsl config for using ThreadPoolExecutor with max_threads=32.""" import parsl from parsl.executors.threads import ThreadPoolExecutor executors = [ThreadPoolExecutor(max_threads=32, label=label) for label in 'batch-small batch-medium batch-large submit-node'.split()] config = parsl.config.Config(executo...
LSSTDESCREPO_NAMEgen3_workflowPATH_START.@gen3_workflow_extracted@gen3_workflow-master@python@desc@gen3_workflow@config@thread_pool_config_32.py@.PATH_END.py
{ "filename": "ZTF20aajcdad-checkpoint.ipynb", "repo_name": "saberyoung/haffet", "repo_path": "haffet_extracted/haffet-master/notebook/.ipynb_checkpoints/ZTF20aajcdad-checkpoint.ipynb", "type": "Jupyter Notebook" }
# run HAFFET with an example of ZTF20aajcdad ```python ``` ### import library ```python from sdapy import snerun import matplotlib.pyplot as plt plt.rcParams["text.usetex"] = False # disable latex import numpy as np ``` ```python ``` ### initialize a snobject class with proper meta data ```python sncls = sn...
saberyoungREPO_NAMEhaffetPATH_START.@haffet_extracted@haffet-master@notebook@.ipynb_checkpoints@ZTF20aajcdad-checkpoint.ipynb@.PATH_END.py
{ "filename": "hypermodel.py", "repo_name": "nanograv/enterprise_extensions", "repo_path": "enterprise_extensions_extracted/enterprise_extensions-master/enterprise_extensions/hypermodel.py", "type": "Python" }
# -*- coding: utf-8 -*- import os import numpy as np import scipy.linalg as sl from enterprise import constants as const from PTMCMCSampler.PTMCMCSampler import PTSampler as ptmcmc from .sampler import JumpProposal, get_parameter_groups, save_runtime_info class HyperModel(object): """ Class to define hype...
nanogravREPO_NAMEenterprise_extensionsPATH_START.@enterprise_extensions_extracted@enterprise_extensions-master@enterprise_extensions@hypermodel.py@.PATH_END.py
{ "filename": "_selected.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/_selected.py", "type": "Python" }
import _plotly_utils.basevalidators class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="choropleth", **kwargs): super(SelectedValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@_selected.py@.PATH_END.py
{ "filename": "_contour.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/volume/_contour.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contour(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "volume" _path_str = "volume.contour" _valid_props = {"color", "show", "width"} # color...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@volume@_contour.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Schwarzam/splusdata", "repo_path": "splusdata_extracted/splusdata-master/splusdata/variability/__init__.py", "type": "Python" }
SchwarzamREPO_NAMEsplusdataPATH_START.@splusdata_extracted@splusdata-master@splusdata@variability@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "tctianchi/pyvenn", "repo_path": "pyvenn_extracted/pyvenn-master/__init__.py", "type": "Python" }
tctianchiREPO_NAMEpyvennPATH_START.@pyvenn_extracted@pyvenn-master@__init__.py@.PATH_END.py
{ "filename": "_add_newdocs_scalars.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/_add_newdocs_scalars.py", "type": "Python" }
""" This file is separate from ``_add_newdocs.py`` so that it can be mocked out by our sphinx ``conf.py`` during doc builds, where we want to avoid showing platform-dependent information. """ import sys import os from numpy.core import dtype from numpy.core import numerictypes as _numerictypes from numpy.core.function_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@_add_newdocs_scalars.py@.PATH_END.py