metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "TimeSeries.ipynb", "repo_name": "JustGlowing/minisom", "repo_path": "minisom_extracted/minisom-master/examples/TimeSeries.ipynb", "type": "Jupyter Notebook" }
```python import sys sys.path.insert(0, '../') from minisom import MiniSom import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec %matplotlib inline %load_ext autoreload ``` ```python %autoreload 2 import pandas as pd data_url = 'https://archive.ics.uci.edu/ml/machine-learning...
JustGlowingREPO_NAMEminisomPATH_START.@minisom_extracted@minisom-master@examples@TimeSeries.ipynb@.PATH_END.py
{ "filename": "CODE_OF_CONDUCT.md", "repo_name": "NASA-Planetary-Science/sbpy", "repo_path": "sbpy_extracted/sbpy-main/CODE_OF_CONDUCT.md", "type": "Markdown" }
sbpy follows the Astropy code of conduct. All Astropy community members are expected to abide by the [Astropy Project Code of Conduct](http://www.astropy.org/code_of_conduct.html).
NASA-Planetary-ScienceREPO_NAMEsbpyPATH_START.@sbpy_extracted@sbpy-main@CODE_OF_CONDUCT.md@.PATH_END.py
{ "filename": "backend_qt5agg.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/backends/backend_qt5agg.py", "type": "Python" }
""" Render to qt from agg """ from .. import backends backends._QT_FORCE_QT5_BINDING = True from .backend_qtagg import ( # noqa: F401, E402 # pylint: disable=W0611 _BackendQTAgg, FigureCanvasQTAgg, FigureManagerQT, NavigationToolbar2QT, FigureCanvasAgg, FigureCanvasQT) @_BackendQTAgg.export class _Backend...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@backends@backend_qt5agg.py@.PATH_END.py
{ "filename": "test_einsum.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/core/tests/test_einsum.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( run_module_suite, assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_raises, suppress_warnings ) # Setup for optimize einsum chars = 'abcdefghij' sizes = np.array([2, 3, 4, 5...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@core@tests@test_einsum.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/utils/tests/__init__.py", "type": "Python" }
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@utils@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/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@volume@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "_alignmentgroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/_alignmentgroup.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="violin", **kwargs): super(AlignmentgroupValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@_alignmentgroup.py@.PATH_END.py
{ "filename": "determine_completeness.py", "repo_name": "jfoster17/extinction-distances", "repo_path": "extinction-distances_extracted/extinction-distances-master/extinction_distance/completeness/determine_completeness.py", "type": "Python" }
#!/usr/bin/env python # encoding: utf-8 """ determine_completeness_make_catalog.py This script is designed to test the completeness of UKIDSS images. I inject fake stars (perfect 2D gaussians) into the image and try to recover them with the same parameters I use in Sextractor to create a photometric catalog (yet to do...
jfoster17REPO_NAMEextinction-distancesPATH_START.@extinction-distances_extracted@extinction-distances-master@extinction_distance@completeness@determine_completeness.py@.PATH_END.py
{ "filename": "selmap.py", "repo_name": "gkulkarni/QLF", "repo_path": "QLF_extracted/QLF-master/selmap.py", "type": "Python" }
import numpy as np import matplotlib as mpl mpl.use('Agg') mpl.rcParams['text.usetex'] = True mpl.rcParams['font.family'] = 'serif' mpl.rcParams['font.serif'] = 'cm' mpl.rcParams['font.size'] = '22' import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.axes_grid1 import make_axes_locatable from ...
gkulkarniREPO_NAMEQLFPATH_START.@QLF_extracted@QLF-master@selmap.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/visualization/utils.py", "type": "Python" }
# Licensed under GPL version 3 - see LICENSE.rst '''This module collects helper functions for visualization backends. The functions here are not intended to be called directly by the user. Instead, they refractor common tasks that are used in several visualization backends. ''' import warnings import numpy as np from...
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@visualization@utils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/barpolar/marker/colorbar/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: 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__, _...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@barpolar@marker@colorbar@__init__.py@.PATH_END.py
{ "filename": "auto_make_best.ipynb", "repo_name": "astrockragh/Mangrove", "repo_path": "Mangrove_extracted/Mangrove-main/pysr_final/auto_make_best.ipynb", "type": "Jupyter Notebook" }
```python import torch, pickle, time, os, random, shutil import numpy as np import os.path as osp import matplotlib.pyplot as plt from scipy.stats import ks_2samp from pysr import pysr, PySRRegressor from tqdm import tqdm import pandas as pd from sklearn.metrics import r2_score import dataframe_image as dfi import PI...
astrockraghREPO_NAMEMangrovePATH_START.@Mangrove_extracted@Mangrove-main@pysr_final@auto_make_best.ipynb@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_y/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergl.error_y", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_y@_thickness.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/choroplethmapbox/selected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "choroplethmapbox.selected" _path_str = "choroplethmapbox.selected.marker" _valid_props = {"o...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@choroplethmapbox@selected@_marker.py@.PATH_END.py
{ "filename": "derived_field.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/doc/source/cookbook/derived_field.py", "type": "Python" }
import yt # Load the dataset. ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030") # You can create a derived field by manipulating any existing derived fields # in any way you choose. In this case, let's just make a simple one: # thermal_energy_density = 3/2 nkT # First create a function which yields your new der...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@doc@source@cookbook@derived_field.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/layout/mapbox/center/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._lon import LonValidator from ._lat import LatValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._lon.LonValidator...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@center@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "metal-sn/pyMCZ", "repo_path": "pyMCZ_extracted/pyMCZ-master/output/README.md", "type": "Markdown" }
MC Metallicity Output ==================== Monte Carlo sampling to calculate metallicity uncertainty from strong line flux data. ==================== Output ==================== All the results will be saved in this direcoty by the name of the input file (e.g. exampledata for input exampledata_meas.txt and exampledat...
metal-snREPO_NAMEpyMCZPATH_START.@pyMCZ_extracted@pyMCZ-master@output@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/tests/SimulatedUniverse/__init__.py", "type": "Python" }
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@tests@SimulatedUniverse@__init__.py@.PATH_END.py
{ "filename": "gravelbox_individual_visit_snr.py", "repo_name": "andycasey/AnniesLasso", "repo_path": "AnniesLasso_extracted/AnniesLasso-master/sandbox-scripts/gravelbox_individual_visit_snr.py", "type": "Python" }
""" Analyse individual snapshot spectra from APOGEE. """ import numpy as np import os from six.moves import cPickle as pickle from astropy.table import Table import AnniesLasso as tc model_filename = "apogee-rg-custom-17label-REGULARIZED-theta_linalg_init-bfgs_factr0.1_pgtol1e-6-fmin_xtol-1e-6-ftol-1e-6.pickle.bac...
andycaseyREPO_NAMEAnniesLassoPATH_START.@AnniesLasso_extracted@AnniesLasso-master@sandbox-scripts@gravelbox_individual_visit_snr.py@.PATH_END.py
{ "filename": "test_mistral_samplepack.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/tests/e2e/patched/test_mistral_samplepack.py", "type": "Python" }
""" E2E tests for lora llama """ import logging import os import unittest from pathlib import Path from axolotl.cli import load_datasets from axolotl.common.cli import TrainerCliArgs from axolotl.train import train from axolotl.utils.config import normalize_config from axolotl.utils.dict import DictDefault from ..ut...
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@tests@e2e@patched@test_mistral_samplepack.py@.PATH_END.py
{ "filename": "scrape.py", "repo_name": "ChrisBeaumont/brut", "repo_path": "brut_extracted/brut-master/bubbly/data/scrape.py", "type": "Python" }
""" Grab IRAC bands 3,4 and MIPS mosaics from the web """ import os from time import time from urllib import urlopen from multiprocessing import Pool from functools import partial def get_url(url, fname, target_dir='galaxy/raw/'): """ Save a file from the internet Parameters ---------- url : The url t...
ChrisBeaumontREPO_NAMEbrutPATH_START.@brut_extracted@brut-master@bubbly@data@scrape.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._text import TextValidator from ._font import FontValidator from ._align import AlignValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.Te...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@title@__init__.py@.PATH_END.py
{ "filename": "demo2.py", "repo_name": "RoyWilliams/RGBMatrix", "repo_path": "RGBMatrix_extracted/RGBMatrix-main/demo2.py", "type": "Python" }
from PIL import Image from PIL import ImageDraw import time import random from rgbmatrix import RGBMatrix, RGBMatrixOptions # Configuration for the matrix options = RGBMatrixOptions() options.rows = 32 options.chain_length = 1 options.parallel = 1 options.hardware_mapping = 'adafruit-hat' matrix = RGBMatrix(options =...
RoyWilliamsREPO_NAMERGBMatrixPATH_START.@RGBMatrix_extracted@RGBMatrix-main@demo2.py@.PATH_END.py
{ "filename": "test_extract_1d_spectra.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/tests/spect/test_extract_1d_spectra.py", "type": "Python" }
#!/usr/bin/env python """ Regression tests for GMOS LS `extractSpectra`. These tests run on real data to ensure that the output is always the same. Further investigation is needed to check if these outputs are scientifically relevant. Notes ----- - The `indirect` argument on `@pytest.mark.parametrize` fixture forces t...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@tests@spect@test_extract_1d_spectra.py@.PATH_END.py
{ "filename": "compute_num_completeness_mproc_burke.py", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/completenessContours/compute_num_completeness_mproc_burke.py", "type": "Python" }
import os import argparse import gzip import numpy as np import pandas as pd from astropy.io import fits import compute_num_completeness_w_ve as kp def read_stellar_table(filename): kic = pd.read_csv(filename, delimiter=" ") all_datas = [] all_keys = [] for i in range(len(kic.kepid)): cur = kp....
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@completenessContours@compute_num_completeness_mproc_burke.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/dimension/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="parcoords.dimension", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@dimension@_tickformat.py@.PATH_END.py
{ "filename": "test_log_rebin.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/examples/outofdate/test_log_rebin.py", "type": "Python" }
#!/usr/bin/env python3 import numpy from os import remove import os.path from time import clock from mangadap.util.instrument import log_rebin #from mangadap.contrib.ppxf_util import log_rebin from mangadap.util.constants import constants from matplotlib import pyplot from astropy.io import fits #-------------------...
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@examples@outofdate@test_log_rebin.py@.PATH_END.py
{ "filename": "_legendrank.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="funnel", **kwargs): super(LegendrankValidator, 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@funnel@_legendrank.py@.PATH_END.py
{ "filename": "gp_multidimensional_quasiperiodic_activity_numba.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/models/gp_multidimensional_quasiperiodic_activity_numba.py", "type": "Python" }
from pyorbit.subroutines.common import * from pyorbit.models.abstract_model import * from pyorbit.keywords_definitions import * from scipy.linalg import cho_factor, cho_solve, lapack, LinAlgError from scipy import matrix, spatial #from numba.experimental import jitclass try: from numba import jit @jit(nopyt...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@models@gp_multidimensional_quasiperiodic_activity_numba.py@.PATH_END.py
{ "filename": "_uid.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/_uid.py", "type": "Python" }
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="uid", parent_name="parcoords", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_typ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@_uid.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/hoverlabel/font/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="violin.hoverlabel.font", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@hoverlabel@font@_colorsrc.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="pie", **kwargs): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@_legendgrouptitle.py@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/colorbar/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="heatmap.colorbar", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@colorbar@_tickformat.py@.PATH_END.py
{ "filename": "orbits.py", "repo_name": "eggplantbren/Exoplanet", "repo_path": "Exoplanet_extracted/Exoplanet-master/orbits.py", "type": "Python" }
from pylab import * for v0 in linspace(0.4, 1., 121): # Initial position pos = array([1., 0.]) # Initial velocity vel = array([0., v0]) # Timestep dt = 0.0005 tfinal = 10. steps = int(tfinal/dt) keep = empty((steps, 2)) ion() for i in range(0, steps): phi1 = arctan2(pos[1], pos[0]) pos += 0.5*dt*...
eggplantbrenREPO_NAMEExoplanetPATH_START.@Exoplanet_extracted@Exoplanet-master@orbits.py@.PATH_END.py
{ "filename": "_reversescale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/line/_reversescale.py", "type": "Python" }
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterpolar.marker.line", **kwargs, ): super(ReversescaleValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@line@_reversescale.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/themis/__init__.py", "type": "Python" }
from .spacecraft.fields.fgm import fgm from .spacecraft.fields.fit import fit from .spacecraft.fields.efi import efi from .spacecraft.fields.fft import fft from .spacecraft.fields.fbk import fbk from .spacecraft.fields.scm import scm from .spacecraft.particles.esa import esa from .spacecraft.particles.esd import esd ...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@themis@__init__.py@.PATH_END.py
{ "filename": "display.py", "repo_name": "astrom-tom/dfitspy", "repo_path": "dfitspy_extracted/dfitspy-master/dfitspy/display.py", "type": "Python" }
''' dfitspy is a program aimed at reproducing the dfits program in python. This file codes the display in the terminal @place: ESO - La Silla - Paranal Observatory @author(s): Romain Thomas @year(s): 2018-2020 @First version: 19.9-0 @Current version: 20.7.0 @Telescope(s): ALL @Instrument(s): ALL @Documentation url: @L...
astrom-tomREPO_NAMEdfitspyPATH_START.@dfitspy_extracted@dfitspy-master@dfitspy@display.py@.PATH_END.py
{ "filename": "n_tutorial4_IFU_masking.ipynb", "repo_name": "Vital-Fernandez/lime", "repo_path": "lime_extracted/lime-master/examples/tutorials/n_tutorial4_IFU_masking.ipynb", "type": "Jupyter Notebook" }
# 4) IFU spatial masking In this tutorial, we shall perform a pre-analysis of an IFU (Integral Field Unit) cube. These data sets provide both spatial and spectroscopic information of astronomical bodies. The workflow for an IFU observation is very similar to the one we saw in the previous tutorials for long-slit spe...
Vital-FernandezREPO_NAMElimePATH_START.@lime_extracted@lime-master@examples@tutorials@n_tutorial4_IFU_masking.ipynb@.PATH_END.py
{ "filename": "models.py", "repo_name": "StingraySoftware/stingray", "repo_path": "stingray_extracted/stingray-main/stingray/simulator/models.py", "type": "Python" }
from astropy.modeling.models import custom_model # TODO: Add Jacobian @custom_model def GeneralizedLorentz1D(x, x_0=1.0, fwhm=1.0, value=1.0, power_coeff=1.0): """ Generalized Lorentzian function, implemented using astropy.modeling.models custom model Parameters ---------- x: numpy.ndarray ...
StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@simulator@models.py@.PATH_END.py
{ "filename": "glossary.md", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/docs/glossary.md", "type": "Markdown" }
--- --- <!-- ## Navigation | Contents 1 | Contents 2 | Global | Documentation | |:-|:-|:-|:-| | [Independent Variable](#indepvar) | [Dependent Variable](#depvar) | [Home](../index.md) | [Manual](./manual.md) | | [Weight](#weight) | [Accuracy](#accuracy) | [Readme](../README.md) | [Glossary](./glossary.md) | | [Mode...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@docs@glossary.md@.PATH_END.py
{ "filename": "install_headers.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/distutils/command/install_headers.py", "type": "Python" }
import os from distutils.command.install_headers import install_headers as old_install_headers class install_headers (old_install_headers): def run (self): headers = self.distribution.headers if not headers: return prefix = os.path.dirname(self.install_dir) for header ...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@distutils@command@install_headers.py@.PATH_END.py
{ "filename": "print_values.py", "repo_name": "oscaribv/pyaneti", "repo_path": "pyaneti_extracted/pyaneti-master/src/print_values.py", "type": "Python" }
# Read the data # Dummy params vector contains # [0] -> i # [1] -> chain label # [2] -> chi2_rv # [3] -> chi2_tr # [4 - 7*nplanets] -> Planet parameters(T0,P,e,w,b,a/R*,K) # [4+7*nplanets - nplanets*nbands ] -> rps_ij (i to planet, j to band) # [] LDC bands # [] Offsets # [] jitter # [] trends srp = 7*nplanets # start...
oscaribvREPO_NAMEpyanetiPATH_START.@pyaneti_extracted@pyaneti-master@src@print_values.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/benchmarks/shap_speed/README.md", "type": "Markdown" }
# [SHAP](https://arxiv.org/abs/1705.07874) values comparison **Introduction** In this benchmark we evaluated the shap values calculation performance for different gradient boosting libraries. The original paper about shap values you could find [here](https://arxiv.org/abs/1802.03888) and the official implementation [...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@benchmarks@shap_speed@README.md@.PATH_END.py
{ "filename": "apokasc_grid.py", "repo_name": "hposborn/MonoTools", "repo_path": "MonoTools_extracted/MonoTools-main/MonoTools/stellar/isoclassify/huber17scripts/apokasc_grid.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from classify_grid import * import os, ebf from astropy.io import ascii import time if __name__ == '__main__': homedir=os.path.expanduser('~/') model=ebf.read(homedir+'science/models/MIST/mesa.ebf') model['rho']=np.log10(model['rho']) # do this to t...
hposbornREPO_NAMEMonoToolsPATH_START.@MonoTools_extracted@MonoTools-main@MonoTools@stellar@isoclassify@huber17scripts@apokasc_grid.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/nnx/transforms/__init__.py", "type": "Python" }
# Copyright 2024 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@flax@nnx@transforms@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "athob/py-ananke", "repo_path": "py-ananke_extracted/py-ananke-main/src/__init__.py", "type": "Python" }
athobREPO_NAMEpy-anankePATH_START.@py-ananke_extracted@py-ananke-main@src@__init__.py@.PATH_END.py
{ "filename": "basis_function.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/satellite_constellations/basis_function.py", "type": "Python" }
__all__ = ("SatelliteAvoidBasisFunction",) import healpy as hp import numpy as np import rubin_scheduler.scheduler.basis_functions as bf class SatelliteAvoidBasisFunction(bf.BaseBasisFunction): """Uses satellite position information from the Conditions object and then avoids streaks. Parameters ----...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@satellite_constellations@basis_function.py@.PATH_END.py
{ "filename": "AxionMass.ipynb", "repo_name": "cajohare/AxionLimits", "repo_path": "AxionLimits_extracted/AxionLimits-master/AxionMass.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline from numpy import * import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.cm as cm from PlotFuncs import MyDoublePlot_Vertical,AxionPhoton,MySaveFig,UpperFrequencyAxis_Simple,col_alpha,FigSetup,line_background pek = line_background(1,'k') def UpperPQAxis(ax,tickdir='...
cajohareREPO_NAMEAxionLimitsPATH_START.@AxionLimits_extracted@AxionLimits-master@AxionMass.ipynb@.PATH_END.py
{ "filename": "interface.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py2/zmq/eventloop/minitornado/platform/interface.py", "type": "Python" }
#!/usr/bin/env python # # Copyright 2011 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py2@zmq@eventloop@minitornado@platform@interface.py@.PATH_END.py
{ "filename": "WolfeDiskSetup.py", "repo_name": "mneeleman/qubefit", "repo_path": "qubefit_extracted/qubefit-master/examples/WolfeDiskSetup.py", "type": "Python" }
import numpy as np import astropy.units as u from qubefit.qubefit import QubeFit def set_model(): # Initialize the QubeFit Instance DataFile = './WolfeDiskCube.fits' Qube = QubeFit.from_fits(DataFile) Qube.file = DataFile # Trimming the Data Cube center, sz, chan = [128, 128], [45, 45], [6, ...
mneelemanREPO_NAMEqubefitPATH_START.@qubefit_extracted@qubefit-master@examples@WolfeDiskSetup.py@.PATH_END.py
{ "filename": "adamax_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/optimizers/adamax_test.py", "type": "Python" }
# flake8: noqa import numpy as np from keras.src import backend from keras.src import ops from keras.src import testing from keras.src.optimizers.adamax import Adamax class AdamaxTest(testing.TestCase): def test_config(self): optimizer = Adamax( learning_rate=0.5, beta_1=0.8, ...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@optimizers@adamax_test.py@.PATH_END.py
{ "filename": "tty.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/tty.py", "type": "Python" }
"""Terminal utilities.""" # Author: Steen Lumholt. from termios import * __all__ = ["cfmakeraw", "cfmakecbreak", "setraw", "setcbreak"] # Indices for termios list. IFLAG = 0 OFLAG = 1 CFLAG = 2 LFLAG = 3 ISPEED = 4 OSPEED = 5 CC = 6 def cfmakeraw(mode): """Make termios mode raw.""" # Clear all POSIX.1-2017...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@tty.py@.PATH_END.py
{ "filename": "index_lookup_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/index_lookup_test.py", "type": "Python" }
import os import numpy as np import pytest from tensorflow import data as tf_data from keras.src import backend from keras.src import layers from keras.src import models from keras.src import testing from keras.src.saving import saving_api @pytest.mark.skipif( backend.backend() == "numpy", reason="Failing for n...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@index_lookup_test.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "roman-corgi/emccd_detect", "repo_path": "emccd_detect_extracted/emccd_detect-master/emccd_detect/README.md", "type": "Markdown" }
# EMCCD Detect Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image. Website: (<https://github.com/roman-corgi/emccd_detect/tree/master/emccd_detect>) # Version The latest version of emccd\_detect is 2.4.0. Main differences from previous version: the ability to implement readout nonl...
roman-corgiREPO_NAMEemccd_detectPATH_START.@emccd_detect_extracted@emccd_detect-master@emccd_detect@README.md@.PATH_END.py
{ "filename": "old.md", "repo_name": "conornally/starbug2", "repo_path": "starbug2_extracted/starbug2-main/docs/source/changes/old.md", "type": "Markdown" }
v0.5.3: Background: > BGD_R added functionality > Changed automatic radius estimation Param: > Added ZP_MAG: which is added to magnitude columns ## This needs some thinking > Added a differentiating roundness 1 and 2 > Removing ROUND_LO > Adding SMOOTH...
conornallyREPO_NAMEstarbug2PATH_START.@starbug2_extracted@starbug2-main@docs@source@changes@old.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CEA-COSMIC/pysap", "repo_path": "pysap_extracted/pysap-master/pysap/base/loaders/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- ########################################################################## # pySAP - Copyright (C) CEA, 2017 - 2018 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-e...
CEA-COSMICREPO_NAMEpysapPATH_START.@pysap_extracted@pysap-master@pysap@base@loaders@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._text import TextValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.TextVal...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "casacore/python-casacore", "repo_path": "python-casacore_extracted/python-casacore-master/casacore/tables/__init__.py", "type": "Python" }
# __init__.py: Top level .py file for python table interface # Copyright (C) 2006 # Associated Universities, Inc. Washington DC, USA. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; eit...
casacoreREPO_NAMEpython-casacorePATH_START.@python-casacore_extracted@python-casacore-master@casacore@tables@__init__.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/hoverlabel/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.hoverlabel.font", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@hoverlabel@font@_variant.py@.PATH_END.py
{ "filename": "_griddash.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/radialaxis/_griddash.py", "type": "Python" }
import _plotly_utils.basevalidators class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.radialaxis", **kwargs ): super(GriddashValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@radialaxis@_griddash.py@.PATH_END.py
{ "filename": "Trappist-1.ipynb", "repo_name": "BDNYC/sedkit", "repo_path": "sedkit_extracted/sedkit-main/sedkit/notebooks/Trappist-1.ipynb", "type": "Jupyter Notebook" }
```python %load_ext autoreload %autoreload 2 ``` The autoreload extension is already loaded. To reload it, use: %reload_ext autoreload # SED for Trappist-1 This notebook executes the lines of code presented in Filippazzo et al. (submitted to PASP). Below I generate and analyze an SED for the M8 dwarfs Trap...
BDNYCREPO_NAMEsedkitPATH_START.@sedkit_extracted@sedkit-main@sedkit@notebooks@Trappist-1.ipynb@.PATH_END.py
{ "filename": "_coloraxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/line/_coloraxis.py", "type": "Python" }
import _plotly_utils.basevalidators class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterternary.marker.line", **kwargs, ): super(ColoraxisValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@line@_coloraxis.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "astropy/astroplan", "repo_path": "astroplan_extracted/astroplan-main/astroplan/tests/test_utils.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import pytest from astropy.time import Time from ..utils import stride_array, time_grid_from_range arr10 = np.arange(10) def test_stride_array(): stride10by5 = stride_array(arr10, 5) assert len(stride10by5) == 6 def test...
astropyREPO_NAMEastroplanPATH_START.@astroplan_extracted@astroplan-main@astroplan@tests@test_utils.py@.PATH_END.py
{ "filename": "write_formation_channel_redshift_rates_large_files.py", "repo_name": "FloorBroekgaarden/Double-Compact-Object-Mergers", "repo_path": "Double-Compact-Object-Mergers_extracted/Double-Compact-Object-Mergers-main/demo_read_hdf5_file/cluster_scripts_DCO/write_formation_channel_redshift_rates_large_files...
import numpy as np import sys import h5py as h5 #Quick fudge to make import from ../Scripts work # sys.path.append('../../common_code/') from PostProcessingScripts import * from formation_channels import * import subprocess import time # ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', ...
FloorBroekgaardenREPO_NAMEDouble-Compact-Object-MergersPATH_START.@Double-Compact-Object-Mergers_extracted@Double-Compact-Object-Mergers-main@demo_read_hdf5_file@cluster_scripts_DCO@write_formation_channel_redshift_rates_large_files.py@.PATH_END.py
{ "filename": "callback.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/src/nextline_schedule/auto/callback.py", "type": "Python" }
import asyncio from collections.abc import Awaitable, Callable from logging import getLogger from nextline import Nextline from nextline.plugin.spec import Context, hookimpl from .state_machine.machine import AutoModeStateMachine from .types import PullFunc def build_state_machine( nextline: Nextline, callback:...
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@src@nextline_schedule@auto@callback.py@.PATH_END.py
{ "filename": "vmaxer.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/vmaxer.py", "type": "Python" }
import numpy as np from astropy.table import Table, vstack from cosmo import volcom from bitmask import lumfn_mask, consv_mask from volfracs import volfracs from findfile import findfile, fetch_fields def vmaxer_rand(survey='gama', ftype='randoms_bd_ddp_n8', ...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@vmaxer.py@.PATH_END.py
{ "filename": "_linecolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/yaxis/_linecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.scene.yaxis", **kwargs ): super(LinecolorValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@yaxis@_linecolor.py@.PATH_END.py
{ "filename": "generate_mocks_grf_f150_night_2019_03_11.py", "repo_name": "EmmanuelSchaan/ThumbStack", "repo_path": "ThumbStack_extracted/ThumbStack-master/generate_mocks_grf_f150_night_2019_03_11.py", "type": "Python" }
import numpy as np from time import time import matplotlib.pyplot as plt import universe reload(universe) from universe import * import mass_conversion reload(mass_conversion) from mass_conversion import * import catalog reload(catalog) from catalog import * import flat_map reload(flat_map) from flat_map import * ...
EmmanuelSchaanREPO_NAMEThumbStackPATH_START.@ThumbStack_extracted@ThumbStack-master@generate_mocks_grf_f150_night_2019_03_11.py@.PATH_END.py
{ "filename": "08_crafting_summary_statistics.ipynb", "repo_name": "mackelab/sbi", "repo_path": "sbi_extracted/sbi-main/tutorials/08_crafting_summary_statistics.ipynb", "type": "Jupyter Notebook" }
# Crafting summary statistics Many simulators produce outputs that are high-dimesional. For example, a simulator might generate a time series or an image. In the tutorial on [04_embedding_networks](04_embedding_networks.md), we discussed how a neural networks can be used to learn summary statistics from such data. In...
mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@tutorials@08_crafting_summary_statistics.ipynb@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(TickmodeValidator, self).__init__( plo...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@colorbar@_tickmode.py@.PATH_END.py
{ "filename": "test_miscUtils.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/tests/utils/test_miscUtils.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@tests@utils@test_miscUtils.py@.PATH_END.py
{ "filename": "_fill.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/map/layer/_fill.py", "type": "Python" }
import _plotly_utils.basevalidators class FillValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="fill", parent_name="layout.map.layer", **kwargs): super(FillValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@map@layer@_fill.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="scatter", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, anim=kwargs.p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@_y.py@.PATH_END.py
{ "filename": "test_examples.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/test_examples.py", "type": "Python" }
import contextlib import errno import importlib import itertools import os import platform import subprocess import sys import time from argparse import Namespace from collections import namedtuple import pytest from pyqtgraph import Qt if __name__ == "__main__" and (__package__ is None or __package__==''): pare...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@test_examples.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/MSCommon/__init__.py", "type": "Python" }
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 limitati...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@MSCommon@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "RuthAngus/gprotation", "repo_path": "gprotation_extracted/gprotation-master/gprotation/__init__.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from .gprot_fit import fit from .GProt import mcmc_fit from .simple_acf import simple_acf from .GProtation import make_plot, MyModel from .emcee2_gprot_fit import gp_fit from .emcee2_GProt import calc_p_init, mcmc_fit from .emcee2_GProtation import make_plot, Glnprob_split...
RuthAngusREPO_NAMEgprotationPATH_START.@gprotation_extracted@gprotation-master@gprotation@__init__.py@.PATH_END.py
{ "filename": "layer.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/layer.py", "type": "Python" }
"""Layer is an Operation with state. Takes care of: - Weights / variables (and tracking thereof) - deferred build - trainable argument value inference - masking - autocasting And some more magic: - add_loss - metric tracking - RNG seed tracking - activity regularization """ import collections import inspect import...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@layer.py@.PATH_END.py
{ "filename": "mesh.py", "repo_name": "bccp/nbodykit", "repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/base/mesh.py", "type": "Python" }
import numpy import logging from pmesh.pm import ParticleMesh, RealField, BaseComplexField import warnings class MeshSource(object): """ Base class for a source in the form of data on an input grid. The MeshSource object remembers the original source together with a sequence of transformations (added ...
bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@base@mesh.py@.PATH_END.py
{ "filename": "_tickcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatter3d.marker.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@colorbar@_tickcolor.py@.PATH_END.py
{ "filename": "reoptimize.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/projects/desi/reoptimize.py", "type": "Python" }
from __future__ import print_function import sys from common import * from desi_common import * if __name__ == '__main__': import optparse parser = optparse.OptionParser(usage='%prog <catalog.fits>') #parser.add_option('--zoom', type=int, nargs=4, help='Set target image extent (default "0 2046 0 4094")')...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@projects@desi@reoptimize.py@.PATH_END.py
{ "filename": "test_exclude_functions.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/data_objects/tests/test_exclude_functions.py", "type": "Python" }
import numpy as np from numpy.testing import assert_equal from yt.loaders import load_uniform_grid from yt.testing import fake_random_ds def test_exclude_above(): the_ds = fake_random_ds(ndims=3) all_data = the_ds.all_data() new_ds = all_data.exclude_above(("gas", "density"), 1) assert_equal(new_ds[(...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@data_objects@tests@test_exclude_functions.py@.PATH_END.py
{ "filename": "genPartSortIndexFiles.py", "repo_name": "rhyspoulton/WhereWolf", "repo_path": "WhereWolf_extracted/WhereWolf-master/genPartSortIndexFiles.py", "type": "Python" }
#!/usr/bin/env python # #This is a python file to create the Particle Sorted Index files needed by WhereWolf # # It uses mpi4py to process the gadget files in parallel # # It can be run by the command: # # $ python genPartSortIndexFiles.py <Gadget folder input directory> <Output directory> <snapshot> import numpy as n...
rhyspoultonREPO_NAMEWhereWolfPATH_START.@WhereWolf_extracted@WhereWolf-master@genPartSortIndexFiles.py@.PATH_END.py
{ "filename": "TODO.md", "repo_name": "jlenain/flaapluc", "repo_path": "flaapluc_extracted/flaapluc-master/TODO.md", "type": "Markdown" }
# TODO * Add API documentation.
jlenainREPO_NAMEflaaplucPATH_START.@flaapluc_extracted@flaapluc-master@TODO.md@.PATH_END.py
{ "filename": "test_stray_light_removal.py", "repo_name": "GeminiDRSoftware/MAROONXDR", "repo_path": "MAROONXDR_extracted/MAROONXDR-main/maroonxdr/maroonx/tests/image/test_stray_light_removal.py", "type": "Python" }
import logging import pytest import astrodata from copy import deepcopy import numpy as np import maroonx_instruments from maroonxdr.maroonx.primitives_maroonx import MAROONX @pytest.mark.parametrize("DFFFD_file", ["20220725T162106Z_DFFFD_r_0001_straylight_flat.fits"]) @pytest.mark.parametrize("FDDDF_file", ["2022072...
GeminiDRSoftwareREPO_NAMEMAROONXDRPATH_START.@MAROONXDR_extracted@MAROONXDR-main@maroonxdr@maroonx@tests@image@test_stray_light_removal.py@.PATH_END.py
{ "filename": "Plotter.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/Plotter.py", "type": "Python" }
import numpy as numpy import math as math import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from numpy.testing import assert_array_almost_equal as assertAAE from . import Tools from .Formatter import formatter as fmt __author__ = "Do Kester" __year__ = 2023 __license__ = "GPL3" __version__ = "3.2....
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@Plotter.py@.PATH_END.py
{ "filename": "oitf.py", "repo_name": "amerand/PMOIRED", "repo_path": "PMOIRED_extracted/PMOIRED-master/pmoired/oitf.py", "type": "Python" }
# check transfer function import pmoired.oifits as oifits from matplotlib import pyplot as plt import numpy as np def showTF(files, insname=None, mode=None, wlmin=None, wlmax=None): """ mode as function of insname: GRAVITY_SC: ('ESO INS SPEC RES', 'ESO INS POLA MODE', 'ESO DET2 SEQ1 DIT') e.g. (...
amerandREPO_NAMEPMOIREDPATH_START.@PMOIRED_extracted@PMOIRED-master@pmoired@oitf.py@.PATH_END.py
{ "filename": "is64bit.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/adodbapi/test/is64bit.py", "type": "Python" }
"""is64bit.Python() --> boolean value of detected Python word size. is64bit.os() --> os build version""" import sys def Python(): return sys.maxsize > 2147483647 def os(): import platform pm = platform.machine() if pm != ".." and pm.endswith("64"): # recent 64 bit Python return True e...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@adodbapi@test@is64bit.py@.PATH_END.py
{ "filename": "Run.py", "repo_name": "TommasoRonconi/galapy", "repo_path": "galapy_extracted/galapy-main/galapy/sampling/Run.py", "type": "Python" }
import numpy import os import warnings os.environ["OMP_NUM_THREADS"] = "1" import argparse import importlib.util from galapy.PhotometricSystem import PMS from galapy.Galaxy import PhotoGXY from galapy.Noise import CalibrationError from galapy.Handlers import ModelParameters from galapy.sampling.Statistics import gaus...
TommasoRonconiREPO_NAMEgalapyPATH_START.@galapy_extracted@galapy-main@galapy@sampling@Run.py@.PATH_END.py
{ "filename": "dump_mwaf.py", "repo_name": "MWATelescope/Birli", "repo_path": "Birli_extracted/Birli-main/tests/data/dump_mwaf.py", "type": "Python" }
#!/usr/bin/env python from itertools import combinations_with_replacement, combinations from os.path import abspath, exists, dirname from os.path import join as path_join, exists as path_exists from os import makedirs from astropy.io import fits from pprint import pformat import sys from argparse import ArgumentParse...
MWATelescopeREPO_NAMEBirliPATH_START.@Birli_extracted@Birli-main@tests@data@dump_mwaf.py@.PATH_END.py
{ "filename": "mime.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/mime.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.mime ~~~~~~~~~~~~~~~~~~~~ Lexer for Multipurpose Internet Mail Extensions (MIME) data. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, inclu...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@mime.py@.PATH_END.py
{ "filename": "_ticklabeloverflow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/colorbar/_ticklabeloverflow.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="cone.colorbar", **kwargs ): super(TicklabeloverflowValidator, self).__init__( plotly_name=plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@colorbar@_ticklabeloverflow.py@.PATH_END.py
{ "filename": "bdf.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/integrate/_ivp/bdf.py", "type": "Python" }
import numpy as np from scipy.linalg import lu_factor, lu_solve from scipy.sparse import issparse, csc_matrix, eye from scipy.sparse.linalg import splu from scipy.optimize._numdiff import group_columns from .common import (validate_max_step, validate_tol, select_initial_step, norm, EPS, num_jac, va...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@integrate@_ivp@bdf.py@.PATH_END.py
{ "filename": "test_pipelines_1.py", "repo_name": "ucberkeleyseti/turbo_seti", "repo_path": "turbo_seti_extracted/turbo_seti-master/test/test_pipelines_1.py", "type": "Python" }
r''' test_pipelines_1.py Using the 0000.h5 Voyager 2020 set of HDF5 files from http://blpd14.ssl.berkeley.edu/voyager_2020/single_coarse_channel/ test the following: * FindDoppler seaarch * find_event_pipeline * plot_event_pipeline ''' from time import time from shutil import rmtree from pathlib import Path from os i...
ucberkeleysetiREPO_NAMEturbo_setiPATH_START.@turbo_seti_extracted@turbo_seti-master@test@test_pipelines_1.py@.PATH_END.py
{ "filename": "webhook.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/blocks/webhook.py", "type": "Python" }
from typing import Optional from httpx import AsyncClient, AsyncHTTPTransport, Response from pydantic import Field, SecretStr from typing_extensions import Literal from prefect.blocks.core import Block from prefect.types import SecretDict from prefect.utilities.urls import validate_restricted_url # Use a global HTTP...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@blocks@webhook.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/hoverlabel/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@hoverlabel@font@_size.py@.PATH_END.py
{ "filename": "figure11c.py", "repo_name": "sjtumsd/crm_sim_nasa_exp_scripts", "repo_path": "crm_sim_nasa_exp_scripts_extracted/crm_sim_nasa_exp_scripts-main/images/figure11c.py", "type": "Python" }
import math import numpy from math import atan import matplotlib import matplotlib.pyplot as plt import csv line_style=['--','-.',':',':','--','-.','-',':','--','-.','-',':'] marker_s=['o','D','s','^','v','p','D','p','1','<','>','d'] line_color=['b','g','c','c','m','y','k','b','g','r','c','m'] result_name=["../demos/...
sjtumsdREPO_NAMEcrm_sim_nasa_exp_scriptsPATH_START.@crm_sim_nasa_exp_scripts_extracted@crm_sim_nasa_exp_scripts-main@images@figure11c.py@.PATH_END.py
{ "filename": "signals.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/apps/search/signals.py", "type": "Python" }
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@apps@search@signals.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="isosurface.colorbar", **kwargs ): super(BorderwidthValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "plot_overview.py", "repo_name": "desy-multimessenger/nuztf", "repo_path": "nuztf_extracted/nuztf-main/overview/plot_overview.py", "type": "Python" }
#!/usr/bin/env python # coding: utf-8 import logging from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib import rc logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) rc("font", **{"family": "serif", "serif": ...
desy-multimessengerREPO_NAMEnuztfPATH_START.@nuztf_extracted@nuztf-main@overview@plot_overview.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "marti-vidal-i/PolConvert", "repo_path": "PolConvert_extracted/PolConvert-main/EVN/__init__.py", "type": "Python" }
marti-vidal-iREPO_NAMEPolConvertPATH_START.@PolConvert_extracted@PolConvert-main@EVN@__init__.py@.PATH_END.py