metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "qest.py", "repo_name": "dhanson/quicklens", "repo_path": "quicklens_extracted/quicklens-master/quicklens/sims/qest.py", "type": "Python" }
# quicklens/sims/qest.py # -- # this module contains a library object which applies quadratic estimators # to inverse-variance filtered sky maps. in this module a 'quadratic estimator' # is actually a weighted sum of estimates produced by qest.qest. these estimators # each have a unique key, and are defined in library....
dhansonREPO_NAMEquicklensPATH_START.@quicklens_extracted@quicklens-master@quicklens@sims@qest.py@.PATH_END.py
{ "filename": "luminosity_model--ECPL_2param--n=2.0_test_for_consistency.py", "repo_name": "DebduttaPaul/luminosity_function_of_sGRBs", "repo_path": "luminosity_function_of_sGRBs_extracted/luminosity_function_of_sGRBs-master/luminosity_model--ECPL_2param--n=2.0_test_for_consistency.py", "type": "Python" }
from __future__ import division from astropy.io import ascii from astropy.table import Table from scipy.optimize import curve_fit from scipy.integrate import quad, simps import debduttaS_functions as mf import specific_functions as sf import time import numpy as np import matplotlib.pyplot as plt plt.rc('axes', linewid...
DebduttaPaulREPO_NAMEluminosity_function_of_sGRBsPATH_START.@luminosity_function_of_sGRBs_extracted@luminosity_function_of_sGRBs-master@luminosity_model--ECPL_2param--n=2.0_test_for_consistency.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "ArgonneCPAC/diffstar", "repo_path": "diffstar_extracted/diffstar-main/README.md", "type": "Markdown" }
# diffstar ## Installation The latest release of diffstar is available for installation with either pip or conda-forge: ``` $ conda install -c conda-forge diffstar ``` Alternatively, to install diffstar into your environment from the source code: ``` $ cd /path/to/root/diffstar $ pip install . ``` ### Environment c...
ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@README.md@.PATH_END.py
{ "filename": "taskUtils.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/python/lsst/ts/wep/utils/taskUtils.py", "type": "Python" }
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@python@lsst@ts@wep@utils@taskUtils.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/box/selected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "box.selected" _path_str = "box.selected.marker" _valid_props = {"color", "opacity", "size"} ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@box@selected@_marker.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="funnel", **kwargs): super(OpacityValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@_opacity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astroplan", "repo_path": "astroplan_extracted/astroplan-main/astroplan/plots/__init__.py", "type": "Python" }
""" `astroplan.plots` contains functions for making plots of commonly-used quantities in observation planning (e.g., airmass vs. time), using `astroplan` and `Matplotlib`_. .. _Matplotlib: http://www.matplotlib.org """ from .time_dependent import * from .sky import * from .mplstyles import * from .finder import *
astropyREPO_NAMEastroplanPATH_START.@astroplan_extracted@astroplan-main@astroplan@plots@__init__.py@.PATH_END.py
{ "filename": "ACC_CSV_Converter.py", "repo_name": "creaneroDIAS/beamModelTester", "repo_path": "beamModelTester_extracted/beamModelTester-master/ACC_CSV_converter/ACC_CSV_Converter.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Wed Feb 14 16:25:32 2018 @author: Oisin Creaner This program is designed to read in an ACC file from LOFAR and convert it to a csv file with the same name but different extension """ import struct import numpy as np import os import sys #definitions of file names #hard coded fo...
creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@ACC_CSV_converter@ACC_CSV_Converter.py@.PATH_END.py
{ "filename": "README-fork.md", "repo_name": "cshsgy/ExoCubed", "repo_path": "ExoCubed_extracted/ExoCubed-main/doc/README-fork.md", "type": "Markdown" }
# How to private fork [canoe](https://github.com/chengcli/canoe) The [canoe](https://github.com/chengcli/canoe) repository is public by default but Github does not allow the creation of private forks for public repositories. Thus, we recommend a public fork of [canoe](https://github.com/chengcli/canoe) to create your ...
cshsgyREPO_NAMEExoCubedPATH_START.@ExoCubed_extracted@ExoCubed-main@doc@README-fork.md@.PATH_END.py
{ "filename": "_value.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/contours/_value.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="value", parent_name="contour.contours", **kwargs): super(ValueValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@contours@_value.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spacetelescope/pystortion", "repo_path": "pystortion_extracted/pystortion-master/pystortion/tests/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains package tests. """
spacetelescopeREPO_NAMEpystortionPATH_START.@pystortion_extracted@pystortion-master@pystortion@tests@__init__.py@.PATH_END.py
{ "filename": "demo_MBS_associated.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/mbs/demo_MBS_associated.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2019 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@mbs@demo_MBS_associated.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/funnel/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 ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "protofeature.py", "repo_name": "astropy/pyvo", "repo_path": "pyvo_extracted/pyvo-main/pyvo/utils/protofeature.py", "type": "Python" }
from dataclasses import dataclass __all__ = ['Feature'] @dataclass class Feature: """ A prototype feature implementing a standard that is currently in the process of being approved, but that might change as a result of the approval process. A Feature must have a name. Optionally, a feature may have a...
astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@utils@protofeature.py@.PATH_END.py
{ "filename": "make_some_beam_plots.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/cmake_testing/GPU_code/primary_beam_gpu/make_some_beam_plots.py", "type": "Python" }
from astropy.io import fits import numpy as np from astropy.wcs import WCS from copy import deepcopy import erfa import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import mwa_hyperbeam from subprocess import call print(mwa_hyperbeam.__version__) D2R = np.pi / 180.0 VELC = 29979245...
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@cmake_testing@GPU_code@primary_beam_gpu@make_some_beam_plots.py@.PATH_END.py
{ "filename": "unlensed.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/PointSource/Types/unlensed.py", "type": "Python" }
from lenstronomy.PointSource.Types.base_ps import PSBase import numpy as np __all__ = ["Unlensed"] class Unlensed(PSBase): """ class of a single point source in the image plane, aka star Name within the PointSource module: 'UNLENSED' This model can deal with arrays of point sources. parameters: r...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@PointSource@Types@unlensed.py@.PATH_END.py
{ "filename": "layer_style_editor.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/plugins/dendro_viewer/layer_style_editor.py", "type": "Python" }
import os from qtpy import QtWidgets from echo.qt import autoconnect_callbacks_to_qt from glue.utils.qt import load_ui class DendorgramLayerStyleEditor(QtWidgets.QWidget): def __init__(self, layer, parent=None): super(DendorgramLayerStyleEditor, self).__init__(parent=parent) self.ui = load_ui...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@plugins@dendro_viewer@layer_style_editor.py@.PATH_END.py
{ "filename": "lti_conversion.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/signal/lti_conversion.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.signal` namespace for importing the functions # included below. from scipy._lib.deprecation import _sub_module_deprecation __all__ = [ # noqa: F822 'tf2ss', 'abcd_normalize', 'ss2tf', 'zpk2ss', 'ss2zpk', 'cont2discr...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@signal@lti_conversion.py@.PATH_END.py
{ "filename": "_width.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/marker/line/_width.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatter.marker.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@marker@line@_width.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/triangles/conftest.py", "type": "Python" }
import pytest import autolens as al @pytest.fixture def grid(): return al.Grid2D.uniform( shape_native=(10, 10), pixel_scales=1.0, ) @pytest.fixture def tracer(): isothermal_mass_profile = al.mp.Isothermal( centre=(0.0, 0.0), einstein_radius=1.6, ell_comps=al.conv...
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@triangles@conftest.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "igmhub/picca", "repo_path": "picca_extracted/picca-master/py/picca/tests/delta_extraction/__init__.py", "type": "Python" }
"""Initialize python package logger""" import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@py@picca@tests@delta_extraction@__init__.py@.PATH_END.py
{ "filename": "appearance_functions.py", "repo_name": "creaneroDIAS/beamModelTester", "repo_path": "beamModelTester_extracted/beamModelTester-master/comparison_module/appearance_functions.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Fri Jun 15 13:13:45 2018 @author: User """ import seaborn as sns import matplotlib.pyplot as plt def gen_pretty_name(key,units=False): ''' This function generates suitable names for graph titles and axes from the keys used to access elements of the dataframe in the...
creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@comparison_module@appearance_functions.py@.PATH_END.py
{ "filename": "logging_functions.py", "repo_name": "spacetelescope/mirage", "repo_path": "mirage_extracted/mirage-master/mirage/logging/logging_functions.py", "type": "Python" }
#! /usr/bin/env python """This module contains functions related to logging in Mirage """ import datetime from functools import wraps import logging from logging.config import dictConfig import os import shutil import traceback import yaml def create_logger(filename, output_log_file): """Using the provided yaml...
spacetelescopeREPO_NAMEmiragePATH_START.@mirage_extracted@mirage-master@mirage@logging@logging_functions.py@.PATH_END.py
{ "filename": "_uid.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/_uid.py", "type": "Python" }
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatter3d", **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_typ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@_uid.py@.PATH_END.py
{ "filename": "_symmetric.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/error_y/_symmetric.py", "type": "Python" }
import _plotly_utils.basevalidators class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter.error_y", **kwargs ): super(SymmetricValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@error_y@_symmetric.py@.PATH_END.py
{ "filename": "N_scaling_figure.ipynb", "repo_name": "Mauropieroni/fastPTA", "repo_path": "fastPTA_extracted/fastPTA-main/examples/N_scaling_figure.ipynb", "type": "Jupyter Notebook" }
### Start importing all libraries ```python # Global import os import tqdm import numpy as np import matplotlib.pyplot as plt # Local import examples_utils as eu import fastPTA.utils as ut import fastPTA.plotting_functions as pf from fastPTA.Fisher_code import compute_fisher ``` No GPU/TPU found, falling back t...
MauropieroniREPO_NAMEfastPTAPATH_START.@fastPTA_extracted@fastPTA-main@examples@N_scaling_figure.ipynb@.PATH_END.py
{ "filename": "spherical_harmonics.py", "repo_name": "galsci/pysm", "repo_path": "pysm_extracted/pysm-main/src/pysm3/utils/spherical_harmonics.py", "type": "Python" }
import healpy as hp import numpy as np import logging from astropy import units as u import pixell.enmap, pixell.curvedsky from .. import mpi, utils log = logging.getLogger("pysm3") def apply_smoothing_and_coord_transform( input_map, fwhm=None, beam_window=None, rot=None, lmax=None, output_...
galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@src@pysm3@utils@spherical_harmonics.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/legendgrouptitle/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="treemap.legendgrouptitle", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@legendgrouptitle@_text.py@.PATH_END.py
{ "filename": "standard_errrors_and_p-values.py", "repo_name": "cjekel/piecewise_linear_fit_py", "repo_path": "piecewise_linear_fit_py_extracted/piecewise_linear_fit_py-master/examples/standard_errrors_and_p-values.py", "type": "Python" }
# example of how to calculate standard errors and p-values from __future__ import print_function import numpy as np import pwlf # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.74104940e-02, 8.34831790e-02, 1.02580042e-01, 1.2276793...
cjekelREPO_NAMEpiecewise_linear_fit_pyPATH_START.@piecewise_linear_fit_py_extracted@piecewise_linear_fit_py-master@examples@standard_errrors_and_p-values.py@.PATH_END.py
{ "filename": "legend_handler.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/legend_handler.py", "type": "Python" }
""" Default legend handlers. .. important:: This is a low-level legend API, which most end users do not need. We recommend that you are familiar with the :ref:`legend guide <legend_guide>` before reading this documentation. Legend handlers are expected to be a callable object with a following signature:...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@legend_handler.py@.PATH_END.py
{ "filename": "signal_generator.ipynb", "repo_name": "icecube/skyllh", "repo_path": "skyllh_extracted/skyllh-master/doc/sphinx/faq/signal_generator.ipynb", "type": "Jupyter Notebook" }
# Signal Generator ## How can I change the flux model of my sources (for my signal events)?
icecubeREPO_NAMEskyllhPATH_START.@skyllh_extracted@skyllh-master@doc@sphinx@faq@signal_generator.ipynb@.PATH_END.py
{ "filename": "batching.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/experimental/ops/batching.py", "type": "Python" }
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@data@experimental@ops@batching.py@.PATH_END.py
{ "filename": "gen_pot.py", "repo_name": "stub42/pytz", "repo_path": "pytz_extracted/pytz-master/gen_pot.py", "type": "Python" }
from __future__ import print_function import sys import os.path import time from gen_tzinfo import allzones from pytz import __version__ boilerplate = r"""msgid "" msgstr "" "Project-Id-Version: pytz %s\n" "POT-Creation-Date: %s\n" "Content-Type: text/plain; charset=UTF-8\n" """ % ( __version__, time.strftim...
stub42REPO_NAMEpytzPATH_START.@pytz_extracted@pytz-master@gen_pot.py@.PATH_END.py
{ "filename": "lc.py", "repo_name": "AstroVPK/kali", "repo_path": "kali_extracted/kali-master/python/kali/lc.py", "type": "Python" }
#!/usr/bin/env python """ Module that defines light curve objects. """ import math import cmath import numpy as np import operator import sys import abc import psutil import types import os import reprlib import copy import warnings import pdb as pdb import scipy.stats as spstats from scipy.interpolate import Univaria...
AstroVPKREPO_NAMEkaliPATH_START.@kali_extracted@kali-master@python@kali@lc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font from ._grouptitlefont import Grouptitlefont else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._font.Font"...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "calibration_ghost.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/ghostdr/ghost/calibration_ghost.py", "type": "Python" }
""" This module holds the CalibrationGHOST class """ from gemini_calmgr.orm.header import Header from gemini_calmgr.orm.ghost import Ghost from gemini_calmgr.cal.calibration import Calibration, not_processed, not_imaging, not_spectroscopy import math class CalibrationGHOST(Calibration): """ This class implem...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@ghostdr@ghost@calibration_ghost.py@.PATH_END.py
{ "filename": "combinedspec.ipynb", "repo_name": "alphaparrot/ExoPlaSim", "repo_path": "ExoPlaSim_extracted/ExoPlaSim-master/exoplasim/plasim/src/specs/combinedspec.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt %matplotlib inline ``` ```python manifest = {} with open("manifest.txt","r") as mn: lines = mn.read().split('\n') for l in lines: lfile = l.split() if len(lfile)>0: manifest[lfile[0]] = lfile[1] ``` ```python names = so...
alphaparrotREPO_NAMEExoPlaSimPATH_START.@ExoPlaSim_extracted@ExoPlaSim-master@exoplasim@plasim@src@specs@combinedspec.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dendrograms/astrodendro", "repo_path": "astrodendro_extracted/astrodendro-main/astrodendro/io/__init__.py", "type": "Python" }
# Licensed under an MIT open source license - see LICENSE from pathlib import Path from .fits import FITSHandler from .hdf5 import HDF5Handler IO_FORMATS = { 'fits': FITSHandler, 'hdf5': HDF5Handler } def _valid(formats): return " and ".join(["'{0}'".format(key) for key in formats]) def load_dendrog...
dendrogramsREPO_NAMEastrodendroPATH_START.@astrodendro_extracted@astrodendro-main@astrodendro@io@__init__.py@.PATH_END.py
{ "filename": "vdm.py", "repo_name": "trivnguyen/nehod_torch", "repo_path": "nehod_torch_extracted/nehod_torch-main/nehod/vdm.py", "type": "Python" }
from typing import Optional, Tuple, Union import torch import torch.nn as nn import torch.nn.functional as F import torch.distributions as dist import pytorch_lightning as pl from nehod import noise_schedules, scores from nehod import diffusion_utils, train_utils, augmentations from nehod.diffusion_utils import alph...
trivnguyenREPO_NAMEnehod_torchPATH_START.@nehod_torch_extracted@nehod_torch-main@nehod@vdm.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/extend/core/__init__.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@extend@core@__init__.py@.PATH_END.py
{ "filename": "redcal_inspect_2458154.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458154.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_2458154.ipynb@.PATH_END.py
{ "filename": "sinc.py", "repo_name": "transientskp/lpf", "repo_path": "lpf_extracted/lpf-main/lpf/bolts/filters/sinc.py", "type": "Python" }
# type: ignore import numpy as np from scipy.ndimage import _ni_support from scipy.ndimage.filters import correlate1d def sinc(x, s=1): sinc = np.sin(x / s) / (x / s) sinc[x == 0] = 1 return sinc def _sinc_kernel1d(sigma, radius): x = np.arange(-radius, radius + 1) weights = sinc(x, sigma) we...
transientskpREPO_NAMElpfPATH_START.@lpf_extracted@lpf-main@lpf@bolts@filters@sinc.py@.PATH_END.py
{ "filename": "parallel_model.py", "repo_name": "hfarias/mask_galaxy", "repo_path": "mask_galaxy_extracted/mask_galaxy-master/mrcnn/parallel_model.py", "type": "Python" }
""" Mask R-CNN Multi-GPU Support for Keras. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla Ideas and a small code snippets from these sources: https://github.com/fchollet/keras/issues/2436 https://medium.com/@kuza55/transparent-multi-gpu-training...
hfariasREPO_NAMEmask_galaxyPATH_START.@mask_galaxy_extracted@mask_galaxy-master@mrcnn@parallel_model.py@.PATH_END.py
{ "filename": "test_quantities_fitting.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/modeling/tests/test_quantities_fitting.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests that relate to fitting models with quantity parameters """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np import pytest from ..models import Gaussian1D from ... ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@modeling@tests@test_quantities_fitting.py@.PATH_END.py
{ "filename": "tensorflow_datasets.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/utilities/tensorflow_datasets.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.utilities import TensorflowDatasets # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. D...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@utilities@tensorflow_datasets.py@.PATH_END.py
{ "filename": "test_transforms.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/visualization/wcsaxes/tests/test_transforms.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division, absolute_import import numpy as np from matplotlib.transforms import Affine2D from ....wcs import WCS from ..transforms import WCSWorld2PixelTransform WCS2D = WCS(naxis=2) WCS2D.wcs.ctype = ['x', 'y'] ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@visualization@wcsaxes@tests@test_transforms.py@.PATH_END.py
{ "filename": "LICENSE.md", "repo_name": "illustristng/illustris_python", "repo_path": "illustris_python_extracted/illustris_python-master/LICENSE.md", "type": "Markdown" }
Copyright (c) 2017, illustris & illustris_python developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of cond...
illustristngREPO_NAMEillustris_pythonPATH_START.@illustris_python_extracted@illustris_python-master@LICENSE.md@.PATH_END.py
{ "filename": "test_full_run.py", "repo_name": "cylammarco/ASPIRED", "repo_path": "ASPIRED_extracted/ASPIRED-main/test/test_full_run.py", "type": "Python" }
# -*- coding: utf-8 -*- import os from unittest.mock import patch import numpy as np from aspired import image_reduction, spectral_reduction HERE = os.path.dirname(os.path.realpath(__file__)) @patch("plotly.graph_objects.Figure.show") def test_full_run(mock_show): # Extract two spectra # Line list atla...
cylammarcoREPO_NAMEASPIREDPATH_START.@ASPIRED_extracted@ASPIRED-main@test@test_full_run.py@.PATH_END.py
{ "filename": "_showscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/_showscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattergeo.marker", **kwargs ): super(ShowscaleValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@_showscale.py@.PATH_END.py
{ "filename": "radon_transform.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/transform/radon_transform.py", "type": "Python" }
import numpy as np from scipy.interpolate import interp1d from scipy.constants import golden_ratio from scipy.fft import fft, ifft, fftfreq, fftshift from ._warps import warp from ._radon_transform import sart_projection_update from .._shared.utils import convert_to_float from warnings import warn from functools impor...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@transform@radon_transform.py@.PATH_END.py
{ "filename": "bench_app.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/benchmarks/benchmarks/bench_app.py", "type": "Python" }
from .common import Benchmark import numpy as np class LaplaceInplace(Benchmark): params = ['inplace', 'normal'] param_names = ['update'] def setup(self, update): N = 150 Niter = 1000 dx = 0.1 dy = 0.1 dx2 = (dx * dx) dy2 = (dy * dy) def num_updat...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@benchmarks@benchmarks@bench_app.py@.PATH_END.py
{ "filename": "pk2xi_speed.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/investigations/pk2xi_speed.py", "type": "Python" }
from barry.cosmology import PowerToCorrelationGauss, PowerToCorrelationFT, getCambGenerator import numpy as np from timeit import timeit camb = getCambGenerator() ks = camb.ks pk = camb.get_data()[1] ss = np.linspace(20, 200, 50) gauss = PowerToCorrelationGauss(ks) fft = PowerToCorrelationFT() n = 500 def time_gauss...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@investigations@pk2xi_speed.py@.PATH_END.py
{ "filename": "test_loss_equivalence.py", "repo_name": "mwalmsley/zoobot", "repo_path": "zoobot_extracted/zoobot-main/tests/test_loss_equivalence.py", "type": "Python" }
# import pytest # # cannot be run on mac m1 as tensorflow cannot be installed # import tensorflow_probability as tfp # import torch # import numpy as np # from zoobot.tensorflow.training import losses as tf_losses # from zoobot.pytorch.training import losses as torch_losses # @pytest.fixture # def single_question_c...
mwalmsleyREPO_NAMEzoobotPATH_START.@zoobot_extracted@zoobot-main@tests@test_loss_equivalence.py@.PATH_END.py
{ "filename": "preprocess_plot.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/preprocess/preprocess_plot.py", "type": "Python" }
import numpy as np import scipy.stats as stats import os import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from venn import venn from sotodlib import hwp import sotodlib.core as core from sotodlib.core.flagman import has_all_cut, has_any_cuts, count_cuts, sparse_to_ranges_matrix def plot_det_bia...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@preprocess@preprocess_plot.py@.PATH_END.py
{ "filename": "celery.py", "repo_name": "LCOGT/banzai", "repo_path": "banzai_extracted/banzai-main/banzai/celery.py", "type": "Python" }
import os from datetime import datetime, timedelta from dateutil.parser import parse from celery import Celery from kombu import Queue from banzai import dbs, calibrations, logs from banzai.utils import date_utils, realtime_utils, stage_utils from celery.signals import worker_process_init from banzai.context import C...
LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@celery.py@.PATH_END.py
{ "filename": "test_sph_data_objects.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/data_objects/tests/test_sph_data_objects.py", "type": "Python" }
import numpy as np from numpy.testing import assert_allclose, assert_almost_equal, assert_equal from yt import SlicePlot, add_particle_filter from yt.loaders import load from yt.testing import fake_sph_grid_ds, fake_sph_orientation_ds, requires_file def test_point(): ds = fake_sph_orientation_ds() field_data...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@data_objects@tests@test_sph_data_objects.py@.PATH_END.py
{ "filename": "binomialVettingCompleteness_scoreSum-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_dr25RadCut/.ipynb_checkpoints/binomialVettingCompleteness_scoreSum-checkpoint.ipynb", "type": "Jupyter Note...
```python import numpy as np import matplotlib.pyplot as plt import scipy.special as spec import pandas as pd from astropy.io import ascii import scipy.stats as stats from ipywidgets import FloatProgress from IPython.display import display import sys sys.path.insert(0, '..') import dr25Models as funcModels ``` ```py...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_dr25RadCut@.ipynb_checkpoints@binomialVettingCompleteness_scoreSum-checkpoint.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astroML/gatspy", "repo_path": "gatspy_extracted/gatspy-master/gatspy/periodic/tests/__init__.py", "type": "Python" }
astroMLREPO_NAMEgatspyPATH_START.@gatspy_extracted@gatspy-master@gatspy@periodic@tests@__init__.py@.PATH_END.py
{ "filename": "SN_Example.ipynb", "repo_name": "cheerfuluser/tessreduce", "repo_path": "tessreduce_extracted/tessreduce-master/examples/SN_Example.ipynb", "type": "Jupyter Notebook" }
```python import tessreduce as tr import matplotlib.pyplot as plt import numpy as np %matplotlib inline ``` If you only know the name of the transient, and not ra, dec, or sector, then you can use **sn_lookup**. Here we use it for SN 2020cdj ```python obs = tr.sn_lookup('sn2020cdj',time='disc') ``` | Sector ...
cheerfuluserREPO_NAMEtessreducePATH_START.@tessreduce_extracted@tessreduce-master@examples@SN_Example.ipynb@.PATH_END.py
{ "filename": "test_beamformer.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/tests/test_beamformer.py", "type": "Python" }
""" Unit test for the lsl.misc.beamformer module. """ import os import unittest import ephem import numpy as np from astropy.coordinates import Angle from lsl.misc import beamformer from lsl.common import stations import lsl.testing __version__ = "0.2" __author__ = "Jayce Dowell" class beamformer_tests(unitt...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_beamformer.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/fftpack/tests/__init__.py", "type": "Python" }
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@fftpack@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "xgds/xgds_core", "repo_path": "xgds_core_extracted/xgds_core-master/xgds_core/management/appCommands/__init__.py", "type": "Python" }
xgdsREPO_NAMExgds_corePATH_START.@xgds_core_extracted@xgds_core-master@xgds_core@management@appCommands@__init__.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/unselected/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.unselected.textfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@unselected@textfont@_color.py@.PATH_END.py
{ "filename": "Test_DCO_Formation_Channels_Redshift_rates.ipynb", "repo_name": "FloorBroekgaarden/Double-Compact-Object-Mergers", "repo_path": "Double-Compact-Object-Mergers_extracted/Double-Compact-Object-Mergers-main/demo_read_hdf5_file/Test_DCO_Formation_Channels_Redshift_rates.ipynb", "type": "Jupyter Noteb...
```python # just to make the cells appear wider: from IPython.core.display import display, HTML display(HTML("<style>.container { width:100% !important; }</style>")) import h5py as h5 import numpy as np import os import matplotlib.pyplot as plt import pandas as pd import string ``` /var/folders/lc/vg4hc2nn2pn...
FloorBroekgaardenREPO_NAMEDouble-Compact-Object-MergersPATH_START.@Double-Compact-Object-Mergers_extracted@Double-Compact-Object-Mergers-main@demo_read_hdf5_file@Test_DCO_Formation_Channels_Redshift_rates.ipynb@.PATH_END.py
{ "filename": "topopt.py", "repo_name": "COSMOGRAIL/PyCS", "repo_path": "PyCS_extracted/PyCS-master/pycs/spl/topopt.py", "type": "Python" }
""" Higher level wrappers around the multiopt optimizers. These attempt to be a as multi-puropose as possible, but please understand that there is no general "optimal" way to optimize a spline fit. Depening on your data, custom optimizers might be needed. That's what we did for the TDC. In principle we do not define t...
COSMOGRAILREPO_NAMEPyCSPATH_START.@PyCS_extracted@PyCS-master@pycs@spl@topopt.py@.PATH_END.py
{ "filename": "_y0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/_y0.py", "type": "Python" }
import _plotly_utils.basevalidators class Y0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="y0", parent_name="image", **kwargs): super(Y0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@_y0.py@.PATH_END.py
{ "filename": "generate_cooling_model_with_plotter.py", "repo_name": "cylammarco/WDPhotTools", "repo_path": "WDPhotTools_extracted/WDPhotTools-main/example/generate_cooling_model_with_plotter.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Plot the default cooling model""" from WDPhotTools import plotter plotter.plot_cooling_model( mass=[0.2, 0.4, 0.6, 0.8, 1.0], savefig=True, folder="example_output", filename="DA_cooling_model_from_plotter", )
cylammarcoREPO_NAMEWDPhotToolsPATH_START.@WDPhotTools_extracted@WDPhotTools-main@example@generate_cooling_model_with_plotter.py@.PATH_END.py
{ "filename": "result_analysis.py", "repo_name": "fabiorigamonti/bang", "repo_path": "bang_extracted/bang-main/src/BANG/result_analysis.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import corner from matplotlib import ticker import math import os def dehenen_mass(M,R,gamma,r): Mbulge = M*(r/(r+R))**(3-gamma) return Mbulge def NFW_mass(M,c,R,r): s = r/R M_halo = M/(np.log(1+c)-c/(1+c))*(np.log(1+s)-s/(1+s)) return M_halo ...
fabiorigamontiREPO_NAMEbangPATH_START.@bang_extracted@bang-main@src@BANG@result_analysis.py@.PATH_END.py
{ "filename": "descriptorlib.py", "repo_name": "skyfielders/python-skyfield", "repo_path": "python-skyfield_extracted/python-skyfield-master/skyfield/descriptorlib.py", "type": "Python" }
from functools import update_wrapper class reify(object): """Adapted from Pyramid's `reify()` memoizing decorator.""" def __init__(self, method): self.method = method update_wrapper(self, method) def __get__(self, instance, objtype=None): if instance is None: return sel...
skyfieldersREPO_NAMEpython-skyfieldPATH_START.@python-skyfield_extracted@python-skyfield-master@skyfield@descriptorlib.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/starts/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="streamtube.starts", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@starts@_x.py@.PATH_END.py
{ "filename": "writeoifits.py", "repo_name": "achael/eht-imaging", "repo_path": "eht-imaging_extracted/eht-imaging-main/ehtim/io/writeoifits.py", "type": "Python" }
# writeData.py # functionto save observation to OIFITS # author: Katie Bouman from __future__ import division from __future__ import print_function from builtins import range import numpy as np import ehtim.io.oifits import ehtim.const_def as ehc def writeOIFITS(filename, RA, DEC, frequency, bandWidth, intTime, ...
achaelREPO_NAMEeht-imagingPATH_START.@eht-imaging_extracted@eht-imaging-main@ehtim@io@writeoifits.py@.PATH_END.py
{ "filename": "_parentssrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/_parentssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="parentssrc", parent_name="icicle", **kwargs): super(ParentssrcValidator, 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@icicle@_parentssrc.py@.PATH_END.py
{ "filename": "semadb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/semadb.py", "type": "Python" }
from typing import Any, Iterable, List, Optional, Tuple, cast from uuid import uuid4 import numpy as np import requests from langchain_core.documents import Document from langchain_core.embeddings import Embeddings from langchain_core.utils import get_from_env from langchain_core.vectorstores import VectorStore from ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@semadb.py@.PATH_END.py
{ "filename": "acsncRunConComp.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acsnc/ws/test/acsncRunConComp.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acsnc@ws@test@acsncRunConComp.py@.PATH_END.py
{ "filename": "docs_full_pipeline.ipynb", "repo_name": "tamarervin/SolAster", "repo_path": "SolAster_extracted/SolAster-main/mkdocs/docs/examples/docs_full_pipeline.ipynb", "type": "Jupyter Notebook" }
# Outline of correction and velocity calculations from SDO/HMI Images ```python import datetime import pandas as pd import numpy as np import sunpy.map from sunpy.net import Fido from sunpy.net import attrs as a from sunpy.coordinates import frames import SolAster.tools.rvs as rvs import SolAster.tools.calculation_...
tamarervinREPO_NAMESolAsterPATH_START.@SolAster_extracted@SolAster-main@mkdocs@docs@examples@docs_full_pipeline.ipynb@.PATH_END.py
{ "filename": "colormap_converter.py", "repo_name": "yacobozdalkiran/CLASS_mod", "repo_path": "CLASS_mod_extracted/CLASS_mod-main/class_public-master/external/RealSpaceInterface/colormap_converter.py", "type": "Python" }
import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np from PIL import Image import os OUTPUT_DIR = os.path.join("static", "images", "colormaps") WIDTH = 512 def create_image(cmap, width): values = np.linspace(0, 1, width) colors = cmap(values).reshape((1, width, 4)) image = Image.f...
yacobozdalkiranREPO_NAMECLASS_modPATH_START.@CLASS_mod_extracted@CLASS_mod-main@class_public-master@external@RealSpaceInterface@colormap_converter.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "richteague/disksurf", "repo_path": "disksurf_extracted/disksurf-master/README.md", "type": "Markdown" }
# disksurf <p align='center'> <img src="HD163296_zeroth.png" width="793" height="549"> <br> <a href='https://disksurf.readthedocs.io/en/latest/?badge=latest'> <img src='https://readthedocs.org/projects/disksurf/badge/?version=latest' alt='Documentation Status' /> </a> <a href='https://doi.org/10.21105/jo...
richteagueREPO_NAMEdisksurfPATH_START.@disksurf_extracted@disksurf-master@README.md@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="barpolar.marker", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@_colorscale.py@.PATH_END.py
{ "filename": "run_and_gather_logs.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/tools/test/run_and_gather_logs.py", "type": "Python" }
# Copyright 2016 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@tools@test@run_and_gather_logs.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/rangeselector/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.xaxis.rangeselector.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@rangeselector@font@_family.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/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...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@choroplethmapbox@selected@_marker.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/insidetextfont/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.insidetextfont", **kwargs ): super(LinepositionValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@insidetextfont@_lineposition.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/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__, _...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@barpolar@marker@colorbar@__init__.py@.PATH_END.py
{ "filename": "post_kick2.py", "repo_name": "orlox/mesa_input_data", "repo_path": "mesa_input_data_extracted/mesa_input_data-master/2016_ULX/scripts/NSBH/kick_data/post_kick2.py", "type": "Python" }
#!/usr/bin/env python import numpy as np from pylab import * import matplotlib.pyplot as plt from matplotlib import rc rc('text', usetex=True) import matplotlib.patches as patches from scipy.interpolate import griddata import math import scipy from matplotlib import ticker import sys import os import mmap import iterto...
orloxREPO_NAMEmesa_input_dataPATH_START.@mesa_input_data_extracted@mesa_input_data-master@2016_ULX@scripts@NSBH@kick_data@post_kick2.py@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="splom", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@_visible.py@.PATH_END.py
{ "filename": "DistanceCostFunction.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/DistanceCostFunction.py", "type": "Python" }
import numpy as numpy import math from .ErrorDistribution import ErrorDistribution from .LogFactorial import logFactorial from .Formatter import formatter as fmt from .Tools import setAttribute as setatt __author__ = "Do Kester" __year__ = 2022 __license__ = "GPL3" __version__ = "3.0.0" __url__ = "https://www.bayesic...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@DistanceCostFunction.py@.PATH_END.py
{ "filename": "compare_lw.py", "repo_name": "Goobley/DexRT", "repo_path": "DexRT_extracted/DexRT-main/compare_lw.py", "type": "Python" }
import matplotlib.pyplot as plt import numpy as np import xarray as xr from matplotlib.colors import LogNorm from scipy.interpolate import RegularGridInterpolator from scipy.stats import pearsonr from weno4 import weno4 import astropy.units as u try: get_ipython().run_line_magic("matplotlib", "") except: plt.io...
GoobleyREPO_NAMEDexRTPATH_START.@DexRT_extracted@DexRT-main@compare_lw.py@.PATH_END.py
{ "filename": "cryptosign.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/router/auth/cryptosign.py", "type": "Python" }
##################################################################################### # # Copyright (c) typedef int GmbH # SPDX-License-Identifier: EUPL-1.2 # ##################################################################################### import os import binascii from pprint import pformat from typing import ...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@router@auth@cryptosign.py@.PATH_END.py
{ "filename": "aperture.py", "repo_name": "tcassanelli/pyoof", "repo_path": "pyoof_extracted/pyoof-master/pyoof/aperture/aperture.py", "type": "Python" }
# !/usr/bin/env python # -*- coding: utf-8 -*- # Author: Tomas Cassanelli import numpy as np import warnings import astropy # only used for workaround from astropy import units as apu from ..math_functions import cart2pol, rms from ..zernike import U __all__ = [ 'illum_parabolic', 'illum_gauss', 'wavefront', 'ph...
tcassanelliREPO_NAMEpyoofPATH_START.@pyoof_extracted@pyoof-master@pyoof@aperture@aperture.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "dtamayo/reboundx", "repo_path": "reboundx_extracted/reboundx-main/reboundx/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- import warnings #Find suffix import sysconfig suffix = sysconfig.get_config_var('EXT_SUFFIX') if suffix is None: suffix = ".so" #Import shared C library import os pymodulespath = os.path.dirname(__file__) from ctypes import * clibreboundx = cdll.LoadLibrary(pymodulespath + '/../libreboundx...
dtamayoREPO_NAMEreboundxPATH_START.@reboundx_extracted@reboundx-main@reboundx@__init__.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/aaxis/_title.py", "type": "Python" }
import _plotly_utils.basevalidators class TitleValidator(_plotly_utils.basevalidators.TitleValidator): def __init__(self, plotly_name="title", parent_name="carpet.aaxis", **kwargs): super(TitleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@aaxis@_title.py@.PATH_END.py
{ "filename": "establishing_the_correlation--step_2--Tan_method--corrected.py", "repo_name": "DebduttaPaul/luminosity_function_of_lGRBs", "repo_path": "luminosity_function_of_lGRBs_extracted/luminosity_function_of_lGRBs-master/establishing_the_correlation--step_2--Tan_method--corrected.py", "type": "Python" }
from __future__ import division from astropy.io import ascii from astropy.table import Table from scipy.stats import pearsonr as R from scipy.stats import spearmanr as S from scipy.stats import kendalltau as T from scipy.optimize import curve_fit from scipy.integrate import quad import debduttaS_functions as mf import ...
DebduttaPaulREPO_NAMEluminosity_function_of_lGRBsPATH_START.@luminosity_function_of_lGRBs_extracted@luminosity_function_of_lGRBs-master@establishing_the_correlation--step_2--Tan_method--corrected.py@.PATH_END.py
{ "filename": "plot_template.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/doc/examples/features_detection/plot_template.py", "type": "Python" }
""" ================= Template Matching ================= We use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on a single coin). Here, we return a single match (the exact same coin), so the maximum value in the ``match_template`` result corresponds to the coin loca...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@examples@features_detection@plot_template.py@.PATH_END.py
{ "filename": "message_factory.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/protobuf/py3/google/protobuf/message_factory.py", "type": "Python" }
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@protobuf@py3@google@protobuf@message_factory.py@.PATH_END.py
{ "filename": "Tutorial-IllinoisGRMHD__driver_evaluate_MHD_rhs.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/IllinoisGRMHD/doc/Tutorial-IllinoisGRMHD__driver_evaluate_MHD_rhs.ipynb", "type": "Jupyter Notebook" }
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Tutorial-IllinoisGRMHD: `driver_evaluate_MHD_rhs.C` ## A...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@IllinoisGRMHD@doc@Tutorial-IllinoisGRMHD__driver_evaluate_MHD_rhs.ipynb@.PATH_END.py
{ "filename": "awslambda.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/tools/awslambda.ipynb", "type": "Jupyter Notebook" }
# AWS Lambda >[`Amazon AWS Lambda`](https://aws.amazon.com/pm/lambda/) is a serverless computing service provided by `Amazon Web Services` (`AWS`). It helps developers to build and run applications and services without provisioning or managing servers. This serverless architecture enables you to focus on writing and d...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@tools@awslambda.ipynb@.PATH_END.py
{ "filename": "mms_part_des_photoelectrons.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/mms/particles/mms_part_des_photoelectrons.py", "type": "Python" }
import os import logging from pyspedas.projects.mms.mms_config import CONFIG from pyspedas.utilities.download import download from pytplot import get_data, cdf_to_tplot logging.captureWarnings(True) logging.basicConfig(format='%(asctime)s: %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.INFO) def mms_part_d...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@mms@particles@mms_part_des_photoelectrons.py@.PATH_END.py
{ "filename": "lens_power.py", "repo_name": "oliverphilcox/HADES", "repo_path": "HADES_extracted/HADES-master/hades/lens_power.py", "type": "Python" }
import numpy as np from hades.params import BICEP a=BICEP() from flipper import * def ffp10_lensing(delensing_fraction=a.delensing_fraction,camb_spectrum=a.camb_spectrum): """ Return a spline fit to the ffp10 lensing C_l^BB spectrum. This is NOT identical to the CAMB spectrum used otherwise. If camb_spectrum=T...
oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@hades@lens_power.py@.PATH_END.py
{ "filename": "blender_visualization.md", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/doxygen/documentation/manuals/visualization/blender_visualization.md", "type": "Markdown" }
Blender Visualization (Offline) {#blender_visualization} ==================================
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@manuals@visualization@blender_visualization.md@.PATH_END.py
{ "filename": "luminosity_model--ECPL_2param--Gamma.py", "repo_name": "DebduttaPaul/luminosity_function_of_sGRBs", "repo_path": "luminosity_function_of_sGRBs_extracted/luminosity_function_of_sGRBs-master/luminosity_model--ECPL_2param--Gamma.py", "type": "Python" }
from __future__ import division from astropy.io import ascii from astropy.table import Table from scipy.optimize import curve_fit from scipy.integrate import quad, simps import debduttaS_functions as mf import specific_functions as sf import time import numpy as np import matplotlib.pyplot as plt plt.rc('axes', linewid...
DebduttaPaulREPO_NAMEluminosity_function_of_sGRBsPATH_START.@luminosity_function_of_sGRBs_extracted@luminosity_function_of_sGRBs-master@luminosity_model--ECPL_2param--Gamma.py@.PATH_END.py