metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "example_linear.py", "repo_name": "jinshisai/SLAM", "repo_path": "SLAM_extracted/SLAM-main/example_linear.py", "type": "Python" }
import numpy as np from pvanalysis import PVAnalysis '-------- INPUTS --------' fitsfile = './testfits/testlinear.fits' outname = 'linear' # file name header for outputs incl = 65. # deg vsys = 4.0 # km/s dist = 139. # pc rms = 2.4e-3 # Jy/beam thr = 5. # rms ridgemode = 'mean' # 'mean' or 'gauss' xlim = [-70, ...
jinshisaiREPO_NAMESLAMPATH_START.@SLAM_extracted@SLAM-main@example_linear.py@.PATH_END.py
{ "filename": "CustomInterstellar.py", "repo_name": "xpsi-group/xpsi", "repo_path": "xpsi_extracted/xpsi-main/examples/examples_modeling_tutorial/modules/CustomInterstellar.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 6 16:56:44 2024 @author: bas """ import xpsi from xpsi import Parameter import numpy as np from scipy.interpolate import Akima1DInterpolator class CustomInterstellar(xpsi.Interstellar): """ Apply interstellar attenuation. """ def __init...
xpsi-groupREPO_NAMExpsiPATH_START.@xpsi_extracted@xpsi-main@examples@examples_modeling_tutorial@modules@CustomInterstellar.py@.PATH_END.py
{ "filename": "intro.ipynb", "repo_name": "dfm/tinygp", "repo_path": "tinygp_extracted/tinygp-main/docs/tutorials/intro.ipynb", "type": "Jupyter Notebook" }
```python try: import tinygp except ImportError: %pip install -q tinygp ``` (intro)= # An Introduction to tinygp This tutorial provides a brief introduction to how Gaussian Processes (GPs) are implemented in `tinygp`. We're not going to provide much of an introduction to GPs themselves, because there are alr...
dfmREPO_NAMEtinygpPATH_START.@tinygp_extracted@tinygp-main@docs@tutorials@intro.ipynb@.PATH_END.py
{ "filename": "_east.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/mapbox/bounds/_east.py", "type": "Python" }
import _plotly_utils.basevalidators class EastValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="east", parent_name="layout.mapbox.bounds", **kwargs ): super(EastValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@mapbox@bounds@_east.py@.PATH_END.py
{ "filename": "test_halo_model.py", "repo_name": "halomod/halomod", "repo_path": "halomod_extracted/halomod-main/tests/test_halo_model.py", "type": "Python" }
"""Integration-style tests of the full HaloModel class.""" import warnings import numpy as np import pytest from hmf.density_field.filters import Filter from hmf.halos.mass_definitions import MassDefinition from halomod import DMHaloModel, TracerHaloModel from halomod.bias import Bias from halomod.concentration impo...
halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@tests@test_halo_model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2015_lensing/__init__.py", "type": "Python" }
from cobaya.likelihoods.base_classes import PlanckClik class planck_2015_lensing(PlanckClik): r""" Lensing likelihood of Planck's 2015 data release based on temperature+polarization map-based lensing reconstruction \cite{Ade:2015zua}. """ pass
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2015_lensing@__init__.py@.PATH_END.py
{ "filename": "contact.md", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/docs/source/more_info/contact.md", "type": "Markdown" }
## Contact Us We really value feedback, especially from our users. Please ask your question or report your bug with the [Rubin Community forum](https://community.lsst.org/c/support/support-lasair/55) under [Support > Lasair](https://community.lsst.org/c/support/support-lasair/55). You will need to get an account ...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@docs@source@more_info@contact.md@.PATH_END.py
{ "filename": "mcTestRegisterDeviceWithMultipleSerial.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/monitoring/moncollect/ws/test/mcTestRegisterDeviceWithMultipleSerial.py", "type": "Python" }
#!/usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All right...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@monitoring@moncollect@ws@test@mcTestRegisterDeviceWithMultipleSerial.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/tickfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcats.tickfont", **kwargs): super(SizeValidator, 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@parcats@tickfont@_size.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/_textfont.py", "type": "Python" }
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattercarpet", **kwargs): super(TextfontValidator, 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@scattercarpet@_textfont.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "davidpamos/MultiModes", "repo_path": "MultiModes_extracted/MultiModes-main/README.md", "type": "Markdown" }
# MultiModes - Author: David Pamos Ortega - PhD Student - University of Granada (UGR) - - Thesis Directors: Dr. Juan Carlos Suárez Yanes - University of Granada (UGR) - and Dr. Antonio García Hernández - University of Granada (UGR) - - Expert contributor: Dr. Javier Pascual Granado - Institute of Astrophysics of Andal...
davidpamosREPO_NAMEMultiModesPATH_START.@MultiModes_extracted@MultiModes-main@README.md@.PATH_END.py
{ "filename": "gtest_xml_test_utils.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googletest/test/gtest_xml_test_utils.py", "type": "Python" }
#!/usr/bin/env python # # Copyright 2006, Google Inc. # 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, this list...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googletest@test@gtest_xml_test_utils.py@.PATH_END.py
{ "filename": "test_ext_lomb_scargle.py", "repo_name": "quatrope/feets", "repo_path": "feets_extracted/feets-master/tests/extractors/test_ext_lomb_scargle.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2017 Juan Cabral # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
quatropeREPO_NAMEfeetsPATH_START.@feets_extracted@feets-master@tests@extractors@test_ext_lomb_scargle.py@.PATH_END.py
{ "filename": "base_hmc.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/pymc/step_methods/hmc/base_hmc.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@step_methods@hmc@base_hmc.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/hoverlabel/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="violin.hoverlabel", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@hoverlabel@_bordercolor.py@.PATH_END.py
{ "filename": "_labelprefix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/_labelprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="labelprefix", parent_name="carpet.baxis", **kwargs): super(LabelprefixValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@carpet@baxis@_labelprefix.py@.PATH_END.py
{ "filename": "test_wcs.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/wcs/tests/test_wcs.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import io import os from contextlib import nullcontext from datetime import datetime import numpy as np import pytest from numpy.testing import ( assert_allclose, assert_array_almost_equal, assert_array_almost_equal_nulp, assert_array_equ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@wcs@tests@test_wcs.py@.PATH_END.py
{ "filename": "example_9_occurrence_rate_inverse.py", "repo_name": "GijsMulders/epos", "repo_path": "epos_extracted/epos-master/EPOS/scriptdir/examples/example_9_occurrence_rate_inverse.py", "type": "Python" }
#! /usr/bin/env ipython ''' Estimate plane occurrence rates using the inverse detection efficiency method Plots should appear in the directory png/example_9/occurrence/ Binned occurrence rates are saved in json/example_9/ This example calculates the occurrence rates for different classes of planets, defined by a ...
GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@scriptdir@examples@example_9_occurrence_rate_inverse.py@.PATH_END.py
{ "filename": "dust-profiles.md", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/docs/source/user-guide/examples/dust-profiles.md", "type": "Markdown" }
# Dust profiles Plot the surface density profile of each dust species. ![](../../_static/dust_profiles.png) ```{note} The data is from a Phantom simulation with multiple dust species using the mixture (or "1-fluid") method with an embedded planet available from [figshare](https://figshare.com/articles/dataset/Plonk_...
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@docs@source@user-guide@examples@dust-profiles.md@.PATH_END.py
{ "filename": "AIDA_Check_Settings.py", "repo_name": "erikhom/aida", "repo_path": "aida_extracted/aida-master/AIDA_Check_Settings.py", "type": "Python" }
################################################################################ # # File: AIDA_Check_Settings.py # # Summary: Function to check input values for AIDA settings loaded from # 'AIDA_Settings.py', user specified settings file, or the # command line # # Author: ...
erikhomREPO_NAMEaidaPATH_START.@aida_extracted@aida-master@AIDA_Check_Settings.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@hoverlabel@font@__init__.py@.PATH_END.py
{ "filename": "loadVAE.ipynb", "repo_name": "igomezv/simplemc_tests", "repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/analyzers/neuralike/neural_models/crann_models/loadVAE.ipynb", "type": "Jupyter Notebook" }
```python import tensorflow as tf from matplotlib import pyplot as plt import numpy as np %matplotlib inline from tensorflow.keras.models import Model import pandas as pd from sklearn.preprocessing import StandardScaler, MinMaxScaler from tensorflow.keras.optimizers import Adam from tensorflow.keras.initializers import...
igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@analyzers@neuralike@neural_models@crann_models@loadVAE.ipynb@.PATH_END.py
{ "filename": "core.py", "repo_name": "21cmfast/21CMMC", "repo_path": "21CMMC_extracted/21CMMC-master/src/py21cmmc/core.py", "type": "Python" }
"""Module providing Core Modules for cosmoHammer. This is the basis of the plugin system for :mod:`py21cmmc`. TODO: Add description of the API of cores (and how to define new ones). """ import copy import inspect import logging import numpy as np import py21cmfast as p21 import warnings from os import path from scipy...
21cmfastREPO_NAME21CMMCPATH_START.@21CMMC_extracted@21CMMC-master@src@py21cmmc@core.py@.PATH_END.py
{ "filename": "output.py", "repo_name": "CobayaSampler/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/output.py", "type": "Python" }
""" .. module:: output :Synopsis: Generic output class and output drivers :Author: Jesus Torrado """ # Global import os import sys import datetime import re import shutil from typing import Optional, Any from packaging import version # Local from cobaya.yaml import yaml_dump, yaml_load, yaml_load_file, \ OutputEr...
CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@output.py@.PATH_END.py
{ "filename": "__main__.py", "repo_name": "grand-mother/grand", "repo_path": "grand_extracted/grand-main/tests/tools/__main__.py", "type": "Python" }
""" Run all unit tests for the grand.geo package """ from .. import main if __name__ == "__main__": main()
grand-motherREPO_NAMEgrandPATH_START.@grand_extracted@grand-main@tests@tools@__main__.py@.PATH_END.py
{ "filename": "_metasrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/box/_metasrc.py", "type": "Python" }
import _plotly_utils.basevalidators class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="box", **kwargs): super(MetasrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@box@_metasrc.py@.PATH_END.py
{ "filename": "_autocolorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/streamtube/_autocolorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="streamtube", **kwargs ): super(AutocolorscaleValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@_autocolorscale.py@.PATH_END.py
{ "filename": "lsstnutssampler.py", "repo_name": "Harry45/DESEMU", "repo_path": "DESEMU_extracted/DESEMU-main/lsstnutssampler.py", "type": "Python" }
import os import random import jax import jaxlib import jax_cosmo as jc import numpyro from datetime import datetime import numpyro.distributions as dist from numpyro.infer import MCMC, NUTS, init_to_median, init_to_value from lsst.functions import get_params_vec, get_bandpowers_theory, load_data from utils.helpers imp...
Harry45REPO_NAMEDESEMUPATH_START.@DESEMU_extracted@DESEMU-main@lsstnutssampler.py@.PATH_END.py
{ "filename": "Hourglass-1d.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Hydro/Hourglass/Hourglass-1d.py", "type": "Python" }
#ATS:test(SELF, "--graphics False", label="Planar Hourglass test problem -- 1-D (serial)") #------------------------------------------------------------------------------- # A made up 1-D problem to test the anti-hourglassing algorithms. #------------------------------------------------------------------------------- f...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Hydro@Hourglass@Hourglass-1d.py@.PATH_END.py
{ "filename": "adstex.py", "repo_name": "yymao/adstex", "repo_path": "adstex_extracted/adstex-main/adstex.py", "type": "Python" }
""" adstex: Automated generation of NASA ADS bibtex entries from citation keys (identifiers, author+year) in your TeX source files. Project website: https://github.com/yymao/adstex The MIT License (MIT) Copyright (c) 2015-2024 Yao-Yuan Mao (yymao) http://opensource.org/licenses/MIT """ from __future__ import absolute...
yymaoREPO_NAMEadstexPATH_START.@adstex_extracted@adstex-main@adstex.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="funnel.marker.colorbar", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@marker@colorbar@_bordercolor.py@.PATH_END.py
{ "filename": "enumerate-api.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/tools/releasing/enumerate-api.py", "type": "Python" }
""" This tool is used in generating meaningful release notes. This tool simplifies reading the current statsmodels API to a JSON file. It can also be used against any installed statsmodels package to read the API. The typical use would be source venv/legacy-statsmodels/activate python enumerate-api.py -of statsmodels...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@tools@releasing@enumerate-api.py@.PATH_END.py
{ "filename": "contrast.py", "repo_name": "rodluger/planetplanet", "repo_path": "planetplanet_extracted/planetplanet-master/scripts/contrast.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' contrast.py |github| -------------------- Plots an occultation event in two different limits: the airless limit and the thick atmosphere limit. The asymmetry of the light curve in the former case betrays a strong day/night temperature contrast on the occulted planet. ...
rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@contrast.py@.PATH_END.py
{ "filename": "lextab.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pycparser/py3/pycparser/lextab.py", "type": "Python" }
# lextab.py. This file automatically created by PLY (version 3.10). Don't edit! _tabversion = '3.10' _lextokens = set(('AND', 'ANDEQUAL', 'ARROW', 'AUTO', 'BREAK', 'CASE', 'CHAR', 'CHAR_CONST', 'COLON', 'COMMA', 'CONDOP', 'CONST', 'CONTINUE', 'DEFAULT', 'DIVEQUAL', 'DIVIDE', 'DO', 'DOUBLE', 'ELLIPSIS', 'ELSE', 'EN...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pycparser@py3@pycparser@lextab.py@.PATH_END.py
{ "filename": "test_fcompiler_intel.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/distutils/tests/test_fcompiler_intel.py", "type": "Python" }
from __future__ import division, absolute_import, print_function import numpy.distutils.fcompiler from numpy.testing import run_module_suite, assert_ intel_32bit_version_strings = [ ("Intel(R) Fortran Intel(R) 32-bit Compiler Professional for applications" "running on Intel(R) 32, Version 11.1", '11.1'), ] ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@distutils@tests@test_fcompiler_intel.py@.PATH_END.py
{ "filename": "_griddash.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/baxis/_griddash.py", "type": "Python" }
import _plotly_utils.basevalidators class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="griddash", parent_name="carpet.baxis", **kwargs): super(GriddashValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@baxis@_griddash.py@.PATH_END.py
{ "filename": "coordinate_handler.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/geometry/coordinates/coordinate_handler.py", "type": "Python" }
import abc import weakref from functools import cached_property from numbers import Number from typing import Any, Literal, overload import numpy as np from yt._typing import AxisOrder from yt.funcs import fix_unitary, is_sequence, parse_center_array, validate_width_tuple from yt.units.yt_array import YTArray, YTQuan...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@geometry@coordinates@coordinate_handler.py@.PATH_END.py
{ "filename": "iuwt_toolbox.py", "repo_name": "ratt-ru/PyMORESANE", "repo_path": "PyMORESANE_extracted/PyMORESANE-master/pymoresane/iuwt_toolbox.py", "type": "Python" }
import numpy as np from scipy import ndimage import traceback try: import pycuda.driver as drv import pycuda.tools import pycuda.autoinit import pycuda.gpuarray as gpuarray from pycuda.compiler import SourceModule except: traceback.print_exc() print "Pycuda unavailable - GPU mode will fail....
ratt-ruREPO_NAMEPyMORESANEPATH_START.@PyMORESANE_extracted@PyMORESANE-master@pymoresane@iuwt_toolbox.py@.PATH_END.py
{ "filename": "CurviBoundaryConditions.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/Deprecated/CurviBoundaryConditions/CurviBoundaryConditions.py", "type": "Python" }
# This module provides functions for setting up Curvilinear boundary conditions, # as documented in Tutorial-Start_to_Finish-Curvilinear_BCs.ipynb # Authors: Zachariah B. Etienne # zachetie **at** gmail **dot* com # Terrence Pierre Jacques # First we import needed core NRPy+ modules from outputC ...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Deprecated@CurviBoundaryConditions@CurviBoundaryConditions.py@.PATH_END.py
{ "filename": "multi_client_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/dtensor/python/tests/multi_client_test.py", "type": "Python" }
# Copyright 2023 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@dtensor@python@tests@multi_client_test.py@.PATH_END.py
{ "filename": "sort_lines.py", "repo_name": "Morisset/PyNeb_devel", "repo_path": "PyNeb_devel_extracted/PyNeb_devel-master/pyneb/sample_scripts/sort_lines.py", "type": "Python" }
# Sort lines of an observational dataset in alphabetical order import pyneb as pn # Read data obs_data = 'pne.dat' obs = pn.Observation(obs_data, fileFormat='lines_in_rows', corrected=True) out_file=open('out.dat', 'w') # getSortedLines returns lines in sorted order for line in obs.getSortedLines(): row = li...
MorissetREPO_NAMEPyNeb_develPATH_START.@PyNeb_devel_extracted@PyNeb_devel-master@pyneb@sample_scripts@sort_lines.py@.PATH_END.py
{ "filename": "plot_release_highlights_1_6_0.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/release_highlights/plot_release_highlights_1_6_0.py", "type": "Python" }
# ruff: noqa """ ======================================= Release Highlights for scikit-learn 1.6 ======================================= .. currentmodule:: sklearn We are pleased to announce the release of scikit-learn 1.6! Many bug fixes and improvements were added, as well as some key new features. Below we detail ...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@release_highlights@plot_release_highlights_1_6_0.py@.PATH_END.py
{ "filename": "_range.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/angularaxis/_range.py", "type": "Python" }
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.angularaxis", **kwargs): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@angularaxis@_range.py@.PATH_END.py
{ "filename": "processors.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/processors.py", "type": "Python" }
""" Processors are little transformation blocks that transform the token list from a buffer before the BufferControl will render it to the screen. They can insert tokens before or after, or highlight fragments by replacing the token types. """ from __future__ import unicode_literals from abc import ABCMeta, abstractme...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py2@prompt_toolkit@layout@processors.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/comm/README.md", "type": "Markdown" }
# Comm It provides a way to register a Kernel Comm implementation, as per the Jupyter kernel protocol. It also provides a base Comm implementation and a default CommManager that can be used. ## Register a comm implementation in the kernel: ### Case 1: Using the default CommManager and the BaseComm implementations W...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@comm@README.md@.PATH_END.py
{ "filename": "rrg_to_lenstool-checkpoint.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/src/.ipynb_checkpoints/rrg_to_lenstool-checkpoint.py", "type": "Python" }
''' This script will take the output from rrg and convert the shears in the format required to be used in lenstool (using option 7, and the format a, b, theta) ''' from astropy.io import fits import os as os #import mask_catalogue as mask_catalogue import numpy as np def rrg_to_lenstool( rrg_catalogue, ...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@src@.ipynb_checkpoints@rrg_to_lenstool-checkpoint.py@.PATH_END.py
{ "filename": "googledrive.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/googledrive.py", "type": "Python" }
# Prerequisites: # 1. Create a Google Cloud project # 2. Enable the Google Drive API: # https://console.cloud.google.com/flows/enableapi?apiid=drive.googleapis.com # 3. Authorize credentials for desktop app: # https://developers.google.com/drive/api/quickstart/python#authorize_credentials_for_a_desktop_application ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@googledrive.py@.PATH_END.py
{ "filename": "PSDs_README.md", "repo_name": "CosmoStatGW/gwfast", "repo_path": "gwfast_extracted/gwfast-master/psds/PSDs_README.md", "type": "Markdown" }
# gwfast/psds We here list the sources of the available Power Spectral Densities, PSDs, or Amplitude Spectral Densities, ASDs available in GWFast, in alphabetical order ### ce\_strain/ Cosmic Explorer ASDs from [*Science-Driven Tunable Design of Cosmic Explorer Detectors*](https://arxiv.org/abs/2201.10668), available...
CosmoStatGWREPO_NAMEgwfastPATH_START.@gwfast_extracted@gwfast-master@psds@PSDs_README.md@.PATH_END.py
{ "filename": "multiclass.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/multiclass.py", "type": "Python" }
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@multiclass.py@.PATH_END.py
{ "filename": "test_financial_expired.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/lib/tests/test_financial_expired.py", "type": "Python" }
import sys import pytest import numpy as np def test_financial_expired(): match = 'NEP 32' with pytest.warns(DeprecationWarning, match=match): func = np.fv with pytest.raises(RuntimeError, match=match): func(1, 2, 3)
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@lib@tests@test_financial_expired.py@.PATH_END.py
{ "filename": "_sizesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/hoverlabel/font/_sizesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnel.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@hoverlabel@font@_sizesrc.py@.PATH_END.py
{ "filename": "_sgs.py", "repo_name": "sfarrens/sfof", "repo_path": "sfof_extracted/sfof-master/sfof/python/euclid/dm/_sgs.py", "type": "Python" }
# /home/sartor/pymodule/euclid/dm/_sgs.py # -*- coding: utf-8 -*- # PyXB bindings for NM:77d3da8c9c0b8eec64b9957d9ec227ca99caec32 # Generated 2014-07-24 16:26:39.933073 by PyXB version 1.2.3 # Namespace http://euclid.esa.org/schema/sys/sgs [xmlns:sgs] import pyxb import pyxb.binding import pyxb.binding.saxer import io...
sfarrensREPO_NAMEsfofPATH_START.@sfof_extracted@sfof-master@sfof@python@euclid@dm@_sgs.py@.PATH_END.py
{ "filename": "test_zeus_mock_avg.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/config/examples/test_zeus_mock_avg.py", "type": "Python" }
import sys sys.path.append("..") sys.path.append("../..") from barry.config import setup from barry.fitter import Fitter from barry.models.bao_power_Beutler2017 import PowerBeutler2017 from barry.datasets.dataset_power_spectrum import PowerSpectrum_SDSS_DR12 from barry.utils import plot_bestfit from barry.samplers imp...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@config@examples@test_zeus_mock_avg.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "supernnova/SuperNNova", "repo_path": "SuperNNova_extracted/SuperNNova-main/python/supernnova/visualization/__init__.py", "type": "Python" }
supernnovaREPO_NAMESuperNNovaPATH_START.@SuperNNova_extracted@SuperNNova-main@python@supernnova@visualization@__init__.py@.PATH_END.py
{ "filename": "format_read.py", "repo_name": "ellawang44/Breidablik", "repo_path": "Breidablik_extracted/Breidablik-master/breidablik/analysis/format_read.py", "type": "Python" }
from breidablik.analysis import tools import numpy as np def pixel_format(data, wavelength, center = 670.9659, lower = 0.4, upper = 0.4, ftype = 'flux'): """Changes the data from read into a machine learning format. This function is for machine learning over pixels. Parameters ---------- data : dict ...
ellawang44REPO_NAMEBreidablikPATH_START.@Breidablik_extracted@Breidablik-master@breidablik@analysis@format_read.py@.PATH_END.py
{ "filename": "test_quickspectra.py", "repo_name": "desihub/desisim", "repo_path": "desisim_extracted/desisim-main/py/desisim/test/test_quickspectra.py", "type": "Python" }
import unittest, os, shutil, tempfile, subprocess import numpy as np from desisim.scripts import quickspectra import desispec.io from astropy.io import fits class TestQuickSpectra(unittest.TestCase): @classmethod def setUpClass(cls): cls.origdir = os.getcwd() cls.testdir = tempfile.mkdtemp() ...
desihubREPO_NAMEdesisimPATH_START.@desisim_extracted@desisim-main@py@desisim@test@test_quickspectra.py@.PATH_END.py
{ "filename": "test_plot_clumping_factor_Chary.py", "repo_name": "roban/CosmoloPy", "repo_path": "CosmoloPy_extracted/CosmoloPy-master/tests/test_plot_clumping_factor_Chary.py", "type": "Python" }
from __future__ import absolute_import, division, print_function import sys import numpy import pylab import cosmolopy.reionization as cr def plot_clumping_factor_Chary(): """Plot clumping factor from Chary paper. """ z = numpy.linspace(5,15,500) cf = cr.clumping_factor_Chary(z) pylab.plot(z,c...
robanREPO_NAMECosmoloPyPATH_START.@CosmoloPy_extracted@CosmoloPy-master@tests@test_plot_clumping_factor_Chary.py@.PATH_END.py
{ "filename": "mutable_array_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/mutable_array_test.py", "type": "Python" }
# Copyright 2024 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@tests@mutable_array_test.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="histogram.marker.colorbar", **kwargs ): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@colorbar@_tick0.py@.PATH_END.py
{ "filename": "split_by_token.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/split_by_token.ipynb", "type": "Jupyter Notebook" }
# How to split text by tokens Language models have a [token](/docs/concepts/tokens/) limit. You should not exceed the token limit. When you [split your text](/docs/concepts/text_splitters/) into chunks it is therefore a good idea to count the number of tokens. There are many tokenizers. When you count tokens in your ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@split_by_token.ipynb@.PATH_END.py
{ "filename": "radiative_functions.py", "repo_name": "joshuakt/Oxygen-False-Positives", "repo_path": "Oxygen-False-Positives_extracted/Oxygen-False-Positives-main/radiative_functions.py", "type": "Python" }
################################## import numpy as np import pylab from scipy.integrate import * from scipy.interpolate import interp1d from scipy import optimize import scipy.interpolate from numba import jit ################################# ### H2O and CO2 ranges for OLR grid P_H2O_grid_new = np.logspace(1,9,34) P...
joshuaktREPO_NAMEOxygen-False-PositivesPATH_START.@Oxygen-False-Positives_extracted@Oxygen-False-Positives-main@radiative_functions.py@.PATH_END.py
{ "filename": "test_mag_likelihood.py", "repo_name": "sibirrer/hierArc", "repo_path": "hierArc_extracted/hierArc-main/test/test_Likelihood/test_LensLikelihood/test_mag_likelihood.py", "type": "Python" }
import pytest import numpy as np import numpy.testing as npt from hierarc.Likelihood.LensLikelihood.mag_likelihood import MagnificationLikelihood from lenstronomy.Util.data_util import magnitude2cps class TestMagnificationLikelihood(object): def setup_method(self): pass def test_log_likelihood(self):...
sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@test@test_Likelihood@test_LensLikelihood@test_mag_likelihood.py@.PATH_END.py
{ "filename": "_b.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/_b.py", "type": "Python" }
import _plotly_utils.basevalidators class BValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="scattercarpet", **kwargs): super(BValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@_b.py@.PATH_END.py
{ "filename": "test_gammainc.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/special/tests/test_gammainc.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np from scipy.special import gammainc from scipy.special._testutils import FuncData def test_line(): # Test on the line a = x where a simpler asymptotic expansion # (analog of DLMF 8.12.15) is available. def gammainc_line(x)...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@special@tests@test_gammainc.py@.PATH_END.py
{ "filename": "QuadraticInterpolator.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/Utilities/QuadraticInterpolator.py", "type": "Python" }
#------------------------------------------------------------------------------- # QuadraticInterpolator #------------------------------------------------------------------------------- from PYB11Generator import * class QuadraticInterpolator: """Encapsulates the algorithm and data for parabolic interpolation in ...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Utilities@QuadraticInterpolator.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/contours/labelfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): super(VariantValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@contours@labelfont@_variant.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/textfont/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="sunburst.textfont", **kwargs): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@textfont@_style.py@.PATH_END.py
{ "filename": "aggregate_results.py", "repo_name": "victoria-tiki/transformer_complex", "repo_path": "transformer_complex_extracted/transformer_complex-main/inference/aggregate_results.py", "type": "Python" }
import os import numpy as np import h5py def aggregate_results(output_dir, world_size): aggregated_hdf5_path = os.path.join(output_dir, 'aggregated_results_model_separate_ff_separate_conv_resume2_160_80_10_epoch=10.h5') # creat h5 file to store results with h5py.File(aggregated_hdf5_path, 'w') as agg_h5f...
victoria-tikiREPO_NAMEtransformer_complexPATH_START.@transformer_complex_extracted@transformer_complex-main@inference@aggregate_results.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/community/fractalcluster/__init__.py", "type": "Python" }
from .interface import Fractalcluster
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@community@fractalcluster@__init__.py@.PATH_END.py
{ "filename": "non_maxwellianity.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/pyCalculations/non_maxwellianity.py", "type": "Python" }
import numpy as np from scipy.constants import k, m_e, m_p import pytools as pt import warnings import logging import random def epsilon_M(f,cell,pop="proton",m=m_p, bulk=None, B=None, model="bimaxwellian", normorder=1, norm=2, threshold=0, dummy=None): ''' Calcula...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@pyCalculations@non_maxwellianity.py@.PATH_END.py
{ "filename": "double_source_plane.ipynb", "repo_name": "sibirrer/hierArc", "repo_path": "hierArc_extracted/hierArc-main/notebooks/double_source_plane.ipynb", "type": "Jupyter Notebook" }
# Double source plane cosmology forecast ```python # import standard python modules import numpy as np import corner import copy import matplotlib.pyplot as plt import matplotlib.patches as mpatches %matplotlib inline # import lenstronomy and hierArc modules from lenstronomy.Cosmo.lens_cosmo import LensCosmo from h...
sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@notebooks@double_source_plane.ipynb@.PATH_END.py
{ "filename": "camvid_segmentation_multiclass.ipynb", "repo_name": "qubvel/segmentation_models.pytorch", "repo_path": "segmentation_models.pytorch_extracted/segmentation_models.pytorch-main/examples/camvid_segmentation_multiclass.ipynb", "type": "Jupyter Notebook" }
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/qubvel/segmentation_models.pytorch/blob/main/examples/camvid_segmentation_multiclass.ipynb) # Install package ```python %%capture %pip install --upgrade segmentation-models-pytorch lightning albument...
qubvelREPO_NAMEsegmentation_models.pytorchPATH_START.@segmentation_models.pytorch_extracted@segmentation_models.pytorch-main@examples@camvid_segmentation_multiclass.ipynb@.PATH_END.py
{ "filename": "_idssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/_idssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="heatmapgl", **kwargs): super(IdssrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@_idssrc.py@.PATH_END.py
{ "filename": "generatePlots.py", "repo_name": "claudiok/clsim", "repo_path": "clsim_extracted/clsim-master/resources/scripts/compareToPPCredux/generatePlots.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function import matplotlib matplotlib.use("PDF") from optparse import OptionParser usage = "usage: %prog [options] inputfile" parser = OptionParser(usage) import os options,args = parser.parse_args() if len(args) != 0: parser.error("wrong number of options") ...
claudiokREPO_NAMEclsimPATH_START.@clsim_extracted@clsim-master@resources@scripts@compareToPPCredux@generatePlots.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/line/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="parcats.line.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@line@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "nuclear-multimessenger-astronomy/nmma", "repo_path": "nmma_extracted/nmma-main/tutorials/README.md", "type": "Markdown" }
nuclear-multimessenger-astronomyREPO_NAMEnmmaPATH_START.@nmma_extracted@nmma-main@tutorials@README.md@.PATH_END.py
{ "filename": "base.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/redis/base.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import Redis from langchain_community.vectorstores.redis.base import ( RedisVectorStoreRetriever, check_index_exists, ) # Create a way to dynamically lo...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@redis@base.py@.PATH_END.py
{ "filename": "noise.py", "repo_name": "ACCarnall/bagpipes", "repo_path": "bagpipes_extracted/bagpipes-master/bagpipes/fitting/noise.py", "type": "Python" }
import numpy as np try: import george from george import kernels except ImportError: pass class noise_model(object): """ A class for modelling the noise properties of spectroscopic data, including correlated noise. Parameters ---------- noise_dict : dictionary Contains the ...
ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@bagpipes@fitting@noise.py@.PATH_END.py
{ "filename": "reference_metric.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/reference_metric.py", "type": "Python" }
# reference_metric.py: Define all needed quantities # for a reference metric. # Given uniform (reference metric) coordinate # (xx[0],xx[1],xx[2]), you must define: # 1) xxmin[3],xxmax[3]: Valid ranges for each # uniform coordinate xx0,xx1,xx2 # 2) xxSph[3]: Spherical coordinate (r,theta,phi), # ...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@reference_metric.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/insidetextfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.insidetextfont", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@insidetextfont@_size.py@.PATH_END.py
{ "filename": "test_model_intensity.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/tests/test_model_intensity.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2020, the ixpeobssim team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # #...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@tests@test_model_intensity.py@.PATH_END.py
{ "filename": "plot_mock_data.py", "repo_name": "LSSTDESC/NaMaster", "repo_path": "NaMaster_extracted/NaMaster-master/sandbox_validation/data/plot_mock_data.py", "type": "Python" }
from __future__ import print_function from optparse import OptionParser import numpy as np import healpy as hp import matplotlib.pyplot as plt import flatmaps as fm import os from matplotlib import rc import matplotlib rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) rc('text', usetex=True) def opt_call...
LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@sandbox_validation@data@plot_mock_data.py@.PATH_END.py
{ "filename": "plot_ci_vs_fwhm.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/devutils/plot_ci_vs_fwhm.py", "type": "Python" }
#!/usr/bin/env python import argparse import pdb from astropy.stats import sigma_clipped_stats from astropy.table import Table, vstack import matplotlib.pyplot as plt import numpy as np from drizzlepac.devutils.comparison_tools import compare_sourcelists from drizzlepac.haputils.diagnostic_utils import read_json_file...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@devutils@plot_ci_vs_fwhm.py@.PATH_END.py
{ "filename": "sim_image.py", "repo_name": "astrostat/LIRA", "repo_path": "LIRA_extracted/LIRA-master/lira/python/test/sim_image.py", "type": "Python" }
# sim_image - function to make simulated null 2D images, based on the # assumed model - gauss + constant # # It requires CIAO4.5/ciao_contrib script package and Sherpa # # INPUT: indirs directories with the data files (could be more than one) # infile - image file # psffile - corresponding psf file # ...
astrostatREPO_NAMELIRAPATH_START.@LIRA_extracted@LIRA-master@lira@python@test@sim_image.py@.PATH_END.py
{ "filename": "sort_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/sort_ops_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@ops@sort_ops_test.py@.PATH_END.py
{ "filename": "plot_video_api.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/gallery/others/plot_video_api.py", "type": "Python" }
""" ========= Video API ========= .. note:: Try on `Colab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_video_api.ipynb>`_ or :ref:`go to the end <sphx_glr_download_auto_examples_others_plot_video_api.py>` to download the full example code. This ex...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@gallery@others@plot_video_api.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="sunburst.marker.colorbar", **kwargs, ): super(ShowticksuffixValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@marker@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "results_teffects.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/treatment/tests/results/results_teffects.py", "type": "Python" }
# flake8: noqa # file is mostly autogenerated import numpy as np class Bunch(dict): def __init__(self, **kw): dict.__init__(self, kw) self.__dict__ = self table = np.array([ -239.63921146434, 23.82402100183, -10.058722305774, 8.408247034e-24, -286.33343459485, -192.94498833383, np.na...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@treatment@tests@results@results_teffects.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/hoverlabel/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@hoverlabel@font@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "mkplummer/Imber", "repo_path": "Imber_extracted/Imber-main/README.md", "type": "Markdown" }
# Imber Doppler imaging and light curve inverstion tool created by [Michael K. Plummer](https://www.michaelplummer.dev) for modeling stellar/substellar surfaces. The Python module simulates spectroscopic and photometric observations with both a gridded, numerical simulation and analytical model. Imber has been specific...
mkplummerREPO_NAMEImberPATH_START.@Imber_extracted@Imber-main@README.md@.PATH_END.py
{ "filename": "test_convolve_kernels.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/convolution/tests/test_convolve_kernels.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import itertools import numpy as np import pytest from numpy.testing import assert_allclose, assert_almost_equal from astropy import units as u from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import ( ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@convolution@tests@test_convolve_kernels.py@.PATH_END.py
{ "filename": "gather_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/tests/gather_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@compiler@tests@gather_test.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/legend/title/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.legend.title.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@legend@title@font@_lineposition.py@.PATH_END.py
{ "filename": "test_imgproc.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/modules/imgproc/misc/python/test/test_imgproc.py", "type": "Python" }
#!/usr/bin/env python from __future__ import print_function import numpy as np import cv2 as cv from tests_common import NewOpenCVTests class Imgproc_Tests(NewOpenCVTests): def test_python_986(self): cntls = [] img = np.zeros((100,100,3), dtype=np.uint8) color = (0,0,0) cnts = n...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@imgproc@misc@python@test@test_imgproc.py@.PATH_END.py
{ "filename": "test_paper_models.py", "repo_name": "henrysky/astroNN", "repo_path": "astroNN_extracted/astroNN-master/tests/test_paper_models.py", "type": "Python" }
########################################################################## # To make sure published models in papers actually are still working fine ########################################################################## import os import shutil import subprocess import warnings import numpy as np from astroNN.apo...
henryskyREPO_NAMEastroNNPATH_START.@astroNN_extracted@astroNN-master@tests@test_paper_models.py@.PATH_END.py
{ "filename": "fastchem_c_o.py", "repo_name": "NewStrangeWorlds/FastChem", "repo_path": "FastChem_extracted/FastChem-master/python/fastchem_c_o.py", "type": "Python" }
import pyfastchem import numpy as np import os from save_output import saveChemistryOutput, saveMonitorOutput, saveChemistryOutputPandas, saveMonitorOutputPandas import matplotlib.pyplot as plt from astropy import constants as const #input values for temperature (in K) and pressure (in bar) #we only use a single value...
NewStrangeWorldsREPO_NAMEFastChemPATH_START.@FastChem_extracted@FastChem-master@python@fastchem_c_o.py@.PATH_END.py
{ "filename": "600_Interpolation.ipynb", "repo_name": "rometsch/fargocpt", "repo_path": "fargocpt_extracted/fargocpt-master/examples/600_Interpolation.ipynb", "type": "Jupyter Notebook" }
# Interpolation of grids This notebook shows how fields defined on the interfaces can be interpolated to cell centers. This is used in the Loader class provided by the `fargocpt` module. We make use of the underlying symmetry of the grids. This brings the interpolation time down from 1.5 seconds using `scipy.interpol...
rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@examples@600_Interpolation.ipynb@.PATH_END.py
{ "filename": "5_analyze_air_shower_reco.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/examples/cr_efficiency_analysis/5_analyze_air_shower_reco.py", "type": "Python" }
import numpy as np import os import glob import helper_cr_eff as hcr import json import NuRadioReco.modules.io.eventReader as eventReader from NuRadioReco.framework.parameters import stationParameters as stnp from NuRadioReco.framework.parameters import showerParameters as shp from NuRadioReco.utilities import units im...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@examples@cr_efficiency_analysis@5_analyze_air_shower_reco.py@.PATH_END.py
{ "filename": "orbit.py", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/source/MulensModel/orbits/orbit.py", "type": "Python" }
import numpy as np import math """ Classes that can be accessed directly: - Orbit - OrbitCircular - OrbitEccentric """ class Orbit(object): """ Class that combines :py:class:`OrbitCircular` and :py:class:`OrbitEccentric`. """ def __new__(self, **kwargs): for Class_ in [OrbitCircular, Orbi...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@source@MulensModel@orbits@orbit.py@.PATH_END.py
{ "filename": "event.py", "repo_name": "gautiernguyen/Automatic-detection-of-ICMEs-at-1-AU-a-deep-learning-approach", "repo_path": "Automatic-detection-of-ICMEs-at-1-AU-a-deep-learning-approach_extracted/Automatic-detection-of-ICMEs-at-1-AU-a-deep-learning-approach-master/event.py", "type": "Python" }
import pandas as pds import datetime import numpy as np import time import matplotlib.pyplot as plt import matplotlib.dates as mdates class Event: def __init__(self, begin, end, param=None): self.begin = begin self.end = end self.proba = None self.duration = self.end-self.begin ...
LONG_NAME_3.py