metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_categoryorder.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/baxis/_categoryorder.py", "type": "Python" }
import _plotly_utils.basevalidators class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="carpet.baxis", **kwargs ): super(CategoryorderValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@baxis@_categoryorder.py@.PATH_END.py
{ "filename": "_y.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_y.py", "type": "Python" }
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatterpolar.marker.colorbar", **kwargs ): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@marker@colorbar@_y.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/volume/_stream.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "volume" _path_str = "volume.stream" _valid_props = {"maxpoints", "token"} # maxpoints ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@volume@_stream.py@.PATH_END.py
{ "filename": "run_example.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/falco/proper/examples/run_example.py", "type": "Python" }
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@proper@examples@run_example.py@.PATH_END.py
{ "filename": "threshold.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/python/tutorial_code/imgProc/threshold/threshold.py", "type": "Python" }
from __future__ import print_function import cv2 as cv import argparse max_value = 255 max_type = 4 max_binary_value = 255 trackbar_type = 'Type: \n 0: Binary \n 1: Binary Inverted \n 2: Truncate \n 3: To Zero \n 4: To Zero Inverted' trackbar_value = 'Value' window_name = 'Threshold Demo' ## [Threshold_Demo] def Thre...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@tutorial_code@imgProc@threshold@threshold.py@.PATH_END.py
{ "filename": "test_plugin.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/test_plugin.py", "type": "Python" }
import asyncio from collections.abc import AsyncIterator import pytest from pytest_httpx import HTTPXMock from nextline_schedule.graphql import ( MUTATE_AUTO_MODE_TURN_OFF, MUTATE_AUTO_MODE_TURN_ON, QUERY_AUTO_MODE_STATE, QUERY_SCHEDULER, SUBSCRIBE_AUTO_MODE_STATE, ) from nextlinegraphql import cr...
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@test_plugin.py@.PATH_END.py
{ "filename": "measure.py", "repo_name": "LSSTDESC/chroma", "repo_path": "chroma_extracted/chroma-master/chroma/measure.py", "type": "Python" }
import lmfit import numpy as np try: import astropy.io.fits as fits except: import pyfits as fits import galsim import chroma class EllipMeasurer(object): """ Abstract base class for ellipticity measurer, which measures the ellipticities of ring test target images, and optionally writes best-fit image...
LSSTDESCREPO_NAMEchromaPATH_START.@chroma_extracted@chroma-master@chroma@measure.py@.PATH_END.py
{ "filename": "_orientation.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/_orientation.py", "type": "Python" }
import _plotly_utils.basevalidators class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="bar.marker.colorbar", **kwargs ): super(OrientationValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@_orientation.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/caxis/title/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.caxis.title.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@caxis@title@font@_lineposition.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/doc/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Tractor documentation build configuration file, created by # sphinx-quickstart on Sat Jun 18 08:17:34 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@doc@conf.py@.PATH_END.py
{ "filename": "make_assets.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/ios/VisionTestApp/make_assets.py", "type": "Python" }
import torch from torch.utils.mobile_optimizer import optimize_for_mobile from torchvision.models.detection import ( fasterrcnn_mobilenet_v3_large_320_fpn, FasterRCNN_MobileNet_V3_Large_320_FPN_Weights, ) print(torch.__version__) model = fasterrcnn_mobilenet_v3_large_320_fpn( weights=FasterRCNN_MobileNet_...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@ios@VisionTestApp@make_assets.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "astrom-tom/specstack", "repo_path": "specstack_extracted/specstack-master/specstack/plot.py", "type": "Python" }
''' specstack module ----------------- File: ploy.py This file configures the plotting lines @author: R. THOMAS @year: 2019 @place: ESO @License: GPL v3.0 - see LICENCE.txt ''' #### Python third party import matplotlib.pyplot as plt def plot(grid, stacked, std, ermean, indiv, grid_indiv): ''' Function t...
astrom-tomREPO_NAMEspecstackPATH_START.@specstack_extracted@specstack-master@specstack@plot.py@.PATH_END.py
{ "filename": "redcal_inspect_2458061.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458061.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_2458061.ipynb@.PATH_END.py
{ "filename": "run_all.py", "repo_name": "eggplantbren/RMHB", "repo_path": "RMHB_extracted/RMHB-master/Code/run_all.py", "type": "Python" }
from pylab import * rc("font", size=16, family="serif", serif="Computer Sans") rc("text", usetex=True) def ccf(data1, data2, log10_tau, delta=0.1): """ Get the cross-correlation between log10_tau and log10_tau + delta """ s = 0. c_bar = data1[:,1].mean() nl = data2.shape[0] # Loop over line measurements for...
eggplantbrenREPO_NAMERMHBPATH_START.@RMHB_extracted@RMHB-master@Code@run_all.py@.PATH_END.py
{ "filename": "convolution.py", "repo_name": "annadeg/jwst-msafit", "repo_path": "jwst-msafit_extracted/jwst-msafit-main/msafit/utils/convolution.py", "type": "Python" }
import numpy as np __all__ = ["extend_hypercube","convolve_cube_psf"] def multiply_arrays(cube_arr,psf_arr,out_arr=None): if len(cube_arr.shape)==3: return np.multiply(cube_arr[:,:,:,np.newaxis,np.newaxis], psf_arr,out=out_arr) elif len(cube_arr.shape)==2: return np.multiply(cube_arr[np.newa...
annadegREPO_NAMEjwst-msafitPATH_START.@jwst-msafit_extracted@jwst-msafit-main@msafit@utils@convolution.py@.PATH_END.py
{ "filename": "feffdat.py", "repo_name": "xraypy/xraylarch", "repo_path": "xraylarch_extracted/xraylarch-master/larch/xafs/feffdat.py", "type": "Python" }
#!/usr/bin/env python """ feffdat provides the following function related to reading and dealing with Feff.data files in larch: path1 = read_feffdat('feffNNNN.dat') returns a Feff Group -- a special variation of a Group -- for the path represented by the feffNNNN.dat group = ff2chi(paths) creates a group that...
xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@larch@xafs@feffdat.py@.PATH_END.py
{ "filename": "mask.py", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/shapepipe/modules/mask_package/mask.py", "type": "Python" }
"""MASK. This module contains a class to create star mask for an image. :Authors: Axel Guinot, Martin Kilbinger """ import os import re import numpy as np from astropy import units, wcs from astropy.coordinates import SkyCoord from astropy.io import fits from shapepipe.pipeline import file_io from shapepipe.pipel...
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@shapepipe@modules@mask_package@mask.py@.PATH_END.py
{ "filename": "h5py_wrap.py", "repo_name": "galtay/rabacus", "repo_path": "rabacus_extracted/rabacus-master/rabacus/hdf5/h5py_wrap.py", "type": "Python" }
""" Simple convenience functions to access the h5py library. """ import sys import h5py import numpy as np __all__ = ['ra', 'raa', 'rd', 'wd', 'wa', 'cg'] class Error(Exception): """Base class for exceptions in this module.""" pass class OverwriteError(Error): """Exception raised for attempting to o...
galtayREPO_NAMErabacusPATH_START.@rabacus_extracted@rabacus-master@rabacus@hdf5@h5py_wrap.py@.PATH_END.py
{ "filename": "act_hsc_2018.py", "repo_name": "dylancromer/maszcal", "repo_path": "maszcal_extracted/maszcal-main/spec/data/obs/act_hsc_2018.py", "type": "Python" }
import numpy as np from maszcal.data.obs import ActHsc2018 def describe_act_hsc_2018(): def describe_covariance(): def it_loads_the_covariance_matrix(): DIR = 'data/act-hsc/' radii = np.logspace(0, 1, 10) cov = ActHsc2018.covariance(DIR, radii) assert i...
dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@spec@data@obs@act_hsc_2018.py@.PATH_END.py
{ "filename": "sineWave_degrees.py", "repo_name": "cjekel/piecewise_linear_fit_py", "repo_path": "piecewise_linear_fit_py_extracted/piecewise_linear_fit_py-master/examples/sineWave_degrees.py", "type": "Python" }
# import our libraries import numpy as np import matplotlib.pyplot as plt import pwlf # generate sin wave data x = np.linspace(0, 10, num=100) y = np.sin(x * np.pi / 2) # add noise to the data y = np.random.normal(0, 0.05, 100) + y # initialize piecewise linear fit with your x and y data # pwlf lets you fit continuou...
cjekelREPO_NAMEpiecewise_linear_fit_pyPATH_START.@piecewise_linear_fit_py_extracted@piecewise_linear_fit_py-master@examples@sineWave_degrees.py@.PATH_END.py
{ "filename": "_transition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/slider/_transition.py", "type": "Python" }
import _plotly_utils.basevalidators class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="transition", parent_name="layout.slider", **kwargs): super(TransitionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@slider@_transition.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/updatemenu/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.updatemenu", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@updatemenu@_bgcolor.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mbursa/sim5", "repo_path": "sim5_extracted/sim5-master/python/__init__.py", "type": "Python" }
mbursaREPO_NAMEsim5PATH_START.@sim5_extracted@sim5-master@python@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/reproject", "repo_path": "reproject_extracted/reproject-main/reproject/mosaicking/__init__.py", "type": "Python" }
from .coadd import * # noqa from .wcs_helpers import * # noqa
astropyREPO_NAMEreprojectPATH_START.@reproject_extracted@reproject-main@reproject@mosaicking@__init__.py@.PATH_END.py
{ "filename": "mpl_plot_kde_2d.py", "repo_name": "arviz-devs/arviz", "repo_path": "arviz_extracted/arviz-main/examples/matplotlib/mpl_plot_kde_2d.py", "type": "Python" }
""" 2D KDE ====== _gallery_category: Distributions """ import matplotlib.pyplot as plt import numpy as np import arviz as az az.style.use("arviz-doc") az.plot_kde( np.random.beta(2, 5, size=100), np.random.beta(2, 5, size=100), contour_kwargs={"colors": None, "cmap": plt.cm.viridis, "levels": 30}, c...
arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@examples@matplotlib@mpl_plot_kde_2d.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.font" _valid_props = { "color", "family", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@_font.py@.PATH_END.py
{ "filename": "StartBokeh.py", "repo_name": "Keck-DataReductionPipelines/KCWI_DRP", "repo_path": "KCWI_DRP_extracted/KCWI_DRP-master/kcwidrp/primitives/StartBokeh.py", "type": "Python" }
from keckdrpframework.primitives.base_primitive import BasePrimitive from bokeh.client import pull_session from bokeh.plotting.figure import figure from bokeh.layouts import column class StartBokeh(BasePrimitive): """ Start the bokeh server for the KCWI DRP. This is enabled through the ``enable_bokeh`` ...
Keck-DataReductionPipelinesREPO_NAMEKCWI_DRPPATH_START.@KCWI_DRP_extracted@KCWI_DRP-master@kcwidrp@primitives@StartBokeh.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/title/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.title.font", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@title@font@_shadow.py@.PATH_END.py
{ "filename": "tests.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/goes/tests/tests.py", "type": "Python" }
import os import unittest from pytplot import data_exists, tnames import pyspedas from pytplot import del_data, tplot class LoadTestCases(unittest.TestCase): def test_downloadonly(self): del_data() mag_files = pyspedas.projects.goes.fgm(datatype="1min", downloadonly=True) self.assertTrue...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@goes@tests@tests.py@.PATH_END.py
{ "filename": "random_shuffle_queue_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/random/random_shuffle_queue_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@random@random_shuffle_queue_test.py@.PATH_END.py
{ "filename": "mk_ray_trace_groups.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/HeasoftTools/mk_ray_trace_groups.py", "type": "Python" }
import os import subprocess from ..HeasoftTools.gen_tools import run_ftool, ftool_mp import argparse import numpy as np import time from astropy.table import Table import pandas as pd def run_ftjoin_mp(dname, dname2, fnames, nproc): ftool = "ftjoin" arg_lists = [] for fname in fnames: arg_list =...
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@HeasoftTools@mk_ray_trace_groups.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/gauge/step/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="indicator.gauge.step", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@gauge@step@_thickness.py@.PATH_END.py
{ "filename": "slit.py", "repo_name": "mtalapinto/moes", "repo_path": "carmenes/optics/slit.py", "type": "Python" }
import numpy as np def slit_params_init(H, DC, dec_x, dec_y, defocus): H[:, 0] += dec_x H[:, 1] += dec_y H[:, 2] += defocus DC[:, 0] = 0. DC[:, 1] = 0. DC[:, 2] = 1. return H, DC def interp(x0, y0, x1, y1, n): if x0 == x1 and y0 < y1: s = np.sqrt((x0 - x1) ** 2 + (y0 - y...
mtalapintoREPO_NAMEmoesPATH_START.@carmenes@optics@slit.py@.PATH_END.py
{ "filename": "_matfuncs.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/linalg/_matfuncs.py", "type": "Python" }
# # Author: Travis Oliphant, March 2002 # import warnings from itertools import product import numpy as np from numpy import (dot, diag, prod, logical_not, ravel, transpose, conjugate, absolute, amax, sign, isfinite, triu) # Local imports from scipy.linalg import LinAlgError, bandwidth from ._misc ...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@_matfuncs.py@.PATH_END.py
{ "filename": "utility.py", "repo_name": "lsst-uk/sky-estimation-WP3.7", "repo_path": "sky-estimation-WP3.7_extracted/sky-estimation-WP3.7-master/measureMetrics/utility.py", "type": "Python" }
''' A variety of useful functions that don't belong anywhere else. ''' import numpy as np import astropy import astropy.coordinates as coord import pandas as pd from scipy.special import gamma, gammaincinv def matchTables(table1, table2, table1Ra = 'ra', table1Dec = 'dec', table1Unit = 'deg', ...
lsst-ukREPO_NAMEsky-estimation-WP3.7PATH_START.@sky-estimation-WP3.7_extracted@sky-estimation-WP3.7-master@measureMetrics@utility.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/baxis/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.baxis.title.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@baxis@title@font@_size.py@.PATH_END.py
{ "filename": "vzsamp.py", "repo_name": "veusz/veusz", "repo_path": "veusz_extracted/veusz-master/veusz/utils/vzsamp.py", "type": "Python" }
# Copyright (C) 2012 Science and Technology Facilities Council. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later ...
veuszREPO_NAMEveuszPATH_START.@veusz_extracted@veusz-master@veusz@utils@vzsamp.py@.PATH_END.py
{ "filename": "test_svar.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/vector_ar/tests/test_svar.py", "type": "Python" }
""" Test SVAR estimation """ from statsmodels.compat.platform import PLATFORM_WIN import numpy as np from numpy.testing import assert_allclose, assert_almost_equal import pytest import statsmodels.datasets.macrodata from statsmodels.tsa.vector_ar.svar_model import SVAR DECIMAL_6 = 6 DECIMAL_5 = 5 DECIMAL_4 = 4 cla...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@vector_ar@tests@test_svar.py@.PATH_END.py
{ "filename": "Example_2_Files.ipynb", "repo_name": "MarcoMuellner/SMURFS", "repo_path": "SMURFS_extracted/SMURFS-master/notebook_examples/Example_2_Files.ipynb", "type": "Jupyter Notebook" }
# Example 2: Using files Smurfs can also deal with ASCII files. Except for the conversion into magnitude and sigma clipping, no reduction is applied. ```python %matplotlib notebook import os os.chdir("..") from smurfs import Smurfs ``` ```python s = Smurfs(file='tests/test_files/testFile.dat') ```  ...
MarcoMuellnerREPO_NAMESMURFSPATH_START.@SMURFS_extracted@SMURFS-master@notebook_examples@Example_2_Files.ipynb@.PATH_END.py
{ "filename": "problems.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/dedalus_repo/dedalus/core/problems.py", "type": "Python" }
""" Classes for representing systems of equations. """ from collections import OrderedDict import numpy as np from mpi4py import MPI from .metadata import MultiDict, Metadata from . import field from .field import Operand from . import future from . import operators from . import solvers from ..tools import parsing ...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@dedalus_repo@dedalus@core@problems.py@.PATH_END.py
{ "filename": "npairs_jackknife_3d.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/pair_counters/npairs_jackknife_3d.py", "type": "Python" }
r""" Module containing the `~halotools.mock_observables.npairs_jackknife_3d` function used to estimate errors in the `~halotools.mock_observables.tpcf` function. """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import multiprocessing from functools import partia...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@pair_counters@npairs_jackknife_3d.py@.PATH_END.py
{ "filename": "_fgopacity.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/pattern/_fgopacity.py", "type": "Python" }
import _plotly_utils.basevalidators class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="treemap.marker.pattern", **kwargs ): super(FgopacityValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@pattern@_fgopacity.py@.PATH_END.py
{ "filename": "parallax.py", "repo_name": "tvwenger/kd", "repo_path": "kd_extracted/kd-master/kd/parallax.py", "type": "Python" }
#!/usr/bin/env python """ parallax.py Utility to calculate parallax distances the traditional way. Copyright(C) 2017-2021 by Trey V. Wenger; tvwenger@gmail.com GNU General Public License v3 (GNU GPLv3) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public ...
tvwengerREPO_NAMEkdPATH_START.@kd_extracted@kd-master@kd@parallax.py@.PATH_END.py
{ "filename": "Jpeg2KImagePlugin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/Jpeg2KImagePlugin.py", "type": "Python" }
# # The Python Imaging Library # $Id$ # # JPEG2000 file handling # # History: # 2014-03-12 ajh Created # 2021-06-30 rogermb Extract dpi information from the 'resc' header box # # Copyright (c) 2014 Coriolis Systems Limited # Copyright (c) 2014 Alastair Houghton # # See the README file for information on usage and red...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@Jpeg2KImagePlugin.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/streamtube/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="streamtube", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@streamtube@_stream.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmapgl/colorbar/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="heatmapgl.colorbar", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmapgl@colorbar@_thickness.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatterpolar.line", **kwargs): super(WidthValidator, 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@scatterpolar@line@_width.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "cpinte/casa_cube", "repo_path": "casa_cube_extracted/casa_cube-master/casa_cube/__init__.py", "type": "Python" }
__version__ = "0.1" from .cube import * from .molex import *
cpinteREPO_NAMEcasa_cubePATH_START.@casa_cube_extracted@casa_cube-master@casa_cube@__init__.py@.PATH_END.py
{ "filename": "cat_egs_groth.py", "repo_name": "HETDEX/elixer", "repo_path": "elixer_extracted/elixer-main/elixer/cat_egs_groth.py", "type": "Python" }
from __future__ import print_function #keep it simple for now. Put base class and all children in here. #Later, create a proper package try: from elixer import global_config as G from elixer import science_image from elixer import cat_base from elixer import match_summary from elixer import utiliti...
HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@cat_egs_groth.py@.PATH_END.py
{ "filename": "Tloss_Pkeep.ipynb", "repo_name": "ahermosillo/stochastic-randommigration", "repo_path": "stochastic-randommigration_extracted/stochastic-randommigration-main/manybodies/Tloss_Pkeep.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pylb from matplotlib.ticker import FuncFormatter from matplotlib.ticker import (MultipleLocator, AutoMinorLocator) from matplotlib.gridspec import GridSpec from scipy.optimize import curve_fit %matplotlib inline plt.style.use('/User...
ahermosilloREPO_NAMEstochastic-randommigrationPATH_START.@stochastic-randommigration_extracted@stochastic-randommigration-main@manybodies@Tloss_Pkeep.ipynb@.PATH_END.py
{ "filename": "scikit_kfold_training.py", "repo_name": "zkdtc/MLC_ELGs", "repo_path": "MLC_ELGs_extracted/MLC_ELGs-master/scikit_kfold_training.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Run the code as python3 scikit_kfold_training.py'rf' 'multi' """ import os,sys import numpy as np from sklearn import svm n_input_pars=8 n_output_pars=4 from sklearn.neighbors import KNeighborsClassifier from xgboost import XGBClassifier import copy from astropy.table import Table import ...
zkdtcREPO_NAMEMLC_ELGsPATH_START.@MLC_ELGs_extracted@MLC_ELGs-master@scikit_kfold_training.py@.PATH_END.py
{ "filename": "test_ingest_runner.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/tests/unit/pipeline/ingest/test_ingest_runner.py", "type": "Python" }
"""Unit tests for ingest runner """ import unittest import unittest.mock from unittest.mock import patch import context import ingest_runner import ingest class RunnerTest(unittest.TestCase): @patch('ingest.Ingester') @patch('ingest_runner.lasairLogging') def test_run_ingest(self, mock_logging, mock_ing...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@pipeline@ingest@test_ingest_runner.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "vmmunoza/nuHawkHunter", "repo_path": "nuHawkHunter_extracted/nuHawkHunter-master/README.md", "type": "Markdown" }
# νHawkHunter [![DOI](https://www.zenodo.org/badge/364986991.svg)](https://www.zenodo.org/badge/latestdoi/364986991) [![arXiv](https://img.shields.io/badge/arXiv-2203.14979-B31B1B.svg)](http://arxiv.org/abs/2203.14979) ![Alt text](https://img.shields.io/pypi/pyversions/python-binance.svg) [![License: MIT](https://img.s...
vmmunozaREPO_NAMEnuHawkHunterPATH_START.@nuHawkHunter_extracted@nuHawkHunter-master@README.md@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/colorbar/title/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="isosurface.colorbar.title.font", **kwargs, ): super(VariantValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@colorbar@title@font@_variant.py@.PATH_END.py
{ "filename": "torch_test_contrib_gpu.py", "repo_name": "facebookresearch/faiss", "repo_path": "faiss_extracted/faiss-main/faiss/gpu/test/torch_test_contrib_gpu.py", "type": "Python" }
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import unittest import numpy as np import faiss import faiss.contrib.torch_utils from faiss.contrib import datasets from faiss...
facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@faiss@gpu@test@torch_test_contrib_gpu.py@.PATH_END.py
{ "filename": "data_adapter.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/trainers/data_adapters/data_adapter.py", "type": "Python" }
class DataAdapter: """Base class for input data adapters. The purpose of a DataAdapter is to provide a unified interface to iterate over input data provided in a variety of formats -- such as NumPy arrays, tf.Tensors, tf.data.Datasets, Keras PyDatasets, etc. """ def get_numpy_iterator(self): ...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@trainers@data_adapters@data_adapter.py@.PATH_END.py
{ "filename": "tile.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/tile.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@tile.py@.PATH_END.py
{ "filename": "test_wavecal_nuv_g230l.py", "repo_name": "spacetelescope/calcos", "repo_path": "calcos_extracted/calcos-master/tests/test_wavecal_nuv_g230l.py", "type": "Python" }
"""Tests for COS/NUV G230L wavecal.""" import pytest import calcos from helpers import BaseCOS # TODO: Mark this as slow when there are faster tests added for CI tests # so that this only runs in nightly tests. @pytest.mark.slow class TestWavecalNUVG230L(BaseCOS): detector = 'nuv' def test_wavecal_nu...
spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@tests@test_wavecal_nuv_g230l.py@.PATH_END.py
{ "filename": "Graphics--MapProjections.ipynb", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/Demos/Graphics--MapProjections.ipynb", "type": "Jupyter Notebook" }
# TidalPy Surface Maps and Projection Plotting Most models used in TidalPy calculate results in spherical coordinates on evenly spaced grids in latitude and longitude. This data can be displayed in a box format, but often other projections are more visually accurate since surface area is compressed at the poles. It is ...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@Demos@Graphics--MapProjections.ipynb@.PATH_END.py
{ "filename": "mathutils.py", "repo_name": "rodluger/everest", "repo_path": "everest_extracted/everest-master/everest/mathutils.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' :py:mod:`mathutils.py` - Math utils ----------------------------------- Miscellaneous math utilities used throughout the code. ''' from __future__ import division, print_function, absolute_import, \ unicode_literals import numpy as np from scipy.signal import me...
rodlugerREPO_NAMEeverestPATH_START.@everest_extracted@everest-master@everest@mathutils.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "transientskp/tkp", "repo_path": "tkp_extracted/tkp-master/tkp/bin/__init__.py", "type": "Python" }
transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tkp@bin@__init__.py@.PATH_END.py
{ "filename": "test_mdet_regression.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/mdet_tests/test_mdet_regression.py", "type": "Python" }
import os import sys import copy import glob import logging import pytest import numpy as np import galsim import fitsio import ngmix from metadetect.metadetect import Metadetect # setup logging for lib in [__name__, 'ngmix', 'metadetect']: lgr = logging.getLogger(lib) hdr = logging.StreamHandler(sys.stdout...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@mdet_tests@test_mdet_regression.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "POSYDON-code/POSYDON", "repo_path": "POSYDON_extracted/POSYDON-main/posydon/active_learning/psy_cris/synthetic_data/__init__.py", "type": "Python" }
POSYDON-codeREPO_NAMEPOSYDONPATH_START.@POSYDON_extracted@POSYDON-main@posydon@active_learning@psy_cris@synthetic_data@__init__.py@.PATH_END.py
{ "filename": "const.py", "repo_name": "atomdb/pyatomdb", "repo_path": "pyatomdb_extracted/pyatomdb-master/pyatomdb/pyatomdb/const.py", "type": "Python" }
""" This contains a list of constants, both physical and apec code related. Version 0.1 - initial release Adam Foster July 17th 2015 """ #PHYSICAL CONSTANTS KBOLTZ = 8.617385e-8# /*!< in units of keV/K *== 1/(11604.5*1000)/ M_E = 2.7182818284590452354 # /*!< Euler e */ UPSILON_COLL_COEFF = 8.629e-6 # /*!< sqrt{2 pi ...
atomdbREPO_NAMEpyatomdbPATH_START.@pyatomdb_extracted@pyatomdb-master@pyatomdb@pyatomdb@const.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="histogram2dcontour.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@line@_width.py@.PATH_END.py
{ "filename": "subch_zoom.py", "repo_name": "AMReX-Astro/Castro", "repo_path": "Castro_extracted/Castro-main/Exec/science/subchandra/analysis/subch_zoom.py", "type": "Python" }
#!/usr/bin/env python3 import argparse import os import sys from functools import reduce import matplotlib import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.axes_grid1 import ImageGrid import yt from yt.fields.derived_field import ValidateSpatial from yt.frontends.boxlib.api import CastroDataset f...
AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@subchandra@analysis@subch_zoom.py@.PATH_END.py
{ "filename": "tval.py", "repo_name": "petigura/terra", "repo_path": "terra_extracted/terra-master/terra/tval.py", "type": "Python" }
""" Transit Validation After the brute force period search yeilds candidate periods, functions in this module will check for transit-like signature. """ import numpy as np from numpy import ma from scipy import ndimage as nd from scipy.spatial import cKDTree from matplotlib import mlab import h5py import pandas as ...
petiguraREPO_NAMEterraPATH_START.@terra_extracted@terra-master@terra@tval.py@.PATH_END.py
{ "filename": "2024_08_14_145052_f93e1439f022_add_deployment_concurrency_limit.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/sqlite/2024_08_14_145052_f93e1439f022_add_deployment_concurrency_limit.py", "type": "Python" }
"""add_deployment_concurrency_limit Revision ID: f93e1439f022 Revises: 354f1ede7e9f Create Date: 2024-08-14 14:50:52.420436 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "f93e1439f022" down_revision = "354f1ede7e9f" branch_labels = None depends_on = None def...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@sqlite@2024_08_14_145052_f93e1439f022_add_deployment_concurrency_limit.py@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="histogram", **kwargs): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@_hovertemplate.py@.PATH_END.py
{ "filename": "_maxzoom.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/cluster/_maxzoom.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxzoom", parent_name="scattermapbox.cluster", **kwargs ): super(MaxzoomValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@cluster@_maxzoom.py@.PATH_END.py
{ "filename": "ClassMoresaneSingleSlice.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Imager/MultiSliceDeconv/MORESANE/ClassMoresaneSingleSlice.py", "type": "Python" }
''' DDFacet, a facet-based radio imaging package Copyright (C) 2013-2016 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; eit...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@Imager@MultiSliceDeconv@MORESANE@ClassMoresaneSingleSlice.py@.PATH_END.py
{ "filename": "gen_control_flow_v1.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/core/tfrt/saved_model/tests/gen_control_flow_v1.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@core@tfrt@saved_model@tests@gen_control_flow_v1.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "StingraySoftware/stingray", "repo_path": "stingray_extracted/stingray-main/stingray/modeling/__init__.py", "type": "Python" }
# Licensed under MIT license - see LICENSE.rst # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from .._astropy_init import * # ------------------------------------------------------...
StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@modeling@__init__.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=plo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@title@font@_size.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "brinckmann/montepython_public", "repo_path": "montepython_public_extracted/montepython_public-master/montepython/likelihoods/cosmic_clocks_BC03_all/__init__.py", "type": "Python" }
from montepython.likelihood_class import Likelihood_clocks class cosmic_clocks_BC03_all(Likelihood_clocks): pass
brinckmannREPO_NAMEmontepython_publicPATH_START.@montepython_public_extracted@montepython_public-master@montepython@likelihoods@cosmic_clocks_BC03_all@__init__.py@.PATH_END.py
{ "filename": "luminosity.py", "repo_name": "pynbody/pynbody", "repo_path": "pynbody_extracted/pynbody-master/pynbody/analysis/luminosity.py", "type": "Python" }
""" Routines and derived arrays for calculating luminosities and magnitudes. .. versionchanged:: 2.0 Luminosity tables are now generated directly from the output of the STEV/CMD web interface. The default tables are updated to more modern stellar population tracks (May 2024). This will result in different magni...
pynbodyREPO_NAMEpynbodyPATH_START.@pynbody_extracted@pynbody-master@pynbody@analysis@luminosity.py@.PATH_END.py
{ "filename": "parser.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/voltLib/parser.py", "type": "Python" }
import fontTools.voltLib.ast as ast from fontTools.voltLib.lexer import Lexer from fontTools.voltLib.error import VoltLibError from io import open PARSE_FUNCS = { "DEF_GLYPH": "parse_def_glyph_", "DEF_GROUP": "parse_def_group_", "DEF_SCRIPT": "parse_def_script_", "DEF_LOOKUP": "parse_def_lookup_", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@voltLib@parser.py@.PATH_END.py
{ "filename": "extract_test.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/tests/extract_test.py", "type": "Python" }
from concurrent.futures import ThreadPoolExecutor from threading import Barrier import pytest from common import * def test_extract(ds_local, ds_trimmed): ds = ds_local ds_extracted = ds.extract() ds_extracted.x.tolist() == ds_trimmed.x.tolist() ds_extracted.x.tolist() == np.arange(10.).tolist() as...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@extract_test.py@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "AmpelAstro/Ampel-contrib-sample", "repo_path": "Ampel-contrib-sample_extracted/Ampel-contrib-sample-master/CONTRIBUTING.md", "type": "Markdown" }
# Style guidelines ## Use pre-commit Pre-commit hooks check your commits for obvious mistakes like invalid syntax in Python or JSON files. [Install pre-commit on your machine](https://pre-commit.com/#installation), then activate the hooks with `pre-commit install`. The configured hooks will then run before every c...
AmpelAstroREPO_NAMEAmpel-contrib-samplePATH_START.@Ampel-contrib-sample_extracted@Ampel-contrib-sample-master@CONTRIBUTING.md@.PATH_END.py
{ "filename": "_tickcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="choropleth.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choropleth@colorbar@_tickcolor.py@.PATH_END.py
{ "filename": "manip_ops.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/manip_ops.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@ops@manip_ops.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "jan-rybizki/Galaxia_wrap", "repo_path": "Galaxia_wrap_extracted/Galaxia_wrap-master/notebook/README.md", "type": "Markdown" }
## Galaxia wrap notebooks roadmap You can load the notebooks using ``jupyter notebook`` and then change the content interactively, once you downloaded this repository. You can also just have a look at them here on github. **Legacy GDR2mock notebooks** ------------------------------------ In **[notebook 1](https://g...
jan-rybizkiREPO_NAMEGalaxia_wrapPATH_START.@Galaxia_wrap_extracted@Galaxia_wrap-master@notebook@README.md@.PATH_END.py
{ "filename": "galaxy10.py", "repo_name": "henrysky/astroNN", "repo_path": "astroNN_extracted/astroNN-master/src/astroNN/datasets/galaxy10.py", "type": "Python" }
# ---------------------------------------------------------# # astroNN.datasets.galaxy10: Galaxy10 DECaLS dataset # ---------------------------------------------------------# import os import urllib.request import h5py import numpy as np from astroNN.config import astroNN_CACHE_DIR from astroNN.shared.downloader_t...
henryskyREPO_NAMEastroNNPATH_START.@astroNN_extracted@astroNN-master@src@astroNN@datasets@galaxy10.py@.PATH_END.py
{ "filename": "mlir.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/interpreters/mlir.py", "type": "Python" }
# Copyright 2021 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@_src@interpreters@mlir.py@.PATH_END.py
{ "filename": "Interactive.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Script/Interactive.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@Script@Interactive.py@.PATH_END.py
{ "filename": "ensemble_posterior.py", "repo_name": "mackelab/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/inference/posteriors/ensemble_posterior.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> from typing import List, Optional, Tuple, Union import torch from torch import Tensor from torch.distributions import Distribution from sbi.inference.po...
mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@inference@posteriors@ensemble_posterior.py@.PATH_END.py
{ "filename": "arr_resize.py", "repo_name": "t-brandt/acorns-adi", "repo_path": "acorns-adi_extracted/acorns-adi-master/utils/arr_resize.py", "type": "Python" }
#!/usr/bin/env python # # Original filename: arr_resize.py # # Author: Tim Brandt # Email: tbrandt@astro.princeton.edu # Date: Dec 2012 # # Summary: Resize a square array. Crop or pad with NaN as necessary. # If padding, create and return a new array. # import numpy as np def arr_resize(arr, newdim=None, padval=np.n...
t-brandtREPO_NAMEacorns-adiPATH_START.@acorns-adi_extracted@acorns-adi-master@utils@arr_resize.py@.PATH_END.py
{ "filename": "linalg_decomp_1.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/sandbox/archive/linalg_decomp_1.py", "type": "Python" }
'''Recipes for more efficient work with linalg using classes intended for use for multivariate normal and linear regression calculations x is the data (nobs, nvars) m is the moment matrix (x'x) or a covariance matrix Sigma examples: x'sigma^{-1}x z = Px where P=Sigma^{-1/2} or P=Sigma^{1/2} Initially assume po...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@sandbox@archive@linalg_decomp_1.py@.PATH_END.py
{ "filename": "_tickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/baxis/_tickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="carpet.baxis", **kwargs): super(TickprefixValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@baxis@_tickprefix.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/yaxis/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.yaxis.title.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@yaxis@title@font@_size.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/simplejson/py3/simplejson/tool.py", "type": "Python" }
r"""Command-line tool to validate and pretty-print JSON Usage:: $ echo '{"json":"obj"}' | python -m simplejson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -m simplejson.tool Expecting property name: line 1 column 2 (char 2) """ from __future__ import with_statement import sys impo...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@simplejson@py3@simplejson@tool.py@.PATH_END.py
{ "filename": "_q3.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_q3.py", "type": "Python" }
import _plotly_utils.basevalidators class Q3Validator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="q3", parent_name="box", **kwargs): super(Q3Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwar...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_q3.py@.PATH_END.py
{ "filename": "0001_initial.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/net/migrations/0001_initial.py", "type": "Python" }
# Generated by Django 3.0.7 on 2020-06-25 15:38 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@net@migrations@0001_initial.py@.PATH_END.py
{ "filename": "example_08_planet_grid_fitting.py", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/examples/example_08_planet_grid_fitting.py", "type": "Python" }
# # Example Notebook to fit a microlensing event # # The procedure is: # 1. Estimate the point lens parameters (`t_0`, `u_0`, `t_E`) from the light # curve. # 2. Fit a point lens model (excluding the planetary perturbation). # 3. Estimate the planet parameters (`s`, `alpha`) from the light curve. # 4. Search for the be...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@examples@example_08_planet_grid_fitting.py@.PATH_END.py
{ "filename": "synthetic_radiography.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/diagnostics/charged_particle_radiography/synthetic_radiography.py", "type": "Python" }
""" Routines for the analysis of proton radiographs. These routines can be broadly classified as either creating synthetic radiographs from prescribed fields or methods of 'inverting' experimentally created radiographs to reconstruct the original fields (under some set of assumptions). """ __all__ = ["Tracker", "synth...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@diagnostics@charged_particle_radiography@synthetic_radiography.py@.PATH_END.py
{ "filename": "installation.md", "repo_name": "janosch314/GWFish", "repo_path": "GWFish_extracted/GWFish-main/docs/source/installation.md", "type": "Markdown" }
# Installing GWFish An older version of GWFish is [available on pypi](https://pypi.org/project/GWFish/), but don't use it --- it's not up to date yet. Instead, clone the repo. Move to a clean folder, and run: ```bash git clone https://github.com/janosch314/GWFish cd GWFish ``` You can then install `GWFish` with: ``...
janosch314REPO_NAMEGWFishPATH_START.@GWFish_extracted@GWFish-main@docs@source@installation.md@.PATH_END.py
{ "filename": "artisoptions_doc.md", "repo_name": "artis-mcrt/artis", "repo_path": "artis_extracted/artis-main/artisoptions_doc.md", "type": "Markdown" }
``` // Number of energy packets per process (MPI rank). OpenMP threads share these packets constexpr int MPKTS; constexpr auto GRID_TYPE = {GridType::CARTESIAN3D, GridType::CYLINDRICAL2D, GridType::SPHERICAL1D} // for GridType::CARTESIAN3D, set the dimensions. This will have no effect with a 3D model.txt since they w...
artis-mcrtREPO_NAMEartisPATH_START.@artis_extracted@artis-main@artisoptions_doc.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astro-transients/tilepy", "repo_path": "tilepy_extracted/tilepy-master/src/tilepy/scripts/__init__.py", "type": "Python" }
from .Tiling_Observations import Tiling_Observations from .PlottingTwoCampaigns import PlottingTwoCampaigns __all__ = [ "Tiling_Observations", "PlottingTwoCampaigns", ]
astro-transientsREPO_NAMEtilepyPATH_START.@tilepy_extracted@tilepy-master@src@tilepy@scripts@__init__.py@.PATH_END.py
{ "filename": "_linewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/xaxis/_linewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.scene.xaxis", **kwargs ): super(LinewidthValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@xaxis@_linewidth.py@.PATH_END.py
{ "filename": "UVLF_FutureMock.py", "repo_name": "NNSSA/GALLUMI_public", "repo_path": "GALLUMI_public_extracted/GALLUMI_public-main/Scripts/UVLF_FutureMock/UVLF_FutureMock.py", "type": "Python" }
import numpy as np from matplotlib import pyplot as plt from scipy.interpolate import PchipInterpolator import galcv ######################################################################################### # Gaussian integrator points, weights = np.polynomial.legendre.leggauss(1000) def integrator(f, a, b): sub ...
NNSSAREPO_NAMEGALLUMI_publicPATH_START.@GALLUMI_public_extracted@GALLUMI_public-main@Scripts@UVLF_FutureMock@UVLF_FutureMock.py@.PATH_END.py