metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "measurement.py", "repo_name": "mpound/pdrtpy", "repo_path": "pdrtpy_extracted/pdrtpy-master/pdrtpy/measurement.py", "type": "Python" }
"""Manage spectral line or continuum observations""" # @Todo it would be nice to be able to get Measurment[index] as a Measurement instead of # a float. This is the behavior for CCDData, somehow lost in Measurement See NDUncertainty __getitem__ # this will have ripple effects if implemented. import warnings from copy...
mpoundREPO_NAMEpdrtpyPATH_START.@pdrtpy_extracted@pdrtpy-master@pdrtpy@measurement.py@.PATH_END.py
{ "filename": "LoadRestartFile_nod_VIS.py", "repo_name": "martinsparre/XSHPipelineManager", "repo_path": "XSHPipelineManager_extracted/XSHPipelineManager-master/LoadRestartFile/LoadRestartFile_nod_VIS.py", "type": "Python" }
#!/usr/bin/python # -*- coding: utf-8 -*- #Martin Sparre, DARK, March 2011 #version 5.9.0 from PipelineManager import * VIS = LoadRestartFile('OutputBase/xsh_2dmap_VIS.restart') VIS.ResetAllRecipes() EsorexName='xsh_scired_slit_nod' SOFFileName = EsorexName VIS.DeclareNewRecipe(EsorexName,SOFFileName) VIS.DeclareR...
martinsparreREPO_NAMEXSHPipelineManagerPATH_START.@XSHPipelineManager_extracted@XSHPipelineManager-master@LoadRestartFile@LoadRestartFile_nod_VIS.py@.PATH_END.py
{ "filename": "wrapper.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/base/wrapper.py", "type": "Python" }
import functools import inspect from textwrap import dedent class ResultsWrapper: """ Class which wraps a statsmodels estimation Results class and steps in to reattach metadata to results (if available) """ _wrap_attrs = {} _wrap_methods = {} def __init__(self, results): self._res...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@base@wrapper.py@.PATH_END.py
{ "filename": "run_unravel_image_region.py", "repo_name": "astrostat/LIRA", "repo_path": "LIRA_extracted/LIRA-master/lira/inst/docs/examples/PyProcUtils/run_unravel_image_region.py", "type": "Python" }
import numpy as n import pyfits # These are regions dividing the image into 4 quadrants: regions = [] regions.append( [( 0,15),( 0,15)] ) regions.append( [( 0,15),(16,32)] ) regions.append( [(16,32),(16,32)] ) regions.append( [(16,32),( 0,15)] ) #These are regions containing an "E" -- or none! regions = [] regions.a...
astrostatREPO_NAMELIRAPATH_START.@LIRA_extracted@LIRA-master@lira@inst@docs@examples@PyProcUtils@run_unravel_image_region.py@.PATH_END.py
{ "filename": "linalg.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/scipy/sparse/linalg.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...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@sparse@linalg.py@.PATH_END.py
{ "filename": "tfsa-2022-123.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-123.md", "type": "Markdown" }
## TFSA-2022-123: `CHECK` fail in `tf.sparse.cross` ### CVE Number CVE-2022-35997 ### Impact If `tf.sparse.cross` receives an input `separator` that is not a scalar, it gives a `CHECK` fail that can be used to trigger a denial of service attack. ```python import tensorflow as tf tf.sparse.cross(inputs=[],name='a',se...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-123.md@.PATH_END.py
{ "filename": "residual_calculator.ipynb", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/galfit/residual_calculator.ipynb", "type": "Jupyter Notebook" }
```python #!pip3 install --user astropy ``` ```python import numpy as np import astropy as ap import pandas as pd from astropy.io import fits import scipy.linalg as slg import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib.colors import LinearSegmentedColormap import glob import os from I...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@galfit@residual_calculator.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/wavelength_cal/src/__init__.py", "type": "Python" }
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@wavelength_cal@src@__init__.py@.PATH_END.py
{ "filename": "justdoit.py", "repo_name": "natashabatalha/PandExo", "repo_path": "PandExo_extracted/PandExo-master/pandexo/engine/justdoit.py", "type": "Python" }
import numpy as np from pandeia.engine.instrument_factory import InstrumentFactory from .pandexo import wrapper from .load_modes import SetDefaultModes import os import pickle as pkl from joblib import Parallel, delayed import multiprocessing import json from .exomast import get_target_data from astroquery.simbad impor...
natashabatalhaREPO_NAMEPandExoPATH_START.@PandExo_extracted@PandExo-master@pandexo@engine@justdoit.py@.PATH_END.py
{ "filename": "stash.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py3/_pytest/stash.py", "type": "Python" }
from typing import Any from typing import cast from typing import Dict from typing import Generic from typing import TypeVar from typing import Union __all__ = ["Stash", "StashKey"] T = TypeVar("T") D = TypeVar("D") class StashKey(Generic[T]): """``StashKey`` is an object used as a key to a :class:`Stash`. ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py3@_pytest@stash.py@.PATH_END.py
{ "filename": "imaging_with_wsclean.py", "repo_name": "lucatelli/morphen", "repo_path": "morphen_extracted/morphen-main/selfcal/imaging_with_wsclean.py", "type": "Python" }
import pandas as pd import numpy as np import argparse import os import glob import time def imaging(g_name, field, uvtaper, robust, base_name='clean_image', continue_clean='False',nc=4): g_vis = g_name + '.ms' """ # uvtaper_mode+uvtaper_args+'.'+uvtaper_addmode+uvtaper_addargs+ """ prin...
lucatelliREPO_NAMEmorphenPATH_START.@morphen_extracted@morphen-main@selfcal@imaging_with_wsclean.py@.PATH_END.py
{ "filename": "type_registry.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/autograph/utils/type_registry.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@autograph@utils@type_registry.py@.PATH_END.py
{ "filename": "test_isomap.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/manifold/tests/test_isomap.py", "type": "Python" }
import math from itertools import product import numpy as np import pytest from scipy.sparse import rand as sparse_rand from sklearn import clone, datasets, manifold, neighbors, pipeline, preprocessing from sklearn.datasets import make_blobs from sklearn.metrics.pairwise import pairwise_distances from sklearn.utils._...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@manifold@tests@test_isomap.py@.PATH_END.py
{ "filename": "stratsi_params.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/mass_check/stratsi_params.py", "type": "Python" }
''' common parameters and functions for stratified streaming instability natural units: Hgas=Omega=1, so cs=1 ''' import sys import numpy as np from mpi4py import MPI import matplotlib.pyplot as plt from dedalus import public as de import h5py import argparse import time from scipy.integrate import quad from scipy.op...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@mass_check@stratsi_params.py@.PATH_END.py
{ "filename": "session_wrapper.py", "repo_name": "rhayes777/PyAutoFit", "repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/database/migration/session_wrapper.py", "type": "Python" }
import logging from functools import wraps from sqlalchemy import text from typing import Optional from ..sqlalchemy_ import sa logger = logging.getLogger(__name__) def needs_revision_table(func): """ Applies to functions that depend on the existence of the revision table. If the table does not exist ...
rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@database@migration@session_wrapper.py@.PATH_END.py
{ "filename": "input.py", "repo_name": "florian-lienhard/MM-LSD", "repo_path": "MM-LSD_extracted/MM-LSD-main/stars/Sun/input.py", "type": "Python" }
import os star = "Sun" #checklist for preprocessing: #star name defined above #rassine installed in rassine_loc #s2d spectra, ccf files, s1d files in rawdir #checklist for next steps: #name vald file e.g. yourtarget.txt and put it into VALD_files folder #star #the steps after preprocessing are independent of the da...
florian-lienhardREPO_NAMEMM-LSDPATH_START.@MM-LSD_extracted@MM-LSD-main@stars@Sun@input.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/cluster/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermap.cluster", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@cluster@_sizesrc.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/legendgrouptitle/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): super(StyleValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@legendgrouptitle@font@_style.py@.PATH_END.py
{ "filename": "worker.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/cli/worker.py", "type": "Python" }
import asyncio import json import os from enum import Enum from typing import List, Optional, Type import typer from prefect._internal.integrations import KNOWN_EXTRAS_FOR_PACKAGES from prefect.cli._prompts import confirm from prefect.cli._types import PrefectTyper, SettingsOption from prefect.cli._utilities import e...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@cli@worker.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "jvines/Ceres-plusplus", "repo_path": "Ceres-plusplus_extracted/Ceres-plusplus-main/cerespp/__init__.py", "type": "Python" }
""" Ceres plusplus is a module designed to extend the functionality of ceres (https://github.com/rabrahm/ceres) in order to calculate activity indicators from spectra reduced with the tool, and to easily extract the indicators that ceres does calculate, for example the CCF FWHM and the BIS. """ from pkg_resources impor...
jvinesREPO_NAMECeres-plusplusPATH_START.@Ceres-plusplus_extracted@Ceres-plusplus-main@cerespp@__init__.py@.PATH_END.py
{ "filename": "process.py", "repo_name": "ML4GW/hermes", "repo_path": "hermes_extracted/hermes-main/hermes/aeriel/monitor/process.py", "type": "Python" }
import multiprocessing as mp import sys import time from queue import Empty from typing import TYPE_CHECKING, Optional from hermes.aeriel.monitor.logging import listener, logger from hermes.aeriel.monitor.utils import ExceptionWrapper, Throttle if TYPE_CHECKING: from queue import Queue from hermes.aeriel.mon...
ML4GWREPO_NAMEhermesPATH_START.@hermes_extracted@hermes-main@hermes@aeriel@monitor@process.py@.PATH_END.py
{ "filename": "accented_text.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/text_labels_and_annotations/accented_text.py", "type": "Python" }
r""" ============= Accented text ============= Matplotlib supports accented characters via TeX mathtext or Unicode. Using mathtext, the following accents are provided: \\hat, \\breve, \\grave, \\bar, \\acute, \\tilde, \\vec, \\dot, \\ddot. All of them have the same syntax, e.g. \\bar{o} yields "o overbar", \\ddot{o}...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@text_labels_and_annotations@accented_text.py@.PATH_END.py
{ "filename": "dataverse.py", "repo_name": "GBTAmmoniaSurvey/GAS", "repo_path": "GAS_extracted/GAS-master/GAS/dataverse.py", "type": "Python" }
GBTAmmoniaSurveyREPO_NAMEGASPATH_START.@GAS_extracted@GAS-master@GAS@dataverse.py@.PATH_END.py
{ "filename": "lensing_table.py", "repo_name": "cmbant/CosmoMC", "repo_path": "CosmoMC_extracted/CosmoMC-master/batch3/outputs/lensing_table.py", "type": "Python" }
from __future__ import absolute_import from __future__ import print_function import planckStyle as s g = s.getSinglePlotter() class comb(object): def __init__(self, varname, prior, title, blockstart=False): self.varname = varname self.prior = prior self.title = title self.blocksta...
cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@batch3@outputs@lensing_table.py@.PATH_END.py
{ "filename": "_traceref.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/error_x/_traceref.py", "type": "Python" }
import _plotly_utils.basevalidators class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="histogram.error_x", **kwargs ): super(TracerefValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@error_x@_traceref.py@.PATH_END.py
{ "filename": "this.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/this.py", "type": "Python" }
s = """Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre guna pbzcyvpngrq. Syng vf orggre guna arfgrq. Fcnefr vf orggre guna qrafr. Ernqnovyvgl pbhagf. Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. Nygubhtu cenpg...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@this.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/hoverlabel/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choroplethmap.hoverlabel", **kwargs, ): super(BordercolorValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@hoverlabel@_bordercolor.py@.PATH_END.py
{ "filename": "projected_normal.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/distributions/projected_normal.py", "type": "Python" }
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import math import torch from pyro.ops.tensor_utils import safe_normalize from . import constraints from .torch_distribution import TorchDistribution class ProjectedNormal(TorchDistribution): """ Projected isotropic normal...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@distributions@projected_normal.py@.PATH_END.py
{ "filename": "arunfinedr7full.py", "repo_name": "rohinkumar/correlcalc", "repo_path": "correlcalc_extracted/correlcalc-master/clusterresults/arunfinedr7full.py", "type": "Python" }
from correlcalc import * bins = np.arange(0.001,0.051,0.001) acorrdr7flcdmls=atpcf('/usr3/vstr/yrohin/Downloads/DR7-Full.ascii',bins,bins,randfile='/usr3/vstr/yrohin/Downloads/random-DR7-Full.ascii',vtype='sigpi',estimator='ls',weights='eq') print("-------------------------------------") #acorrdr7flcdmlsw=atpcf('/usr3/...
rohinkumarREPO_NAMEcorrelcalcPATH_START.@correlcalc_extracted@correlcalc-master@clusterresults@arunfinedr7full.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "kernels.py", "repo_name": "danieljprice/phantom", "repo_path": "phantom_extracted/phantom-master/scripts/kernels.py", "type": "Python" }
#!/Users/dprice/anaconda3/bin/python3 #--------------------------------------------------------------- # # Daniel Price's automatic smoothing kernel generation script # Prints kernels and all related functions in suitable # manner for direct incorporation into SPH codes # #-------------------------------------------...
danieljpriceREPO_NAMEphantomPATH_START.@phantom_extracted@phantom-master@scripts@kernels.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/freezegun/py3/freezegun/api.py", "type": "Python" }
from . import config from ._async import wrap_coroutine import asyncio import copyreg import dateutil import datetime import functools import sys import time import uuid import calendar import unittest import platform import warnings import types import numbers import inspect from typing import TYPE_CHECKING, overload ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@freezegun@py3@freezegun@api.py@.PATH_END.py
{ "filename": "pixsim.py", "repo_name": "desihub/desisim", "repo_path": "desisim_extracted/desisim-main/py/desisim/scripts/pixsim.py", "type": "Python" }
""" desisim.scripts.pixsim ====================== This is a module. """ from __future__ import absolute_import, division, print_function import os,sys import os.path import shutil import random from time import asctime import numpy as np import desimodel.io from desiutil.log import get_logger import desispec.io fr...
desihubREPO_NAMEdesisimPATH_START.@desisim_extracted@desisim-main@py@desisim@scripts@pixsim.py@.PATH_END.py
{ "filename": "computeOccurrenceFaOnly-checkpoint.ipynb", "repo_name": "stevepur/DR25-occurrence-public", "repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_gaiaRadCut/.ipynb_checkpoints/computeOccurrenceFaOnly-checkpoint.ipynb", "type": "Jupyter Notebook" }
```python import os import requests import pandas as pd from astropy.io import fits from cStringIO import StringIO import numpy as np import matplotlib.pyplot as plt from scipy.stats import gamma from scipy.optimize import minimize from scipy.interpolate import RectBivariateSpline import emcee import corner import scip...
stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_gaiaRadCut@.ipynb_checkpoints@computeOccurrenceFaOnly-checkpoint.ipynb@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/colorbar/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@colorbar@tickfont@_weight.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/legendgrouptitle/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): super(VariantValidator, self).__init__( plotl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@legendgrouptitle@font@_variant.py@.PATH_END.py
{ "filename": "Teff_from_SpT.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/stars/Teff_from_SpT.py", "type": "Python" }
import numpy def Teff_from_SpT(SpT, relation="HH14"): # Set up the data. SpT_list = ['F5','F8','G0',"G2", "G5", "G8", "K0", "K2", "K5", "K7", "M0", \ "M1", "M2", "M3", "M4", "M5", "M6", "M7"] SpT_numbers = [float(test[0].replace("F","4").replace("G","3").\ replace("K","2").replace...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@stars@Teff_from_SpT.py@.PATH_END.py
{ "filename": "test_e2e.py", "repo_name": "LCOGT/banzai-nres", "repo_path": "banzai-nres_extracted/banzai-nres-main/banzai_nres/tests/test_e2e.py", "type": "Python" }
import pytest from banzai.tests.utils import FakeResponse, get_min_and_max_dates from banzai_nres import settings from banzai.logs import get_logger import os import mock import numpy as np from banzai.utils import file_utils import time from glob import glob import pkg_resources from banzai.celery import app, schedule...
LCOGTREPO_NAMEbanzai-nresPATH_START.@banzai-nres_extracted@banzai-nres-main@banzai_nres@tests@test_e2e.py@.PATH_END.py
{ "filename": "dataset.py", "repo_name": "kboone/avocado", "repo_path": "avocado_extracted/avocado-master/avocado/dataset.py", "type": "Python" }
import numpy as np import os import pandas as pd from tqdm import tqdm from sklearn.model_selection import StratifiedKFold from .astronomical_object import AstronomicalObject from .instruments import get_band_central_wavelength from .utils import ( AvocadoException, write_dataframe, read_dataframes, r...
kbooneREPO_NAMEavocadoPATH_START.@avocado_extracted@avocado-master@avocado@dataset.py@.PATH_END.py
{ "filename": "slider_params.py", "repo_name": "HinLeung622/pipes_vis", "repo_path": "pipes_vis_extracted/pipes_vis-main/pipes_vis/slider_params.py", "type": "Python" }
from . import utils # build a library of standard slider labels and extremes, side sorting and priority sfh_priorities = { 'burst':0, 'constant':10, 'exponential':20, 'delayed':30, 'lognormal':40, 'dblplaw':50, 'psb_wild2020':60, 'psb_twin':70 } # commonly used among all SFHs massform...
HinLeung622REPO_NAMEpipes_visPATH_START.@pipes_vis_extracted@pipes_vis-main@pipes_vis@slider_params.py@.PATH_END.py
{ "filename": "irregulardatagrid.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/images_contours_and_fields/irregulardatagrid.py", "type": "Python" }
""" ======================================= Contour plot of irregularly spaced data ======================================= Comparison of a contour plot of irregularly spaced data interpolated on a regular grid versus a tricontour plot for an unstructured triangular grid. Since `~.axes.Axes.contour` and `~.axes.Axes....
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@images_contours_and_fields@irregulardatagrid.py@.PATH_END.py
{ "filename": "rfi_inspect_2458158.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/rfi_inspect/rfi_inspect_2458158.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_2458158.ipynb@.PATH_END.py
{ "filename": "debug.py", "repo_name": "bill-cotton/Obit", "repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/share/scripts/debug.py", "type": "Python" }
Debug sample script that does a full setup of AIPS crap # Gollum user 101, disk 3 import OErr, OSystem, UV, AIPS, FITS import VLACal # On Gollum adirs = ["/export/data_1/GOLLUM_1", "/export/data_1/GOLLUM_2", \ "/export/data_1/GOLLUM_3", \ "/export/data_1/GOLLUM_4", \ "/export/data_...
bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@share@scripts@debug.py@.PATH_END.py
{ "filename": "_idssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/_idssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattermapbox", **kwargs): super(IdssrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@_idssrc.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/xaxis/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.scene.xaxis", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@xaxis@_tickvalssrc.py@.PATH_END.py
{ "filename": "EXES-Telluric-Correction.ipynb", "repo_name": "SOFIAObservatory/Recipes", "repo_path": "Recipes_extracted/Recipes-master/EXES-Telluric-Correction.ipynb", "type": "Jupyter Notebook" }
EXES: Telluric Correction ================ * **Aim**: Retreive an atmospheric model from the Planetary Spectrum Generator ([PSG](https://psg.gsfc.nasa.gov/)) and use it to remove telluric features. <br /> * **Data**: Level 3 grism data of the Sirius. <br /> * **Tools**: astropy, scipy, PSG <br /> * **Instrument**: EXES...
SOFIAObservatoryREPO_NAMERecipesPATH_START.@Recipes_extracted@Recipes-master@EXES-Telluric-Correction.ipynb@.PATH_END.py
{ "filename": "cdbAddImplLang.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/cdb/ws/src/cdbAddImplLang.py", "type": "Python" }
#!/usr/bin/env python import sys import shutil import os import getopt from xml.parsers import expat class Xml2Container(object): def StartElement(self, name, attributes): if attributes.has_key('Container') and attributes[u'Container'] == self.container: code = attributes['Code'] if code.find("alma.")...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@cdb@ws@src@cdbAddImplLang.py@.PATH_END.py
{ "filename": "split_train_test.py", "repo_name": "SKA-INAF/caesar-mrcnn-tf2", "repo_path": "caesar-mrcnn-tf2_extracted/caesar-mrcnn-tf2-main/scripts/split_train_test.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function ################################################## ### MODULE IMPORT ################################################## ## STANDARD MODULES import os import sys import json import time import argparse import datetime import random import numpy as np...
SKA-INAFREPO_NAMEcaesar-mrcnn-tf2PATH_START.@caesar-mrcnn-tf2_extracted@caesar-mrcnn-tf2-main@scripts@split_train_test.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/pip/vendor/html5lib/utils.py", "type": "Python" }
from __future__ import absolute_import, division, unicode_literals from types import ModuleType try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree class MethodDispatcher(dict): """Dict with 2 special properties: On initiation, keys ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@pip@vendor@html5lib@utils.py@.PATH_END.py
{ "filename": "train_disp_reconstructor.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/tools/train_disp_reconstructor.py", "type": "Python" }
""" Tool for training the DispReconstructor """ import astropy.units as u import numpy as np from ctapipe.core import Tool from ctapipe.core.traits import Bool, Int, IntTelescopeParameter, Path from ctapipe.io import TableLoader from ctapipe.reco import CrossValidator, DispReconstructor from ctapipe.reco.preprocessing...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@tools@train_disp_reconstructor.py@.PATH_END.py
{ "filename": "TruncationExtractor.py", "repo_name": "CU-NESS/pylinex", "repo_path": "pylinex_extracted/pylinex-master/pylinex/nonlinear/TruncationExtractor.py", "type": "Python" }
""" File: pylinex/fitter/TruncationExtractor.py Author: Keith Tauscher Date: 1 Oct 2018 Description: Class which uses the rest of the module to perform an end-to-end extraction. The inputs of the class are data and error vectors, training set matrices and expanders. """ import os import numpy...
CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@pylinex@nonlinear@TruncationExtractor.py@.PATH_END.py
{ "filename": "euctwfreq.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/chardet/euctwfreq.py", "type": "Python" }
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@chardet@euctwfreq.py@.PATH_END.py
{ "filename": "_nbit_base.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/_typing/_nbit_base.py", "type": "Python" }
"""A module with the precisions of generic `~numpy.number` types.""" from .._utils import set_module from typing import final @final # Disallow the creation of arbitrary `NBitBase` subclasses @set_module("numpy.typing") class NBitBase: """ A type representing `numpy.number` precision during static type check...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_typing@_nbit_base.py@.PATH_END.py
{ "filename": "randomness.ipynb", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs_nnx/guides/randomness.ipynb", "type": "Jupyter Notebook" }
# Randomness Random state handling in Flax NNX was radically simplified compared to systems like Haiku and Flax Linen because Flax NNX _defines the random state as an object state_. In essence, this means that in Flax NNX, the random state is: 1) just another type of state; 2) stored in `nnx.Variable`s; and 3) held by...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs_nnx@guides@randomness.ipynb@.PATH_END.py
{ "filename": "_weightsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/textfont/_weightsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattergeo.textfont", **kwargs ): super(WeightsrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@textfont@_weightsrc.py@.PATH_END.py
{ "filename": "ModelReaderTesting_GITMtiming.ipynb", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/Validation/Notebooks/ModelReaderTesting_GITMtiming.ipynb", "type": "Jupyter Notebook" }
# Demo notebook for Model Reader ```python # time the file conversion model, file_dir = 'GITM', 'D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/' import kamodo_ccmc.flythrough.model_wrapper as MW from time import perf_counter reader = MW.Model_Reader('GITM') t0 = perf_counter() kamodo_object = reader(file_dir, variable...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@Validation@Notebooks@ModelReaderTesting_GITMtiming.ipynb@.PATH_END.py
{ "filename": "powerMapsPhilcox.py", "repo_name": "oliverphilcox/HADES", "repo_path": "HADES_extracted/HADES-master/tile_creation/powerMapsPhilcox.py", "type": "Python" }
import sys #sys.path.append('/data/ohep2/EngelenTools/') from flipper import * from flipperPol import * import healpy import aveTools import pickle import scipy.ndimage.filters ## hack to remove mpi4py dependence #from mpi4py import MPI #comm = MPI.COMM_WORLD #rank = comm.Get_rank() #size = comm.Get_size() rank =0 s...
oliverphilcoxREPO_NAMEHADESPATH_START.@HADES_extracted@HADES-master@tile_creation@powerMapsPhilcox.py@.PATH_END.py
{ "filename": "octree.py", "repo_name": "ageller/firefly", "repo_path": "firefly_extracted/firefly-main/src/firefly/data_reader/octree.py", "type": "Python" }
import os import itertools import copy import multiprocessing import itertools import time import numpy as np from .json_utils import load_from_json,write_to_json from .binary_writer import RawBinaryWriter,BinaryWriter from abg_python.system_utils import printProgressBar octant_offsets = 0.25 * np.array([ [-1,-1...
agellerREPO_NAMEfireflyPATH_START.@firefly_extracted@firefly-main@src@firefly@data_reader@octree.py@.PATH_END.py
{ "filename": "copy_injection_recovery.py", "repo_name": "ThibeauWouters/TurboPE-BNS", "repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_NRTv2/injection_36/copy_injection_recovery.py", "type": "Python" }
""" Idea: try different learning rate schemes to try and fix the injections """ import psutil p = psutil.Process() p.cpu_affinity([0]) import os os.environ['CUDA_VISIBLE_DEVICES'] = "3" os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10" import numpy as np import argparse # Regular imports import argparse import cop...
ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_NRTv2@injection_36@copy_injection_recovery.py@.PATH_END.py
{ "filename": "test_database.py", "repo_name": "gmbrandt/xwavecal", "repo_path": "xwavecal_extracted/xwavecal-main/xwavecal/tests/test_database.py", "type": "Python" }
import tempfile import os from datetime import datetime, timedelta import sqlite3 import mock import xwavecal.database as db from xwavecal.tests.utils import FakeImage def test_format_db_info(): data = FakeImage() fmt = '%Y-%m-%dT%H:%M:%S.%f' db_info = db.format_db_info(data, fmt) fib0, fib1, fib2 = ...
gmbrandtREPO_NAMExwavecalPATH_START.@xwavecal_extracted@xwavecal-main@xwavecal@tests@test_database.py@.PATH_END.py
{ "filename": "CmdInput.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/console/CmdInput.py", "type": "Python" }
from ..Qt import QtCore, QtWidgets class CmdInput(QtWidgets.QLineEdit): sigExecuteCmd = QtCore.Signal(object) def __init__(self, parent): QtWidgets.QLineEdit.__init__(self, parent) self.ps1 = ">>> " self.ps2 = "... " self.history = [""] self.ptr = 0 se...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@console@CmdInput.py@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scattermapbox", **kwargs ): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@_hovertemplate.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "deepmind/optax", "repo_path": "optax_extracted/optax-main/README.md", "type": "Markdown" }
# Optax ![CI status](https://github.com/google-deepmind/optax/actions/workflows/tests.yml/badge.svg?branch=main) [![Documentation Status](https://readthedocs.org/projects/optax/badge/?version=latest)](http://optax.readthedocs.io) ![pypi](https://img.shields.io/pypi/v/optax) ## Introduction Optax is a gradient proces...
deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@README.md@.PATH_END.py
{ "filename": "resampleNodeList.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/SimulationControl/resampleNodeList.py", "type": "Python" }
import mpi import VoronoiDistributeNodes import SolidSpheral #........................................................................... # A local helper method for copying data from one NodeList to another. #........................................................................... def copyNodeListFields(nodes0, no...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@SimulationControl@resampleNodeList.py@.PATH_END.py
{ "filename": "yaml_ford.md", "repo_name": "Nicholaswogan/PhotochemPy", "repo_path": "PhotochemPy_extracted/PhotochemPy-main/src/fortran-yaml/yaml_ford.md", "type": "Markdown" }
src_dir: ./ output_dir: ~/BB/hugo/static/portfolio/yaml/doc project_github: https://github.com/BoldingBruggeman/fortran-yaml project_website: https://github.com/BoldingBruggeman/fortran-yaml summary: A lightweight YAML parser written in object-oriented Fortran author: Jorn Bruggeman author_description: github: https://...
NicholaswoganREPO_NAMEPhotochemPyPATH_START.@PhotochemPy_extracted@PhotochemPy-main@src@fortran-yaml@yaml_ford.md@.PATH_END.py
{ "filename": "plot_subbox_volrender.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/examples/run_warpeddisk/plot_subbox_volrender.py", "type": "Python" }
import plotly.graph_objects as go import numpy as np from radmc3dPy.subbox import * from natconst import * # # Example how to use RADMC-3D subbox method to sample an irregular grid # in a regular way, making it easier to plot an analyze stuff. # n = 100 nxyz = [n,n,n] #sz = 1200*au # See the full disk #f...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@examples@run_warpeddisk@plot_subbox_volrender.py@.PATH_END.py
{ "filename": "align_labels_demo.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/subplots_axes_and_figures/align_labels_demo.py", "type": "Python" }
""" ======================= Align labels and titles ======================= Aligning xlabel, ylabel, and title using `.Figure.align_xlabels`, `.Figure.align_ylabels`, and `.Figure.align_titles`. `.Figure.align_labels` wraps the x and y label functions. Note that the xlabel "XLabel1 1" would normally be much closer t...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@subplots_axes_and_figures@align_labels_demo.py@.PATH_END.py
{ "filename": "whats_new_v22.ipynb", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/docs/sphinx/jupyter/whats_new_v22.ipynb", "type": "Jupyter Notebook" }
# What's New in Marvin 2.2! Lots of things are new in Marvin 2.2.0. See the list with links to individual sections here http://sdss-marvin.readthedocs.io/en/latest/whats-new.html ## Marvin now includes MPL-6 data ```python %matplotlib inline from marvin import config config.switchSasUrl('local') config.forceDbOff()...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@docs@sphinx@jupyter@whats_new_v22.ipynb@.PATH_END.py
{ "filename": "chebyshev.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/polynomial/chebyshev.py", "type": "Python" }
""" Objects for dealing with Chebyshev series. This module provides a number of objects (mostly functions) useful for dealing with Chebyshev series, including a `Chebyshev` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@polynomial@chebyshev.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "KSaid-1/pvhub", "repo_path": "pvhub_extracted/pvhub-main/README.md", "type": "Markdown" }
# pvhub Function to predict peculiar velocities given RA (right ascension), Dec (declination), and z (redshift). All maps are in redshift-space. All maps are limited to z < 0.067 with a flag in the function for extrapolation option. Conversion from real-space to redshift space as well as the extrapolation option are e...
KSaid-1REPO_NAMEpvhubPATH_START.@pvhub_extracted@pvhub-main@README.md@.PATH_END.py
{ "filename": "test_deprecate.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/util/test_deprecate.py", "type": "Python" }
from textwrap import dedent import pytest from pandas.util._decorators import deprecate import pandas._testing as tm def new_func(): """ This is the summary. The deprecate directive goes next. This is the extended summary. The deprecate directive goes before this. """ return "new_func called" ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@util@test_deprecate.py@.PATH_END.py
{ "filename": "GetCov.py", "repo_name": "theonefromnowhere/FitCov", "repo_path": "FitCov_extracted/FitCov-main/FitCov/GetCov.py", "type": "Python" }
import numpy as np from pycorr import project_to_multipoles from iminuit import Minuit def GetFittedCovariance(estimators,cuts=None,path='',ret_alpha=True,ret_sep=True): #Cuts specify which part of the diagonals of the covariance will be fitted if(not (cuts is None)): c_max=cuts[1] c_min=cuts...
theonefromnowhereREPO_NAMEFitCovPATH_START.@FitCov_extracted@FitCov-main@FitCov@GetCov.py@.PATH_END.py
{ "filename": "azel.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/maps/python/azel.py", "type": "Python" }
import numpy as np import os from .. import core __all__ = [ "convert_azel_to_radec", "convert_radec_to_azel", "convert_radec_to_gal", "convert_gal_to_radec", "LocalToAstronomicalPointing", "EquatorialToGalacticPointing", ] def get_location(location="spt"): """ Return the astropy Ear...
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@maps@python@azel.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/ext/__init__.py", "type": "Python" }
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@ext@__init__.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/line/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter.marker.line", **kwargs): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@line@_cmax.py@.PATH_END.py
{ "filename": "_hoverlabel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattergeo/_hoverlabel.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.hoverlabel" _valid_props = { "align", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattergeo@_hoverlabel.py@.PATH_END.py
{ "filename": "_ticklabelstep.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/colorbar/_ticklabelstep.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(TicklabelstepValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@colorbar@_ticklabelstep.py@.PATH_END.py
{ "filename": "test_graph_laplacian.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/csgraph/tests/test_graph_laplacian.py", "type": "Python" }
import pytest import numpy as np from numpy.testing import assert_allclose from pytest import raises as assert_raises from scipy import sparse from scipy.sparse import csgraph def check_int_type(mat): return np.issubdtype(mat.dtype, np.signedinteger) or np.issubdtype( mat.dtype, np.uint ) def test_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@csgraph@tests@test_graph_laplacian.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/_dev/__init__.py", "type": "Python" }
""" This package contains utilities that are only used when developing astropy in a copy of the source repository. These files are not installed, and should not be assumed to exist at runtime. """
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@_dev@__init__.py@.PATH_END.py
{ "filename": "NIRSpec_pipeline_workbook_nrs1.ipynb", "repo_name": "Exo-TiC/ExoTiC-JEDI", "repo_path": "ExoTiC-JEDI_extracted/ExoTiC-JEDI-master/notebooks/ERS/stellar_spectra/NIRSpec_pipeline_workbook_nrs1.ipynb", "type": "Jupyter Notebook" }
# NIRSpec G395H Pipeline Workbook ## ERS WASP 39b NRS1 ```python # %matplotlib nbagg ``` ```python workbook = 'insert tag for plots' ``` ```python import exotic_jedi as jedi import numpy as np import matplotlib.pyplot as plt import glob from astropy.io import fits import pickle from scipy.optimize import curve_f...
Exo-TiCREPO_NAMEExoTiC-JEDIPATH_START.@ExoTiC-JEDI_extracted@ExoTiC-JEDI-master@notebooks@ERS@stellar_spectra@NIRSpec_pipeline_workbook_nrs1.ipynb@.PATH_END.py
{ "filename": "_alignsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattermapbox.hoverlabel", **kwargs ): super(AlignsrcValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@hoverlabel@_alignsrc.py@.PATH_END.py
{ "filename": "plotspec.py", "repo_name": "desihub/redrock", "repo_path": "redrock_extracted/redrock-main/py/redrock/plotspec.py", "type": "Python" }
""" redrock.plotspec ================ Visualization tools for plotting spectra. """ import numpy as np from . import zwarning from .templates import make_fulltype class PlotSpec(object): def __init__(self, targets, templates, zscan, zfit, truth=None, archetypes=False): """TODO: document """ ...
desihubREPO_NAMEredrockPATH_START.@redrock_extracted@redrock-main@py@redrock@plotspec.py@.PATH_END.py
{ "filename": "T01generate_events.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/test/emitter/T01generate_events.py", "type": "Python" }
import numpy as np from NuRadioReco.utilities import units from NuRadioMC.EvtGen.generator import write_events_to_hdf5 import logging logger = logging.getLogger("EventGen") logging.basicConfig() VERSION_MAJOR = 1 VERSION_MINOR = 1 def generate_my_events(filename, n_events): """ Event generator skeleton ...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@test@emitter@T01generate_events.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "LR-inaf/pasta-marker", "repo_path": "pasta-marker_extracted/pasta-marker-main/pastamarkers/__init__.py", "type": "Python" }
import os import pastamarkers __ROOT__ = os.path.dirname(pastamarkers.__file__) dir_data = __ROOT__ + "/data/" # "/mnt/c/Users/nicob/Desktop/pastamarkers/test/data/MPD/"
LR-inafREPO_NAMEpasta-markerPATH_START.@pasta-marker_extracted@pasta-marker-main@pastamarkers@__init__.py@.PATH_END.py
{ "filename": "dm_helpers.py", "repo_name": "fjankowsk/meertrig", "repo_path": "meertrig_extracted/meertrig-master/meertrig/dm_helpers.py", "type": "Python" }
# -*- coding: utf-8 -*- # # 2020 Fabian Jankowski # Milky Way DM related helper functions. # import pygedm def get_mw_dm(gl, gb, model="ymw16"): """ Determine the Galactic Milky Way contribution to the dispersion measure for a given sightline. We return the result from the YMW16 model. Para...
fjankowskREPO_NAMEmeertrigPATH_START.@meertrig_extracted@meertrig-master@meertrig@dm_helpers.py@.PATH_END.py
{ "filename": "plot_PT.py", "repo_name": "Jingxuan97/nemesispy", "repo_path": "nemesispy_extracted/nemesispy-main/nemesispy/retrieval/plot_PT.py", "type": "Python" }
#!/usr/bin/env python3 #-*- coding: utf-8 -*- import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import scipy.interpolate as interpolate def plot_averaged_TP_ilon(ilon,tmap,longitude_grid,latitude_grid,pressure_grid, figname='averaged_TP',dpi=400): """ Plot latit...
Jingxuan97REPO_NAMEnemesispyPATH_START.@nemesispy_extracted@nemesispy-main@nemesispy@retrieval@plot_PT.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="funnelarea", **kwargs): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@_marker.py@.PATH_END.py
{ "filename": "py34compat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py2/setuptools/py34compat.py", "type": "Python" }
import importlib try: import importlib.util except ImportError: pass try: module_from_spec = importlib.util.module_from_spec except AttributeError: def module_from_spec(spec): return spec.loader.load_module(spec.name)
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py2@setuptools@py34compat.py@.PATH_END.py
{ "filename": "test_GaiaCat1.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/tests/StarCatalog/test_GaiaCat1.py", "type": "Python" }
import unittest from tests.TestSupport.Utilities import RedirectStreams import EXOSIMS.StarCatalog from EXOSIMS.StarCatalog.GaiaCat1 import GaiaCat1 from EXOSIMS.util.get_module import get_module import os, sys import pkgutil from io import StringIO import astropy.units as u from EXOSIMS.util.get_dirs import get_downlo...
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@tests@StarCatalog@test_GaiaCat1.py@.PATH_END.py
{ "filename": "prompt.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/conversation/prompt.py", "type": "Python" }
# flake8: noqa from langchain.memory.prompt import ( ENTITY_EXTRACTION_PROMPT, ENTITY_MEMORY_CONVERSATION_TEMPLATE, ENTITY_SUMMARIZATION_PROMPT, KNOWLEDGE_TRIPLE_EXTRACTION_PROMPT, SUMMARY_PROMPT, ) from langchain_core.prompts.prompt import PromptTemplate DEFAULT_TEMPLATE = """The following is a fr...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@conversation@prompt.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ratt-ru/QuartiCal", "repo_path": "QuartiCal_extracted/QuartiCal-main/testing/__init__.py", "type": "Python" }
ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@testing@__init__.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterternary/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatterternary", **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@scatterternary@_opacity.py@.PATH_END.py
{ "filename": "_modebar.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/_modebar.py", "type": "Python" }
import _plotly_utils.basevalidators class ModebarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="modebar", parent_name="layout", **kwargs): super(ModebarValidator, 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@layout@_modebar.py@.PATH_END.py
{ "filename": "design.md", "repo_name": "DifferentiableUniverseInitiative/jax_cosmo", "repo_path": "jax_cosmo_extracted/jax_cosmo-master/design.md", "type": "Markdown" }
# Design document for jax-cosmo This document details the API, implementation choices, and internal mechanisms. ## Objective Provide a fully end-to-end automatically differentiable cosmology library, providing observables (e.g. 2pt angular Cls or correlation functions) for a variety of tracers (e.g. lensing, cluster...
DifferentiableUniverseInitiativeREPO_NAMEjax_cosmoPATH_START.@jax_cosmo_extracted@jax_cosmo-master@design.md@.PATH_END.py
{ "filename": "wave.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/examples/tvtk/visual/wave.py", "type": "Python" }
#!/usr/bin/env python # Author: Raashid Baig <raashid@aero.iitb.ac.in> # License: BSD Style. from math import sin, pi from numpy import zeros, arange from tvtk.tools.visual import show, Curve, iterate, MVector def main(): dt = 0.1 x = arange(-50,50) wpoints1 = zeros((100,3), float) wpoints2 = zer...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@tvtk@visual@wave.py@.PATH_END.py
{ "filename": "_scalegroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/_scalegroup.py", "type": "Python" }
import _plotly_utils.basevalidators class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="scalegroup", parent_name="violin", **kwargs): super(ScalegroupValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@_scalegroup.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "AgentM-GEG/residual_feature_extraction", "repo_path": "residual_feature_extraction_extracted/residual_feature_extraction-master/README.md", "type": "Markdown" }
# RESIDUAL FEATURE EXTRACTION PIPELINE A pipeline that carries out feature extraction of residual substructure within the residual images produced by popular galaxy structural-fitting routines such as GALFIT, GIM2D, etc. This pipeline extracts faint low surface brightness features by isolating flux-wise and area-wise s...
AgentM-GEGREPO_NAMEresidual_feature_extractionPATH_START.@residual_feature_extraction_extracted@residual_feature_extraction-master@README.md@.PATH_END.py
{ "filename": "bug_report.md", "repo_name": "TeamLEGWORK/LEGWORK", "repo_path": "LEGWORK_extracted/LEGWORK-main/.github/ISSUE_TEMPLATE/bug_report.md", "type": "Markdown" }
--- name: Bug report about: Help us squash those bugs in LEGWORK! title: '' labels: bug assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **Example for reproducing** Please include a minimum working example that reproduces the error, e.g. ``` import legwork as lw # do stuff w...
TeamLEGWORKREPO_NAMELEGWORKPATH_START.@LEGWORK_extracted@LEGWORK-main@.github@ISSUE_TEMPLATE@bug_report.md@.PATH_END.py
{ "filename": "ndslicing.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/nddata/mixins/ndslicing.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the Slicing mixin to the NDData class. from astropy import log from astropy.wcs.wcsapi import ( BaseHighLevelWCS, # noqa: F401 BaseLowLevelWCS, # noqa: F401 HighLevelWCSWrapper, SlicedLowLevelWCS, ) __all__ = [...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@nddata@mixins@ndslicing.py@.PATH_END.py
{ "filename": "Likelihood21cmFast.py", "repo_name": "BradGreig/21CMMC", "repo_path": "21CMMC_extracted/21CMMC-master/21CMMC_SourceCode/Programs/CosmoHammer_21CMMC/likelihood/module/Likelihood21cmFast.py", "type": "Python" }
#!/usr/bin/env python import os import numpy as np np.seterr(invalid='ignore', divide='ignore') from decimal import * from scipy import interpolate from scipy.interpolate import InterpolatedUnivariateSpline import string import subprocess import time import multiprocessing TWOPLACES = Decimal(10) ** -2 # same a...
BradGreigREPO_NAME21CMMCPATH_START.@21CMMC_extracted@21CMMC-master@21CMMC_SourceCode@Programs@CosmoHammer_21CMMC@likelihood@module@Likelihood21cmFast.py@.PATH_END.py