metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "differential_refraction.bkp.py", "repo_name": "LucaMalavolta/SLOPpy", "repo_path": "SLOPpy_extracted/SLOPpy-main/SLOPpy/differential_refraction.bkp.py", "type": "Python" }
from __future__ import print_function, division from SLOPpy.subroutines.common import * from SLOPpy.subroutines.spectral_subroutines import * from SLOPpy.subroutines.fit_subroutines import * from SLOPpy.subroutines.io_subroutines import * from SLOPpy.subroutines.shortcuts import * __all__ = ["compute_differential_refr...
LucaMalavoltaREPO_NAMESLOPpyPATH_START.@SLOPpy_extracted@SLOPpy-main@SLOPpy@differential_refraction.bkp.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choropleth/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="choropleth.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choropleth@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "crack-seg.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/datasets/segment/crack-seg.md", "type": "Markdown" }
--- comments: true description: Explore the extensive Roboflow Crack Segmentation Dataset, perfect for transportation and public safety studies or self-driving car model development. keywords: Roboflow, Crack Segmentation Dataset, Ultralytics, transportation safety, public safety, self-driving cars, computer vision, ro...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@datasets@segment@crack-seg.md@.PATH_END.py
{ "filename": "FitGlobal21cm.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/inference/FitGlobal21cm.py", "type": "Python" }
""" ModelFit.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Mon May 12 14:01:29 MDT 2014 Description: """ import signal import numpy as np from ..util.Pickling import write_pickle_file from ..physics.Constants import nu_0_mhz import gc, os, sys, copy, types, time, re from .Mo...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@inference@FitGlobal21cm.py@.PATH_END.py
{ "filename": "plot_tools.py", "repo_name": "dartoon/galight", "repo_path": "galight_extracted/galight-master/galight/tools/plot_tools.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 16 20:28:10 2020 @author: Xuheng Ding """ import numpy as np import matplotlib.pyplot as plt import astropy.io.fits as pyfits from matplotlib.colors import LogNorm from galight.tools.measure_tools import SB_profile import copy, matplotlib from matp...
dartoonREPO_NAMEgalightPATH_START.@galight_extracted@galight-master@galight@tools@plot_tools.py@.PATH_END.py
{ "filename": "tuner_utils.py", "repo_name": "keras-team/keras-tuner", "repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/engine/tuner_utils.py", "type": "Python" }
# Copyright 2019 The KerasTuner 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 ...
keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@engine@tuner_utils.py@.PATH_END.py
{ "filename": "_gradient.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/_gradient.py", "type": "Python" }
import _plotly_utils.basevalidators class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scatterternary.marker", **kwargs ): super(GradientValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@_gradient.py@.PATH_END.py
{ "filename": "MetaGalacticBackground.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/analysis/MetaGalacticBackground.py", "type": "Python" }
""" AnalyzeXray.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Tue Sep 18 13:36:56 2012 Description: """ import numpy as np from ..util import labels from ..util.Pickling import read_pickle_file import matplotlib.pyplot as pl from scipy.integrate import trapz from ..util.ReadD...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@analysis@MetaGalacticBackground.py@.PATH_END.py
{ "filename": "networks.py", "repo_name": "PabloVD/HaloGraphNet", "repo_path": "HaloGraphNet_extracted/HaloGraphNet-master/Source/networks.py", "type": "Python" }
#---------------------------------------------------------------------- # Definition of the neural network architectures # Author: Pablo Villanueva Domingo # Last update: 10/11/21 #---------------------------------------------------------------------- import torch from torch.nn import Sequential, Linear, ReLU, ModuleL...
PabloVDREPO_NAMEHaloGraphNetPATH_START.@HaloGraphNet_extracted@HaloGraphNet-master@Source@networks.py@.PATH_END.py
{ "filename": "test_particle_generator.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/utilities/tests/test_particle_generator.py", "type": "Python" }
import numpy as np from numpy.testing import assert_almost_equal, assert_equal from yt.loaders import load_uniform_grid from yt.units._numpy_wrapper_functions import uconcatenate from yt.utilities.particle_generator import ( FromListParticleGenerator, LatticeParticleGenerator, WithDensityParticleGenerator,...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@utilities@tests@test_particle_generator.py@.PATH_END.py
{ "filename": "FitEPM.py", "repo_name": "sPaMFouR/RedPipe", "repo_path": "RedPipe_extracted/RedPipe-master/analysis/FitEPM.py", "type": "Python" }
########################################## ## EPM Distance estimation of SN 2016gfy ## ########################################## import numpy as np import matplotlib.pyplot as plt import subprocess import scipy.optimize as optimize from scipy.optimize import curve_fit ########################################## ## Par...
sPaMFouRREPO_NAMERedPipePATH_START.@RedPipe_extracted@RedPipe-master@analysis@FitEPM.py@.PATH_END.py
{ "filename": "atanalysis.py", "repo_name": "HiPERCAM/hipercam", "repo_path": "hipercam_extracted/hipercam-master/hipercam/scripts/atanalysis.py", "type": "Python" }
import sys import os import re import time from trm import cline from trm.cline import Cline import hipercam as hcam __all__ = [ "atanalysis", ] ############################################################### # # atanalysis -- runs tanalysis on a series of night directories # ###################################...
HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@scripts@atanalysis.py@.PATH_END.py
{ "filename": "aux.py", "repo_name": "shergreen/SatGen", "repo_path": "SatGen_extracted/SatGen-master/aux.py", "type": "Python" }
######################################################################### # Auxiliary functions. # Arthur Fangzhou Jiang 2019 Hebrew University # Sheridan Beckwith Green 2020 Yale University ######################################################################### import config as cfg import numpy as np import sys...
shergreenREPO_NAMESatGenPATH_START.@SatGen_extracted@SatGen-master@aux.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/vo_conesearch/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.vo_conesearch`. """ # Config related to remote database of "reliable" services. vos_baseurl = _config.ConfigItem(...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@vo_conesearch@__init__.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "hongwanliu/DarkHistory", "repo_path": "DarkHistory_extracted/DarkHistory-master/darkhistory/nntf/utils.py", "type": "Python" }
""" Utilities for Neural Network transfer functions. """ import numpy as np #################### ### CONSTANTS EPSILON = 1e-100 LOG_EPSILON = np.log(EPSILON) XMAX = (np.tanh(+4)+1)/2 XMIN = (np.tanh(-5)+1)/2 RS_NODES = [40, 1600] #################### ### UTILITIES def scale_to_E(eng, N, i_st, i_ed, E_target): ...
hongwanliuREPO_NAMEDarkHistoryPATH_START.@DarkHistory_extracted@DarkHistory-master@darkhistory@nntf@utils.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/violin/selected/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "violin.selected" _path_str = "violin.selected.marker" _valid_props = {"color", "opacity", "s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@violin@selected@_marker.py@.PATH_END.py
{ "filename": "cache_key.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/cache_key.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@_src@cache_key.py@.PATH_END.py
{ "filename": "extension.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/setuptools/extension.py", "type": "Python" }
import re import functools import distutils.core import distutils.errors import distutils.extension from setuptools.extern.six.moves import map from .monkey import get_unpatched def _have_cython(): """ Return True if Cython can be imported. """ cython_impl = 'Cython.Distutils.build_ext' try: ...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@setuptools@extension.py@.PATH_END.py
{ "filename": "Container.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspy/src/Acspy/Container.py", "type": "Python" }
# @(#) $Id: Container.py,v 1.59 2012/06/21 15:24:08 acaproni Exp $ # # Copyright (C) 2001 # Associated Universities, Inc. Washington DC, USA. # # Produced for the ALMA project # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as publi...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspy@src@Acspy@Container.py@.PATH_END.py
{ "filename": "layers.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/legacy/layers.py", "type": "Python" }
"""Legacy Keras 1/2 layers. AlphaDropout RandomHeight RandomWidth ThresholdedReLU """ from keras.src import backend from keras.src.api_export import keras_export from keras.src.layers.layer import Layer from keras.src.utils.module_utils import tensorflow as tf @keras_export("keras._legacy.layers.AlphaDropout") clas...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@legacy@layers.py@.PATH_END.py
{ "filename": "test_template_model.py", "repo_name": "threeML/astromodels", "repo_path": "astromodels_extracted/astromodels-master/astromodels/tests/test_template_model.py", "type": "Python" }
from __future__ import division, print_function import os import shutil from pathlib import Path import numpy as np import numpy.testing as npt import pytest import pickle from astromodels import Model, PointSource, clone_model, load_model from astromodels.functions import ( Band, Powerlaw, TemplateModel...
threeMLREPO_NAMEastromodelsPATH_START.@astromodels_extracted@astromodels-master@astromodels@tests@test_template_model.py@.PATH_END.py
{ "filename": "default_session.md", "repo_name": "andycasey/smhr", "repo_path": "smhr_extracted/smhr-master/default_session.md", "type": "Markdown" }
Default SMH settings file ------------------------- This file will be shipped with SMH, but can be edited by the user. # The `rv` settings that end up getting used will go into the data model for that `Session` object. - `rv` - `wavelength_regions`: A list giving (start, end) regions preferred for the cross-correla...
andycaseyREPO_NAMEsmhrPATH_START.@smhr_extracted@smhr-master@default_session.md@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="bar.marker.colorbar", **kwargs ): super(TickmodeValidator, self).__init__( plotly_name=plotly_name, pa...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@_tickmode.py@.PATH_END.py
{ "filename": "tPyDpInfo.py", "repo_name": "lofar-astron/DP3", "repo_path": "DP3_extracted/DP3-master/pythondp3/test/unit/tPyDpInfo.py", "type": "Python" }
# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: GPL-3.0-or-later """ These tests check that the python bindings for the DPInfo class behave correctly. This script can be invoked in two ways: - as standalone from the build/pythondp3/test/integration directory, using...
lofar-astronREPO_NAMEDP3PATH_START.@DP3_extracted@DP3-master@pythondp3@test@unit@tPyDpInfo.py@.PATH_END.py
{ "filename": "ipaddress.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/ipaddress.py", "type": "Python" }
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@ipaddress.py@.PATH_END.py
{ "filename": "Kurucz4.py", "repo_name": "exoclime/HELIOS-K", "repo_path": "HELIOS-K_extracted/HELIOS-K-master/Kurucz4.py", "type": "Python" }
import numpy as np import math import struct import os import argparse # This script produces the binary and *.param files for HELIOS-K # It also calculates the natural broadening coefficients # Date: June 2020 # Author: Simon Grimm filename="gfallwn08oct17.dat" elt0=[ [ 100, "H" , 1.00794], [ 200, "He" , 4.00...
exoclimeREPO_NAMEHELIOS-KPATH_START.@HELIOS-K_extracted@HELIOS-K-master@Kurucz4.py@.PATH_END.py
{ "filename": "test_transferfunction.py", "repo_name": "gwpy/gwpy", "repo_path": "gwpy_extracted/gwpy-main/gwpy/cli/tests/test_transferfunction.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright (C) Evan Goetz (2021) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@cli@tests@test_transferfunction.py@.PATH_END.py
{ "filename": "FAQs.ipynb", "repo_name": "natashabatalha/picaso", "repo_path": "picaso_extracted/picaso-master/docs/notebooks/FAQs.ipynb", "type": "Jupyter Notebook" }
```python import warnings warnings.filterwarnings('ignore') import numpy as np #picaso from picaso import justdoit as jdi from picaso import justplotit as jpi from bokeh.io import output_notebook output_notebook() ``` # How do I load in target properties from Exo.Mast? ```python nexsci = jdi.all_planets() ``` ```...
natashabatalhaREPO_NAMEpicasoPATH_START.@picaso_extracted@picaso-master@docs@notebooks@FAQs.ipynb@.PATH_END.py
{ "filename": "test_openai_functions.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/runnables/test_openai_functions.py", "type": "Python" }
from typing import Any, List, Optional from langchain_core.callbacks.manager import CallbackManagerForLLMRun from langchain_core.language_models.chat_models import BaseChatModel from langchain_core.messages import AIMessage, BaseMessage from langchain_core.outputs import ChatGeneration, ChatResult from pytest_mock imp...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@runnables@test_openai_functions.py@.PATH_END.py
{ "filename": "trainer.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/trainers/trainer.py", "type": "Python" }
import inspect import platform import warnings from keras.src import backend from keras.src import metrics as metrics_module from keras.src import ops from keras.src import optimizers from keras.src import tree from keras.src.optimizers.loss_scale_optimizer import LossScaleOptimizer from keras.src.saving import serial...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@trainers@trainer.py@.PATH_END.py
{ "filename": "Vcirc_threshold.py", "repo_name": "franciscovillaescusa/Pylians", "repo_path": "Pylians_extracted/Pylians-master/HI_Illustris/HI_mass/HI_SO/Vcirc_threshold.py", "type": "Python" }
import numpy as np import sys,os,h5py import units_library as UL # This routine returns the circular velocity of a halo of mass M at redshift z def Vcirc(M,z,Omega_m,Omega_l): x = Omega_m*(1.0+z)**3/(Omega_m*(1.0+z)**3 + Omega_l) - 1.0 delta_c = 18*np.pi**2 + 82.0*x - 39.0*x**2 rho_crit_z = rho_crit*(Ome...
franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@HI_Illustris@HI_mass@HI_SO@Vcirc_threshold.py@.PATH_END.py
{ "filename": "galaxy_mask.py", "repo_name": "schlafly/crowdsource", "repo_path": "crowdsource_extracted/crowdsource-master/crowdsource/galaxy_mask.py", "type": "Python" }
import warnings from astropy.io import fits from astropy.utils.exceptions import AstropyWarning from astropy.modeling.models import Ellipse2D from astropy.wcs import Wcsprm, WCS from astropy.coordinates import SkyCoord import numpy as np import os if 'DECAM_DIR' not in os.environ: decam_dir = os.path.join(os.path....
schlaflyREPO_NAMEcrowdsourcePATH_START.@crowdsource_extracted@crowdsource-master@crowdsource@galaxy_mask.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): super(BordercolorValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@hoverlabel@_bordercolor.py@.PATH_END.py
{ "filename": "images.py", "repo_name": "jkrogager/PyNOT", "repo_path": "PyNOT_extracted/PyNOT-master/pynot/images.py", "type": "Python" }
import numpy as np from astropy.io import fits import operator from scipy.interpolate import RegularGridInterpolator from pynot.fitsio import load_fits_image class FitsImage: def __init__(self, data, error=None, mask=None, header=None): self.data = data self.x = np.arange(data.shape[1]) s...
jkrogagerREPO_NAMEPyNOTPATH_START.@PyNOT_extracted@PyNOT-master@pynot@images.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/extend/__init__.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@_src@extend@__init__.py@.PATH_END.py
{ "filename": "Neural_Network_and_Data_Loading.md", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/docs/notebooks/Neural_Network_and_Data_Loading.md", "type": "Markdown" }
--- jupytext: formats: ipynb,md:myst text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.16.4 kernelspec: display_name: Python 3 language: python name: python3 --- +++ {"id": "18AF5Ab4p6VL"} # Training a simple neural network, with PyTorch data load...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@notebooks@Neural_Network_and_Data_Loading.md@.PATH_END.py
{ "filename": "conf.py", "repo_name": "sfarrens/sf_deconvolve", "repo_path": "sf_deconvolve_extracted/sf_deconvolve-master/docs/source/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # sf_deconvolve documentation build configuration file, created by # sphinx-quickstart on Tue Mar 14 14:39:12 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
sfarrensREPO_NAMEsf_deconvolvePATH_START.@sf_deconvolve_extracted@sf_deconvolve-master@docs@source@conf.py@.PATH_END.py
{ "filename": "weak_tensor_special_math_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/weak_tensor_special_math_ops_test.py", "type": "Python" }
# Copyright 2023 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@weak_tensor_special_math_ops_test.py@.PATH_END.py
{ "filename": "api_implementation.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/protobuf/py3/google/protobuf/internal/api_implementation.py", "type": "Python" }
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@protobuf@py3@google@protobuf@internal@api_implementation.py@.PATH_END.py
{ "filename": "convsyn.py", "repo_name": "hmtabernero/SteParSyn", "repo_path": "SteParSyn_extracted/SteParSyn-main/convsyn.py", "type": "Python" }
#!/usr/bin/python3 # 2-CLAUSE BSD LICENCE #Copyright 2015-2021 Hugo Tabernero, Jonay Gonzalez Hernandez, Emilio Marfil, and David Montes #Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: #1. Redistributions of source code must...
hmtaberneroREPO_NAMESteParSynPATH_START.@SteParSyn_extracted@SteParSyn-main@convsyn.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "OSSOS/SurveySimulator", "repo_path": "SurveySimulator_extracted/SurveySimulator-master/README.md", "type": "Markdown" }
## Survey Simulator 2.0 Documentation The Survey Simulator (sometimes compiled as `Driver` or `SSim` or `SurveySimulator`) takes a model of the orbits and physical parameters of objects in the outer solar system and determines which model objects a particular survey would detect and track. The user provides the...
OSSOSREPO_NAMESurveySimulatorPATH_START.@SurveySimulator_extracted@SurveySimulator-master@README.md@.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/parcats/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._colorbar import ColorBar from . import colorbar else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [".colorbar"], ["._colorbar.Col...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@parcats@line@__init__.py@.PATH_END.py
{ "filename": "polymorphic_function_test_cpu_only.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/eager/polymorphic_function/polymorphic_function_test_cpu_only.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@eager@polymorphic_function@polymorphic_function_test_cpu_only.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "cmateu/PyMGC3", "repo_path": "PyMGC3_extracted/PyMGC3-master/setup.py", "type": "Python" }
import os import sys import re try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='PyMGC3', version='1.0.0', author='C. Mateu', author_email='cmateu@fisica.edu.uy', packages=['bovy_coords','mgc3_lib','myutils'], scripts=['bin/mgc3.py','bin/m...
cmateuREPO_NAMEPyMGC3PATH_START.@PyMGC3_extracted@PyMGC3-master@setup.py@.PATH_END.py
{ "filename": "cubeshow.py", "repo_name": "psheehan/pdspy", "repo_path": "pdspy_extracted/pdspy-master/pdspy/plotting/cubeshow.py", "type": "Python" }
from matplotlib.widgets import Slider, Button, RadioButtons import matplotlib.pyplot as plt """ Display a 3d ndarray with a slider to move along the third dimension. Extra keyword arguments are passed to imshow Original from here: http://nbarbey.github.io/2011/07/08/matplotlib-slider.html """ def cubeshow(cube, axi...
psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@plotting@cubeshow.py@.PATH_END.py
{ "filename": "session_vars.py", "repo_name": "fred3m/toyz", "repo_path": "toyz_extracted/toyz-master/toyz/web/session_vars.py", "type": "Python" }
""" Empty module used to store variables shared in a single Toyz session (websocket connection). """
fred3mREPO_NAMEtoyzPATH_START.@toyz_extracted@toyz-master@toyz@web@session_vars.py@.PATH_END.py
{ "filename": "create_integrations_cards.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/docs/integrations/create_integrations_cards.py", "type": "Python" }
"""Script to generate the integrations (formerly integrations) catalog table""" import glob from pathlib import Path import mkdocs_gen_files import yaml from jinja2 import Environment, FileSystemLoader, select_autoescape with mkdocs_gen_files.open("./integrations/index.md", "w") as markdown_file: # Get file path...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@docs@integrations@create_integrations_cards.py@.PATH_END.py
{ "filename": "_sector.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/_sector.py", "type": "Python" }
import _plotly_utils.basevalidators class SectorValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="sector", parent_name="layout.polar", **kwargs): super(SectorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@_sector.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/tests/__init__.py", "type": "Python" }
def setup_package(): pass def teardown_package(): pass
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@tests@__init__.py@.PATH_END.py
{ "filename": "_tickangle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/colorbar/_tickangle.py", "type": "Python" }
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="splom.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@colorbar@_tickangle.py@.PATH_END.py
{ "filename": "table_rowfree.md", "repo_name": "jbroll/starbase", "repo_path": "starbase_extracted/starbase-master/docs/table_rowfree.md", "type": "Markdown" }
### table_rowfree - release memory of the row structures when done. SYNOPSIS -------- ``` #include <../tablelib/table.h> void table_rowfree(TableRow row); ``` PARAMETERS ---------- * `"TableRow` row" - table row to be done with. DESCRIPTION ----------- # SEE ALSO -------- [table_colval](table_colval.h...
jbrollREPO_NAMEstarbasePATH_START.@starbase_extracted@starbase-master@docs@table_rowfree.md@.PATH_END.py
{ "filename": "test_figure_factory.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py", "type": "Python" }
from unittest import TestCase from plotly import optional_imports from plotly.graph_objs import graph_objs as go from plotly.exceptions import PlotlyError import plotly.io as pio import plotly.figure_factory as ff from plotly.tests.test_optional.optional_utils import NumpyTestUtilsMixin from plotly.tests.test_optional...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@tests@test_optional@test_figure_factory@test_figure_factory.py@.PATH_END.py
{ "filename": "test_astrosat.py", "repo_name": "neuromorphicsystems/astrometry", "repo_path": "astrometry_extracted/astrometry-main/test/test_astrosat.py", "type": "Python" }
import astrometry import json import logging import pathlib dirname = pathlib.Path(__file__).resolve().parent logging.getLogger().setLevel(logging.INFO) solver = astrometry.Solver( astrometry.series_5000.index_files( cache_directory=dirname / "astrometry_cache", scales={5}, ) ) with open(dir...
neuromorphicsystemsREPO_NAMEastrometryPATH_START.@astrometry_extracted@astrometry-main@test@test_astrosat.py@.PATH_END.py
{ "filename": "compute_formation_temperature.py", "repo_name": "palumbom/GRASS", "repo_path": "GRASS_extracted/GRASS-main/scripts/compute_formation_temperature.py", "type": "Python" }
""" ORIGINAL AUTHOR : Khaled Al Moulla DATE : 2023-03-16 MODIFIED BY: Michael Palumbo Compute line formation temperature with PySME. """ #%% MODULES import os import pdb import glob import numpy as np import pandas as pd import matplotlib.pyplot as plt from pysme import sme as SME from pysme.abund import Abund fro...
palumbomREPO_NAMEGRASSPATH_START.@GRASS_extracted@GRASS-main@scripts@compute_formation_temperature.py@.PATH_END.py
{ "filename": "gapfill.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/tod_ops/gapfill.py", "type": "Python" }
import numpy as np import so3g from . import pca import logging logger = logging.getLogger(__name__) class Extract: """Container for storage of sparse sub-segments of a vector. This ties together a Ranges object and a data array with the same length as the total length of the Ranges segments. This i...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@tod_ops@gapfill.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/choroplethmapbox/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._colorbar import ColorBar from ._hoverlabel import Hoverlabel from ._legendgrouptitle import Legendgrouptitle from ._marker import Marker from ._selected import Selected from ._stream import Stream ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@choroplethmapbox@__init__.py@.PATH_END.py
{ "filename": "name_scope_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/common/name_scope_test.py", "type": "Python" }
from keras.src import testing from keras.src.backend.common.name_scope import current_path from keras.src.backend.common.name_scope import name_scope class NameScopeTest(testing.TestCase): def test_stacking(self): self.assertEqual(current_path(), "") with name_scope("outer") as outer: ...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@common@name_scope_test.py@.PATH_END.py
{ "filename": "calfits.py", "repo_name": "RadioAstronomySoftwareGroup/pyuvdata", "repo_path": "pyuvdata_extracted/pyuvdata-main/src/pyuvdata/uvcal/calfits.py", "type": "Python" }
# Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Class for reading and writing calibration FITS files.""" import os import warnings import numpy as np from astropy import units from astropy.coordinates import EarthLocation from astropy.io import fits from docstring_pars...
RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@src@pyuvdata@uvcal@calfits.py@.PATH_END.py
{ "filename": "distances.ipynb", "repo_name": "GuillermoFrancoAbellan/class_clumpy", "repo_path": "class_clumpy_extracted/class_clumpy-main/notebooks/distances.ipynb", "type": "Jupyter Notebook" }
```python # import necessary modules # uncomment to get plots displayed in notebook %matplotlib inline import matplotlib import matplotlib.pyplot as plt import numpy as np from classy import Class ``` ```python font = {'size' : 20, 'family':'STIXGeneral'} axislabelfontsize='large' matplotlib.rc('font', **font) matp...
GuillermoFrancoAbellanREPO_NAMEclass_clumpyPATH_START.@class_clumpy_extracted@class_clumpy-main@notebooks@distances.ipynb@.PATH_END.py
{ "filename": "data_structure.py", "repo_name": "AWehrhahn/SME", "repo_path": "SME_extracted/SME-master/src/pysme/data_structure.py", "type": "Python" }
# -*- coding: utf-8 -*- import logging from copy import copy from multiprocessing.sharedctypes import Value import numpy as np import pybtex from flex.extensions.bindata import MultipleDataExtension from flex.flex import FlexExtension from . import __file_ending__, __version__, persistence from .iliffe_vector import ...
AWehrhahnREPO_NAMESMEPATH_START.@SME_extracted@SME-master@src@pysme@data_structure.py@.PATH_END.py
{ "filename": "smooth_cal_inspect_2458096.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458096.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Calibration Smoothing Nightly Notebook **Josh Dillon**, Last Revised 12/4/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal, abscal, utils from hera_cal.smooth_cal import build_time_blacklist from hera_qm.metrics_io import load_metr...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458096.ipynb@.PATH_END.py
{ "filename": "stata_dark.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/styles/stata_dark.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.styles.stata_dark ~~~~~~~~~~~~~~~~~~~~~~~~~~ Dark style inspired by Stata's do-file editor. Note this is not meant to be a complete style, just for Stata's file formats. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@styles@stata_dark.py@.PATH_END.py
{ "filename": "_core.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/express/_core.py", "type": "Python" }
import plotly.graph_objs as go import plotly.io as pio from collections import namedtuple, OrderedDict from ._special_inputs import IdentityMap, Constant, Range from _plotly_utils.basevalidators import ColorscaleValidator from plotly.colors import qualitative, sequential import math import pandas as pd import numpy as...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@express@_core.py@.PATH_END.py
{ "filename": "_text.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/marker/colorbar/title/_text.py", "type": "Python" }
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@marker@colorbar@title@_text.py@.PATH_END.py
{ "filename": "modifier_test.py", "repo_name": "alibaba/TinyNeuralNetwork", "repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/tests/modifier_test.py", "type": "Python" }
import os import unittest import torch import torch.nn as nn from tinynn.converter import TFLiteConverter from tinynn.graph.modifier import is_dw_conv from tinynn.graph.modifier import ( GraphChannelModifier, fill_tensor_by_dim_changes, calc_dim_changes, calc_dim_constraint, merge_group, merge...
alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@tests@modifier_test.py@.PATH_END.py
{ "filename": "test_library.py", "repo_name": "ledatelescope/bifrost", "repo_path": "bifrost_extracted/bifrost-master/test/test_library.py", "type": "Python" }
import unittest from bifrost.libbifrost_generated import bfTestSuite class TestLibrary(unittest.TestCase): def test_library(self): self.assertEqual(bfTestSuite(), 0)
ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@test@test_library.py@.PATH_END.py
{ "filename": "primitives_image.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/core/primitives_image.py", "type": "Python" }
# # gemini_python # # primitives_image.py # ------------------------------------------------------------------------------ import numpy as np from copy import copy, deepcopy from itertools import ...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@core@primitives_image.py@.PATH_END.py
{ "filename": "generate_png.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/GalfitModule/Utilities/generate_png.py", "type": "Python" }
from joblib import Parallel, delayed import joblib import os import argparse from os.path import join as pj from os.path import abspath as absp import sys _HOME_DIR = os.path.expanduser("~") try: _SPARCFIRE_DIR = os.environ["SPARCFIRE_HOME"] _MODULE_DIR = pj(_SPARCFIRE_DIR, "GalfitModule") except KeyError: ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@GalfitModule@Utilities@generate_png.py@.PATH_END.py
{ "filename": "_shadowsrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/textfont/_shadowsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterpolar.textfont", **kwargs ): super(ShadowsrcValidator, self).__init__( plotly_name=plotly_name, pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@textfont@_shadowsrc.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/references/segmentation/README.md", "type": "Markdown" }
# Semantic segmentation reference training scripts This folder contains reference training scripts for semantic segmentation. They serve as a log of how to train specific models and provide baseline training and evaluation scripts to quickly bootstrap research. All models have been trained on 8x V100 GPUs. You must ...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@segmentation@README.md@.PATH_END.py
{ "filename": "README.md", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/packages/amuse-galaxia/README.md", "type": "Markdown" }
This package installs the Galaxia community code for AMUSE.
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@packages@amuse-galaxia@README.md@.PATH_END.py
{ "filename": "build-model-interface-static-old-artifacts.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-installation/build-model-interface-static-old-artifacts.md", "type": "Markdown" }
- `liblibcatboostmodel.o`. This part contains symbols that require forced initialization. - `libcatboostmodel.a`. This part contains all other symbols.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-installation@build-model-interface-static-old-artifacts.md@.PATH_END.py
{ "filename": "fit_neural_net.py", "repo_name": "arjunsavel/cortecs", "repo_path": "cortecs_extracted/cortecs-main/src/cortecs/fit/fit_neural_net.py", "type": "Python" }
""" Trains a neural network to fit the opacity data. """ import pickle import warnings # optional import handling should raise a warning instead of an error import numpy as np try: import keras import tensorflow as tf from tensorflow.keras import layers except ModuleNotFoundError: warnings.warn( ...
arjunsavelREPO_NAMEcortecsPATH_START.@cortecs_extracted@cortecs-main@src@cortecs@fit@fit_neural_net.py@.PATH_END.py
{ "filename": "getB_raytrace.py", "repo_name": "lofar-astron/RMextract", "repo_path": "RMextract_extracted/RMextract-master/examples/getB_raytrace.py", "type": "Python" }
from datetime import date import numpy as np import RMextract.getIONEX as ionex import RMextract.PosTools as PosTools import RMextract.pyiri.pyiri as pyiri from RMextract.EMM import EMM as EMM def getPParray(pointing,time,position,height_array): az,el = PosTools.getAzEl(pointing,time,position) lonlat=PosToo...
lofar-astronREPO_NAMERMextractPATH_START.@RMextract_extracted@RMextract-master@examples@getB_raytrace.py@.PATH_END.py
{ "filename": "conv_test.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/tests/nnx/nn/conv_test.py", "type": "Python" }
# Copyright 2024 The Flax 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@tests@nnx@nn@conv_test.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/scattergl/marker/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._widthsrc import WidthsrcValidator from ._width import WidthValidator from ._reversescale import ReversescaleValidator from ._colorsrc import ColorsrcValidator from ._colorscale import ColorscaleValidat...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@marker@line@__init__.py@.PATH_END.py
{ "filename": "test_shapelets_ellipse.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LightModel/test_Profiles/test_shapelets_ellipse.py", "type": "Python" }
import copy import numpy as np import numpy.testing as npt from lenstronomy.LightModel.Profiles.shapelets_ellipse import ShapeletSetEllipse from lenstronomy.LightModel.Profiles.shapelets import ShapeletSet from lenstronomy.Util import param_util, util class TestShapeletSetEllipse(object): def setup_method(self, m...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LightModel@test_Profiles@test_shapelets_ellipse.py@.PATH_END.py
{ "filename": "syncFit.py", "repo_name": "sczesla/PyAstronomy", "repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/funcFit/syncFit.py", "type": "Python" }
from __future__ import print_function, division import copy import re import numpy from PyAstronomy.pyaC import pyaErrors as PE from .onedfit import MiniFunc from .params import equal from .onedfit import _PyMCSampler, _OndeDFitParBase from .nameIdentBase import ModelNameIdentBase from PyAstronomy import pyaC import s...
sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@funcFit@syncFit.py@.PATH_END.py
{ "filename": "brightness.py", "repo_name": "dstndstn/tractor", "repo_path": "tractor_extracted/tractor-main/tractor/brightness.py", "type": "Python" }
import numpy as np from tractor.utils import ScalarParam, ParamList, BaseParams, getClassName from tractor import ducks class Mag(ScalarParam): ''' An implementation of `Brightness` that stores a single magnitude. ''' stepsize = -0.01 strformat = '%.3f' class Flux(ScalarParam): ''' A `Br...
dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@tractor@brightness.py@.PATH_END.py
{ "filename": "test_checks.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/tests/utils/decorators/test_checks.py", "type": "Python" }
""" Tests for 'check` decorators (i.e. decorators that only check objects but do not change them). """ import inspect from types import LambdaType from typing import Any from unittest import mock import astropy.units as u import numpy as np import pytest from astropy.constants import c from plasmapy.utils.decorators...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@tests@utils@decorators@test_checks.py@.PATH_END.py
{ "filename": "random_initializers.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/initializers/random_initializers.py", "type": "Python" }
import math from keras.src import ops from keras.src.api_export import keras_export from keras.src.backend import random from keras.src.initializers.initializer import Initializer from keras.src.saving import serialization_lib class RandomInitializer(Initializer): def __init__(self, seed=None): self._ini...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@initializers@random_initializers.py@.PATH_END.py
{ "filename": "image.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/backend/numpy/image.py", "type": "Python" }
import jax import ml_dtypes import numpy as np from keras.src import backend from keras.src.backend.numpy.core import convert_to_tensor from keras.src.utils.module_utils import scipy RESIZE_INTERPOLATIONS = ( "bilinear", "nearest", "lanczos3", "lanczos5", "bicubic", ) def rgb_to_grayscale(images...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@numpy@image.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "morpheus-project/morpheus", "repo_path": "morpheus_extracted/morpheus-master/morpheus/core/__init__.py", "type": "Python" }
morpheus-projectREPO_NAMEmorpheusPATH_START.@morpheus_extracted@morpheus-master@morpheus@core@__init__.py@.PATH_END.py
{ "filename": "simulated_25_NF.ipynb", "repo_name": "sosl/H-FISTA", "repo_path": "H-FISTA_extracted/H-FISTA-main/simulated_25_NF.ipynb", "type": "Jupyter Notebook" }
```python # general packages import numpy as np import os import sys import inspect # H-FISTA packages currentdir = %pwd parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) from lib import Residual from fista import fista from helpers import get_data from lambda_loop import take_lambda_step, initi...
soslREPO_NAMEH-FISTAPATH_START.@H-FISTA_extracted@H-FISTA-main@simulated_25_NF.ipynb@.PATH_END.py
{ "filename": "flash_attention.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/pallas/ops/tpu/flash_attention.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...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@pallas@ops@tpu@flash_attention.py@.PATH_END.py
{ "filename": "progress_bar.py", "repo_name": "blackjax-devs/blackjax", "repo_path": "blackjax_extracted/blackjax-main/blackjax/progress_bar.py", "type": "Python" }
# Copyright 2020- The Blackjax 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
blackjax-devsREPO_NAMEblackjaxPATH_START.@blackjax_extracted@blackjax-main@blackjax@progress_bar.py@.PATH_END.py
{ "filename": "test_ipdoctest.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/testing/plugin/test_ipdoctest.py", "type": "Python" }
"""Tests for the ipdoctest machinery itself. Note: in a file named test_X, functions whose only test is their docstring (as a doctest) and which have no test functionality of their own, should be called 'doctest_foo' instead of 'test_foo', otherwise they get double-counted (the empty function call is counted as a test...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@testing@plugin@test_ipdoctest.py@.PATH_END.py
{ "filename": "annotate_max_batch_sizes_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/compiler/tensorrt/test/annotate_max_batch_sizes_test.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@compiler@tensorrt@test@annotate_max_batch_sizes_test.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/hoverlabel/font/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="violin.hoverlabel.font", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@hoverlabel@font@_colorsrc.py@.PATH_END.py
{ "filename": "_updatemenudefaults.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/_updatemenudefaults.py", "type": "Python" }
import _plotly_utils.basevalidators class UpdatemenudefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="updatemenudefaults", parent_name="layout", **kwargs ): super(UpdatemenudefaultsValidator, self).__init__( plotly_name=plotly_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@_updatemenudefaults.py@.PATH_END.py
{ "filename": "gui.py", "repo_name": "IvS-KULeuven/IvSPythonRepository", "repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/gui/gui.py", "type": "Python" }
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gui.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setO...
IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@gui@gui.py@.PATH_END.py
{ "filename": "demo_VEH_UAZBUS.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/vehicle/demo_VEH_UAZBUS.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2014 projectchrono.org # All right reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distri...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@vehicle@demo_VEH_UAZBUS.py@.PATH_END.py
{ "filename": "test_nulldetections.py", "repo_name": "transientskp/tkp", "repo_path": "tkp_extracted/tkp-master/tests/test_database/test_nulldetections.py", "type": "Python" }
import datetime import itertools import unittest import tkp.db from tkp.db import associations as dbass from tkp.db import general as dbgen from tkp.db import nulldetections as dbnd from tkp.db.orm import DataSet from tkp.testutil import db_subs from tkp.testutil.decorators import requires_database @requires_databa...
transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tests@test_database@test_nulldetections.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/doc/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # AMUSE documentation build configuration file, created by # sphinx-quickstart on Tue Sep 29 13:22:44 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@doc@conf.py@.PATH_END.py
{ "filename": "modatm.py", "repo_name": "astroChasqui/q2", "repo_path": "q2_extracted/q2-master/modatm.py", "type": "Python" }
import matplotlib.pyplot as plt import logging from . import tools import os from .config import * from scipy.integrate import simps import numpy as np from scipy.interpolate import griddata logger = logging.getLogger(__name__) def get_from_file(teff, logg, feh, grid): """Extracts a Kurucz or MARCS model atmosph...
astroChasquiREPO_NAMEq2PATH_START.@q2_extracted@q2-master@modatm.py@.PATH_END.py
{ "filename": "awadb.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/awadb.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import AwaDB # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED_...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@awadb.py@.PATH_END.py
{ "filename": "formatter.py", "repo_name": "Caltech-IPAC/Montage", "repo_path": "Montage_extracted/Montage-main/lib/src/freetype-2.5.4/src/tools/docmaker/formatter.py", "type": "Python" }
# # formatter.py # # Convert parsed content blocks to a structured document (library file). # # Copyright 2002, 2004, 2007, 2008, 2014 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.T...
Caltech-IPACREPO_NAMEMontagePATH_START.@Montage_extracted@Montage-main@lib@src@freetype-2.5.4@src@tools@docmaker@formatter.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/pathbar/textfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weightsrc import WeightsrcValidator from ._weight import WeightValidator from ._variantsrc import VariantsrcValidator from ._variant import VariantValidator from ._textcasesrc import TextcasesrcValidat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@pathbar@textfont@__init__.py@.PATH_END.py
{ "filename": "ttv_model_example.ipynb", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/notebooks/ttv_model_example.ipynb", "type": "Jupyter Notebook" }
# TTV model evaluation example *Author: Hannu Parviainen*<br/> *Last modified: 20.10.2020* Evaluating the transit model for a planet whose transit center times deviate from a linear ephemeris is extremely simple in PyTransit. Each light curve (indexed by an array of light curve indices, `lcids`) can be given its own ...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@notebooks@ttv_model_example.ipynb@.PATH_END.py
{ "filename": "cpFilterScan.py", "repo_name": "lsst/cp_pipe", "repo_path": "cp_pipe_extracted/cp_pipe-main/python/lsst/cp/pipe/cpFilterScan.py", "type": "Python" }
# This file is part of cp_pipe. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you can...
lsstREPO_NAMEcp_pipePATH_START.@cp_pipe_extracted@cp_pipe-main@python@lsst@cp@pipe@cpFilterScan.py@.PATH_END.py