metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "xla_ops_grad.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/jit/ops/xla_ops_grad.py", "type": "Python" }
"""Gradients for XLA ops.""" # 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 #...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@compiler@jit@ops@xla_ops_grad.py@.PATH_END.py
{ "filename": "kde.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/stats/kde.py", "type": "Python" }
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.stats` namespace for importing the functions # included below. from scipy._lib.deprecation import _sub_module_deprecation __all__ = ["gaussian_kde"] # noqa: F822 def __dir__(): return __all__ def __getattr__(name):...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@stats@kde.py@.PATH_END.py
{ "filename": "functions.py", "repo_name": "saberyoung/haffet", "repo_path": "haffet_extracted/haffet-master/sdapy/models/risepl/functions.py", "type": "Python" }
def powerlaw_post_baseline(times, t_0=0, amplitude=25, alpha_r=2): ''' power law function ''' return amplitude * (times - t_0)**alpha_r def powerlaw_full(times, t_0=0, amplitude=25, alpha_r=2, c=0): ''' power law fits (based on Miller et al, https://ui.adsabs.harvard.edu/abs/2020ApJ...902...47M/abstrac...
saberyoungREPO_NAMEhaffetPATH_START.@haffet_extracted@haffet-master@sdapy@models@risepl@functions.py@.PATH_END.py
{ "filename": "test_psf_runners.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/tests/test_psf_runners.py", "type": "Python" }
import pytest import numpy as np import ngmix from ngmix.runners import PSFRunner from ngmix.guessers import GMixPSFGuesser, SimplePSFGuesser, CoellipPSFGuesser from ngmix.em import EMFitter from ngmix.admom import AdmomFitter from ngmix.fitting import CoellipFitter, Fitter from ._sims import get_ngauss_obs, get_psf_ob...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@tests@test_psf_runners.py@.PATH_END.py
{ "filename": "j1407.py", "repo_name": "mkenworthy/exorings", "repo_path": "exorings_extracted/exorings-master/j1407.py", "type": "Python" }
''' custom routines for reading in J1407 data''' from astropy.io import ascii import numpy as np from astropy.io import fits def j1407_photom(): 'read in J1407 photometry with errors' dfile = '1SWASP+J140747.93-394542.6-detrend.fits' # with pyfits.open(dfile) as fpin: # tgtdata = fpin[1].data h...
mkenworthyREPO_NAMEexoringsPATH_START.@exorings_extracted@exorings-master@j1407.py@.PATH_END.py
{ "filename": "_lightposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/cone/_lightposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="cone", **kwargs): super(LightpositionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@_lightposition.py@.PATH_END.py
{ "filename": "indexing.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/state/indexing.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@state@indexing.py@.PATH_END.py
{ "filename": "_opacitysrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choroplethmapbox/marker/_opacitysrc.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="choroplethmapbox.marker", **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choroplethmapbox@marker@_opacitysrc.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/hoverlabel/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.hoverlabel.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@hoverlabel@font@_style.py@.PATH_END.py
{ "filename": "_thickness.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/error_x/_thickness.py", "type": "Python" }
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter.error_x", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@error_x@_thickness.py@.PATH_END.py
{ "filename": "test_enh2xyz.py", "repo_name": "JLBLine/WODEN", "repo_path": "WODEN_extracted/WODEN-master/cmake_testing/wodenpy/array_layout/test_enh2xyz.py", "type": "Python" }
from sys import path import os import unittest import numpy as np from wodenpy.array_layout import create_array_layout D2R = np.pi / 180.0 ##Vehicle for running tests class Test(unittest.TestCase): def test_enh2xyz(self): """Tests the `create_array_layout.enh2xyz` function, which should calculate the ...
JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@cmake_testing@wodenpy@array_layout@test_enh2xyz.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "saberyoung/haffet", "repo_path": "haffet_extracted/haffet-master/sdapy/models/polynomial/__init__.py", "type": "Python" }
"""Initilization modules.""" import os path = os.path.dirname(os.path.abspath(__file__)) __all__ = [] for py in [ f[:-3] for f in os.listdir(path) if f.endswith('.py') and f != '__init__.py' ]: __all__.append(py) from .functions import *
saberyoungREPO_NAMEhaffetPATH_START.@haffet_extracted@haffet-master@sdapy@models@polynomial@__init__.py@.PATH_END.py
{ "filename": "light_curve_collection.py", "repo_name": "golmschenk/generalized-photometric-neural-network-experiments", "repo_path": "generalized-photometric-neural-network-experiments_extracted/generalized-photometric-neural-network-experiments-main/generalized_photometric_neural_network_experiments/dataset/fla...
""" Code to represent a collection of light curves. """ import shutil import socket import re from filelock import FileLock from typing import Union, Iterable, Optional, List import numpy as np import pandas as pd from pathlib import Path from generalized_photometric_neural_network_experiments.dataset.flare.genera...
LONG_NAME_79.py
{ "filename": "README.md", "repo_name": "mbejger/polgraw-allsky", "repo_path": "polgraw-allsky_extracted/polgraw-allsky-master/search/network/src-openmp/lib/README.md", "type": "Markdown" }
This directory contains external libraries we use for vectorization: SLEEF by Naoki Shibata: http://shibatch.sourceforge.net/ Yeppp! : http://www.yeppp.info/
mbejgerREPO_NAMEpolgraw-allskyPATH_START.@polgraw-allsky_extracted@polgraw-allsky-master@search@network@src-openmp@lib@README.md@.PATH_END.py
{ "filename": "asp_system_utils.py", "repo_name": "NeoGeographyToolkit/StereoPipeline", "repo_path": "StereoPipeline_extracted/StereoPipeline-master/src/asp/Python/asp_system_utils.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # __BEGIN_LICENSE__ # Copyright (c) 2009-2013, United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The NGT platform is licensed under the Apache License, Version 2.0 (the # "Lic...
NeoGeographyToolkitREPO_NAMEStereoPipelinePATH_START.@StereoPipeline_extracted@StereoPipeline-master@src@asp@Python@asp_system_utils.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "florpi/sunbird", "repo_path": "sunbird_extracted/sunbird-main/sunbird/utils.py", "type": "Python" }
# taken from https://github.com/cosmodesi/desilike/blob/main/desilike/utils.py import numpy as np import logging import sys import os import time import traceback def setup_logging(level=logging.INFO, stream=sys.stdout, filename=None, filemode='w', **kwargs): """ Set up logging. Parameters ----------...
florpiREPO_NAMEsunbirdPATH_START.@sunbird_extracted@sunbird-main@sunbird@utils.py@.PATH_END.py
{ "filename": "KuzminDiskPotential.py", "repo_name": "jobovy/galpy", "repo_path": "galpy_extracted/galpy-main/galpy/potential/KuzminDiskPotential.py", "type": "Python" }
############################################################################### # KuzminDiskPotential.py: class that implements Kuzmin disk potential # # - amp # Phi(R, z)= --------------------------- # \sqrt{R^2 + (a + |z|)^2} ##############...
jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@potential@KuzminDiskPotential.py@.PATH_END.py
{ "filename": "train.md", "repo_name": "ML4GW/aframe", "repo_path": "aframe_extracted/aframe-main/docs/projects/train.md", "type": "Markdown" }
Train ===== Training Aframe networks using [PyTorch Lightning](https://lightning.ai/docs/pytorch/stable/) and hyper-parameter tuning using [Ray Tune](https://docs.ray.io/en/latest/tune/index.html) ## Environment The `train` project environment is manged by `poetry`. In the root of the `train` project, run ```bash a...
ML4GWREPO_NAMEaframePATH_START.@aframe_extracted@aframe-main@docs@projects@train.md@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/polar/radialaxis/title/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar.radialaxis.title" _path_str = "layout.polar.radialaxis.title.font" _valid_prop...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@polar@radialaxis@title@_font.py@.PATH_END.py
{ "filename": "_make.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/attrs/py2/attr/_make.py", "type": "Python" }
from __future__ import absolute_import, division, print_function import copy import inspect import linecache import sys import threading import uuid import warnings from operator import itemgetter from . import _config, setters from ._compat import ( PY2, PYPY, isclass, iteritems, metadata_proxy,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@attrs@py2@attr@_make.py@.PATH_END.py
{ "filename": "__version__.py", "repo_name": "ryanhausen/fitsmap", "repo_path": "fitsmap_extracted/fitsmap-master/fitsmap/__version__.py", "type": "Python" }
"""0.11.1"""
ryanhausenREPO_NAMEfitsmapPATH_START.@fitsmap_extracted@fitsmap-master@fitsmap@__version__.py@.PATH_END.py
{ "filename": "select_samples.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/Sandbox/imaging/select_samples.py", "type": "Python" }
import fitsio from astropy.table import Table,join,vstack import numpy as np import glob import os import sys from desitarget import cuts from desitarget import targetmask import astropy.io.fits as fits dirsweeps = '/global/project/projectdirs/cosmo/data/legacysurvey/dr9/south/sweep/9.0/' dirsweepn = '/global/project/...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@imaging@select_samples.py@.PATH_END.py
{ "filename": "test_cco_buf_inter.py", "repo_name": "mpi4py/mpi4py", "repo_path": "mpi4py_extracted/mpi4py-master/test/test_cco_buf_inter.py", "type": "Python" }
from mpi4py import MPI import mpiunittest as unittest import arrayimpl def skip_op(typecode, op): if typecode in '?': return True if typecode in 'FDG': if op in (MPI.MAX, MPI.MIN): return True return False def maxvalue(a): try: typecode = a.typecode except Attri...
mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_cco_buf_inter.py@.PATH_END.py
{ "filename": "_activeselection.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/_activeselection.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Activeselection(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.activeselection" _valid_props = {"fillcolor", "opaci...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@_activeselection.py@.PATH_END.py
{ "filename": "python-reference_utils_get_confusion_matrix.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_utils_get_confusion_matrix.md", "type": "Markdown" }
# get_confusion_matrix {% include [utils-get_confusion_matrix__desc](../_includes/work_src/reusage-python/get_confusion_matrix__desc.md) %} ## {{ dl--invoke-format }} {#method-call-format} ```python get_confusion_matrix(model, data, thread_count) ``` ## {{ dl--parameters }} {#parameters-list} ### model #### Desc...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_utils_get_confusion_matrix.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/python/lsst/ts/wep/deblend/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- from .deblendAdapt import * from .deblendDefault import * from .deblendDonutFactory import * from .nelderMeadModify import *
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@python@lsst@ts@wep@deblend@__init__.py@.PATH_END.py
{ "filename": "test_sky_stacking.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/f2/tests/longslit/test_sky_stacking.py", "type": "Python" }
#!/usr/bin/env python3 """ Tests for sky stacking and subtraction for F2. """ import pytest import astrodata from astrodata.testing import download_from_archive import gemini_instruments from geminidr.f2.primitives_f2_longslit import F2Longslit # ---- Fixtures --------------------------------------------------------...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@f2@tests@longslit@test_sky_stacking.py@.PATH_END.py
{ "filename": "widget_upload.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipywidgets/py3/ipywidgets/widgets/widget_upload.py", "type": "Python" }
# Copyright(c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """FileUpload class. Represents a file upload button. """ import datetime as dt from traitlets import ( observe, default, Unicode, Dict, Int, Bool, Bytes, CaselessStrEnum ) from .widget_description import Descrip...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipywidgets@py3@ipywidgets@widgets@widget_upload.py@.PATH_END.py
{ "filename": "(5.1) delta Scuti SNR.ipynb", "repo_name": "danhey/maelstrom", "repo_path": "maelstrom_extracted/maelstrom-master/paper/notebooks/(5.1) delta Scuti SNR.ipynb", "type": "Jupyter Notebook" }
```python %run setup.py ``` ```python df = pd.read_csv('../../../../Dropbox (Sydney Uni)/Shared/pulsator_fraction/all_stars_with_gaia_mathur_green.csv') puls = df[df['pulsating']==1] ``` Let's count the number of TESS CVZ stars with 2 min data ```python files = [] import glob for sector in list(range(1,14)): ...
danheyREPO_NAMEmaelstromPATH_START.@maelstrom_extracted@maelstrom-master@paper@notebooks@(5.1) delta Scuti SNR.ipynb@.PATH_END.py
{ "filename": "TestNLFitters.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestNLFitters.py", "type": "Python" }
# run with : python3 -m unittest TestNLFitters import unittest import os import numpy as numpy from numpy.testing import assert_array_almost_equal as assertAAE from astropy import units import math import matplotlib.pyplot as plt from BayesicFitting import * from StdTests import stdFittertest __author__ = "Do Kest...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestNLFitters.py@.PATH_END.py
{ "filename": "pipes.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/pipes.py", "type": "Python" }
"""Conversion pipeline templates. The problem: ------------ Suppose you have some data that you want to convert to another format, such as from GIF image format to PPM image format. Maybe the conversion involves several steps (e.g. piping it through compress or uuencode). Some of the conversion steps may require th...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@pipes.py@.PATH_END.py
{ "filename": "results.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/python/marvin/tools/results.py", "type": "Python" }
#!/usr/bin/env python # encoding: utf-8 # Licensed under a 3-clause BSD license. # from __future__ import print_function import copy import datetime import json import os import warnings from collections import namedtuple from functools import wraps from operator import add import numpy as np import six from astrop...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@tools@results.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@colorbar@title@font@_size.py@.PATH_END.py
{ "filename": "_include.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/xaxis/autorangeoptions/_include.py", "type": "Python" }
import _plotly_utils.basevalidators class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): super(IncludeValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@xaxis@autorangeoptions@_include.py@.PATH_END.py
{ "filename": "design_description.md", "repo_name": "MazinLab/MKIDGen3", "repo_path": "MKIDGen3_extracted/MKIDGen3-main/docs/design_description.md", "type": "Markdown" }
# MKIDGEN3 Software Design Description ## Overview The MKIDGEN3 software facilitates using multiple hardware subsystems (RFSoC board, IF board) to set up and read out an MKID array. The core functionality revolves around capturing data at various points in the FPGA DSP pipeline. Captures are facilitated by `capture r...
MazinLabREPO_NAMEMKIDGen3PATH_START.@MKIDGen3_extracted@MKIDGen3-main@docs@design_description.md@.PATH_END.py
{ "filename": "_fgopacity.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/pattern/_fgopacity.py", "type": "Python" }
import _plotly_utils.basevalidators class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="icicle.marker.pattern", **kwargs ): super(FgopacityValidator, self).__init__( plotly_name=plotly_name, p...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@pattern@_fgopacity.py@.PATH_END.py
{ "filename": "stage_2.py", "repo_name": "jdhenshaw/scousepy", "repo_path": "scousepy_extracted/scousepy-master/scousepy/stage_2.py", "type": "Python" }
# Licensed under an MIT open source license - see LICENSE import numpy as np def generate_saa_list(scouseobject): """ Returns a list constaining all spectral averaging areas. Parameters ---------- scouseobject : Instance of the scousepy class """ saa_list=[] for i in range(len(scouseob...
jdhenshawREPO_NAMEscousepyPATH_START.@scousepy_extracted@scousepy-master@scousepy@stage_2.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/outsidetextfont/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.outsidetextfont", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@outsidetextfont@_shadow.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/__init__.py", "type": "Python" }
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@__init__.py@.PATH_END.py
{ "filename": "batlib.py", "repo_name": "parsotat/batanalysis", "repo_path": "batanalysis_extracted/batanalysis-main/batanalysis/batlib.py", "type": "Python" }
""" This file holds various functions that users can call to interface with bat observation objects """ import astropy as ap from astropy.io import fits from astropy.time import Time import numpy as np import shutil import matplotlib.pyplot as plt import os import warnings from pathlib import Path import requests from ...
parsotatREPO_NAMEbatanalysisPATH_START.@batanalysis_extracted@batanalysis-main@batanalysis@batlib.py@.PATH_END.py
{ "filename": "publish.py", "repo_name": "dfm/exopop", "repo_path": "exopop_extracted/exopop-main/document/publish.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import os import glob import shutil from datetime import date from itertools import imap from subprocess import check_call datestamp = date.today().strftime("%m%d") TMPDIR = "fore" + datestamp outfn = TMPDIR+".tar" tex = ope...
dfmREPO_NAMEexopopPATH_START.@exopop_extracted@exopop-main@document@publish.py@.PATH_END.py
{ "filename": "check.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/falco/check.py", "type": "Python" }
""" Module to hold input-checking functions to minimize repetition """ import numbers import numpy as np class CheckException(Exception): pass # String check support string_types = (str, bytes) # Int check support int_types = (int, np.integer) def _checkname(vname): """ Internal check that we can use ...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@check.py@.PATH_END.py
{ "filename": "test_ogle_remote.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/ogle/tests/test_ogle_remote.py", "type": "Python" }
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from astropy.utils.exceptions import AstropyDeprecationWarning from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(c...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ogle@tests@test_ogle_remote.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/colorbar/tickfont/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="cone.colorbar.tickfont", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@colorbar@tickfont@_size.py@.PATH_END.py
{ "filename": "_weight.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/smith/realaxis/tickfont/_weight.py", "type": "Python" }
import _plotly_utils.basevalidators class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): super(WeightValidator, self).__init__( plotly_name=...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@realaxis@tickfont@_weight.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-gcp/prefect_gcp/models/__init__.py", "type": "Python" }
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-gcp@prefect_gcp@models@__init__.py@.PATH_END.py
{ "filename": "lbfgsb.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/optimize/lbfgsb.py", "type": "Python" }
""" Functions --------- .. autosummary:: :toctree: generated/ fmin_l_bfgs_b """ ## License for the Python wrapper ## ============================== ## Copyright (c) 2004 David M. Cooke <cookedm@physics.mcmaster.ca> ## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this so...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@optimize@lbfgsb.py@.PATH_END.py
{ "filename": "basic_plot.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/docs/basic_plot.py", "type": "Python" }
import numpy as np from astropy import units as u import pyspeckit xaxis = np.linspace(-50,150,100.) * u.km/u.s sigma = 10. * u.km/u.s center = 50. * u.km/u.s synth_data = np.exp(-(xaxis-center)**2/(sigma**2 * 2.)) # Add noise stddev = 0.1 noise = np.random.randn(xaxis.size)*stddev error = stddev*np.ones_like(synth_d...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@docs@basic_plot.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "djones1040/PythonPhot", "repo_path": "PythonPhot_extracted/PythonPhot-master/PythonPhot/tests/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This packages contains affiliated package tests. """
djones1040REPO_NAMEPythonPhotPATH_START.@PythonPhot_extracted@PythonPhot-master@PythonPhot@tests@__init__.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "zivmaaya/NeuralCMS", "repo_path": "NeuralCMS_extracted/NeuralCMS-main/README.md", "type": "Markdown" }
# NeuralCMS NeuralCMS is a machine-learning model to compute the gravitational moments and mass of Jupiter given seven chosen parameters setting its interior model. The model is trained on over a million interior model solutions computed with the accurate but computationally demanding concentric Maclaurin spheroid met...
zivmaayaREPO_NAMENeuralCMSPATH_START.@NeuralCMS_extracted@NeuralCMS-main@README.md@.PATH_END.py
{ "filename": "fused_attention_stablehlo.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/cudnn/fused_attention_stablehlo.py", "type": "Python" }
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@cudnn@fused_attention_stablehlo.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "guillochon/MOSFiT", "repo_path": "MOSFiT_extracted/MOSFiT-master/mosfit/modules/seds/__init__.py", "type": "Python" }
"""Initilization procedure for `SED` modules.""" import inspect import os import sys path = os.path.dirname(os.path.abspath(__file__)) __all__ = [] for py in [ f[:-3] for f in os.listdir(path) if f.endswith('.py') and f != '__init__.py' ]: mod = __import__('.'.join([__name__, py]), fromlist=[py]) ...
guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@mosfit@modules@seds@__init__.py@.PATH_END.py
{ "filename": "huber.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/linear_model/huber.py", "type": "Python" }
# Authors: Manoj Kumar mks542@nyu.edu # License: BSD 3 clause import numpy as np from scipy import optimize, sparse from ..base import BaseEstimator, RegressorMixin from .base import LinearModel from ..utils import check_X_y from ..utils import check_consistent_length from ..utils import axis0_safe_slice from ..util...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@linear_model@huber.py@.PATH_END.py
{ "filename": "test_centroidOtsu.py", "repo_name": "lsst-ts/ts_wep", "repo_path": "ts_wep_extracted/ts_wep-main/tests/centroid/test_centroidOtsu.py", "type": "Python" }
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # 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 ...
lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@tests@centroid@test_centroidOtsu.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/slider/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.font" _valid_props = { "color", "...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@slider@_font.py@.PATH_END.py
{ "filename": "_coloraxis.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterternary/marker/_coloraxis.py", "type": "Python" }
import _plotly_utils.basevalidators class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterternary.marker", **kwargs ): super(ColoraxisValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterternary@marker@_coloraxis.py@.PATH_END.py
{ "filename": "read_gnu.py", "repo_name": "AMReX-Astro/Castro", "repo_path": "Castro_extracted/Castro-main/Exec/radiation_tests/RadSuOlsonMG/python/read_gnu.py", "type": "Python" }
#!/usr/bin/python from numpy import * def read_gnu_file(filenm): x = [] y = [] f = open(filenm, 'r') line = f.readline() t = float(line.split('"')[1].split('=')[2]) for line in f.readlines(): if not line[0] == ";": words = line.split() x.append(float(words[0])) ...
AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@radiation_tests@RadSuOlsonMG@python@read_gnu.py@.PATH_END.py
{ "filename": "retrieve_fake_fsps_data.py", "repo_name": "ArgonneCPAC/dsps", "repo_path": "dsps_extracted/dsps-main/dsps/data_loaders/retrieve_fake_fsps_data.py", "type": "Python" }
""" """ import numpy as np from jax.scipy.stats import norm import os from .defaults import SSPData _THIS_DRNAME = os.path.dirname(os.path.abspath(__file__)) def load_fake_ssp_data(): ssp_lgmet = _get_lgzlegend() ssp_lg_age_gyr = _get_log_age_gyr() ssp_wave = _get_ssp_wave() ssp_flux = _get_spec_ssp...
ArgonneCPACREPO_NAMEdspsPATH_START.@dsps_extracted@dsps-main@dsps@data_loaders@retrieve_fake_fsps_data.py@.PATH_END.py
{ "filename": "logical_operations.py", "repo_name": "cds-astro/mocpy", "repo_path": "mocpy_extracted/mocpy-master/docs/examples/logical_operations.py", "type": "Python" }
import matplotlib.pyplot as plt from astropy.visualization.wcsaxes.frame import EllipticalFrame from astropy.wcs import WCS from mocpy import MOC # Load Galex and SDSS sdss = MOC.from_fits("./../../resources/P-SDSS9-r.fits") galex = MOC.from_fits("./../../resources/P-GALEXGR6-AIS-FUV.fits") # Compute their intersectio...
cds-astroREPO_NAMEmocpyPATH_START.@mocpy_extracted@mocpy-master@docs@examples@logical_operations.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "SatoshiHamano/WARP", "repo_path": "WARP_extracted/WARP-main/warp/config.py", "type": "Python" }
#!/usr/bin/env python # -*- coding:utf-8 -*- import os.path from astropy.io import fits import sys import numpy as np from warp.Spec2Dtools import header_key_read import traceback def alternativequestion(question, anss, defans): flagans = False while not flagans: ansinput = input(question) if ...
SatoshiHamanoREPO_NAMEWARPPATH_START.@WARP_extracted@WARP-main@warp@config.py@.PATH_END.py
{ "filename": "msk.py", "repo_name": "cvxopt/cvxopt", "repo_path": "cvxopt_extracted/cvxopt-master/src/python/msk.py", "type": "Python" }
""" CVXOPT interface for MOSEK 8 """ # Copyright 2012-2023 M. Andersen and L. Vandenberghe. # Copyright 2010-2011 L. Vandenberghe. # Copyright 2004-2009 J. Dahl and L. Vandenberghe. # # This file is part of CVXOPT. # # CVXOPT is free software; you can redistribute it and/or modify # it under the terms of the GNU Gener...
cvxoptREPO_NAMEcvxoptPATH_START.@cvxopt_extracted@cvxopt-master@src@python@msk.py@.PATH_END.py
{ "filename": "export.py", "repo_name": "vterron/lemon", "repo_path": "lemon_extracted/lemon-master/export.py", "type": "Python" }
#! /usr/bin/env python2 # encoding: UTF-8 # Author: Victor Terron (c) 2020 # Email: `echo vt2rron1iaa32s | tr 132 @.e` # License: GNU GPLv3 from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals _DESCRIPTION = """ Print the...
vterronREPO_NAMElemonPATH_START.@lemon_extracted@lemon-master@export.py@.PATH_END.py
{ "filename": "ah_bootstrap.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/ah_bootstrap.py", "type": "Python" }
""" This bootstrap module contains code for ensuring that the astropy_helpers package will be importable by the time the setup.py script runs. It also includes some workarounds to ensure that a recent-enough version of setuptools is being used for the installation. This module should be the first thing imported in th...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@ah_bootstrap.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "rodluger/planetplanet", "repo_path": "planetplanet_extracted/planetplanet-master/README.md", "type": "Markdown" }
<div align="center"> <img src="https://rodluger.github.io/planetplanet/_images/title.gif" width="400px"> </img> <br/><br/> <p><a href="https://travis-ci.org/rodluger/planetplanet"><img src="https://travis-ci.org/rodluger/planetplanet.svg?branch=master"/></a> <a href="http://dx.doi.org/10.5281/zenodo.997391"><img src="h...
rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@README.md@.PATH_END.py
{ "filename": "test_corrs.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/time/tests/test_corrs.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from astropy import units as u from astropy.coordinates import EarthLocation, SkyCoord, solar_system_ephemeris from astropy.time import Time, TimeDelta from astropy.utils import iers from astropy.utils.compat.optional_deps import HAS_JPLEPHE...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@time@tests@test_corrs.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "dnarayanan/powderday", "repo_path": "powderday_extracted/powderday-master/README.md", "type": "Markdown" }
Welcome to Powderday! Powderday is a dust radiative transfer package designed to interface with galaxy formation simulations in order to produce spectral energy distributions, as well as realistic images. For documentation, please see the docs at: [http://powderday.readthedocs.org](http://powderday.readthedocs.org...
dnarayananREPO_NAMEpowderdayPATH_START.@powderday_extracted@powderday-master@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._showscale import ShowscaleValidator from ._reversescale import ReversescaleValidator from ._pattern import PatternValidator from ._line import LineValidator from ._colorssrc import ColorssrcValidator ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@marker@__init__.py@.PATH_END.py
{ "filename": "actor.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/mayavi/components/actor.py", "type": "Python" }
"""A simple actor component. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005-2020, Enthought, Inc. # License: BSD Style. import vtk # Enthought library imports. from traits.api import Instance, Bool, Enum from tvtk.api import tvtk from traits.api import DelegatesTo # Local imports. fr...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@components@actor.py@.PATH_END.py
{ "filename": "Space.py", "repo_name": "ledatelescope/bifrost", "repo_path": "bifrost_extracted/bifrost-master/python/bifrost/Space.py", "type": "Python" }
# Copyright (c) 2016-2023, The Bifrost Authors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@python@bifrost@Space.py@.PATH_END.py
{ "filename": "mrsa.py", "repo_name": "HajimeKawahara/sot", "repo_path": "sot_extracted/sot-master/src/sot/nmfmap/mrsa.py", "type": "Python" }
import numpy as np def mrsa(vec1,vec2): v1=(vec1-np.mean(vec1)) v2=(vec2-np.mean(vec2)) v1norm=np.sqrt(np.dot(v1,v1)) v2norm=np.sqrt(np.dot(v2,v2)) naib=np.dot(v1,v2)/v1norm/v2norm if naib>1.0: naib=1.0 return 1.0/np.pi*np.arccos(naib) def mrsa_meanX(X): Xini=np.load("Xinit.np...
HajimeKawaharaREPO_NAMEsotPATH_START.@sot_extracted@sot-master@src@sot@nmfmap@mrsa.py@.PATH_END.py
{ "filename": "_ticklen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/_ticklen.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattermap.marker.colorbar", **kwargs ): super(TicklenValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@_ticklen.py@.PATH_END.py
{ "filename": "_volume.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/template/data/_volume.py", "type": "Python" }
from plotly.graph_objs import Volume
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@template@data@_volume.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/assign_mtwcs/tests/data/__init__.py", "type": "Python" }
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@assign_mtwcs@tests@data@__init__.py@.PATH_END.py
{ "filename": "schema.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/agents/schema.py", "type": "Python" }
from typing import Any, Dict, List, Tuple from langchain_core.agents import AgentAction from langchain_core.prompts.chat import ChatPromptTemplate class AgentScratchPadChatPromptTemplate(ChatPromptTemplate): """Chat prompt template for the agent scratchpad.""" @classmethod def is_lc_serializable(cls) ->...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@agents@schema.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/distribute/experimental/rpc/README.md", "type": "Markdown" }
## Experimental TensorFlow RPC Ops. This directory contains kernels for RPC Ops in TensorFlow distribute package. Note*: These ops may move to a separate repository in the future.
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@distribute@experimental@rpc@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator else: from _plotly_utils.importers import rel...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@marker@colorbar@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "scanner_gui_run.ipynb", "repo_name": "Skuggsja-Lab/skuggsja-scan", "repo_path": "skuggsja-scan_extracted/skuggsja-scan-main/scanner_gui_run.ipynb", "type": "Jupyter Notebook" }
# Monitoring while scanning ## Imports ```python from robodk.robolink import * # API to communicate with RoboDK from robodk.robomath import * # basic matrix operations import numpy as np from datetime import datetime import os ``` ## Raster ```python runfile("scan_control_gui.py") ``` An exception has occ...
Skuggsja-LabREPO_NAMEskuggsja-scanPATH_START.@skuggsja-scan_extracted@skuggsja-scan-main@scanner_gui_run.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "mslonina/Mechanic", "repo_path": "Mechanic_extracted/Mechanic-master/README.md", "type": "Markdown" }
Mechanic -------- ### Overview We develop the Mechanic package, which is a flexible numerical framework to handle and automate massive numerical simulations. We assume that these computations rely on testing a huge range of initial conditions, while each test (single simulation run) may be computed as a standalone ta...
msloninaREPO_NAMEMechanicPATH_START.@Mechanic_extracted@Mechanic-master@README.md@.PATH_END.py
{ "filename": "diagnostics.py", "repo_name": "danielrd6/ifscube", "repo_path": "ifscube_extracted/ifscube-master/ifscube/diagnostics.py", "type": "Python" }
import numpy as np from numpy import ma import matplotlib.pyplot as plt from matplotlib import transforms class bpt: """ See Baldwin, Philips & Terlevich 198?, Kauffmann et al. 2003 """ def __init__(self, ha, n2, hb, o3): for line in ('ha', 'n2', 'hb', 'o3'): if not isins...
danielrd6REPO_NAMEifscubePATH_START.@ifscube_extracted@ifscube-master@ifscube@diagnostics.py@.PATH_END.py
{ "filename": "attention.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/pallas/ops/gpu/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@gpu@attention.py@.PATH_END.py
{ "filename": "hub_callback_container.py", "repo_name": "glue-viz/glue", "repo_path": "glue_extracted/glue-main/glue/core/hub_callback_container.py", "type": "Python" }
import weakref from functools import partial __all__ = ['HubCallbackContainer'] class HubCallbackContainer(object): """ A list-like container for callback functions. We need to be careful with storing references to methods, because if a callback method is on a class which contains both the callback a...
glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@core@hub_callback_container.py@.PATH_END.py
{ "filename": "v1_schema.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/_internal/pydantic/v1_schema.py", "type": "Python" }
import inspect import typing import warnings import pydantic from pydantic.v1 import BaseModel as V1BaseModel def is_v1_model(v: typing.Any) -> bool: with warnings.catch_warnings(): warnings.filterwarnings( "ignore", category=pydantic.warnings.PydanticDeprecatedSince20 ) if i...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@_internal@pydantic@v1_schema.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/scene/xaxis/tickfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.xaxis.tickfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@xaxis@tickfont@_color.py@.PATH_END.py
{ "filename": "_visible.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/updatemenu/_visible.py", "type": "Python" }
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.updatemenu", **kwargs ): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@updatemenu@_visible.py@.PATH_END.py
{ "filename": "SConscript.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Script/SConscript.py", "type": "Python" }
"""SCons.Script.SConscript This module defines the Python API provided to SConscript and SConstruct files. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Script@SConscript.py@.PATH_END.py
{ "filename": "p_tuning.md", "repo_name": "huggingface/peft", "repo_path": "peft_extracted/peft-main/docs/source/package_reference/p_tuning.md", "type": "Markdown" }
<!--Copyright 2023 The HuggingFace Team. 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 applicable law or agreed...
huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@docs@source@package_reference@p_tuning.md@.PATH_END.py
{ "filename": "_lightposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/_lightposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="isosurface", **kwargs): super(LightpositionValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@_lightposition.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/README.md", "type": "Markdown" }
athena ====== <!-- Jenkins Status Badge in Markdown (with view), unprotected, flat style --> <!-- In general, need to be on Princeton VPN, logged into Princeton CAS, with ViewStatus access to Jenkins instance to click on unprotected Build Status Badge, but server is configured to whitelist GitHub --> <!-- [![Jenkins Bu...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@README.md@.PATH_END.py
{ "filename": "test_coordinate_helpers.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from unittest.mock import patch import matplotlib.pyplot as plt import matplotlib.transforms as transforms import pytest from astropy import units as u from astropy.io import fits from astropy.utils.data import get_pkg_data_filename from astropy.utils.e...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@visualization@wcsaxes@tests@test_coordinate_helpers.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/parso/py3/tests/conftest.py", "type": "Python" }
import re import tempfile import shutil import logging import os from pathlib import Path import pytest import yatest.common import parso from parso import cache from parso.utils import parse_version_string collect_ignore = ["setup.py"] _SUPPORTED_VERSIONS = '3.6', '3.7', '3.8', '3.9', '3.10' @pytest.fixture(scop...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@parso@py3@tests@conftest.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/cone/colorbar/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="cone.colorbar", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@cone@colorbar@_bordercolor.py@.PATH_END.py
{ "filename": "plot_plummer.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/plot_plummer.py", "type": "Python" }
""" Example AMUSE script to generate a Plummer sphere and plot the results. """ ###BOOKLISTSTART### from matplotlib.pyplot import show, xlim, ylim, figure from amuse.plot import scatter, xlabel, ylabel from amuse.lab import new_plummer_model def main(N=10): figure(figsize=(5,5)) bodies = new_plummer_mode...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@plot_plummer.py@.PATH_END.py
{ "filename": "lexer.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Jinja2/py2/jinja2/lexer.py", "type": "Python" }
# -*- coding: utf-8 -*- """Implements a Jinja / Python combination lexer. The ``Lexer`` class is used to do some preprocessing. It filters out invalid operators like the bitshift operators we don't allow in templates. It separates template code and python code in expressions. """ import re from ast import literal_eval ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Jinja2@py2@jinja2@lexer.py@.PATH_END.py
{ "filename": "test_ontotext_graphdb_graph.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/graphs/test_ontotext_graphdb_graph.py", "type": "Python" }
from pathlib import Path import pytest from langchain_community.graphs import OntotextGraphDBGraph """ cd libs/community/tests/integration_tests/graphs/docker-compose-ontotext-graphdb ./start.sh """ def test_query_method_with_valid_query() -> None: graph = OntotextGraphDBGraph( query_endpoint="http://l...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@graphs@test_ontotext_graphdb_graph.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymapbox/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="densitymapbox.colorbar", **kwargs, ): super(ShowticksuffixValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymapbox@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "make_auto_diff_type.py", "repo_name": "adamjermyn/Skye", "repo_path": "Skye_extracted/Skye-main/auto_diff/python/make_auto_diff_type.py", "type": "Python" }
version https://git-lfs.github.com/spec/v1 oid sha256:0f0334fdaee7bd5a79e4a835c33ec43fdbbe46010c4eab785e151bfbdad1473d size 6354
adamjermynREPO_NAMESkyePATH_START.@Skye_extracted@Skye-main@auto_diff@python@make_auto_diff_type.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/number/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.number.font", **kwargs ): super(LinepositionValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@number@font@_lineposition.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/title/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.colorbar.title.font", **kwargs ): super(ShadowValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@title@font@_shadow.py@.PATH_END.py
{ "filename": "_structures.py", "repo_name": "davidharvey1986/pyRRG", "repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/packaging/_structures.py", "type": "Python" }
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function class InfinityType(object): def __repr__(self): # type: () ->...
davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@packaging@_structures.py@.PATH_END.py
{ "filename": "palette_choices.py", "repo_name": "mwaskom/seaborn", "repo_path": "seaborn_extracted/seaborn-master/examples/palette_choices.py", "type": "Python" }
""" Color palette choices ===================== """ import numpy as np import seaborn as sns import matplotlib.pyplot as plt sns.set_theme(style="white", context="talk") rs = np.random.RandomState(8) # Set up the matplotlib figure f, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(7, 5), sharex=True) # Generate some s...
mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@examples@palette_choices.py@.PATH_END.py