metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "fitcache.py", "repo_name": "Fermipy/fermipy", "repo_path": "fermipy_extracted/fermipy-master/fermipy/fitcache.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import pyLikelihood as pyLike from fermipy import utils from fermipy import gtutils def get_fitcache_pars(fitcache): pars = pyLike.FloatVector() cov = pyLike.FloatVector() pyLike.Vector_Hep_to_Stl(fitcache.currentPars(), ...
FermipyREPO_NAMEfermipyPATH_START.@fermipy_extracted@fermipy-master@fermipy@fitcache.py@.PATH_END.py
{ "filename": "layers.py", "repo_name": "jakeret/tf_unet", "repo_path": "tf_unet_extracted/tf_unet-master/tf_unet/layers.py", "type": "Python" }
# tf_unet 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. # # tf_unet is distributed in the hope that it will be useful, # but WITHOUT...
jakeretREPO_NAMEtf_unetPATH_START.@tf_unet_extracted@tf_unet-master@tf_unet@layers.py@.PATH_END.py
{ "filename": "params.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/python/radmc3dPy/radmc3dPy/params.py", "type": "Python" }
"""This module contains classes for handling of parameters of the model setup and for file I/O """ from __future__ import absolute_import from __future__ import print_function import traceback import importlib try: import numpy as np except ImportError: np = None print(' Numpy cannot be imported ') pr...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@python@radmc3dPy@radmc3dPy@params.py@.PATH_END.py
{ "filename": "matrix_square_root_op_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/linalg/matrix_square_root_op_test.py", "type": "Python" }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@linalg@matrix_square_root_op_test.py@.PATH_END.py
{ "filename": "concatlogs.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/modules/ts/misc/concatlogs.py", "type": "Python" }
#!/usr/bin/env python """ Combines multiple uniform HTML documents with tables into a single one. HTML header from the first document will be used in the output document. Largest `<tbody>...</tbody>` part from each document will be joined together. """ from optparse import OptionParser import glob, sys, os, re if __...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@ts@misc@concatlogs.py@.PATH_END.py
{ "filename": "hook-regions.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/standalone/hooks/hook-regions.py", "type": "Python" }
from PyInstaller.utils.hooks import collect_submodules, collect_data_files hiddenimports = collect_submodules("regions") # for CITATION.rst datas = collect_data_files('regions')
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@standalone@hooks@hook-regions.py@.PATH_END.py
{ "filename": "Tutorial-GiRaFFE_NRPy-Basic_Equations.ipynb", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/in_progress-GiRaFFE_NRPy/Tutorial-GiRaFFE_NRPy-Basic_Equations.ipynb", "type": "Jupyter Notebook" }
# `GiRaFFE_NRPy`: Basic Equations ## Authors: Patrick Nelson & In this tutorial, we introduce the basic GRFFE equations that we wish to solve. Throughout this section and beyond, we will work in geometrized units such that $G=c=1$. As is standard in NRPy+, * Greek indices refer to four-dimensional quantities where...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@in_progress-GiRaFFE_NRPy@Tutorial-GiRaFFE_NRPy-Basic_Equations.ipynb@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "rmjarvis/TreeCorr", "repo_path": "TreeCorr_extracted/TreeCorr-main/tests/conftest.py", "type": "Python" }
def pytest_collectstart(collector): if hasattr(collector, 'skip_compare'): collector.skip_compare += 'stderr',
rmjarvisREPO_NAMETreeCorrPATH_START.@TreeCorr_extracted@TreeCorr-main@tests@conftest.py@.PATH_END.py
{ "filename": "_widthsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/marker/line/_widthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="choropleth.marker.line", **kwargs ): super(WidthsrcValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choropleth@marker@line@_widthsrc.py@.PATH_END.py
{ "filename": "kepler-22.ipynb", "repo_name": "timothydmorton/isochrones", "repo_path": "isochrones_extracted/isochrones-master/notebooks/kepler-22.ipynb", "type": "Jupyter Notebook" }
``` %matplotlib inline import numpy as np import matplotlib.pyplot as plt from isochrones.dartmouth import Dartmouth_Isochrone dar = Dartmouth_Isochrone() from isochrones.starmodel import StarModel ``` Here, I create a stellar model object with observations of $T_{eff}$, $\log g$, and $[Fe/H]$ corresponding to prop...
timothydmortonREPO_NAMEisochronesPATH_START.@isochrones_extracted@isochrones-master@notebooks@kepler-22.ipynb@.PATH_END.py
{ "filename": "extension.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/extension.py", "type": "Python" }
import re import functools import distutils.core import distutils.errors import distutils.extension from typing import TYPE_CHECKING from .monkey import get_unpatched def _have_cython(): """ Return True if Cython can be imported. """ cython_impl = 'Cython.Distutils.build_ext' try: # from ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@extension.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ggalloni/cobaya", "repo_path": "cobaya_extracted/cobaya-master/cobaya/theories/cosmo/__init__.py", "type": "Python" }
from .boltzmannbase import BoltzmannBase, PowerSpectrumInterpolator
ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@theories@cosmo@__init__.py@.PATH_END.py
{ "filename": "thHeat.py", "repo_name": "magic-sph/magic", "repo_path": "magic_extracted/magic-master/python/magic/thHeat.py", "type": "Python" }
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np from magic import scanDir, MagicSetup, Movie, chebgrid, rderavg, AvgField import os, pickle try: from scipy.integrate import simps except: from scipy.integrate import simpson as simps json_model = {'phys_params': [], 'time...
magic-sphREPO_NAMEmagicPATH_START.@magic_extracted@magic-master@python@magic@thHeat.py@.PATH_END.py
{ "filename": "_legendrank.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="histogram2dcontour", **kwargs ): super(LegendrankValidator, self).__init__( plotly_name=plotly_name, p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@_legendrank.py@.PATH_END.py
{ "filename": "like_bmon.py", "repo_name": "ledatelescope/bifrost", "repo_path": "bifrost_extracted/bifrost-master/tools/like_bmon.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright (c) 2017-2023, The Bifrost Authors. All rights reserved. # Copyright (c) 2017-2023, The University of New Mexico. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met...
ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@tools@like_bmon.py@.PATH_END.py
{ "filename": "test_detrender.py", "repo_name": "konkolyseismolab/autoeap", "repo_path": "autoeap_extracted/autoeap-master/tests/test_detrender.py", "type": "Python" }
import numpy as np from autoeap.detrender import detrend_wrt_PDM from numpy.testing import assert_array_almost_equal import os PACKAGEDIR = os.path.abspath(os.path.dirname(__file__)) def test_detrender(): time,flux,flux_err = np.genfromtxt(os.path.join(PACKAGEDIR,"EPIC220198696_c8_autoEAP.lc"),skip_header=1,unpac...
konkolyseismolabREPO_NAMEautoeapPATH_START.@autoeap_extracted@autoeap-master@tests@test_detrender.py@.PATH_END.py
{ "filename": "_threshold.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/indicator/gauge/_threshold.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Threshold(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "indicator.gauge" _path_str = "indicator.gauge.threshold" _valid_props = {"line", "thickne...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@indicator@gauge@_threshold.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/legendgrouptitle/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.legendgrouptitle.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=pl...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@legendgrouptitle@font@_family.py@.PATH_END.py
{ "filename": "test_pca_common.py", "repo_name": "jakevdp/wpca", "repo_path": "wpca_extracted/wpca-master/wpca/tests/test_pca_common.py", "type": "Python" }
from wpca.tests.tools import assert_columns_allclose_upto_sign from wpca import PCA, WPCA, EMPCA from sklearn.decomposition import PCA as SKPCA from sklearn.utils.estimator_checks import check_estimator import numpy as np from numpy.testing import assert_allclose, assert_raises ESTIMATORS = [PCA, WPCA, EMPCA] KWDS ...
jakevdpREPO_NAMEwpcaPATH_START.@wpca_extracted@wpca-master@wpca@tests@test_pca_common.py@.PATH_END.py
{ "filename": "Intermediate-1--RheologicalParameterExploration_Functional.ipynb", "repo_name": "jrenaud90/TidalPy", "repo_path": "TidalPy_extracted/TidalPy-main/Demos/Intermediate-1--RheologicalParameterExploration_Functional.ipynb", "type": "Jupyter Notebook" }
# Rheological Parameter Exploration Using TidalPy's high-level functional programming, we will see how different rheological parameters affect tidal dissipation ```python import numpy as np import matplotlib.pyplot as plt # plt.style.use('dark_background') from matplotlib.gridspec import GridSpec from cmcrameri impor...
jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@Demos@Intermediate-1--RheologicalParameterExploration_Functional.ipynb@.PATH_END.py
{ "filename": "MCMC2.py", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/zdm/MCMC2.py", "type": "Python" }
""" File: MCMC2.py Author: Jordan Hoffmann Date: 06/12/23 Purpose: Contains functions used for MCMC runs of the zdm code. MCMC_wrap2.py is the main function which does the calling and this holds functions which do the MCMC analysis. This function re-initialises the grids on every run while MCMC.py u...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@zdm@MCMC2.py@.PATH_END.py
{ "filename": "demo_axes_grid.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/axes_grid1/demo_axes_grid.py", "type": "Python" }
""" ============== Demo Axes Grid ============== Grid of 2x2 images with a single colorbar or with one colorbar per Axes. """ import matplotlib.pyplot as plt from matplotlib import cbook from mpl_toolkits.axes_grid1 import ImageGrid fig = plt.figure(figsize=(10.5, 2.5)) Z = cbook.get_sample_data("axes_grid/bivariat...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@axes_grid1@demo_axes_grid.py@.PATH_END.py
{ "filename": "ecliptic.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/coordinates/builtin_frames/ecliptic.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import units as u from astropy.coordinates import representation as r from astropy.coordinates.attributes import QuantityAttribute, TimeAttribute from astropy.coordinates.baseframe import BaseCoordinateFrame, base_doc from astropy.utils.decor...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@builtin_frames@ecliptic.py@.PATH_END.py
{ "filename": "svm_quality_analysis.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/haputils/svm_quality_analysis.py", "type": "Python" }
"""Code that evaluates the quality of the SVM products generated by the drizzlepac package. The JSON files generated here can be converted directly into a Pandas DataFrame using the syntax: >>> import json >>> import pandas as pd >>> with open("<rootname>_astrometry_resids.json") as jfile: >>> resids = json.load(...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@haputils@svm_quality_analysis.py@.PATH_END.py
{ "filename": "test_python_parser_only.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/io/parser/test_python_parser_only.py", "type": "Python" }
""" Tests that apply specifically to the Python parser. Unless specifically stated as a Python-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the C parser can accept further arguments when parsing. """ from __future__ import annotations import csv from io import ( ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@io@parser@test_python_parser_only.py@.PATH_END.py
{ "filename": "slice2d_2di.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/particles/spd_slice2d/slice2d_2di.py", "type": "Python" }
import numpy as np import scipy.interpolate import scipy.spatial def slice2d_2di(datapoints, xyz, resolution, thetarange=None, zdirrange=None): """ Produces slice by interpolating projected data. Based on spd_slice2d_2di in IDL """ # cut by theta value if thetarange is not None: thetarang...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@particles@spd_slice2d@slice2d_2di.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scatterpolargl/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.textfont" _valid_props = { "color", ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scatterpolargl@_textfont.py@.PATH_END.py
{ "filename": "_autorangeoptions.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/polar/radialaxis/_autorangeoptions.py", "type": "Python" }
import _plotly_utils.basevalidators class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.polar.radialaxis", **kwargs, ): super(AutorangeoptionsValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@polar@radialaxis@_autorangeoptions.py@.PATH_END.py
{ "filename": "_bordercolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="ohlc.hoverlabel", **kwargs ): super(BordercolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@ohlc@hoverlabel@_bordercolorsrc.py@.PATH_END.py
{ "filename": "bench.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/scripts/benchmark/mp/bench.py", "type": "Python" }
import json import os.path as op import tempfile import numpy as np import os from time import time from elisa.binary_system import system from elisa.conf import settings from elisa.observer import observer from elisa.logger import getLogger from matplotlib import pyplot as plt from importlib import reload from elisa...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@scripts@benchmark@mp@bench.py@.PATH_END.py
{ "filename": "object_helpers.py", "repo_name": "danielkoll/PyRADS", "repo_path": "PyRADS_extracted/PyRADS-master/pyrads/object_helpers.py", "type": "Python" }
from __future__ import division, print_function, absolute_import from copy import copy # to copy lists of objects... # ================================================================================== # Retrieve object(s) from obj list that match obj.attribute == value # or function(obj.attribute,value)...
danielkollREPO_NAMEPyRADSPATH_START.@PyRADS_extracted@PyRADS-master@pyrads@object_helpers.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._width import WidthValidator from ._smoothing import SmoothingValidator from ._shape import ShapeValidator from ._dash import DashValidator from ._color import ColorValidator from ._backoffsrc impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@line@__init__.py@.PATH_END.py
{ "filename": "test_scaling.py", "repo_name": "pymc-devs/pymc", "repo_path": "pymc_extracted/pymc-main/tests/tuning/test_scaling.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@tests@tuning@test_scaling.py@.PATH_END.py
{ "filename": "uves.py", "repo_name": "AWehrhahn/PyReduce", "repo_path": "PyReduce_extracted/PyReduce-master/pyreduce/instruments/uves.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Handles instrument specific info for the UVES spectrograph Mostly reading data from the header """ import logging import os.path import numpy as np from astropy.io import fits from dateutil import parser from .common import Instrument, getter, observation_date_to_night logger = logging.g...
AWehrhahnREPO_NAMEPyReducePATH_START.@PyReduce_extracted@PyReduce-master@pyreduce@instruments@uves.py@.PATH_END.py
{ "filename": "test_fit_imaging_plotters.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/imaging/plot/test_fit_imaging_plotters.py", "type": "Python" }
from os import path import pytest import autolens.plot as aplt directory = path.dirname(path.realpath(__file__)) @pytest.fixture(name="plot_path") def make_fit_imaging_plotter_setup(): return path.join( "{}".format(path.dirname(path.realpath(__file__))), "files", "plots", "fit" ) def test__fit_qu...
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@imaging@plot@test_fit_imaging_plotters.py@.PATH_END.py
{ "filename": "stratsi_pert.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/caseA_eta0.1/stratsi_pert.py", "type": "Python" }
""" stratified linear analysis of the streaming instability """ from stratsi_params import * from eigenproblem import Eigenproblem ''' output control ''' nz_out = 1024 out_scale= nz_out/nz_waves ''' read in background vertical profiles of vgx, vgy, vdx, vdy ''' horiz_eqm = h5py.File('./eqm_horiz.h5', 'r') zaxis_...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@caseA_eta0.1@stratsi_pert.py@.PATH_END.py
{ "filename": "polygon.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/utilities/polygon.py", "type": "Python" }
""" Util that calls several of Polygon's stock market REST APIs. Docs: https://polygon.io/docs/stocks/getting-started """ import json from typing import Any, Dict, Optional import requests from langchain_core.utils import get_from_dict_or_env from pydantic import BaseModel, model_validator POLYGON_BASE_URL = "https:...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@utilities@polygon.py@.PATH_END.py
{ "filename": "remote_execution_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/eager/remote_execution_test.py", "type": "Python" }
# Copyright 2018 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@eager@remote_execution_test.py@.PATH_END.py
{ "filename": "index_route.py", "repo_name": "SKA-INAF/caesar-rest", "repo_path": "caesar-rest_extracted/caesar-rest-master/caesar_rest/index_route.py", "type": "Python" }
############################## # MODULE IMPORTS ############################## from flask import current_app, Blueprint, render_template, request, redirect from caesar_rest import oidc from caesar_rest.decorators import custom_require_login # Get logger #import logging #logger = logging.getLogger(__name__) from caes...
SKA-INAFREPO_NAMEcaesar-restPATH_START.@caesar-rest_extracted@caesar-rest-master@caesar_rest@index_route.py@.PATH_END.py
{ "filename": "plot_fastcc_lfi.py", "repo_name": "mpeel/fastcc", "repo_path": "fastcc_extracted/fastcc-master/plot_fastcc_lfi.py", "type": "Python" }
# Quick script to plot the LFI colour correction curve import matplotlib import matplotlib.pyplot as plt import numpy as np font = {'family' : 'normal', 'size' : 12} matplotlib.rc('font', **font) P30 = [1.00513, 0.00301399, -0.00300699, 28.4] P44 = [0.994769, 0.00596703, -0.00173626, 44.1] P70 = [0.989711,...
mpeelREPO_NAMEfastccPATH_START.@fastcc_extracted@fastcc-master@plot_fastcc_lfi.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.ternary", **kwargs ): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@_uirevision.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/hoverlabel/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.hoverlabel.font", **kwargs ): super(TextcaseValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@hoverlabel@font@_textcase.py@.PATH_END.py
{ "filename": "cauchy.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/scipy/stats/cauchy.py", "type": "Python" }
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@scipy@stats@cauchy.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/realaxis/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.smith.realaxis", **kwargs, ): super(ShowticksuffixValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@realaxis@_showticksuffix.py@.PATH_END.py
{ "filename": "rename_flux_txt.py", "repo_name": "HeloiseS/FUSS", "repo_path": "FUSS_extracted/FUSS-master/iraf_scripts/rename_flux_txt.py", "type": "Python" }
import os f1 = open('list_dat_flux', 'r') f2 = open('list_err_flux', 'r') for line in f1: name = line[:-23] ap = line [-11:-10] new_name = name+"_ap"+ap+".txt" os.system("mv "+line[:-1]+" "+new_name) #print new_name for line in f2: name = line[:-23] ap = line [-11:-10] new_name = name...
HeloiseSREPO_NAMEFUSSPATH_START.@FUSS_extracted@FUSS-master@iraf_scripts@rename_flux_txt.py@.PATH_END.py
{ "filename": "rawfiles.py", "repo_name": "plazar/TOASTER", "repo_path": "TOASTER_extracted/TOASTER-master/rawfiles.py", "type": "Python" }
#!/usr/bin/env python """ rawfiles.py A multi-purpose program to interact with rawfiles. Patrick Lazarus, Dec 8, 2012 """ import utils import database import errors toolkit = ['get_rawfile_id', \ 'load_rawfile', \ 'replace_rawfile', \ 'diagnose_rawfile', \ 'overlapping_r...
plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@rawfiles.py@.PATH_END.py
{ "filename": "test_default.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/simplejson/py2/simplejson/tests/test_default.py", "type": "Python" }
from unittest import TestCase import simplejson as json class TestDefault(TestCase): def test_default(self): self.assertEqual( json.dumps(type, default=repr), json.dumps(repr(type)))
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@simplejson@py2@simplejson@tests@test_default.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/visualization/tests/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@visualization@tests@__init__.py@.PATH_END.py
{ "filename": "test_Roman.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_SimulationAPI/test_ObservationConfig/test_Roman.py", "type": "Python" }
import unittest from lenstronomy.SimulationAPI.ObservationConfig.Roman import Roman from lenstronomy.SimulationAPI.observation_api import Instrument, SingleBand import lenstronomy.Util.util as util import os import astropy.io.fits as pyfits class TestRoman(unittest.TestCase): def setUp(self): self.F062 = ...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_SimulationAPI@test_ObservationConfig@test_Roman.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/c/README.md", "type": "Markdown" }
# TensorFlow Lite C API This directory contains C APIs for TensorFlow Lite. This includes C APIs for common types, like kernels and delegates, as well as an explicit C API for inference. ## Header summary Each public C header contains types and methods for specific uses: * `common.h` - Contains common C enums, ty...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@c@README.md@.PATH_END.py
{ "filename": "test_npy_pkg_config.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/distutils/tests/test_npy_pkg_config.py", "type": "Python" }
import os from numpy.distutils.npy_pkg_config import read_config, parse_flags from numpy.testing import temppath, assert_ simple = """\ [meta] Name = foo Description = foo lib Version = 0.1 [default] cflags = -I/usr/include libs = -L/usr/lib """ simple_d = {'cflags': '-I/usr/include', 'libflags': '-L/usr/lib', ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@distutils@tests@test_npy_pkg_config.py@.PATH_END.py
{ "filename": "tutorial-simple.ipynb", "repo_name": "danielkoll/tidally-locked-coordinates", "repo_path": "tidally-locked-coordinates_extracted/tidally-locked-coordinates-master/TL_coordinates/tutorial-simple.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline import numpy as np import matplotlib.pyplot as plt # import get_GCM_data import transform_to_TL_coordinates ``` ### Get GCM output data. ```python output = {'TS':'TS','CLDTOT':'CLDTOT','U':'U','V':'V'} state = get_GCM_data.get_GCM("./", ["GCMOutput.nc"], vars_list=output) ``` ### Now c...
danielkollREPO_NAMEtidally-locked-coordinatesPATH_START.@tidally-locked-coordinates_extracted@tidally-locked-coordinates-master@TL_coordinates@tutorial-simple.ipynb@.PATH_END.py
{ "filename": "_groups.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/_groups.py", "type": "Python" }
import _plotly_utils.basevalidators class GroupsValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="groups", parent_name="sankey.node", **kwargs): super(GroupsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@_groups.py@.PATH_END.py
{ "filename": "MyCasapy2bbs.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/SkyModel/MyCasapy2bbs.py", "type": "Python" }
#!/usr/bin/env python from __future__ import division, absolute_import, print_function from pyrap.tables import table from pyrap.images import image from SkyModel.Sky import ClassSM import optparse import numpy as np import glob import os from SkyModel.Other import reformat SaveFile="last_MyCasapy2BBS.obj" import pick...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@SkyModel@MyCasapy2bbs.py@.PATH_END.py
{ "filename": "rnn_test.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/rnn/rnn_test.py", "type": "Python" }
import numpy as np import pytest from keras.src import layers from keras.src import ops from keras.src import testing class OneStateRNNCell(layers.Layer): def __init__(self, units, state_size=None, **kwargs): super().__init__(**kwargs) self.units = units self.state_size = state_size if st...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@rnn@rnn_test.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(TickvalssrcValidator, self).__init__( p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@colorbar@_tickvalssrc.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "alibaba/TinyNeuralNetwork", "repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/setup.py", "type": "Python" }
import os import setuptools import subprocess from datetime import datetime try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements def get_sha(): try: return subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('ascii').strip() ...
alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@setup.py@.PATH_END.py
{ "filename": "test_mcs_adp.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/tests/test_mcs_adp.py", "type": "Python" }
""" Unit test for the lsl.common.mcsADP module. """ import os import unittest from datetime import datetime from lsl.common import mcsADP __version__ = "0.1" __author__ = "Jayce Dowell" class mcs_adp_tests(unittest.TestCase): """A unittest.TestCase collection of unit tests for the lsl.common.mcs modul...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_mcs_adp.py@.PATH_END.py
{ "filename": "ddp.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/DESI_ke/ddp.py", "type": "Python" }
import os import fitsio import numpy as np import matplotlib.pyplot as plt from astropy.table import Table from cosmo import volcom from scipy.interpolate import interp1d from findfile import findfile tmr_DDP1 = [-21.8, -20.1] tmr_DDP2 = [-20.6, -19.3] tmr_DDP...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@DESI_ke@ddp.py@.PATH_END.py
{ "filename": "test_svm_je281u.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/tests/hap/test_svm_je281u.py", "type": "Python" }
""" This module tests full pipeline SVM processing for an ACS WFC, full-frame, one filter dataset. """ import datetime import glob import os import pytest from drizzlepac.haputils import astroquery_utils as aqutils from drizzlepac import runsinglehap from astropy.io import fits, ascii from pathlib import Path """ ...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@tests@hap@test_svm_je281u.py@.PATH_END.py
{ "filename": "prop_dftidefs.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/falco/proper/prop_dftidefs.py", "type": "Python" }
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@proper@prop_dftidefs.py@.PATH_END.py
{ "filename": "PcBsB.py", "repo_name": "nickhand/pyRSD", "repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsd/power/gal/Pcs/PcBsB.py", "type": "Python" }
from .. import TwoHaloTerm, OneHaloTerm, DampedGalaxyPowerTerm class PcBsB_2h(TwoHaloTerm): """ The 2-halo term for `PcBsB` """ name = 'PcBsB_2h' def __init__(self, model): super(PcBsB_2h, self).__init__(model, 'b1_cB', 'b1_sB') class PcBsB_1h(OneHaloTerm): """ ...
nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsd@power@gal@Pcs@PcBsB.py@.PATH_END.py
{ "filename": "prior_dict.py", "repo_name": "bek0s/gbkfit", "repo_path": "gbkfit_extracted/gbkfit-master/src/gbkfit/fitting/prior/prior_dict.py", "type": "Python" }
import collections.abc import copy import numpy as np __all__ = [ 'PriorDict' ] class PriorDict(collections.abc.Mapping): def __init__(self, priors): self._priors = copy.deepcopy(priors) def __getitem__(self, key): return self._priors.__getitem__(key) def __iter__(self): ...
bek0sREPO_NAMEgbkfitPATH_START.@gbkfit_extracted@gbkfit-master@src@gbkfit@fitting@prior@prior_dict.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/heatmapgl/colorbar/_title.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "heatmapgl.colorbar" _path_str = "heatmapgl.colorbar.title" _valid_props = {"font", "side", "t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@heatmapgl@colorbar@_title.py@.PATH_END.py
{ "filename": "test_app.py", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/tests/test_app.py", "type": "Python" }
import pytest import numpy as np from astropy import units as u from astropy.wcs import WCS from specutils import Spectrum1D from jdaviz import Application, Specviz from jdaviz.configs.default.plugins.gaussian_smooth.gaussian_smooth import GaussianSmooth from jdaviz.utils import flux_conversion # This applies to all...
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@tests@test_app.py@.PATH_END.py
{ "filename": "msi.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/imagingbase/imagingbase/operators/msi.py", "type": "Python" }
import numpy as np from regpy.operators import Operator from MSI.MSDecomposition import WaveletTransform2D as msiWaveletTransform2D from MSI.MSDecomposition import DoG2D as msiDoG2D from MSI.MSMDDecomposition import DoG2D as msmdDoG2D from MSI.MSDictionaries import WTDictionary as msiWTDictionary from MSI.MSDictionar...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@imagingbase@imagingbase@operators@msi.py@.PATH_END.py
{ "filename": "los_distributions.py", "repo_name": "sibirrer/hierArc", "repo_path": "hierArc_extracted/hierArc-main/hierarc/Sampling/Distributions/los_distributions.py", "type": "Python" }
import numpy as np from hierarc.Util.distribution_util import PDFSampling from scipy.stats import genextreme class LOSDistribution(object): """Line of sight distribution drawing.""" def __init__( self, global_los_distribution=False, los_distributions=None, individual_distribut...
sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@hierarc@Sampling@Distributions@los_distributions.py@.PATH_END.py
{ "filename": "line_plot.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/visualization/line_plot.py", "type": "Python" }
from collections import defaultdict import numpy as np from matplotlib.colors import LogNorm, Normalize, SymLogNorm from yt.funcs import is_sequence, mylog from yt.units.unit_object import Unit # type: ignore from yt.units.yt_array import YTArray from yt.visualization.plot_container import ( BaseLinePlot, Pl...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@line_plot.py@.PATH_END.py
{ "filename": "provabgs_internal.ipynb", "repo_name": "changhoonhahn/provabgs", "repo_path": "provabgs_extracted/provabgs-main/nb/rug/provabgs_internal.ipynb", "type": "Jupyter Notebook" }
# run entire `provabgs` pipeline on fake observations generated using the pipeline This will serve as an internal test that the model and inference pipelines are working! ```python import os import numpy as np # --- plotting --- import corner as DFM import matplotlib as mpl import matplotlib.pyplot as plt #if 'NERS...
changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@nb@rug@provabgs_internal.ipynb@.PATH_END.py
{ "filename": "check_spect.py", "repo_name": "GeminiDRSoftware/GHOSTDR", "repo_path": "GHOSTDR_extracted/GHOSTDR-master/utils/check_spect.py", "type": "Python" }
#!/usr/bin/env python3 from __future__ import division, print_function import sys import astropy.io.fits as pf import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation class Plotter: def __init__(self, fname1, fname2): """ A class to handle the plotting and animation of...
GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@utils@check_spect.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/hoverlabel/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter3d.hoverlabel", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@hoverlabel@_bgcolor.py@.PATH_END.py
{ "filename": "jupyter.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-core/py2/jupyter.py", "type": "Python" }
"""Launch the root jupyter command""" if __name__ == '__main__': from jupyter_core.command import main main()
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-core@py2@jupyter.py@.PATH_END.py
{ "filename": "plot_photometry.py", "repo_name": "skypyproject/skypy", "repo_path": "skypy_extracted/skypy-main/examples/galaxies/plot_photometry.py", "type": "Python" }
""" Optical Photometry ================== This example demonstrates how to model galaxy photometric magnitudes using the kcorrect spectral energy distribution templates as implemented in SkyPy. """ # %% # kcorrect Spectral Templates # --------------------------- # # In SkyPy, the rest-frame spectral energy distribut...
skypyprojectREPO_NAMEskypyPATH_START.@skypy_extracted@skypy-main@examples@galaxies@plot_photometry.py@.PATH_END.py
{ "filename": "test_csharp.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/document_loaders/parsers/language/test_csharp.py", "type": "Python" }
import unittest import pytest from langchain_community.document_loaders.parsers.language.csharp import CSharpSegmenter @pytest.mark.requires("tree_sitter", "tree_sitter_languages") class TestCSharpSegmenter(unittest.TestCase): def setUp(self) -> None: self.example_code = """namespace World { } class He...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@document_loaders@parsers@language@test_csharp.py@.PATH_END.py
{ "filename": "Multiple Responses.ipynb", "repo_name": "lee-group-cmu/RFCDE", "repo_path": "RFCDE_extracted/RFCDE-master/python/vignettes/Multiple Responses.ipynb", "type": "Jupyter Notebook" }
```python import rfcde import numpy as np import matplotlib.pyplot as plt ``` /usr/lib/python3.6/site-packages/statsmodels/compat/pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead. from pandas.core...
lee-group-cmuREPO_NAMERFCDEPATH_START.@RFCDE_extracted@RFCDE-master@python@vignettes@Multiple Responses.ipynb@.PATH_END.py
{ "filename": "_rotation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/_rotation.py", "type": "Python" }
import _plotly_utils.basevalidators class RotationValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="rotation", parent_name="pie", **kwargs): super(RotationValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@_rotation.py@.PATH_END.py
{ "filename": "_borderwidth.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/colorbar/_borderwidth.py", "type": "Python" }
import _plotly_utils.basevalidators class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="icicle.marker.colorbar", **kwargs ): super(BorderwidthValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@colorbar@_borderwidth.py@.PATH_END.py
{ "filename": "colormaps.py", "repo_name": "jiffyclub/palettable", "repo_path": "palettable_extracted/palettable-master/palettable/cmocean/colormaps.py", "type": "Python" }
""" Color maps from Kristen Thyng's cmocean package Learn more at https://github.com/matplotlib/cmocean and view the cmocean license at https://github.com/matplotlib/cmocean/blob/master/LICENSE.txt. """ _ALGAE = [ [215, 249, 208], [214, 248, 206], [212, 247, 205], [211, 246, 203], [210, 245, 202],...
jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@palettable@cmocean@colormaps.py@.PATH_END.py
{ "filename": "_arrayminus.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_x/_arrayminus.py", "type": "Python" }
import _plotly_utils.basevalidators class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scattergl.error_x", **kwargs ): super(ArrayminusValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_x@_arrayminus.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/python/__init__.py", "type": "Python" }
from typing import Any def __getattr__(name: str = "") -> Any: raise AttributeError( "This tool has been moved to langchain experiment. " "This tool has access to a python REPL. " "For best practices make sure to sandbox this tool. " "Read https://github.com/langchain-ai/langchain/...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@python@__init__.py@.PATH_END.py
{ "filename": "csv_logger.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/callbacks/csv_logger.py", "type": "Python" }
import collections import csv import numpy as np from keras.src.api_export import keras_export from keras.src.callbacks.callback import Callback from keras.src.utils import file_utils @keras_export("keras.callbacks.CSVLogger") class CSVLogger(Callback): """Callback that streams epoch results to a CSV file. ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@callbacks@csv_logger.py@.PATH_END.py
{ "filename": "PreFittedModify.py", "repo_name": "yaolun/Her_line_fit", "repo_path": "Her_line_fit_extracted/Her_line_fit-master/PreFittedModify.py", "type": "Python" }
def PreFittingModify(indir, outdir, obs): # to avoid X server error import matplotlib as mpl mpl.use('Agg') from astropy.io import ascii import matplotlib.pyplot as plt import numpy as np import os # modify outdir # outdir = outdir+obs[0]+'/data/' if not os.path.isdir(outdir): ...
yaolunREPO_NAMEHer_line_fitPATH_START.@Her_line_fit_extracted@Her_line_fit-master@PreFittedModify.py@.PATH_END.py
{ "filename": "yolo-world.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/models/yolo-world.md", "type": "Markdown" }
--- comments: true description: Explore the YOLO-World Model for efficient, real-time open-vocabulary object detection using Ultralytics YOLOv8 advancements. Achieve top performance with minimal computation. keywords: YOLO-World, Ultralytics, open-vocabulary detection, YOLOv8, real-time object detection, machine learni...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@models@yolo-world.md@.PATH_END.py
{ "filename": "example_gs_multipop.ipynb", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/docs/examples/example_gs_multipop.ipynb", "type": "Jupyter Notebook" }
# Models with Multiple Source Populations *ARES* can handle an arbitrary number of source populations. To access this functionality, create a dictionary representing each source population of interest. Below, we'll create a population representative of PopII stars and another representative of PopIII stars. Before we...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@docs@examples@example_gs_multipop.ipynb@.PATH_END.py
{ "filename": "Explorer.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/Explorer.py", "type": "Python" }
import numpy as numpy from threading import Thread from .Engine import Engine from .Formatter import formatter as fmt from . import Tools __author__ = "Do Kester" __year__ = 2023 __license__ = "GPL3" __version__ = "3.2.0" __url__ = "https://www.bayesicfitting.nl" __status__ = "Perpetual Beta" # * # * This file is ...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@Explorer.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/display/__init__.py", "type": "Python" }
# gempy.display.__init__.py # Intended to interface as much like imexam as possible from . import connection connect = connection.Connect
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@display@__init__.py@.PATH_END.py
{ "filename": "ebosscolorz.py", "repo_name": "imcgreer/simqso", "repo_path": "simqso_extracted/simqso-master/sdss/ebosscolorz.py", "type": "Python" }
#!/usr/bin/env python import os,sys from copy import deepcopy from collections import defaultdict import numpy as np from scipy.stats import binned_statistic import matplotlib.pyplot as plt from matplotlib import ticker from astropy.table import Table,hstack from simqso import sqgrids as grids import ebosscore import...
imcgreerREPO_NAMEsimqsoPATH_START.@simqso_extracted@simqso-master@sdss@ebosscolorz.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "test_matfuncs.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/linalg/tests/test_matfuncs.py", "type": "Python" }
# # Created by: Pearu Peterson, March 2002 # """ Test functions for scipy.linalg._matfuncs module """ import math import numpy as np from numpy import array, eye, exp, random from numpy.linalg import matrix_power from numpy.testing import ( assert_allclose, assert_, assert_array_almost_equal, assert_equal, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@linalg@tests@test_matfuncs.py@.PATH_END.py
{ "filename": "_cmax.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/line/_cmax.py", "type": "Python" }
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterpolargl.marker.line", **kwargs ): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@line@_cmax.py@.PATH_END.py
{ "filename": "00bMakeDir.py", "repo_name": "MehrnooshTahani/MappingBLOS_MolecularClouds", "repo_path": "MappingBLOS_MolecularClouds_extracted/MappingBLOS_MolecularClouds-master/MolecularClouds/00bMakeDir.py", "type": "Python" }
""" This is the zeroth stage of the BLOSMapping method where the necessary directories are made - When run, the file will ask for the name of a region of interest. It will then check to see of this region of interest has a folder yet, if not it will make the needed folders and sub-folders. """ import os impor...
MehrnooshTahaniREPO_NAMEMappingBLOS_MolecularCloudsPATH_START.@MappingBLOS_MolecularClouds_extracted@MappingBLOS_MolecularClouds-master@MolecularClouds@00bMakeDir.py@.PATH_END.py
{ "filename": "population_model.py", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/code/population_model.py", "type": "Python" }
import numpyro import numpyro.distributions as dist import jax import jax.numpy as jnp from jax.scipy.special import erf,erfinv from jax import vmap import numpy as np import astropy.units as u from astropy.cosmology import Planck15,z_at_value from interpax import interp1d logit_std = 2.5 tmp_max = 100. tmp_min = 2. ...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@code@population_model.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/bar/marker/colorbar/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._tickfont import Tickfont from ._tickformatstop import Tickformatstop from ._title import Title from . import title else: from _plotly_utils.importers import relative_import __all__, __getattr__, _...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@bar@marker@colorbar@__init__.py@.PATH_END.py
{ "filename": "test_utilities.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-aws/tests/test_utilities.py", "type": "Python" }
import pytest from prefect_aws.utilities import ( assemble_document_for_patches, ensure_path_exists, hash_collection, ) class TestHashCollection: def test_simple_dict(self): simple_dict = {"key1": "value1", "key2": "value2"} assert hash_collection(simple_dict) == hash_collection( ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-aws@tests@test_utilities.py@.PATH_END.py
{ "filename": "math_ops.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/framework/experimental/math_ops.py", "type": "Python" }
# Copyright 2020 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@framework@experimental@math_ops.py@.PATH_END.py
{ "filename": "esa.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/themis/spacecraft/particles/esa.py", "type": "Python" }
from pyspedas.projects.themis.load import load import pytplot def esa(trange=['2007-03-23', '2007-03-24'], probe='c', level='l2', suffix='', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, ...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@themis@spacecraft@particles@esa.py@.PATH_END.py
{ "filename": "qso_number_counts_metric.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/metrics/qso_number_counts_metric.py", "type": "Python" }
__all__ = ("QSONumberCountsMetric",) import os import healpy as hp import numpy as np from rubin_scheduler.data import get_data_dir from scipy import interpolate from .base_metric import BaseMetric from .exgal_m5 import ExgalM5 class QSONumberCountsMetric(BaseMetric): """Calculate the number of quasars expecte...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@metrics@qso_number_counts_metric.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcoords/dimension/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="parcoords.dimension", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcoords@dimension@_tickvalssrc.py@.PATH_END.py
{ "filename": "_familysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/hoverlabel/font/_familysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@hoverlabel@font@_familysrc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mbursa/sim5", "repo_path": "sim5_extracted/sim5-master/__init__.py", "type": "Python" }
from .python.sim5lib import * from .python.sim5diskmodel import * from .python.sim5diskspectrum import * from .python.sim5diskraytrace import * from .python.sim5fitstable import *
mbursaREPO_NAMEsim5PATH_START.@sim5_extracted@sim5-master@__init__.py@.PATH_END.py