metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "rotint_sloppy.py", "repo_name": "shihyuntang/igrins_rv", "repo_path": "igrins_rv_extracted/igrins_rv-master/Engine/rotint_sloppy.py", "type": "Python" }
from scipy.signal import fftconvolve from Engine.importmodule import * def rotint(wave_spec,flux_spec,vrot): ''' Applies rotational broadening to spectrum. This code is from the IvS Python Repository and is referenced as such (Institute for Astronomy at KU Leuven 2018, https://github.com/IvS-KULeuven...
shihyuntangREPO_NAMEigrins_rvPATH_START.@igrins_rv_extracted@igrins_rv-master@Engine@rotint_sloppy.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/email/mime/__init__.py", "type": "Python" }
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@email@mime@__init__.py@.PATH_END.py
{ "filename": "_parser.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/re/_parser.py", "type": "Python" }
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the __init__.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offendi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@re@_parser.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/stream/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._token import TokenValidator from ._maxpoints import MaxpointsValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@stream@__init__.py@.PATH_END.py
{ "filename": "asciidata.py", "repo_name": "spacetelescope/stsdas_stripped", "repo_path": "stsdas_stripped_extracted/stsdas_stripped-master/stsdas/pkg/analysis/slitless/axe/axe_asciidata/asciidata.py", "type": "Python" }
""" Main class of the asciidata module @author: Martin Kuemmel, Jonas Haase @organization: Space Telescope - European Coordinating Facility (ST-ECF) @license: Gnu Public Licence @contact: mkuemmel@eso.org @since: 2005/09/13 $LastChangedBy: mkuemmel $ $LastChangedDate: 2008-01-08 18:17:08 +0100 (Tue, 08 Jan 2008) $ $L...
spacetelescopeREPO_NAMEstsdas_strippedPATH_START.@stsdas_stripped_extracted@stsdas_stripped-master@stsdas@pkg@analysis@slitless@axe@axe_asciidata@asciidata.py@.PATH_END.py
{ "filename": "_tickcolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="histogram2dcontour.colorbar", **kwargs, ): super(TickcolorValidator, self).__init__( plotly_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@_tickcolor.py@.PATH_END.py
{ "filename": "saved_model_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/tensorflow/saved_model_test.py", "type": "Python" }
"""Tests for SavedModel functionality under tf implementation.""" import os import numpy as np import pytest import tensorflow as tf from absl.testing import parameterized from keras.src import backend from keras.src import layers from keras.src import metrics from keras.src import models from keras.src import ops f...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@tensorflow@saved_model_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CosmoLike/cocoa", "repo_path": "cocoa_extracted/cocoa-main/cocoa_installation_libraries/cobaya_changes/cobaya/likelihoods/planck_2018_lowl/__init__.py", "type": "Python" }
CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@cocoa_installation_libraries@cobaya_changes@cobaya@likelihoods@planck_2018_lowl@__init__.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/title/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): super(StyleValidator, self).__init__( pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@title@font@_style.py@.PATH_END.py
{ "filename": "stats.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/transitleastsquares_ES/stats.py", "type": "Python" }
from __future__ import division, print_function import numpy from os import path import transitleastsquares_ES.tls_constants as tls_constants from transitleastsquares_ES.helpers import running_median, transit_mask from tqdm import tqdm from transitleastsquares_ES.core import fold def FAP(SDE): """Returns FAP (Fal...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@transitleastsquares_ES@stats.py@.PATH_END.py
{ "filename": "rfi_inspect_2458041.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/rfi_inspect/rfi_inspect_2458041.ipynb", "type": "Jupyter Notebook" }
# RFI Inspection Daily RTP Notebook ```python import numpy as np import matplotlib.pyplot as plt import matplotlib import glob import os from astropy import units from copy import deepcopy from pyuvdata import UVFlag import matplotlib.colors as colors from matplotlib import cm %matplotlib inline %config InlineBacken...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@rfi_inspect@rfi_inspect_2458041.ipynb@.PATH_END.py
{ "filename": "_SpecTrails.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/ChiantiPy/base/_SpecTrails.py", "type": "Python" }
""" Base class used in several ChiantiPy objects """ from datetime import datetime import numpy as np import matplotlib.pyplot as plt import ChiantiPy.tools.filters as chfilters import ChiantiPy.tools.util as util import ChiantiPy.tools.io as chio import ChiantiPy.tools.data as chdata import ChiantiPy.tools.constant...
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@ChiantiPy@base@_SpecTrails.py@.PATH_END.py
{ "filename": "makePlanetInput-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/midMDwarfs/.ipynb_checkpoints/makePlanetInput-checkpoint.ipynb", "type": "Jupyter Notebook" }
This notebook prepares a planet candidate catalog for the stellar population in the specified input stellar catalog. It computes the reliability, corrected planet radius and includes useful planet properties such as robovetter score. It outputs two catalogs, one that contains only PCs and one that contains all KOIs. ...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@midMDwarfs@.ipynb_checkpoints@makePlanetInput-checkpoint.ipynb@.PATH_END.py
{ "filename": "progBar.py", "repo_name": "kylemede/ExoSOFT", "repo_path": "ExoSOFT_extracted/ExoSOFT-master/ExoSOFT/tools/progBar.py", "type": "Python" }
from __future__ import absolute_import import sys class ProgBar(object): """ Call in a loop to create terminal progress bar Heavily modified, but code originally copied from: http://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console @params: iteration - Require...
kylemedeREPO_NAMEExoSOFTPATH_START.@ExoSOFT_extracted@ExoSOFT-master@ExoSOFT@tools@progBar.py@.PATH_END.py
{ "filename": "algol.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/styles/algol.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.styles.algol ~~~~~~~~~~~~~~~~~~~~~ Algol publication style. This style renders source code for publication of algorithms in scientific papers and academic texts, where its format is frequently used. It is based on the style of the revised Algol-60 language...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@styles@algol.py@.PATH_END.py
{ "filename": "11283_pils_absflux.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/X-class/AR_11283/11283_pils_absflux.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 5 22:30:51 2022 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "11283" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@X-class@AR_11283@11283_pils_absflux.py@.PATH_END.py
{ "filename": "plot_spectrum.py", "repo_name": "ACCarnall/bagpipes", "repo_path": "bagpipes_extracted/bagpipes-master/bagpipes/plotting/plot_spectrum.py", "type": "Python" }
from __future__ import print_function, division, absolute_import import numpy as np try: import matplotlib as mpl import matplotlib.pyplot as plt except RuntimeError: pass from .general import * def add_spectrum(spectrum, ax, x_ticks=None, zorder=4, z_non_zero=True, y_scale=None, ymax...
ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@bagpipes@plotting@plot_spectrum.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/utils/sphinx/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@utils@sphinx@__init__.py@.PATH_END.py
{ "filename": "waterfaller.py", "repo_name": "CHIME-Pulsar-Timing/CHIME-Pulsar_automated_filterbank", "repo_path": "CHIME-Pulsar_automated_filterbank_extracted/CHIME-Pulsar_automated_filterbank-main/waterfaller.py", "type": "Python" }
#!/usr/bin/env python """ waterfaller.py Make waterfall plots to show frequency sweep of a single pulse. Reads PSRFITS or SIGPROC filterbank format files. Patrick Lazarus - Aug. 19, 2011 Paul Scholz - Nov 2015 """ import optparse import matplotlib.pyplot as plt import matplotlib.cm import numpy as np from presto...
CHIME-Pulsar-TimingREPO_NAMECHIME-Pulsar_automated_filterbankPATH_START.@CHIME-Pulsar_automated_filterbank_extracted@CHIME-Pulsar_automated_filterbank-main@waterfaller.py@.PATH_END.py
{ "filename": "tools.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/exa/langchain_exa/tools.py", "type": "Python" }
"""Tool for the Exa Search API.""" from typing import Any, Dict, List, Optional, Union from exa_py import Exa # type: ignore[untyped-import] from exa_py.api import ( HighlightsContentsOptions, # type: ignore[untyped-import] TextContentsOptions, # type: ignore[untyped-import] ) from langchain_core.callbacks...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@exa@langchain_exa@tools.py@.PATH_END.py
{ "filename": "minibatch_rv.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/variational/minibatch_rv.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@variational@minibatch_rv.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/nuclia/tool.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.tools.nuclia.tool import NUASchema, NucliaUnderstandingAPI # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handl...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@nuclia@tool.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/docs/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@docs@conf.py@.PATH_END.py
{ "filename": "_dividerwidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/yaxis/_dividerwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="dividerwidth", parent_name="layout.yaxis", **kwargs ): super(DividerwidthValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@yaxis@_dividerwidth.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "jdhenshaw/scousepy", "repo_path": "scousepy_extracted/scousepy-master/scousepy/conftest.py", "type": "Python" }
"""Configure Test Suite. This file is used to configure the behavior of pytest when using the Astropy test infrastructure. It needs to live inside the package in order for it to get picked up when running the tests inside an interpreter using `scousepy.test()`. """ import os from astropy.version import version as a...
jdhenshawREPO_NAMEscousepyPATH_START.@scousepy_extracted@scousepy-master@scousepy@conftest.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "nombac/optab", "repo_path": "optab_extracted/optab-main/README.md", "type": "Markdown" }
# **`Optab`** ### **Public Fortran90 code package for generating ideal-gas opacity tables** To execute radiation hydrodynamics simulations, the equation of state and opacity are both critical components. Ideally, these elements should originate from the same set of chemical equilibrium abundances, yet this alignment i...
nombacREPO_NAMEoptabPATH_START.@optab_extracted@optab-main@README.md@.PATH_END.py
{ "filename": "test_real_transforms.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/fftpack/tests/test_real_transforms.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from os.path import join, dirname import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal from pytest import raises as assert_raises from scipy.fftpack.realtransforms import ( dct, idct, dst, idst, dctn, idctn, dstn, id...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@fftpack@tests@test_real_transforms.py@.PATH_END.py
{ "filename": "plot_extraction_frame.py", "repo_name": "JamesKirk11/Tiberius", "repo_path": "Tiberius_extracted/Tiberius-main/src/reduction_utils/plot_extraction_frame.py", "type": "Python" }
#### Author of this code: James Kirk #### Contact: jameskirk@live.co.uk from astropy.io import fits import pickle import matplotlib.pyplot as plt from matplotlib import gridspec import argparse import numpy as np # Prevent matplotlib plotting frames upside down plt.rcParams['image.origin'] = 'lower' parser = argpa...
JamesKirk11REPO_NAMETiberiusPATH_START.@Tiberius_extracted@Tiberius-main@src@reduction_utils@plot_extraction_frame.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/polar/radialaxis/_title.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.title" _valid_props = {"font...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@polar@radialaxis@_title.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "mkelley/mskpy", "repo_path": "mskpy_extracted/mskpy-main/mskpy/photometry/core.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ core --- Core code for photometry. ================================== .. autosummary:: :toctree: generated/ Functions --------- airmass_app airmass_loc cal_airmass cal_color_airmass """ from ..util import autodoc import numpy a...
mkelleyREPO_NAMEmskpyPATH_START.@mskpy_extracted@mskpy-main@mskpy@photometry@core.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/choroplethmap/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@choroplethmap@colorbar@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/Extending/burnman/material/__init__.py", "type": "Python" }
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@Extending@burnman@material@__init__.py@.PATH_END.py
{ "filename": "warm_starting_util_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/warm_starting_util_test.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@training@warm_starting_util_test.py@.PATH_END.py
{ "filename": "_leaf.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/_leaf.py", "type": "Python" }
import _plotly_utils.basevalidators class LeafValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="leaf", parent_name="icicle", **kwargs): super(LeafValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_c...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@_leaf.py@.PATH_END.py
{ "filename": "test_gridding.ipynb", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/papers/H0_I/Analysis/CRACO/test_gridding.ipynb", "type": "Jupyter Notebook" }
```python import zdm import os, sys import numpy as np import matplotlib from matplotlib import pyplot as plt from zdm import survey from zdm import io from zdm import iteration as it from zdm.craco import loading matplotlib.rcParams['image.interpolation'] = None ``` /opt/anaconda3/envs/frbenv/lib/python3.9/site...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@H0_I@Analysis@CRACO@test_gridding.ipynb@.PATH_END.py
{ "filename": "localized_names.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/win32/Demos/security/localized_names.py", "type": "Python" }
# A Python port of the MS knowledge base article Q157234 # "How to deal with localized and renamed user and group names" # http://support.microsoft.com/default.aspx?kbid=157234 import sys import pywintypes from ntsecuritycon import ( DOMAIN_ALIAS_RID_ADMINS, DOMAIN_USER_RID_ADMIN, SECURITY_BUILTIN_DOMAIN_...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@Demos@security@localized_names.py@.PATH_END.py
{ "filename": "positions.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/kapteyn/positions.py", "type": "Python" }
#!/usr/bin/env python #---------------------------------------------------------------------- # FILE: positions.py # PURPOSE: Provides functions for the conversion of positions to grids # AUTHOR: M.G.R. Vogelaar, University of Groningen, The Netherlands # DATE: Nov 20, 2009 # UPDATE: Nov 20, 2009 # VERSION: 0.1...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@kapteyn@positions.py@.PATH_END.py
{ "filename": "morphology_1.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/python/tutorial_code/imgProc/erosion_dilatation/morphology_1.py", "type": "Python" }
from __future__ import print_function import cv2 as cv import numpy as np import argparse src = None erosion_size = 0 max_elem = 2 max_kernel_size = 21 title_trackbar_element_shape = 'Element:\n 0: Rect \n 1: Cross \n 2: Ellipse' title_trackbar_kernel_size = 'Kernel size:\n 2n +1' title_erosion_window = 'Erosion Demo'...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@tutorial_code@imgProc@erosion_dilatation@morphology_1.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterternary/textfont/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterternary.textfont", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterternary@textfont@_familysrc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sdss/mangadap", "repo_path": "mangadap_extracted/mangadap-main/mangadap/spectra/__init__.py", "type": "Python" }
from .rowstackedspectra import RowStackedSpectra from .manga import MaNGARSS
sdssREPO_NAMEmangadapPATH_START.@mangadap_extracted@mangadap-main@mangadap@spectra@__init__.py@.PATH_END.py
{ "filename": "write_snana_parquet.py", "repo_name": "LSSTDESC/elasticc", "repo_path": "elasticc_extracted/elasticc-main/lib_elasticc2/write_snana_parquet.py", "type": "Python" }
import sys import logging import pathlib import polars from read_snana import elasticc2_snana_reader def main(): esr = elasticc2_snana_reader() esr.logger.setLevel( logging.DEBUG ) outdir = pathlib.Path( "/data/raknop/ELASTICC2_parquet" ) for objclass in [ 'AGN', 'CART', 'Cepheid', 'EB', 'ILOT', 'K...
LSSTDESCREPO_NAMEelasticcPATH_START.@elasticc_extracted@elasticc-main@lib_elasticc2@write_snana_parquet.py@.PATH_END.py
{ "filename": "constants.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/doc/constants.py", "type": "Python" }
""" ========= Constants ========= NumPy includes several constants: %(constant_list)s """ # # Note: the docstring is autogenerated. # from __future__ import division, absolute_import, print_function import textwrap, re # Maintain same format as in numpy.add_newdocs constants = [] def add_newdoc(module, name, doc): ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@doc@constants.py@.PATH_END.py
{ "filename": "chemistry.py", "repo_name": "geodynamics/burnman", "repo_path": "burnman_extracted/burnman-main/burnman/utils/chemistry.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit # for the Earth and Planetary Sciences # Copyright (C) 2012 - 2021 by the BurnMan team, released under the GNU # GPL v2 or later. # This module provides the functions required to process the # standard burnman formula formats. # tools.chemistry...
geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@burnman@utils@chemistry.py@.PATH_END.py
{ "filename": "gaussian.py", "repo_name": "minzastro/unidam", "repo_path": "unidam_extracted/unidam-master/unidam/fitters/gaussian.py", "type": "Python" }
import numpy as np from scipy.optimize import curve_fit from unidam.utils.mathematics import kl_divergence, wstatistics from unidam.fitters import basic from unidam.utils.extra_functions import unidam_extra_functions as uef from scipy.stats import norm def tgauss(dummy, x, mu, sigma, lower, upper): """ Proxy f...
minzastroREPO_NAMEunidamPATH_START.@unidam_extracted@unidam-master@unidam@fitters@gaussian.py@.PATH_END.py
{ "filename": "required_by_vounit.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/units/required_by_vounit.py", "type": "Python" }
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This package defines SI prefixed units that are required by the VOUnit standard but that are rarely used in practice and liable to lead to confusion (such as ``msolMass`` for milli-solar mass). They are in a separate module from...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@units@required_by_vounit.py@.PATH_END.py
{ "filename": "h5py_wrap.py", "repo_name": "galtay/urchin", "repo_path": "urchin_extracted/urchin-main/src/example_config/eagle/select_halo/h5py_wrap.py", "type": "Python" }
""" Simple convenience functions to access the h5py library. """ import h5py import numpy as np import os.path __all__ = ['ra', 'raa', 'rd', 'wd', 'wa', 'cg'] class _Error(Exception): """Base class for exceptions in this module.""" pass class _OverwriteError(_Error): """Exception raised for attempt...
galtayREPO_NAMEurchinPATH_START.@urchin_extracted@urchin-main@src@example_config@eagle@select_halo@h5py_wrap.py@.PATH_END.py
{ "filename": "mirrored_strategy.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/experimental/mirrored_strategy.py", "type": "Python" }
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@distribute@experimental@mirrored_strategy.py@.PATH_END.py
{ "filename": "dif_dm_halos.py", "repo_name": "dynamics-of-stellar-systems/dynamite", "repo_path": "dynamite_extracted/dynamite-master/dev_tests/dif_dm_halos.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import logging import time import numpy as np # Set matplotlib backend to 'Agg' (compatible when X11 is not running # e.g., on a cluster). Note that the backend can only be set BEFORE # matplotlib is used or even submodules are imported! import matplotlib matp...
dynamics-of-stellar-systemsREPO_NAMEdynamitePATH_START.@dynamite_extracted@dynamite-master@dev_tests@dif_dm_halos.py@.PATH_END.py
{ "filename": "demo_ROS_sensor.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/ros/demo_ROS_sensor.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2021 projectchrono.org # All right 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 distri...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@ros@demo_ROS_sensor.py@.PATH_END.py
{ "filename": "testCOutsideComplexity.py", "repo_name": "terryyin/lizard", "repo_path": "lizard_extracted/lizard-master/test/testCOutsideComplexity.py", "type": "Python" }
import unittest from .testHelpers import get_cpp_function_list_with_extension from lizard_ext.lizardoutside import LizardExtension as CountOutsideComplexity def analyze_with_outside_extension(code): return get_cpp_function_list_with_extension(code, CountOutsideComplexity()) class Test_complexity_in_c_marco(unitt...
terryyinREPO_NAMElizardPATH_START.@lizard_extracted@lizard-master@test@testCOutsideComplexity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/table/tests/__init__.py", "type": "Python" }
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@table@tests@__init__.py@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattermapbox", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@_visible.py@.PATH_END.py
{ "filename": "fenced_doctest_lib.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/tools/docs/fenced_doctest_lib.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@tools@docs@fenced_doctest_lib.py@.PATH_END.py
{ "filename": "spleaf_esp_activity_slow.py", "repo_name": "LucaMalavolta/PyORBIT", "repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/models/spleaf_esp_activity_slow.py", "type": "Python" }
from pyorbit.subroutines.common import * from pyorbit.models.abstract_model import * from pyorbit.keywords_definitions import * from scipy.linalg import cho_factor, cho_solve, lapack, LinAlgError from scipy import matrix, spatial import sys __all__ = ['SPLEAF_ESP_slow'] try: from spleaf import cov as spleaf_cov...
LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@models@spleaf_esp_activity_slow.py@.PATH_END.py
{ "filename": "fresnel_test.ipynb", "repo_name": "Jashcraf/poke", "repo_path": "poke_extracted/poke-main/experiments/weber/fresnel_test.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import poppy import astropy.units as u from custom_optics import ShiftedGaussianAperture ``` # Set up poppy optical system with decentered aperture and defocus ```python pupil_d = 25.4e-3*u.m wvl = 1e-6*u.m npix = 512 OS = 1 efl = 100e-3*u.m aper = Shifte...
JashcrafREPO_NAMEpokePATH_START.@poke_extracted@poke-main@experiments@weber@fresnel_test.ipynb@.PATH_END.py
{ "filename": "query_workflow.py", "repo_name": "LSSTDESC/gen3_workflow", "repo_path": "gen3_workflow_extracted/gen3_workflow-master/python/desc/gen3_workflow/query_workflow.py", "type": "Python" }
""" Module to extract status info of the workflow tasks from the monitoring.db file. """ import os from collections import defaultdict import sqlite3 import numpy as np import pandas as pd __all__ = ['query_workflow', 'print_status', 'get_task_name'] def is_uuid(value): """Check if the passed value is formatted...
LSSTDESCREPO_NAMEgen3_workflowPATH_START.@gen3_workflow_extracted@gen3_workflow-master@python@desc@gen3_workflow@query_workflow.py@.PATH_END.py
{ "filename": "_argparse.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/argcomplete/py3/argcomplete/packages/_argparse.py", "type": "Python" }
# Copyright 2012-2023, Andrey Kislyuk and argcomplete contributors. Licensed under the terms of the # `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_. Distribution of the LICENSE and NOTICE # files with source copies of this package and derivative works is **REQUIRED** as specified by the Ap...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@argcomplete@py3@argcomplete@packages@_argparse.py@.PATH_END.py
{ "filename": "util.py", "repo_name": "snad-space/ztf-viewer", "repo_path": "ztf-viewer_extracted/ztf-viewer-master/ztf_viewer/util.py", "type": "Python" }
import datetime import json import logging import math import re from collections import defaultdict from functools import wraps from itertools import chain, count import astropy.table import numpy as np from astropy import units from astropy.coordinates import EarthLocation from astropy.time import Time from immutabl...
snad-spaceREPO_NAMEztf-viewerPATH_START.@ztf-viewer_extracted@ztf-viewer-master@ztf_viewer@util.py@.PATH_END.py
{ "filename": "tools.py", "repo_name": "bradkav/NbodyIMRI", "repo_path": "NbodyIMRI_extracted/NbodyIMRI-main/NbodyIMRI/tools.py", "type": "Python" }
import numpy as np from scipy.integrate import cumtrapz import string import random import NbodyIMRI from NbodyIMRI import units as u from os.path import join import h5py import glob def open_file_for_read(fileID): """ Open an output file in order to be read (taking care of the correct directory structure ...
bradkavREPO_NAMENbodyIMRIPATH_START.@NbodyIMRI_extracted@NbodyIMRI-main@NbodyIMRI@tools.py@.PATH_END.py
{ "filename": "abscal_inspect_2458062.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458062.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Absolute Calibration Nightly Notebook **Josh Dillon**, Last Revised 9/23/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metri...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458062.ipynb@.PATH_END.py
{ "filename": "compound.py", "repo_name": "panoptes/POCS", "repo_path": "POCS_extracted/POCS-main/src/panoptes/pocs/scheduler/observation/compound.py", "type": "Python" }
import numpy as np from astropy import units as u from panoptes.utils.utils import get_quantity_value, listify from panoptes.pocs.scheduler.observation.base import Observation as BaseObservation class Observation(BaseObservation): """An observation that consists of different combinations of exptimes.""" def...
panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@src@panoptes@pocs@scheduler@observation@compound.py@.PATH_END.py
{ "filename": "chunk_sampler.py", "repo_name": "i4Ds/sdo-cli", "repo_path": "sdo-cli_extracted/sdo-cli-main/src/sdo/sood/data/chunk_sampler.py", "type": "Python" }
""" Inspired by https://gist.github.com/wassname/8ae1f64389c2aaceeb84fcd34c3651c3 A Pytorch sampler that samples ordered indices from unordered sequences. Good for the use with Dask because Dask will slow down when sampling between chunks. Usually, it is better if batches are uncorrelated so we want each batch to be ...
i4DsREPO_NAMEsdo-cliPATH_START.@sdo-cli_extracted@sdo-cli-main@src@sdo@sood@data@chunk_sampler.py@.PATH_END.py
{ "filename": "usnob_trim.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/util/usnob_trim.py", "type": "Python" }
#! /usr/bin/env python3 # This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE # Used to trim down the "hpslit"-merged USNO-B files before # building indices out of them. from __future__ import print_function import sys from optparse import OptionParser try: ...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@util@usnob_trim.py@.PATH_END.py
{ "filename": "_cog.py", "repo_name": "sfarrens/sfof", "repo_path": "sfof_extracted/sfof-master/sfof/python/euclid/dm/_cog.py", "type": "Python" }
# /home/sartor/pymodule/euclid/dm/_cog.py # -*- coding: utf-8 -*- # PyXB bindings for NM:a17fe44f5818a6dad4c3af2f6274ac08c385d7a5 # Generated 2014-07-24 16:26:39.932813 by PyXB version 1.2.3 # Namespace http://euclid.esa.org/schema/pro/le3/cog [xmlns:cog] import pyxb import pyxb.binding import pyxb.binding.saxer impor...
sfarrensREPO_NAMEsfofPATH_START.@sfof_extracted@sfof-master@sfof@python@euclid@dm@_cog.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattermap.marker.colorbar", **kwargs ): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@_x.py@.PATH_END.py
{ "filename": "ProductModel.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/ProductModel.py", "type": "Python" }
import numpy as numpy from . import Tools from .Model import Model from .NonLinearModel import NonLinearModel from astropy import units __author__ = "Do Kester" __year__ = 2020 __license__ = "GPL3" __version__ = "2.5.3" __url__ = "https://www.bayesicfitting.nl" __status__ = "Perpetual Beta" # * # * This file is par...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@ProductModel.py@.PATH_END.py
{ "filename": "gmock_faq.md", "repo_name": "google/googletest", "repo_path": "googletest_extracted/googletest-main/docs/gmock_faq.md", "type": "Markdown" }
# Legacy gMock FAQ ### When I call a method on my mock object, the method for the real object is invoked instead. What's the problem? In order for a method to be mocked, it must be *virtual*, unless you use the [high-perf dependency injection technique](gmock_cook_book.md#MockingNonVirtualMethods). ### Can I mock a ...
googleREPO_NAMEgoogletestPATH_START.@googletest_extracted@googletest-main@docs@gmock_faq.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/unselected/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._size import SizeValidator from ._opacity import OpacityValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_i...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@unselected@marker@__init__.py@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/pattern/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="treemap.marker.pattern", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@pattern@_bgcolorsrc.py@.PATH_END.py
{ "filename": "widget.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py3/ipywidgets/widgets/widget.py", "type": "Python" }
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Base Widget class. Allows user to create widgets in the back-end that render in the Jupyter notebook front-end. """ import os import sys import typing from contextlib import contextmanager from collections.abc imp...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py3@ipywidgets@widgets@widget.py@.PATH_END.py
{ "filename": "population.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/sampling/population.py", "type": "Python" }
# Copyright 2024 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@pymc@sampling@population.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "chandra-marx/marxs", "repo_path": "marxs_extracted/marxs-main/marxs/math/tests/__init__.py", "type": "Python" }
chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@math@tests@__init__.py@.PATH_END.py
{ "filename": "plot_stellar_yield_table.py", "repo_name": "Azeret/galIMF", "repo_path": "galIMF_extracted/galIMF-master/plot_stellar_yield_table.py", "type": "Python" }
import time import math import matplotlib.pyplot as plt import numpy as np from scipy import interpolate import element_abundances_solar reference_name = 'Anders1989' H_abundances_solar = element_abundances_solar.function_solar_element_abundances(reference_name, 'H') # He_abundances_solar = element_abundances_solar.fu...
AzeretREPO_NAMEgalIMFPATH_START.@galIMF_extracted@galIMF-master@plot_stellar_yield_table.py@.PATH_END.py
{ "filename": "base.py", "repo_name": "dwkim78/pdtrend", "repo_path": "pdtrend_extracted/pdtrend-master/pdtrend/datasets/base.py", "type": "Python" }
""" Base IO code for all datasets """ import sys from os.path import dirname from os.path import join def load_lightcurve_set(): """ Return the set of light curves for testing pdtrend. Returns ------- lcs : numpy.ndarray An array of light curves. """ import bz2 try: ...
dwkim78REPO_NAMEpdtrendPATH_START.@pdtrend_extracted@pdtrend-master@pdtrend@datasets@base.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/hoverlabel/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sankey.hoverlabel.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@hoverlabel@font@_style.py@.PATH_END.py
{ "filename": "test_units.py", "repo_name": "galsci/pysm", "repo_path": "pysm_extracted/pysm-main/tests/test_units.py", "type": "Python" }
import healpy as hp import numpy as np import pytest from pysm3 import units from pysm3.models.template import read_map @pytest.fixture def setUp(): T_CMB = 100.0 * units.K_CMB T_RJ = 100.0 * units.K_RJ freqs = 100.0 * units.GHz nside = 256 npix = hp.nside2npix(nside) test_map_RJ = np.random....
galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@tests@test_units.py@.PATH_END.py
{ "filename": "settings.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/io/fits/hdu/compressed/settings.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Quantization dithering method constants; these are right out of fitsio.h NO_DITHER = -1 SUBTRACTIVE_DITHER_1 = 1 SUBTRACTIVE_DITHER_2 = 2 QUANTIZE_METHOD_NAMES = { NO_DITHER: "NO_DITHER", SUBTRACTIVE_DITHER_1: "SUBTRACTIVE_DITHER_1", SUBTRAC...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@fits@hdu@compressed@settings.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/legendgrouptitle/font/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): super(WeightValidator, self).__init__( plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@legendgrouptitle@font@_weight.py@.PATH_END.py
{ "filename": "orderl5.py", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/tides/inclination_funcs/orderl5.py", "type": "Python" }
""" Inclination functions (squared) for tidal order-l = 5. These are exact (no truncation on I) """ from typing import TYPE_CHECKING import numpy as np from . import InclinOutput from ...utilities.performance.numba import njit if TYPE_CHECKING: from ...utilities.types import FloatArray @njit(cacheable=True, p...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@tides@inclination_funcs@orderl5.py@.PATH_END.py
{ "filename": "read_elower_grid.py", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/documents/analysis/read_elower_grid.py", "type": "Python" }
# %% from exojax.spec.lbderror import optimal_params Tl_in = 500.0 #K Tu_in = 1200.0 #K diffmode = 2 dE, Tl, Tu = optimal_params(Tl_in, Tu_in, diffmode) print(dE, Tl, Tu) #750.0 1153.6267095763965 554.1714566743503
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@documents@analysis@read_elower_grid.py@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/ternary/baxis/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.ternary.baxis" _path_str = "layout.ternary.baxis.tickfont" _valid_props = { ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@ternary@baxis@_tickfont.py@.PATH_END.py
{ "filename": "master_script.py", "repo_name": "bbercovici/SBGAT", "repo_path": "SBGAT_extracted/SBGAT-master/Examples/PGMUncertaintyMCPolesConstantMass/master_script.py", "type": "Python" }
import os import json import numpy as np import os import platform import sys import itertools import time import socket def generate_all_cases_dictionnary_list(base_dictionnary,all_cases_dictionnary,base_location,sim_name): if len(all_cases_dictionnary) > 0: keys, values = zip(*all_cases_dictionnary.it...
bbercoviciREPO_NAMESBGATPATH_START.@SBGAT_extracted@SBGAT-master@Examples@PGMUncertaintyMCPolesConstantMass@master_script.py@.PATH_END.py
{ "filename": "test_set_active_attribute.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/integrationtests/mayavi/test_set_active_attribute.py", "type": "Python" }
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Standard library imports. from os.path import abspath from io import BytesIO import copy # Local imports. from mayavi.core.common import get_output from common import TestCase, get_example_...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@integrationtests@mayavi@test_set_active_attribute.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "halomod/hmf", "repo_path": "hmf_extracted/hmf-main/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # hmf documentation build configuration file, created by # sphinx-quickstart on Mon Dec 2 10:40:08 2013. # # 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 con...
halomodREPO_NAMEhmfPATH_START.@hmf_extracted@hmf-main@docs@conf.py@.PATH_END.py
{ "filename": "timesample.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/core/tests/timesample.py", "type": "Python" }
#!/usr/bin/env python from spt3g import core import unittest import numpy as np import copy SEC = core.G3Units.sec class TestTimesampleVector(unittest.TestCase): def test_from_list(self): t0 = core.G3Time('2019-01-01T12:30:00') vectime = core.G3VectorTime([t0, t0 + 10*SEC]) assert(vect...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@core@tests@timesample.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.xaxis.title", **kwargs): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@title@_text.py@.PATH_END.py
{ "filename": "test_ontotext_graphdb_qa.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/chains/test_ontotext_graphdb_qa.py", "type": "Python" }
from unittest.mock import MagicMock, Mock import pytest from langchain.chains import LLMChain from langchain_community.chains.graph_qa.ontotext_graphdb import OntotextGraphDBQAChain from langchain_community.graphs import OntotextGraphDBGraph """ cd libs/langchain/tests/integration_tests/chains/docker-compose-ontotex...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@chains@test_ontotext_graphdb_qa.py@.PATH_END.py
{ "filename": "_domain.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/_domain.py", "type": "Python" }
import _plotly_utils.basevalidators class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="treemap", **kwargs): super(DomainValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@_domain.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "brinckmann/montepython_public", "repo_path": "montepython_public_extracted/montepython_public-master/montepython/likelihoods/core_m5_lowl/__init__.py", "type": "Python" }
# there is no specific likelihood code for this experiment, because it # falls in the category of CMB experiments described in the "mock CMB" # format. The class below inherits the properties of a general class # "Likelihood_mock_cmb", which knows how to deal with all experiments in # "mock CMB" format. from montepyth...
brinckmannREPO_NAMEmontepython_publicPATH_START.@montepython_public_extracted@montepython_public-master@montepython@likelihoods@core_m5_lowl@__init__.py@.PATH_END.py
{ "filename": "plot_waterfalls.py", "repo_name": "CHIME-Pulsar-Timing/CHIME-Pulsar_automated_filterbank", "repo_path": "CHIME-Pulsar_automated_filterbank_extracted/CHIME-Pulsar_automated_filterbank-main/plot_waterfalls.py", "type": "Python" }
import sys from presto import waterfaller from presto.filterbank import FilterbankFile import csv #lets first parse the single pulse file fil_file = sys.argv[1] sp_file = sys.argv[3:] fil = fil_file.strip('.fil') snr_default = float(sys.argv[2]) #this is code to select time ranges to make waterfalls search_file = fil...
CHIME-Pulsar-TimingREPO_NAMECHIME-Pulsar_automated_filterbankPATH_START.@CHIME-Pulsar_automated_filterbank_extracted@CHIME-Pulsar_automated_filterbank-main@plot_waterfalls.py@.PATH_END.py
{ "filename": "shaped_expander.py", "repo_name": "CU-NESS/pylinex", "repo_path": "pylinex_extracted/pylinex-master/examples/expander/shaped_expander.py", "type": "Python" }
""" File: examples/expander/shaped_expander.py Author: Keith Tauscher Date: 10 Sep 2017 Description: Example showing how to use the ShapedExpander class which allows Expander's to deal with non-flat arrays. """ import os import numpy as np from pylinex import NullExpander, ShapedExpander, load_expander_fr...
CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@expander@shaped_expander.py@.PATH_END.py
{ "filename": "clik_cldf_ls.py", "repo_name": "CosmoLike/cocoa", "repo_path": "cocoa_extracted/cocoa-main/Cocoa/external_modules/code/planck/code/spt_clik/src/python/tools/clik_cldf_ls.py", "type": "Python" }
#! PYTHONEXE import sys sys.path = ["REPLACEPATH"]+sys.path import numpy as nm import clik.cldf as cldf import os.path as osp import os def main(argv): base = (argv[1]) try: f = cldf.File(base) kk = list(f.keys()) except IOError as e: print("Can't cldf_ls %s"%argv[1]) return kk.sort() res =...
CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@Cocoa@external_modules@code@planck@code@spt_clik@src@python@tools@clik_cldf_ls.py@.PATH_END.py
{ "filename": "global_average_pooling2d.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/pooling/global_average_pooling2d.py", "type": "Python" }
from keras.src import ops from keras.src.api_export import keras_export from keras.src.layers.pooling.base_global_pooling import BaseGlobalPooling @keras_export( [ "keras.layers.GlobalAveragePooling2D", "keras.layers.GlobalAvgPool2D", ] ) class GlobalAveragePooling2D(BaseGlobalPooling): ""...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@pooling@global_average_pooling2d.py@.PATH_END.py
{ "filename": "mnist_classifier_fromscratch.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/examples/mnist_classifier_fromscratch.py", "type": "Python" }
# Copyright 2018 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@examples@mnist_classifier_fromscratch.py@.PATH_END.py
{ "filename": "HotJupiterPhaseCurve.ipynb", "repo_name": "rodluger/starry", "repo_path": "starry_extracted/starry-master/notebooks/HotJupiterPhaseCurve.ipynb", "type": "Jupyter Notebook" }
# Hot jupiter phase curve example ```python %matplotlib inline ``` ```python %run notebook_setup.py ``` In this notebook, we'll run through a brief example of how to model a full hot jupiter light curve -- including the transit, secondary eclipse, and phase curve -- using the machinery of the `exoplanet` package. ...
rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@notebooks@HotJupiterPhaseCurve.ipynb@.PATH_END.py
{ "filename": "test_pairTask.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/tests/task/test_pairTask.py", "type": "Python" }
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@tests@task@test_pairTask.py@.PATH_END.py
{ "filename": "line_search.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/scipy/optimize/line_search.py", "type": "Python" }
# Copyright 2020 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@scipy@optimize@line_search.py@.PATH_END.py
{ "filename": "EVLACal.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/python/EVLACal.py", "type": "Python" }
""" """ from __future__ import absolute_import from __future__ import print_function import UV, UVDesc, Image, ImageDesc, FArray, ObitTask, AIPSTask, AIPSDir, OErr, History import InfoList, Table, OSystem, OASDM from AIPS import AIPS from FITS import FITS from AIPSDir import AIPSdisks, nAIPS from OTObit import Acat, ...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@python@EVLACal.py@.PATH_END.py
{ "filename": "datafiles_window.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/datafiles_window.py", "type": "Python" }
import sys #,os from PyQt6 import QtWidgets,QtGui,QtCore font = QtGui.QFont() font.setPointSize(8) font.setBold(False) class datafiles_window(QtWidgets.QDialog): def __init__(self, parent = None): # super(show_symbols, self).__init__(parent) super(datafiles_window, self).__init__() self...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@datafiles_window.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/deploy/gke-marketplace-app/trt-engine/README.md", "type": "Markdown" }
<!-- # Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, th...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@deploy@gke-marketplace-app@trt-engine@README.md@.PATH_END.py