metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "cacheprovider.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/pytest/py3/_pytest/cacheprovider.py", "type": "Python" }
"""Implementation of the cache provider.""" # This plugin was not named "cache" to avoid conflicts with the external # pytest-cache version. import dataclasses import json import os from pathlib import Path from typing import Dict from typing import Generator from typing import Iterable from typing import List from typ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pytest@py3@_pytest@cacheprovider.py@.PATH_END.py
{ "filename": "RKCoefficients.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/RK/RKCoefficients.py", "type": "Python" }
#------------------------------------------------------------------------------- # RKCoefficients #------------------------------------------------------------------------------- from PYB11Generator import * @PYB11template("Dimension") class RKCoefficients: "Carries the RK correction coefficients around" PYB1...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@RK@RKCoefficients.py@.PATH_END.py
{ "filename": "_densitymapbox.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_densitymapbox.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Densitymapbox(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "densitymapbox" _valid_props = { "autocolorscale", "below", "coloraxis", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_densitymapbox.py@.PATH_END.py
{ "filename": "fig_discrim_func_N7.py", "repo_name": "rhdtownsend/gyre", "repo_path": "gyre_extracted/gyre-master/docs/source/user-guide/numerical-methods/fig_discrim_func_N7.py", "type": "Python" }
#!/usr/bin/env python # # Discriminant function plot # Imports import matplotlib.pyplot as plt import matplotlib.ticker as tkr import numpy as np import numpy.linalg as la from colors import * # Plot settings plt.style.use('web.mplstyle') # Calculation & plot parameters N = 7 M = 1000 sigma_min = 0 sigma_max = ...
rhdtownsendREPO_NAMEgyrePATH_START.@gyre_extracted@gyre-master@docs@source@user-guide@numerical-methods@fig_discrim_func_N7.py@.PATH_END.py
{ "filename": "parameters.py", "repo_name": "CASTOR-telescope/ETC", "repo_path": "ETC_extracted/ETC-master/castor_etc/parameters.py", "type": "Python" }
""" Contains parameters for CASTOR imaging chain. --- GNU General Public License v3 (GNU GPLv3) (c) 2022. (c) 2022. Government of Canada Gouvernement du Canada National Research Council Conseil national de recherches Ottawa, Canada, K1A 0R6 O...
CASTOR-telescopeREPO_NAMEETCPATH_START.@ETC_extracted@ETC-master@castor_etc@parameters.py@.PATH_END.py
{ "filename": "jinachat.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chat_models/jinachat.py", "type": "Python" }
"""JinaChat wrapper.""" from __future__ import annotations import logging from typing import ( Any, AsyncIterator, Callable, Dict, Iterator, List, Mapping, Optional, Tuple, Type, Union, ) from langchain_core.callbacks import ( AsyncCallbackManagerForLLMRun, Callbac...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chat_models@jinachat.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/CarpetX_z4c/__init__.py", "type": "Python" }
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@CarpetX_z4c@__init__.py@.PATH_END.py
{ "filename": "_byteordercodes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/io/matlab/_byteordercodes.py", "type": "Python" }
''' Byteorder utilities for system - numpy byteorder encoding Converts a variety of string codes for little endian, big endian, native byte order and swapped byte order to explicit NumPy endian codes - one of '<' (little endian) or '>' (big endian) ''' import sys __all__ = [ 'aliases', 'native_code', 'swapped_co...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@io@matlab@_byteordercodes.py@.PATH_END.py
{ "filename": "MspImagePlugin.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py2/PIL/MspImagePlugin.py", "type": "Python" }
# # The Python Imaging Library. # # MSP file handling # # This is the format used by the Paint program in Windows 1 and 2. # # History: # 95-09-05 fl Created # 97-01-03 fl Read/write MSP images # 17-02-21 es Fixed RLE interpretation # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fr...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py2@PIL@MspImagePlugin.py@.PATH_END.py
{ "filename": "api.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/fields/api.py", "type": "Python" }
# from . import species_fields from . import ( angular_momentum, astro_fields, cosmology_fields, fluid_fields, fluid_vector_fields, geometric_fields, local_fields, magnetic_field, my_plugin_fields, particle_fields, vector_operations, ) from .derived_field import ( Derived...
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@api.py@.PATH_END.py
{ "filename": "finder.py", "repo_name": "FRBs/FRB", "repo_path": "FRB_extracted/FRB-main/frb/figures/finder.py", "type": "Python" }
""" Module for generating a finder chart """ import os import numpy as np from IPython import embed from matplotlib import pyplot as plt from matplotlib import font_manager import matplotlib.cm as cm from PIL import Image from astropy import units from astropy.visualization.wcsaxes import SphericalCircle from astro...
FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@frb@figures@finder.py@.PATH_END.py
{ "filename": "example.ipynb", "repo_name": "danhey/echelle", "repo_path": "echelle_extracted/echelle-master/example.ipynb", "type": "Jupyter Notebook" }
```python import echelle import matplotlib.pyplot as plt import numpy as np import lightkurve as lk ``` ```python # np.savetxt('bla.txt', list(zip(frequency, amplitude))) frequency, amplitude = np.loadtxt('bla.txt').T ``` ```python c = echelle.interact_echelle(frequency, amplitude, 0.5, 2, ...
danheyREPO_NAMEechellePATH_START.@echelle_extracted@echelle-master@example.ipynb@.PATH_END.py
{ "filename": "using_data_readers.md", "repo_name": "CHIMEFRB/fitburst", "repo_path": "fitburst_extracted/fitburst-main/docs/usage/using_data_readers.md", "type": "Markdown" }
The `fitburst` codebase uses a `DataReader` object for the following purposes: 1. to ensure that all attributes necessary for downstream analysis are initialized; 2. to provide methods for normalizing and (incoherently) dedispersing the input spectrum, if necessary; 3. to allow for experiment-specific modularity in pi...
CHIMEFRBREPO_NAMEfitburstPATH_START.@fitburst_extracted@fitburst-main@docs@usage@using_data_readers.md@.PATH_END.py
{ "filename": "astro_fields.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/fields/astro_fields.py", "type": "Python" }
import numpy as np from .derived_field import ValidateParameter from .field_plugin_registry import register_field_plugin from .vector_operations import create_magnitude_field @register_field_plugin def setup_astro_fields(registry, ftype="gas", slice_info=None): unit_system = registry.ds.unit_system pc = regi...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@fields@astro_fields.py@.PATH_END.py
{ "filename": "cr_reject.py", "repo_name": "msiebert1/UCSC_spectral_pipeline", "repo_path": "UCSC_spectral_pipeline_extracted/UCSC_spectral_pipeline-master/spectral_reduction/cr_reject.py", "type": "Python" }
from astropy.io import fits import numpy as np import matplotlib.pyplot as plt import copy import glob import scipy.stats as stats def undo_sky_rejects(masked_data, original_data, tol=100): num_nan_arr = [] for i, row in enumerate(masked_data): num_nan = len(np.isnan(row)[np.isnan(row)==True]) ...
msiebert1REPO_NAMEUCSC_spectral_pipelinePATH_START.@UCSC_spectral_pipeline_extracted@UCSC_spectral_pipeline-master@spectral_reduction@cr_reject.py@.PATH_END.py
{ "filename": "_fixedrange.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/carpet/aaxis/_fixedrange.py", "type": "Python" }
import _plotly_utils.basevalidators class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="carpet.aaxis", **kwargs): super(FixedrangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@carpet@aaxis@_fixedrange.py@.PATH_END.py
{ "filename": "presets.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/references/depth/stereo/presets.py", "type": "Python" }
from typing import Optional, Tuple, Union import torch import transforms as T class StereoMatchingEvalPreset(torch.nn.Module): def __init__( self, mean: float = 0.5, std: float = 0.5, resize_size: Optional[Tuple[int, ...]] = None, max_disparity: Optional[float] = None, ...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@depth@stereo@presets.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/histogram/_legendrank.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="histogram", **kwargs): super(LegendrankValidator, 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@histogram@_legendrank.py@.PATH_END.py
{ "filename": "_center.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/geo/_center.py", "type": "Python" }
import _plotly_utils.basevalidators class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="center", parent_name="layout.geo", **kwargs): super(CenterValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@geo@_center.py@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/candlestick/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="candlestick.stream", **kwargs ): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@candlestick@stream@_maxpoints.py@.PATH_END.py
{ "filename": "read_from_lasair.py", "repo_name": "daniel-muthukrishna/astrorapid", "repo_path": "astrorapid_extracted/astrorapid-master/read_from_lasair.py", "type": "Python" }
import numpy as np from collections import OrderedDict import json from six.moves.urllib.request import urlopen from astroquery.irsa_dust import IrsaDust import astropy.coordinates as coord import astropy.units as u from astrorapid.classify import Classify from astrorapid.helpers import delete_indexes, convert_lists_...
daniel-muthukrishnaREPO_NAMEastrorapidPATH_START.@astrorapid_extracted@astrorapid-master@read_from_lasair.py@.PATH_END.py
{ "filename": "plot_test_fn.py", "repo_name": "exoclime/THOR", "repo_path": "THOR_extracted/THOR-main/mjolnir/plot_test_fn.py", "type": "Python" }
#---- Runs through a subset of simulations to test functionality of plot code - #---- code by Russell Deitrick ------------------------------------------------ # to do: add a sync rot with pbl case # add hd 189 w/ and w/o full g # add W43 w/ HELIOS # clean up (delete unused output files or don't o...
exoclimeREPO_NAMETHORPATH_START.@THOR_extracted@THOR-main@mjolnir@plot_test_fn.py@.PATH_END.py
{ "filename": "box_inequalities.py", "repo_name": "stephane-caron/qpsolvers", "repo_path": "qpsolvers_extracted/qpsolvers-main/examples/box_inequalities.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # SPDX-License-Identifier: LGPL-3.0-or-later # Copyright 2016-2022 Stéphane Caron and the qpsolvers contributors """Test an available QP solvers on a small problem with box inequalities.""" import random from time import perf_counter import numpy as np from qpsolvers ...
stephane-caronREPO_NAMEqpsolversPATH_START.@qpsolvers_extracted@qpsolvers-main@examples@box_inequalities.py@.PATH_END.py
{ "filename": "noise-color-kasdin.py", "repo_name": "aewallin/allantools", "repo_path": "allantools_extracted/allantools-master/examples/noise-color-kasdin.py", "type": "Python" }
#!/usr/bin/env python # import numpy as np import matplotlib.pyplot as plt import allantools as at import math # note that latex requires e.g. a texlive installation and dvipng plt.rc('text', usetex=True) # for latex plt.rc('font', family='serif') """ colorednoise example with phase-PSD, frequency-PSD, and ADEV/MDE...
aewallinREPO_NAMEallantoolsPATH_START.@allantools_extracted@allantools-master@examples@noise-color-kasdin.py@.PATH_END.py
{ "filename": "mlflow.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chat_models/mlflow.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.chat_models.mlflow import ChatMlflow # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chat_models@mlflow.py@.PATH_END.py
{ "filename": "test_count.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/methods/test_count.py", "type": "Python" }
from pandas import ( DataFrame, Series, ) import pandas._testing as tm class TestDataFrameCount: def test_count(self): # corner case frame = DataFrame() ct1 = frame.count(1) assert isinstance(ct1, Series) ct2 = frame.count(0) assert isinstance(ct2, Series) ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@methods@test_count.py@.PATH_END.py
{ "filename": "test_de.py", "repo_name": "dfm/emcee", "repo_path": "emcee_extracted/emcee-main/src/emcee/tests/integration/test_de.py", "type": "Python" }
# -*- coding: utf-8 -*- from emcee import moves from .test_proposal import _test_normal, _test_uniform __all__ = ["test_normal_de", "test_normal_de_no_gamma", "test_uniform_de"] def test_normal_de(**kwargs): _test_normal(moves.DEMove(), **kwargs) def test_normal_de_no_gamma(**kwargs): _test_normal(moves....
dfmREPO_NAMEemceePATH_START.@emcee_extracted@emcee-main@src@emcee@tests@integration@test_de.py@.PATH_END.py
{ "filename": "info_ga.py", "repo_name": "pavolgaj/OCFit", "repo_path": "OCFit_extracted/OCFit-master/OCFit/info_ga.py", "type": "Python" }
# -*- coding: utf-8 -*- #class for statistics about GA or DE fitting #version 0.2.1 #update: 22.6.2022 # (c) Pavol Gajdos, 2018 - 2022 from pickle import load import numpy as np try: import matplotlib.pyplot as mpl except: #import on server without graphic output import matplotlib matplotlib.use('Agg',f...
pavolgajREPO_NAMEOCFitPATH_START.@OCFit_extracted@OCFit-master@OCFit@info_ga.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/surface/hoverlabel/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@hoverlabel@__init__.py@.PATH_END.py
{ "filename": "straighten.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/src/eureka/S3_data_reduction/straighten.py", "type": "Python" }
import numpy as np from ..lib import smooth from . import plots_s3 def find_column_median_shifts(data, meta, m): '''Takes the median frame (in time) and finds the center of mass (COM) in pixels for each column. It then returns the needed shift to apply to each column to bring the COM to the center Pa...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@S3_data_reduction@straighten.py@.PATH_END.py
{ "filename": "recipe_register.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/igrins/igrins_recipes/recipe_register.py", "type": "Python" }
from ..pipeline.steps import Step from ..procedures.sky_spec import (_make_combined_image_sky, extract_spectra) from ..procedures.procedures_register import (identify_orders, identify_lines, ...
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@igrins_recipes@recipe_register.py@.PATH_END.py
{ "filename": "info.py", "repo_name": "sfarrens/sf_deconvolve", "repo_path": "sf_deconvolve_extracted/sf_deconvolve-master/sf_deconvolve_lib/info.py", "type": "Python" }
# -*- coding: utf-8 -*- """SF_DECONVOLVE PACKAGE INFO This module provides some basic information about the sf_deconvolve package. :Author: Samuel Farrens <samuel.farrens@cea.fr> :Version: 5.0.0 """ # Package Version version_info = (5, 0, 0) __version__ = '.'.join(str(c) for c in version_info) __about__ = ('sf_d...
sfarrensREPO_NAMEsf_deconvolvePATH_START.@sf_deconvolve_extracted@sf_deconvolve-master@sf_deconvolve_lib@info.py@.PATH_END.py
{ "filename": "_uirevision.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/_uirevision.py", "type": "Python" }
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="densitymapbox", **kwargs): super(UirevisionValidator, 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@densitymapbox@_uirevision.py@.PATH_END.py
{ "filename": "kepclean.py", "repo_name": "KeplerGO/PyKE", "repo_path": "PyKE_extracted/PyKE-master/pyke/kepclean.py", "type": "Python" }
from .utils import PyKEArgumentHelpFormatter from . import kepio, kepmsg, kepkey import numpy as np from astropy.io import fits as pyfits __all__ = ['kepclean'] def kepclean(infile, outfile=None, zero=True, overwrite=False, verbose=False, logfile='kepclean.log'): """ Remove NaN values from a kepl...
KeplerGOREPO_NAMEPyKEPATH_START.@PyKE_extracted@PyKE-master@pyke@kepclean.py@.PATH_END.py
{ "filename": "test_likelihood.ipynb", "repo_name": "substellar/brewster", "repo_path": "brewster_extracted/brewster-master/test_likelihood.ipynb", "type": "Jupyter Notebook" }
```python import multiprocessing import time import numpy as np import scipy as sp import emcee import testkit import ciamod import settings import os import gc import sys import pickle from scipy.io.idl import readsav from scipy import interpolate from scipy.interpolate import interp1d from scipy.interpolate import In...
substellarREPO_NAMEbrewsterPATH_START.@brewster_extracted@brewster-master@test_likelihood.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/__init__.py", "type": "Python" }
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@__init__.py@.PATH_END.py
{ "filename": "search_old.py", "repo_name": "hposborn/MonoTools", "repo_path": "MonoTools_extracted/MonoTools-main/MonoTools/search_old.py", "type": "Python" }
# # Let's use this python script to: # - perform transit "Quick fit" # - Search for dips in a lightcurve which match that detected # - Search for secondaries # - Perform quick/dirty EB modelling # import numpy as np import pandas as pd import pickle import os import glob from copy import deepcopy from datetime impor...
hposbornREPO_NAMEMonoToolsPATH_START.@MonoTools_extracted@MonoTools-main@MonoTools@search_old.py@.PATH_END.py
{ "filename": "_ids.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/_ids.py", "type": "Python" }
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="isosurface", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@_ids.py@.PATH_END.py
{ "filename": "_minallowed.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/_minallowed.py", "type": "Python" }
import _plotly_utils.basevalidators class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.xaxis", **kwargs ): super(MinallowedValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@_minallowed.py@.PATH_END.py
{ "filename": "actionAngleInverse.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/actionAngle/actionAngleInverse.py", "type": "Python" }
############################################################################### # actionAngleInverse.py: top-level class with common routines for inverse # actionAngle methods ############################################################################### from ..util.conversion import ( actio...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@actionAngle@actionAngleInverse.py@.PATH_END.py
{ "filename": "grammar_notation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py", "type": "Python" }
""" pygments.lexers.grammar_notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for grammar notations like BNF. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups, include, this, using, words ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@grammar_notation.py@.PATH_END.py
{ "filename": "test_param_clippers.py", "repo_name": "ArgonneCPAC/diffstar", "repo_path": "diffstar_extracted/diffstar-main/diffstar/fitting_helpers/tests/test_param_clippers.py", "type": "Python" }
""" """ import numpy as np from jax import random as jran from ...kernels.main_sequence_kernels import ( MS_PARAM_BOUNDS_PDICT, _get_bounded_sfr_params_vmap, _get_unbounded_sfr_params_vmap, ) from ...kernels.quenching_kernels import ( Q_PARAM_BOUNDS_PDICT, _get_bounded_q_params_vmap, _get_unbou...
ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@diffstar@fitting_helpers@tests@test_param_clippers.py@.PATH_END.py
{ "filename": "utf_16_le.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/encodings/utf_16_le.py", "type": "Python" }
""" Python 'utf-16-le' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_le_encode def decode(input, errors='strict'): return codecs.utf_16_le_decode(input, errors, True) class IncrementalEncod...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@encodings@utf_16_le.py@.PATH_END.py
{ "filename": "example3.ipynb", "repo_name": "astroCV/astroCV", "repo_path": "astroCV_extracted/astroCV-master/galaxy_detection/example3.ipynb", "type": "Jupyter Notebook" }
```python #Basic AstroCV example 3 #Detect galaxies in online images #Optimal image ratio = 4:3 (ratio of traning images) #Detects galaxies in online images, then crops them so they have a 4:3 ratio, and compares number of galaxies detected in the cropped zone import sys import pyyolo import numpy as np from PIL...
astroCVREPO_NAMEastroCVPATH_START.@astroCV_extracted@astroCV-master@galaxy_detection@example3.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "danielemichilli/SpS", "repo_path": "SpS_extracted/SpS-master/sps/__init__.py", "type": "Python" }
name = "sps"
danielemichilliREPO_NAMESpSPATH_START.@SpS_extracted@SpS-master@sps@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._yref import YrefValidator from ._ypad import YpadValidator from ._yanchor import YanchorValidator from ._y import YValidator from ._xref import XrefValidator from ._xpad import XpadValidator fr...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@__init__.py@.PATH_END.py
{ "filename": "_dtick.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/radialaxis/_dtick.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.polar.radialaxis", **kwargs ): super(DtickValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@radialaxis@_dtick.py@.PATH_END.py
{ "filename": "scripts.py", "repo_name": "StingraySoftware/stingray", "repo_path": "stingray_extracted/stingray-main/stingray/modeling/scripts.py", "type": "Python" }
import numpy as np from astropy.modeling import models from stingray.modeling import PSDParEst, PSDPosterior, PSDLogLikelihood from stingray.modeling import GaussianPosterior, GaussianLogLikelihood from stingray import Powerspectrum __all__ = ["fit_powerspectrum", "fit_crossspectrum", "fit_lorentzians"] def fit_pow...
StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@modeling@scripts.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="histogram2d", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_stream.py@.PATH_END.py
{ "filename": "transform.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/scipy/spatial/transform.py", "type": "Python" }
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@spatial@transform.py@.PATH_END.py
{ "filename": "Fluctuations.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/static/Fluctuations.py", "type": "Python" }
""" FluctuatingBackground.py Author: Jordan M_brocha Affiliation: UCLA Created on: Mon Oct 10 14:29:54 PDT 2016 Description: """ import numpy as np from math import factorial from ..physics import Cosmology from ..util import ParameterFile from ..util.Stats import bin_c2e from scipy.special import erfinv from scip...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@static@Fluctuations.py@.PATH_END.py
{ "filename": "write_icfile.py", "repo_name": "meyeralexj/gubas", "repo_path": "gubas_extracted/gubas-master/write_icfile.py", "type": "Python" }
import scipy.integrate as integ import scipy.io as io # import matplotlib.pyplot as plots # from mpl_toolkits.mplot3d import Axes3D # import matplotlib.tri as mtri # from matplotlib import animation import numpy as np import random as rnd from numpy import linalg as la from numpy import math as ma import subprocess # ...
meyeralexjREPO_NAMEgubasPATH_START.@gubas_extracted@gubas-master@write_icfile.py@.PATH_END.py
{ "filename": "test_news.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/tests/test_news.py", "type": "Python" }
r""" Tests for news results Author: Chad Fulton License: BSD-3 """ from statsmodels.compat.pandas import ( FUTURE_STACK, assert_frame_equal, assert_series_equal, ) import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal import pandas as pd import pytest from statsmodels import...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@tests@test_news.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@colorbar@title@font@__init__.py@.PATH_END.py
{ "filename": "hdu_table.py", "repo_name": "cta-observatory/cta-lstchain", "repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/high_level/hdu_table.py", "type": "Python" }
""" Module containing functions to create DL3 event lists and DL3 index files, following recommendations from GADF v0.3 For reference to the documentation of GADF v0.3 follow various sections in, https://gamma-astro-data-formats.readthedocs.io/en/latest/ """ import logging import os import astropy.units as u import ...
cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@high_level@hdu_table.py@.PATH_END.py
{ "filename": "_thicknessmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymap/colorbar/_thicknessmode.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="densitymap.colorbar", **kwargs ): super(ThicknessmodeValidator, self).__init__( plotly_name=plotly_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymap@colorbar@_thicknessmode.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/matrixlib/setup.py", "type": "Python" }
#!/usr/bin/env python3 def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('matrixlib', parent_package, top_path) config.add_subpackage('tests') config.add_data_files('*.pyi') return config if __name__ == "__main__": fr...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@matrixlib@setup.py@.PATH_END.py
{ "filename": "colordata.py", "repo_name": "jiffyclub/palettable", "repo_path": "palettable_extracted/palettable-master/palettable/plotly/colordata.py", "type": "Python" }
""" Color maps from Plotly package Learn more at https://github.com/plotly/plotly.py and view the MIT license at https://github.com/plotly/plotly.py/blob/master/LICENSE.txt """ PLOTLY = [ (99, 110, 250), (239, 85, 59), (0, 204, 150), (171, 99, 250), (255, 161, 90), (25, 211, 243), (255, 10...
jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@palettable@plotly@colordata.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/numpy/core.py", "type": "Python" }
import builtins import contextlib import functools import warnings import numpy as np from keras.src import tree from keras.src.backend.common import KerasVariable from keras.src.backend.common import standardize_dtype from keras.src.backend.common.backend_utils import slice_along_axis from keras.src.backend.common.d...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@numpy@core.py@.PATH_END.py
{ "filename": "_lenmode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py", "type": "Python" }
import _plotly_utils.basevalidators class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(LenmodeValidator, self).__init__( plotly_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@marker@colorbar@_lenmode.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/socs", "repo_path": "socs_extracted/socs-main/socs/agents/hwp_pid/drivers/__init__.py", "type": "Python" }
simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@hwp_pid@drivers@__init__.py@.PATH_END.py
{ "filename": "MOFF_testing_MWA.py", "repo_name": "epic-astronomy/EPIC", "repo_path": "EPIC_extracted/EPIC-master/main/MOFF_testing_MWA.py", "type": "Python" }
import datetime as DT import numpy as NP import matplotlib.pyplot as PLT import matplotlib.colors as PLTC import scipy.constants as FCNST import antenna_array as AA import geometry as GEOM import sim_observe as SIM import ipdb as PDB itr = 1 # Antenna initialization lat = -26.701 # Latitude of MWA in degrees f0 = 15...
epic-astronomyREPO_NAMEEPICPATH_START.@EPIC_extracted@EPIC-master@main@MOFF_testing_MWA.py@.PATH_END.py
{ "filename": "_partial_dependence.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/inspection/_partial_dependence.py", "type": "Python" }
"""Partial dependence plots for regression and classification models.""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import warnings from collections.abc import Iterable import numpy as np from scipy import sparse from scipy.stats.mstats import mquantiles from ..base import is_cla...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@inspection@_partial_dependence.py@.PATH_END.py
{ "filename": "realistic_continents_fixed_sst_test_case.py", "repo_name": "ExeClim/Isca", "repo_path": "Isca_extracted/Isca-master/exp/test_cases/realistic_continents/realistic_continents_fixed_sst_test_case.py", "type": "Python" }
import os import numpy as np import f90nml from isca import IscaCodeBase, DiagTable, Experiment, Namelist, GFDL_BASE NCORES = 4 base_dir = os.path.dirname(os.path.realpath(__file__)) # a CodeBase can be a directory on the computer, # useful for iterative development cb = IscaCodeBase.from_directory(GFDL_BASE) # or...
ExeClimREPO_NAMEIscaPATH_START.@Isca_extracted@Isca-master@exp@test_cases@realistic_continents@realistic_continents_fixed_sst_test_case.py@.PATH_END.py
{ "filename": "RELEASE_NOTES.md", "repo_name": "Keck-DataReductionPipelines/OsirisDRP", "repo_path": "OsirisDRP_extracted/OsirisDRP-master/RELEASE_NOTES.md", "type": "Markdown" }
## Release Notes for v6.0 **2022-04-12** - Update to the manual including: discussion of new imager, new tables of sensitivities for imager and spectrograph, updates on how to observe with the TRICK NIR TT sensor, discussion of the new exposure time calculator, new discussion of the OSIRIS imager reduction pipeline KAI...
Keck-DataReductionPipelinesREPO_NAMEOsirisDRPPATH_START.@OsirisDRP_extracted@OsirisDRP-master@RELEASE_NOTES.md@.PATH_END.py
{ "filename": "example_UF23.ipynb", "repo_name": "me-manu/gammaALPs", "repo_path": "gammaALPs_extracted/gammaALPs-master/notebooks/UF23/example_UF23.ipynb", "type": "Jupyter Notebook" }
# Notebook that demonstrates the use of the UF23 model ```python # to import the gmf.py, this cell should be only executed once after kernel restart %cd .. %cd .. ``` /mnt/c/Users/friba/Desktop/Bachelorarbeit/gammaALPs/notebooks /mnt/c/Users/friba/Desktop/Bachelorarbeit/gammaALPs /home/flandgraf/.local...
me-manuREPO_NAMEgammaALPsPATH_START.@gammaALPs_extracted@gammaALPs-master@notebooks@UF23@example_UF23.ipynb@.PATH_END.py
{ "filename": "convert_saved_model.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/python/convert_saved_model.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@lite@python@convert_saved_model.py@.PATH_END.py
{ "filename": "mlab.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/tools/mlab.py", "type": "Python" }
# Author: Gael Varoquaux <gael.varoquaux at normalesup.org> # Copyright (c) 2007-2020, Enthought, Inc. # License: BSD Style. print("!! mayavi.tools.mlab is obsolete and has been replaced by !!") print("!! mayavi.mlab. Please update your code. !!") from mayavi.mlab import *
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@tools@mlab.py@.PATH_END.py
{ "filename": "test_utils.py", "repo_name": "RadioAstronomySoftwareGroup/pyradiosky", "repo_path": "pyradiosky_extracted/pyradiosky-main/tests/test_utils.py", "type": "Python" }
# Copyright (c) 2019 Radio Astronomy Software Group # Licensed under the 2-clause BSD License import os import astropy.units as units import numpy as np import pytest from astropy.coordinates import Angle from astropy.time import Time from pyradiosky import SkyModel, utils as skyutils def test_tee_ra_loop(): ti...
RadioAstronomySoftwareGroupREPO_NAMEpyradioskyPATH_START.@pyradiosky_extracted@pyradiosky-main@tests@test_utils.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatter3d/hoverlabel/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.hoverlabel" _path_str = "scatter3d.hoverlabel.font" _valid_props = {"color", "colors...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatter3d@hoverlabel@_font.py@.PATH_END.py
{ "filename": "simple.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/examples/workflow/generic/simple_subworkflow_data/simple.py", "type": "Python" }
""" A minimal pycbc workflow example """ import argparse import pycbc import pycbc.workflow as wf import os pycbc.init_logging(True) parser = argparse.ArgumentParser(description=__doc__[1:]) parser.add_argument("--multilevel", action='store_true', default=False) wf.add_workflow_command_line_group(parser) wf.add_workf...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@examples@workflow@generic@simple_subworkflow_data@simple.py@.PATH_END.py
{ "filename": "test_idl_read_ephem_obs.py", "repo_name": "maserlib/ExPRES", "repo_path": "ExPRES_extracted/ExPRES-master/test/test_idl_read_ephem_obs.py", "type": "Python" }
from . import * import unittest import datetime import numpy test_read_ephem_obs_files = {'wgc': ['data/JUICE/StateVectorResults.txt'], 'uiowa':[]} class amj_aj(unittest.TestCase): """ Test cases for serpe/expres READ_EPHEM_OBS.PRO """ def setUp(self): self.idl = init_serpe_idl() sel...
maserlibREPO_NAMEExPRESPATH_START.@ExPRES_extracted@ExPRES-master@test@test_idl_read_ephem_obs.py@.PATH_END.py
{ "filename": "_common.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/misc/_common.py", "type": "Python" }
""" Functions which are common and require SciPy Base and Level 1 SciPy (special, linalg) """ import importlib.resources from scipy._lib.deprecation import _deprecated from scipy._lib._finite_differences import _central_diff_weights, _derivative from numpy import array, frombuffer, load __all__ = ['central_diff_weigh...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@misc@_common.py@.PATH_END.py
{ "filename": "metadata_writer_tutorial.ipynb", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/models/convert/metadata_writer_tutorial.ipynb", "type": "Jupyter Notebook" }
##### Copyright 2024 The AI Edge Authors. ```python #@title 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...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@models@convert@metadata_writer_tutorial.ipynb@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="box", **kwargs): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, dat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_marker.py@.PATH_END.py
{ "filename": "tick_xlabel_top.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/ticks/tick_xlabel_top.py", "type": "Python" }
""" ================================== Move x-axis tick labels to the top ================================== `~.axes.Axes.tick_params` can be used to configure the ticks. *top* and *labeltop* control the visibility tick lines and labels at the top x-axis. To move x-axis ticks from bottom to top, we have to activate th...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@ticks@tick_xlabel_top.py@.PATH_END.py
{ "filename": "_x.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/domain/_x.py", "type": "Python" }
import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="parcats.domain", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_t...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@domain@_x.py@.PATH_END.py
{ "filename": "test_rate_network.py", "repo_name": "sbird/fake_spectra", "repo_path": "fake_spectra_extracted/fake_spectra-master/fake_spectra/tests/test_rate_network.py", "type": "Python" }
"""Tests for the rate network.""" import numpy as np from fake_spectra import rate_network from fake_spectra import ratenetworkspectra from fake_spectra._spectra_priv import _interpolate_2d def _exact_alphaHp(): """For hydrogen recombination we have an exact answer from Ferland et al 1992 (http://adsabs.harvard.e...
sbirdREPO_NAMEfake_spectraPATH_START.@fake_spectra_extracted@fake_spectra-master@fake_spectra@tests@test_rate_network.py@.PATH_END.py
{ "filename": "version.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/version.py", "type": "Python" }
# this is adapted from https://github.com/astropy/astropy/blob/master/astropy/version.py # see https://github.com/astropy/astropy/pull/10774 for a discussion on why this needed. try: try: from ._dev_version import version except ImportError: from ._version import version except Exception: i...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@version.py@.PATH_END.py
{ "filename": "test_parameters.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/core_tests/test_parameters.py", "type": "Python" }
import warnings from amuse.test import amusetest from amuse.support.exceptions import AmuseException, AmuseWarning from amuse.units import nbody_system, generic_unit_system, generic_unit_converter from amuse.units import units from amuse.datamodel import parameters from amuse.support.interface import HandleParameters ...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@core_tests@test_parameters.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymap/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymap.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymap@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "test_imageuri_validator.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/_plotly_utils/tests/validators/test_imageuri_validator.py", "type": "Python" }
import base64 import os import pytest from _plotly_utils.basevalidators import ImageUriValidator from PIL import Image # Fixtures # -------- @pytest.fixture() def validator(): return ImageUriValidator("prop", "parent") # Tests # ----- # ### Acceptance ### @pytest.mark.parametrize( "val", [ "htt...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@_plotly_utils@tests@validators@test_imageuri_validator.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.slider.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@font@_family.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mdruett/COCOPLOT", "repo_path": "COCOPLOT_extracted/COCOPLOT-master/Python/cocopy/__init__.py", "type": "Python" }
#!/bin/env python # -*- coding: utf-8 -*- from .cocoplot import plot, video, filter, filtplot
mdruettREPO_NAMECOCOPLOTPATH_START.@COCOPLOT_extracted@COCOPLOT-master@Python@cocopy@__init__.py@.PATH_END.py
{ "filename": "federate_knownPWtce.py", "repo_name": "christopherburke/TESS-ExoClass", "repo_path": "TESS-ExoClass_extracted/TESS-ExoClass-master/code/federate_knownPWtce.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 28 11:51:04 2018 Federate/ephemeris match known confirmed planets hosted at NExScI with the TCEs. Must be online for the search to work. Also queries MAST for TIC's that may be near. @author: Christopher J. Burke """ import numpy as np import toi...
christopherburkeREPO_NAMETESS-ExoClassPATH_START.@TESS-ExoClass_extracted@TESS-ExoClass-master@code@federate_knownPWtce.py@.PATH_END.py
{ "filename": "combine_linear_box_inequalities.py", "repo_name": "stephane-caron/qpsolvers", "repo_path": "qpsolvers_extracted/qpsolvers-main/qpsolvers/conversions/combine_linear_box_inequalities.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # SPDX-License-Identifier: LGPL-3.0-or-later # Copyright 2016-2023 Stéphane Caron and the qpsolvers contributors """Combine linear and box inequalities into double-sided linear format.""" import numpy as np import scipy.sparse as spa from ..exceptions import ProblemErr...
stephane-caronREPO_NAMEqpsolversPATH_START.@qpsolvers_extracted@qpsolvers-main@qpsolvers@conversions@combine_linear_box_inequalities.py@.PATH_END.py
{ "filename": "_covtype.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py3/sklearn/datasets/_covtype.py", "type": "Python" }
"""Forest covertype dataset. A classic dataset for classification benchmarks, featuring categorical and real-valued features. The dataset page is available from UCI Machine Learning Repository https://archive.ics.uci.edu/ml/datasets/Covertype Courtesy of Jock A. Blackard and Colorado State University. """ # Au...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py3@sklearn@datasets@_covtype.py@.PATH_END.py
{ "filename": "CHANGELOG.md", "repo_name": "pysat/pysat", "repo_path": "pysat_extracted/pysat-main/CHANGELOG.md", "type": "Markdown" }
Change Log ========== All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). [3.2.1] - 2024-10-03 -------------------- * Bug Fix * Fixed a bug for identifying clean warnings to test * Imposed minimum frequency of `1D` on `Instrument....
pysatREPO_NAMEpysatPATH_START.@pysat_extracted@pysat-main@CHANGELOG.md@.PATH_END.py
{ "filename": "test_widget.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py3/ipywidgets/widgets/tests/test_widget.py", "type": "Python" }
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Test Widget.""" import inspect import pytest from IPython.core.interactiveshell import InteractiveShell from IPython.display import display from IPython.utils.capture import capture_output from ipywidgets.widgets...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py3@ipywidgets@widgets@tests@test_widget.py@.PATH_END.py
{ "filename": "undo.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-ui/vaex/ui/undo.py", "type": "Python" }
import logging import numpy as np import copy logger = logging.getLogger("vaex.ui.undo") class UndoManager(object): def __init__(self, max_bytes=1024**3): self.actions_undo = [] self.actions_redo = [] self.undo_count = 0 # number of times undo is pressed def undo(self): logg...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-ui@vaex@ui@undo.py@.PATH_END.py
{ "filename": "tfsa-2022-091.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-091.md", "type": "Markdown" }
## TFSA-2022-091: `CHECK` failure in `AvgPoolOp` ### CVE Number CVE-2022-35941 ### Impact The [`AvgPoolOp`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/avgpooling_op.cc#L56-L98) function takes an argument `ksize` that must be positive but is not check...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-091.md@.PATH_END.py
{ "filename": "setup.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/SignalProp/CPPAnalyticRayTracing/setup.py", "type": "Python" }
from setuptools import setup from Cython.Build import cythonize from distutils.extension import Extension from Cython.Distutils import build_ext import numpy import os try: print('Your $GSLDIR = ' + str(os.environ['GSLDIR'])) except: print('You have either not installed GSL or have not set the system variable ...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@SignalProp@CPPAnalyticRayTracing@setup.py@.PATH_END.py
{ "filename": "ext_car.py", "repo_name": "quatrope/feets", "repo_path": "feets_extracted/feets-master/feets/extractors/ext_car.py", "type": "Python" }
#!/usr/bin/env python # 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 without limitation the rights ...
quatropeREPO_NAMEfeetsPATH_START.@feets_extracted@feets-master@feets@extractors@ext_car.py@.PATH_END.py
{ "filename": "test_io_losc.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/timeseries/tests/test_io_losc.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Cardiff University (2021-2022) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@timeseries@tests@test_io_losc.py@.PATH_END.py
{ "filename": "sunos.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Platform/sunos.py", "type": "Python" }
"""engine.SCons.Platform.sunos Platform-specific initialization for Sun systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Platform@sunos.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/selected/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="histogram.selected", **kwargs ): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@selected@_marker.py@.PATH_END.py
{ "filename": "testnotebooks.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/tests/testnotebooks.ipynb", "type": "Jupyter Notebook" }
```python __author__ = 'Robert Nikutta <robert.nikutta@noirlab.edu>, Data Lab Team <datalab@noirlab.edu>' __version__ = '20240920' ``` # Automatic notebook testing ### Run the cells in this notebook in order. Note: if you wish to run any Python code as the first cell of any tested notebooks, please edit the file `pre...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@tests@testnotebooks.ipynb@.PATH_END.py
{ "filename": "pyssht_demo_5.py", "repo_name": "astro-informatics/ssht", "repo_path": "ssht_extracted/ssht-main/src/pyssht/pyssht_demo_5.py", "type": "Python" }
import numpy as np import pyssht as ssht import matplotlib.pyplot as plt from pylab import cm import scipy.io as sio import os # % pyssht_demo_5 - Run demo5 # % # % Smooth Earth topography map by applying a Gaussian filter in harmonic # % space. # % # % The official Earth Gravitational Model EGM2008 has been publicly ...
astro-informaticsREPO_NAMEsshtPATH_START.@ssht_extracted@ssht-main@src@pyssht@pyssht_demo_5.py@.PATH_END.py
{ "filename": "libs.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/utilities/libs.py", "type": "Python" }
""" Displays location of source files, one line of documentation and the function name based on the request """ import importlib import inspect import itertools import pkgutil import sys import io from fnmatch import fnmatchcase import pytplot import pyspedas import functools def libs(function_name, package=None): ...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@utilities@libs.py@.PATH_END.py
{ "filename": "_tickformatstop.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "densitymap.colorbar" _path_str = "densitymap.colorbar.tickformatstop" _valid_props =...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@densitymap@colorbar@_tickformatstop.py@.PATH_END.py