metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "__init__.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/mayavi/tools/data_wizards/__init__.py",
"type": "Python"
} | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@tools@data_wizards@__init__.py@.PATH_END.py | |
{
"filename": "hydro_minimal.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/examples/textbook/hydro_minimal.py",
"type": "Python"
} | ###BOOKLISTSTART1###
from amuse.lab import *
def main(N, Mtot, Rvir, t_end):
converter=nbody_system.nbody_to_si(Mtot, Rvir)
gas = new_plummer_gas_model(N, convert_nbody=converter)
hydro = Gadget2(converter)
hydro.gas_particles.add_particles(gas)
Etot_init = hydro.kinetic_energy \
+ h... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@hydro_minimal.py@.PATH_END.py |
{
"filename": "test_spectral_window.py",
"repo_name": "ska-sa/katdal",
"repo_path": "katdal_extracted/katdal-master/katdal/test/test_spectral_window.py",
"type": "Python"
} | ###############################################################################
# Copyright (c) 2018,2021-2022, National Research Foundation (SARAO)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the License at
#... | ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@katdal@test@test_spectral_window.py@.PATH_END.py |
{
"filename": "test_nonlin.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/optimize/tests/test_nonlin.py",
"type": "Python"
} | """ Unit tests for nonlinear solvers
Author: Ondrej Certik
May 2007
"""
from __future__ import division, print_function, absolute_import
from numpy.testing import assert_
import pytest
from scipy._lib.six import xrange
from scipy.optimize import nonlin, root
from numpy import matrix, diag, dot
from numpy.linalg impor... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@optimize@tests@test_nonlin.py@.PATH_END.py |
{
"filename": "nddata.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/nddata/nddata.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# This module implements the base NDData class.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from copy import deepcopy
from .nddata_base import NDDataBase
from .nduncerta... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@nddata@nddata.py@.PATH_END.py |
{
"filename": "encoders.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/redis/py3/redis/_parsers/encoders.py",
"type": "Python"
} | from ..exceptions import DataError
class Encoder:
"Encode strings to bytes-like and decode bytes-like to strings"
__slots__ = "encoding", "encoding_errors", "decode_responses"
def __init__(self, encoding, encoding_errors, decode_responses):
self.encoding = encoding
self.encoding_errors =... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@redis@py3@redis@_parsers@encoders.py@.PATH_END.py |
{
"filename": "_version.py",
"repo_name": "handley-lab/anesthetic",
"repo_path": "anesthetic_extracted/anesthetic-master/anesthetic/_version.py",
"type": "Python"
} | __version__ = '2.9.1'
| handley-labREPO_NAMEanestheticPATH_START.@anesthetic_extracted@anesthetic-master@anesthetic@_version.py@.PATH_END.py |
{
"filename": "tools.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/tools.py",
"type": "Python"
} | """
tools
=====
Functions that USERS will possibly want access to.
"""
import json
import warnings
import os
from plotly import exceptions, optional_imports
from plotly.files import PLOTLY_DIR
DEFAULT_PLOTLY_COLORS = [
"rgb(31, 119, 180)",
"rgb(255, 127, 14)",
"rgb(44, 160, 44)",
"rgb(214, 39, 40)"... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@tools.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "cta-observatory/cta-lstchain",
"repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/calib/camera/tests/__init__.py",
"type": "Python"
} | cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@calib@camera@tests@__init__.py@.PATH_END.py | |
{
"filename": "motion.py",
"repo_name": "dstndstn/tractor",
"repo_path": "tractor_extracted/tractor-main/tractor/motion.py",
"type": "Python"
} | from .utils import *
from .basics import *
class Parallax(ArithmeticParams, ScalarParam):
''' in arcesc '''
stepsize = 1e-3
def __str__(self):
return 'Parallax: %.3f arcsec' % (self.getValue())
class ParallaxWithPrior(Parallax):
def getLogPrior(self):
p = self.getValue()
if ... | dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@tractor@motion.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/treemap/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "treemap.hoverlabel"
_path_str = "treemap.hoverlabel.font"
_valid_props = {
"color",
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@treemap@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "ii_plus_3d.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/ia_correlations/ii_plus_3d.py",
"type": "Python"
} | r"""
Module containing the `~halotools.mock_observables.alignments.ii_plus_3d` function used to
calculate the intrinsic ellipticity-ellipticity (II) correlation
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from math import pi, gamma
from .alignment_helpers... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@ia_correlations@ii_plus_3d.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "stephane-caron/qpsolvers",
"repo_path": "qpsolvers_extracted/qpsolvers-main/qpsolvers/utils.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright 2016-2022 Stéphane Caron and the qpsolvers contributors
"""Utility functions."""
from typing import Union
import numpy as np
import scipy.sparse as spa
def print_matrix_vector(
A: Union[np.ndarray, spa.csc_... | stephane-caronREPO_NAMEqpsolversPATH_START.@qpsolvers_extracted@qpsolvers-main@qpsolvers@utils.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/database/model/__init__.py",
"type": "Python"
} | from .fit import *
from .instance import *
from .model import *
from .prior import *
from .array import *
from .compound import *
from .common import *
| rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@database@model@__init__.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "jpierel14/snsed",
"repo_path": "snsed_extracted/snsed-master/docs/source/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# snsedextend documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 28 14:09:47 2018.
#
# 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.
#... | jpierel14REPO_NAMEsnsedPATH_START.@snsed_extracted@snsed-master@docs@source@conf.py@.PATH_END.py |
{
"filename": "_row.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/table/domain/_row.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class RowValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="row", parent_name="table.domain", **kwargs):
super(RowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@table@domain@_row.py@.PATH_END.py |
{
"filename": "Util.py",
"repo_name": "Keck-DataReductionPipelines/MosfireDRP",
"repo_path": "MosfireDRP_extracted/MosfireDRP-master/MOSFIRE/Util.py",
"type": "Python"
} | Keck-DataReductionPipelinesREPO_NAMEMosfireDRPPATH_START.@MosfireDRP_extracted@MosfireDRP-master@MOSFIRE@Util.py@.PATH_END.py | |
{
"filename": "data.py",
"repo_name": "ukatc/AtLAST_sensitivity_calculator",
"repo_path": "AtLAST_sensitivity_calculator_extracted/AtLAST_sensitivity_calculator-main/atlast_sc/data.py",
"type": "Python"
} | import math
from dataclasses import dataclass
import astropy.units as u
from astropy.units import Unit, Quantity
from atlast_sc.utils import DataHelper
from atlast_sc.exceptions import UnitException, ValueOutOfRangeException,\
ValueNotAllowedException, ValueTooHighException, ValueTooLowException
class Data:
"... | ukatcREPO_NAMEAtLAST_sensitivity_calculatorPATH_START.@AtLAST_sensitivity_calculator_extracted@AtLAST_sensitivity_calculator-main@atlast_sc@data.py@.PATH_END.py |
{
"filename": "coroutine_subprocess_poc.py",
"repo_name": "SAMI-Galaxy-Survey/sami",
"repo_path": "sami_extracted/sami-master/coroutine_subprocess_poc.py",
"type": "Python"
} | """
git-repository: coroutine_subprocess.py
Based on: https://stackoverflow.com/questions/34020599/asynchronously-receive-output-from-long-running-shell-commands-with-asyncio-pyt
History
-------
Created by: agreen on 13/2/18
"""
from __future__ import absolute_import, division, print_function, unicode_literals
f... | SAMI-Galaxy-SurveyREPO_NAMEsamiPATH_START.@sami_extracted@sami-master@coroutine_subprocess_poc.py@.PATH_END.py |
{
"filename": "_showscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/_showscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="showscale", parent_name="barpolar.marker", **kwargs
):
super(ShowscaleValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@_showscale.py@.PATH_END.py |
{
"filename": "_textcasesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/textfont/_textcasesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="textcasesrc", parent_name="scattersmith.textfont", **kwargs
):
super(TextcasesrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@textfont@_textcasesrc.py@.PATH_END.py |
{
"filename": "n0_fft.py",
"repo_name": "NextGenCMB/lensitbiases",
"repo_path": "lensitbiases_extracted/lensitbiases-main/lensitbiases/n0_fft.py",
"type": "Python"
} | import os
import numpy as np
from lensitbiases.utils_n1 import extcl, cls_dot
from lensitbiases.box import box
import pyfftw
class nhl_fft:
def __init__(self, cls_ivfs, cls_w, lminbox=50, lmaxbox=2500, k2l=None, cls_w2=None):
"""
Note:
for a response calculation set cls_w to t... | NextGenCMBREPO_NAMElensitbiasesPATH_START.@lensitbiases_extracted@lensitbiases-main@lensitbiases@n0_fft.py@.PATH_END.py |
{
"filename": "pspnet.py",
"repo_name": "qubvel/segmentation_models",
"repo_path": "segmentation_models_extracted/segmentation_models-master/segmentation_models/models/pspnet.py",
"type": "Python"
} | from keras_applications import get_submodules_from_kwargs
from ._common_blocks import Conv2dBn
from ._utils import freeze_model, filter_keras_submodules
from ..backbones.backbones_factory import Backbones
backend = None
layers = None
models = None
keras_utils = None
# -----------------------------------------------... | qubvelREPO_NAMEsegmentation_modelsPATH_START.@segmentation_models_extracted@segmentation_models-master@segmentation_models@models@pspnet.py@.PATH_END.py |
{
"filename": "make_ascii_catalog.py",
"repo_name": "grzeimann/Diagnose",
"repo_path": "Diagnose_extracted/Diagnose-main/make_ascii_catalog.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 19 09:36:32 2021
@author: gregz
"""
import glob
import numpy as np
import os.path as op
import sys
from astropy.io import fits
from astropy.table import Table
filename = sys.argv[1]
t = 2.
folder = sys.argv[2]
N = fits.open(filename)[2].shape[0]
... | grzeimannREPO_NAMEDiagnosePATH_START.@Diagnose_extracted@Diagnose-main@make_ascii_catalog.py@.PATH_END.py |
{
"filename": "maxContextCalc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/otlLib/maxContextCalc.py",
"type": "Python"
} | __all__ = ["maxCtxFont"]
def maxCtxFont(font):
"""Calculate the usMaxContext value for an entire font."""
maxCtx = 0
for tag in ("GSUB", "GPOS"):
if tag not in font:
continue
table = font[tag].table
if not table.LookupList:
continue
for lookup in ta... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@otlLib@maxContextCalc.py@.PATH_END.py |
{
"filename": "_shapesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/marker/pattern/_shapesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="shapesrc", parent_name="funnelarea.marker.pattern", **kwargs
):
super(ShapesrcValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@marker@pattern@_shapesrc.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "njcuk9999/lbl",
"repo_path": "lbl_extracted/lbl-main/lbl/instruments/README.md",
"type": "Markdown"
} | # Instrument directory
- This contains instrument python scripts (and `select.py`)
- Each instrument contains a class i.e. for SPIRou:
```python
from lbl.instruments import default
class Spirou(default.Instrument):
def __init__(self, params):
# call to super function
# noinspection PyTypeChecke... | njcuk9999REPO_NAMElblPATH_START.@lbl_extracted@lbl-main@lbl@instruments@README.md@.PATH_END.py |
{
"filename": "typesense.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/typesense.py",
"type": "Python"
} | from __future__ import annotations
import uuid
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, Union
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.utils import get_from_env
from langchain_core.vectorstores import VectorStore
... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@typesense.py@.PATH_END.py |
{
"filename": "Plot.Opac.py",
"repo_name": "alexrhowe/APOLLO",
"repo_path": "APOLLO_extracted/APOLLO-master/Plot.Opac.py",
"type": "Python"
} | from __future__ import print_function
import sys
import numpy as np
import matplotlib.pyplot as plt
if len(sys.argv)<=3:
print('Error: arguments not specified. File1, File2, Pressure, Temperature')
sys.exit()
file1 = sys.argv[1]
file2 = sys.argv[2]
press = np.log10((float)(sys.argv[3]))
temp = np.log10((float... | alexrhoweREPO_NAMEAPOLLOPATH_START.@APOLLO_extracted@APOLLO-master@Plot.Opac.py@.PATH_END.py |
{
"filename": "K2_Detrend_AMC.py",
"repo_name": "barentsen/dave",
"repo_path": "dave_extracted/dave-master/extractDetrend/K2photo/K2_Detrend_AMC.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
import matplotlib.pyplot as plt
from martinsff import martinsff
import extract_lc
extract_lc = reload(extract_lc)
from astropy.stats import median_absolute_deviation as MAD
import astropy
from astropy.table import Table
import gl... | barentsenREPO_NAMEdavePATH_START.@dave_extracted@dave-master@extractDetrend@K2photo@K2_Detrend_AMC.py@.PATH_END.py |
{
"filename": "ModelReaderTesting_WACCMXtiming.ipynb",
"repo_name": "nasa/Kamodo",
"repo_path": "Kamodo_extracted/Kamodo-master/Validation/Notebooks/ModelReaderTesting_WACCMXtiming.ipynb",
"type": "Jupyter Notebook"
} | # Demo notebook for Model Reader
```python
model = 'WACCMX'
file_dir = 'D:/WACCMX/Jack_Wang_081222_IT_2/'
import kamodo_ccmc.flythrough.model_wrapper as MW
MW.Variable_Search('', model, file_dir)
```
```python
var_list = ['E_east', 'E_equator', 'TEC', 'H_geopot_ilev', 'N_e', 'rho', 'vi_north', 'v_north',
... | nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@Validation@Notebooks@ModelReaderTesting_WACCMXtiming.ipynb@.PATH_END.py |
{
"filename": "Example5_PSF_Correction.ipynb",
"repo_name": "bsafdi/NPTFit",
"repo_path": "NPTFit_extracted/NPTFit-master/examples/Example5_PSF_Correction.ipynb",
"type": "Jupyter Notebook"
} | # Example 5: NPTF Correction for the Point Spread Function (PSF)
In this example we show how to account for the PSF correction using `psf_correction.py`
Fundamentally the presence of a non-zero PSF implies that the photons from any point source will be smeared out into some region around its true location. This effec... | bsafdiREPO_NAMENPTFitPATH_START.@NPTFit_extracted@NPTFit-master@examples@Example5_PSF_Correction.ipynb@.PATH_END.py |
{
"filename": "transfer_learning.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/guides/transfer_learning.py",
"type": "Python"
} | """
Title: Transfer learning & fine-tuning
Author: [fchollet](https://twitter.com/fchollet)
Date created: 2020/04/15
Last modified: 2023/06/25
Description: Complete guide to transfer learning & fine-tuning in Keras.
Accelerator: GPU
"""
"""
## Setup
"""
import numpy as np
import keras
from keras import layers
import ... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@guides@transfer_learning.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "jdswinbank/Comet",
"repo_path": "Comet_extracted/Comet-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# Comet documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 28 16:29:06 2012.
#
# 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... | jdswinbankREPO_NAMECometPATH_START.@Comet_extracted@Comet-master@docs@conf.py@.PATH_END.py |
{
"filename": "intervals_between_obs_metric.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/maf_contrib/intervals_between_obs_metric.py",
"type": "Python"
} | # Example for IntervalsBetweenObsMetric
# Somayeh Khakpash - Lehigh University
# Last edited : 10/21/2020
# Calculates statistics (mean or median or standard deviation) of intervals
# between observations during simultaneous windows/Inter-seasonal gap of
# another survey.
# SurveyIntervals is the list of the survey obs... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@maf_contrib@intervals_between_obs_metric.py@.PATH_END.py |
{
"filename": "utilities.py",
"repo_name": "astrolabsoftware/fink-science",
"repo_path": "fink-science_extracted/fink-science-master/tutorial/utilities.py",
"type": "Python"
} | # Copyright 2020 AstroLab Software
# Author: Julien Peloton
#
# 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 applicabl... | astrolabsoftwareREPO_NAMEfink-sciencePATH_START.@fink-science_extracted@fink-science-master@tutorial@utilities.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/scatterpolargl/marker/colorbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="thickness",
parent_name="scatterpolargl.marker.colorbar",
**kwargs,
):
super(ThicknessValidator, self).__init__(
plot... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@marker@colorbar@_thickness.py@.PATH_END.py |
{
"filename": "release_note.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/tools/releasing/release_note.py",
"type": "Python"
} | """
Generate a release note template. The key parameters are
RELEASE, VERSION, MILESTONE BRANCH, and LAST_COMMIT_SHA.
LAST_COMMIT_SHA is the sha of the commit used to produce the previous
version. This is used to determine the time stamp where commits in the
current release begin.
Requires PyGitHub, dateparser and j... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@tools@releasing@release_note.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "RadioAstronomySoftwareGroup/pyuvdata",
"repo_path": "pyuvdata_extracted/pyuvdata-main/src/pyuvdata/__init__.py",
"type": "Python"
} | # Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Init file for pyuvdata."""
import contextlib
import warnings
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from setuptools_scm import get_version
# copy this function here from s... | RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@src@pyuvdata@__init__.py@.PATH_END.py |
{
"filename": "_ufunc.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/_typing/_ufunc.py",
"type": "Python"
} | from .. import ufunc
_UFunc_Nin1_Nout1 = ufunc
_UFunc_Nin2_Nout1 = ufunc
_UFunc_Nin1_Nout2 = ufunc
_UFunc_Nin2_Nout2 = ufunc
_GUFunc_Nin2_Nout1 = ufunc
| numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_typing@_ufunc.py@.PATH_END.py |
{
"filename": "test_status.py",
"repo_name": "mpi4py/mpi4py",
"repo_path": "mpi4py_extracted/mpi4py-master/test/test_status.py",
"type": "Python"
} | from mpi4py import MPI
import mpiunittest as unittest
class TestStatus(unittest.TestCase):
def setUp(self):
self.STATUS = MPI.Status()
def tearDown(self):
self.STATUS = None
def testDefaultFieldValues(self):
self.assertEqual(self.STATUS.Get_source(), MPI.ANY_SOURCE)
self... | mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_status.py@.PATH_END.py |
{
"filename": "test_gs_crt.py",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/tests/adv/test_gs_crt.py",
"type": "Python"
} | """
test_gs_crt.py
Author: Jordan Mirocha
Affiliation: UCLA
Created on: Wed May 11 09:46:05 PDT 2016
Description:
"""
import ares
import numpy as np
import matplotlib.pyplot as pl
pars = \
{
'pop_sed{1}': 'mcd',
'pop_alpha{1}': -1.5,
'pop_Emin{1}': 2e2,
'pop_Emax{1}': 3e4,
'pop_EminNorm{1}': 5e2,
'pop_Ema... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@adv@test_gs_crt.py@.PATH_END.py |
{
"filename": "_xaxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/scene/_xaxis.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class XAxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.xaxis"
_valid_props = {
"autorange",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@scene@_xaxis.py@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/legend/font/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="family", parent_name="layout.legend.font", **kwargs
):
super(FamilyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@legend@font@_family.py@.PATH_END.py |
{
"filename": "figtable.py",
"repo_name": "xraypy/xraylarch",
"repo_path": "xraylarch_extracted/xraylarch-master/doc/sphinx/ext/figtable.py",
"type": "Python"
} | """
Adds a new directive called 'figtable' that creates a figure
around a table.
"""
from docutils import nodes
import docutils.parsers.rst.directives as directives
from docutils.parsers.rst import Directive
from sphinx import addnodes
class figtable(nodes.General, nodes.Element):
pass
def visit_figtable_node(se... | xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@doc@sphinx@ext@figtable.py@.PATH_END.py |
{
"filename": "orca_defaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/_plotly_future_/orca_defaults.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@_plotly_future_@orca_defaults.py@.PATH_END.py | |
{
"filename": "kernel.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/amplitude/kernel.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import numpy as np
from numba import prange, njit
from numba.extending import overload
from quartical.utils.numba import (coerce_literal,
JIT_OPTIONS,
PARALLEL_JIT_OPTIONS)
from quartical.gains.general.generics import (native_... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@amplitude@kernel.py@.PATH_END.py |
{
"filename": "_util.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/filelock/py2/filelock/_util.py",
"type": "Python"
} | import os
import stat
import sys
PermissionError = PermissionError if sys.version_info[0] == 3 else OSError
def raise_on_exist_ro_file(filename):
try:
file_stat = os.stat(filename) # use stat to do exists + can write to check without race condition
except OSError:
return None # swallow does... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@filelock@py2@filelock@_util.py@.PATH_END.py |
{
"filename": "fixwheel.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/build/rocm/tools/fixwheel.py",
"type": "Python"
} | #!/usr/bin/env python3
# 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... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@build@rocm@tools@fixwheel.py@.PATH_END.py |
{
"filename": "ttv2fast2furious.py",
"repo_name": "shadden/TTV2Fast2Furious",
"repo_path": "TTV2Fast2Furious_extracted/TTV2Fast2Furious-master/ttv2fast2furious/ttv2fast2furious.py",
"type": "Python"
} | """
.. module:: ttv2fast2furious
:platform: Unix, Mac, Windows
:synopsis: Routines for TTV analysis
.. moduleauthor:: Sam Hadden <samuel.hadden@cfa.harvard.edu>
"""
import warnings
import numpy as np
from scipy.optimize import lsq_linear
from scipy.special import gammainc,gammaincinv
from scipy.special import e... | shaddenREPO_NAMETTV2Fast2FuriousPATH_START.@TTV2Fast2Furious_extracted@TTV2Fast2Furious-master@ttv2fast2furious@ttv2fast2furious.py@.PATH_END.py |
{
"filename": "SolidSpheral1d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/SimulationControl/SolidSpheral1d.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# Import SolidSpheral objects, setting the 1-D objects as generic names.
#-------------------------------------------------------------------------------
from Spheral1d import *
| LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@SimulationControl@SolidSpheral1d.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/bar/selected/textfont/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._color import ColorValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._color.ColorValidator"]
)
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@selected@textfont@__init__.py@.PATH_END.py |
{
"filename": "test_integrator.py",
"repo_name": "astropy/photutils",
"repo_path": "photutils_extracted/photutils-main/photutils/isophote/tests/test_integrator.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the integrator module.
"""
import numpy as np
import pytest
from astropy.io import fits
from numpy.testing import assert_allclose
from photutils.datasets import get_path
from photutils.isophote.integrator import (BILINEAR, MEAN, MEDIAN,
... | astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@isophote@tests@test_integrator.py@.PATH_END.py |
{
"filename": "VAC_MVM_Marvin_tutorial.ipynb",
"repo_name": "sdss/marvin",
"repo_path": "marvin_extracted/marvin-main/docs/sphinx/tutorials/notebooks/VAC_MVM_Marvin_tutorial.ipynb",
"type": "Jupyter Notebook"
} | # MaNGA Visual Morphology Catalogue (MVM-VAC)
Credit: Jose Antonio Vazquez Mata
See [SDSS DR16 MVM](https://www.sdss.org/dr16/data_access/value-added-catalogs/?vac_id=manga-visual-morphologies-from-sdss-and-desi-images) for more information about this VAC.
This catalogue contains a direct visual morphological classi... | sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@docs@sphinx@tutorials@notebooks@VAC_MVM_Marvin_tutorial.ipynb@.PATH_END.py |
{
"filename": "example_inv_murakami.py",
"repo_name": "geodynamics/burnman",
"repo_path": "burnman_extracted/burnman-main/examples/example_inv_murakami.py",
"type": "Python"
} | from __future__ import absolute_import
from __future__ import print_function
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU
# GPL v2 or later.
import sys
import numpy as np
import m... | geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@examples@example_inv_murakami.py@.PATH_END.py |
{
"filename": "pulsations.py",
"repo_name": "mikecokina/elisa",
"repo_path": "elisa_extracted/elisa-master/src/elisa/binary_system/surface/pulsations.py",
"type": "Python"
} | import numpy as np
from .. import utils as bsutils
from ... pulse.container_ops import (
incorporate_pulsations_to_model,
generate_harmonics
)
from ... import const
def build_harmonics(system, component, components_distance):
"""
Adds pre-calculated spherical harmonics values for each pulsation mode.... | mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@binary_system@surface@pulsations.py@.PATH_END.py |
{
"filename": "xcdm_nopert.ipynb",
"repo_name": "NumCosmo/NumCosmo",
"repo_path": "NumCosmo_extracted/NumCosmo-master/notebooks/apes_tests/xcdm_nopert.ipynb",
"type": "Jupyter Notebook"
} | ---
**License**
xcdm_nopert
Thu Mar 16 16:56:00 2023\
Copyright 2023\
Sandro Dias Pinto Vitenti <vitenti@uel.br>
---
---
xcdm_nopert\
Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
numcosmo is free software: you can redistribute it and/or modify it
under the terms of the GNU General Publi... | NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@notebooks@apes_tests@xcdm_nopert.ipynb@.PATH_END.py |
{
"filename": "tfsa-2021-063.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-063.md",
"type": "Markdown"
} | ## TFSA-2021-063: Undefined behavior in `MaxPool3DGradGrad`
### CVE Number
CVE-2021-29574
### Impact
The implementation of `tf.raw_ops.MaxPool3DGradGrad` exhibits undefined behavior
by dereferencing null pointers backing attacker-supplied empty tensors:
```python
import tensorflow as tf
orig_input = tf.constant([0.... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-063.md@.PATH_END.py |
{
"filename": "_outlinecolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/colorbar/_outlinecolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="outlinecolor", parent_name="choropleth.colorbar", **kwargs
):
super(OutlinecolorValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@colorbar@_outlinecolor.py@.PATH_END.py |
{
"filename": "_weightsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/table/header/font/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="weightsrc", parent_name="table.header.font", **kwargs
):
super(WeightsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@table@header@font@_weightsrc.py@.PATH_END.py |
{
"filename": "test_aux_functions.py",
"repo_name": "tcassanelli/pyoof",
"repo_path": "pyoof_extracted/pyoof-master/pyoof/tests/test_aux_functions.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Tomas Cassanelli
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy.tests.helper import assert_quantity_allclose
from astropy.utils.misc import NumpyRNGContext
from astropy import units as apu
import pyoof
def test_str2LaTeX... | tcassanelliREPO_NAMEpyoofPATH_START.@pyoof_extracted@pyoof-master@pyoof@tests@test_aux_functions.py@.PATH_END.py |
{
"filename": "coron.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/outlier_detection/coron.py",
"type": "Python"
} | """
Submodule for performing outlier detection on coronagraphy data.
"""
import logging
import numpy as np
from stdatamodels.jwst import datamodels
from jwst.resample.resample_utils import build_mask
from .utils import create_cube_median, flag_model_crs
from ._fileio import save_median
log = logging.getLogger(__n... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@outlier_detection@coron.py@.PATH_END.py |
{
"filename": "visualize.py",
"repo_name": "supernnova/SuperNNova",
"repo_path": "SuperNNova_extracted/SuperNNova-main/python/supernnova/visualization/visualize.py",
"type": "Python"
} | import os
from pathlib import Path
import h5py
import glob
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
plt.switch_backend("agg")
def plot_lightcurves(df, SNIDs, settings):
"""Utility for gridspec of lightcruves
Args:
df (pandas.DataFr... | supernnovaREPO_NAMESuperNNovaPATH_START.@SuperNNova_extracted@SuperNNova-main@python@supernnova@visualization@visualize.py@.PATH_END.py |
{
"filename": "tests_lunar_cotrans.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/themis/tests/tests_lunar_cotrans.py",
"type": "Python"
} | """Tests of gse2sse and sse2sel functions."""
import unittest
from numpy.testing import assert_array_almost_equal_nulp, assert_array_max_ulp, assert_allclose
from copy import deepcopy
from pytplot import data_exists, get_data, store_data, cdf_to_tplot, del_data, tplot_restore, replace_metadata
from pytplot import get_c... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@themis@tests@tests_lunar_cotrans.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "apertif/apercal",
"repo_path": "apercal_extracted/apercal-master/apercal/pipeline/__init__.py",
"type": "Python"
} | from start_pipeline import *
| apertifREPO_NAMEapercalPATH_START.@apercal_extracted@apercal-master@apercal@pipeline@__init__.py@.PATH_END.py |
{
"filename": "test_array.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/mapper/test_array.py",
"type": "Python"
} | import pytest
import numpy as np
import autofit as af
from autoconf.dictable import to_dict
@pytest.fixture
def array():
return af.Array(
shape=(2, 2),
prior=af.GaussianPrior(mean=0.0, sigma=1.0),
)
@pytest.fixture
def array_3d():
return af.Array(
shape=(2, 2, 2),
prior=... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@mapper@test_array.py@.PATH_END.py |
{
"filename": "degrading_a_spectrum.ipynb",
"repo_name": "jlustigy/coronagraph",
"repo_path": "coronagraph_extracted/coronagraph-master/docs/notebooks/degrading_a_spectrum.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
%config InlineBackend.figure_format = "png2x"
from __future__ import print_function
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
```
```python
rcParams["savefig.dpi"] = 200
rcParams["figure.dpi"] = ... | jlustigyREPO_NAMEcoronagraphPATH_START.@coronagraph_extracted@coronagraph-master@docs@notebooks@degrading_a_spectrum.ipynb@.PATH_END.py |
{
"filename": "eht_unify.py",
"repo_name": "AFD-Illinois/iharm3d",
"repo_path": "iharm3d_extracted/iharm3d-master/script/analysis/eht_unify.py",
"type": "Python"
} | #!/usr/bin/env python3
import os, sys
import pickle
import numpy as np
import hdf5_to_dict as io
avgs = []
for fname in sys.argv[1:-1]:
print("Loading {}".format(fname))
avgs.append(pickle.load(open(fname, "rb")))
avgs[-1]['fname'] = fname
#for avg in avgs:
# print("Name: {}, contents: {}".format(avg['fname'... | AFD-IllinoisREPO_NAMEiharm3dPATH_START.@iharm3d_extracted@iharm3d-master@script@analysis@eht_unify.py@.PATH_END.py |
{
"filename": "vectorpotentialdipole_verify.py",
"repo_name": "fmihpc/vlasiator",
"repo_path": "vlasiator_extracted/vlasiator-master/doc/vectordipole/vectorpotentialdipole_verify.py",
"type": "Python"
} | #!/usr/bin/env python import matplotlib.pyplot as plt
# /*
# * This file is part of Vlasiator.
# * Copyright 2010-2016 Finnish Meteorological Institute
# * Copyright 2017-2019 University of Helsinki
# *
# * For detail... | fmihpcREPO_NAMEvlasiatorPATH_START.@vlasiator_extracted@vlasiator-master@doc@vectordipole@vectorpotentialdipole_verify.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/llms/utils.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms.utils import enforce_stop_tokens
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@llms@utils.py@.PATH_END.py |
{
"filename": "waveforms.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/signal/waveforms.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.signal` namespace for importing the functions
# included below.
import warnings
from . import _waveforms
__all__ = [ # noqa: F822
'sawtooth', 'square', 'gausspulse', 'chirp', 'sweep_poly',
'unit_impulse', 'place', '... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@signal@waveforms.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/stpipe/tests/data/__init__.py",
"type": "Python"
} | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@stpipe@tests@data@__init__.py@.PATH_END.py | |
{
"filename": "_detail.py",
"repo_name": "bek0s/gbkfit",
"repo_path": "gbkfit_extracted/gbkfit-master/src/gbkfit/fitting/fitters/_detail.py",
"type": "Python"
} | bek0sREPO_NAMEgbkfitPATH_START.@gbkfit_extracted@gbkfit-master@src@gbkfit@fitting@fitters@_detail.py@.PATH_END.py | |
{
"filename": "simple_anim.ipynb",
"repo_name": "HITS-AIN/PINK",
"repo_path": "PINK_extracted/PINK-master/jupyter/devel/simple_anim.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib widget
```
# Animated line plot
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
fig, ax = plt.subplots()
x = np.arange(0, 2*np.pi, 0.01)
line, = ax.plot(x, np.sin(x))
def init(): # only required for blitting to give a clean slate.
... | HITS-AINREPO_NAMEPINKPATH_START.@PINK_extracted@PINK-master@jupyter@devel@simple_anim.ipynb@.PATH_END.py |
{
"filename": "_tickformat.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_tickformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickformat", parent_name="funnel.marker.colorbar", **kwargs
):
super(TickformatValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@marker@colorbar@_tickformat.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "geggo/phase-unwrap",
"repo_path": "phase-unwrap_extracted/phase-unwrap-master/unwrap/__init__.py",
"type": "Python"
} | from __future__ import absolute_import
from unwrap.unwrap import unwrap
| geggoREPO_NAMEphase-unwrapPATH_START.@phase-unwrap_extracted@phase-unwrap-master@unwrap@__init__.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "cheng-zhao/FCFC",
"repo_path": "FCFC_extracted/FCFC-main/README.md",
"type": "Markdown"
} | # Fast Correlation Function Calculator (FCFC)


<img src="doc/logo/FCFC_logo.svg" align="right" />
## Table of Contents
- [Introduction](#introduction)
- [... | cheng-zhaoREPO_NAMEFCFCPATH_START.@FCFC_extracted@FCFC-main@README.md@.PATH_END.py |
{
"filename": "test_mcmc.py",
"repo_name": "andreatramacere/jetset",
"repo_path": "jetset_extracted/jetset-master/jetset/tests/test_mcmc.py",
"type": "Python"
} | import pytest
from .base_class import TestBase
class TestEmcee(TestBase):
def integration_suite(self,fit_dict=None,sed_number=None,plot=False):
if sed_number is not None and fit_dict is None:
from .test_model_fit import prepare_asset
fit_dict=prepare_asset(plot=plot,sed_number=sed_... | andreatramacereREPO_NAMEjetsetPATH_START.@jetset_extracted@jetset-master@jetset@tests@test_mcmc.py@.PATH_END.py |
{
"filename": "frequency_flux.py",
"repo_name": "HeRTA/FRBSTATS",
"repo_path": "FRBSTATS_extracted/FRBSTATS-main/figs/frequency_flux.py",
"type": "Python"
} | from csv import reader
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
### Set MPL plot parameters
# Selectable SVG text
plt.rcParams['svg.fonttype'] = 'none'
# Use TeX
plt.rcParams['text.usetex'] = True
# Set figsize
plt.rcParams["figure.figsize"] = (24,20)
plt.rcParams["figure.dpi"] = ... | HeRTAREPO_NAMEFRBSTATSPATH_START.@FRBSTATS_extracted@FRBSTATS-main@figs@frequency_flux.py@.PATH_END.py |
{
"filename": "aggregate.py",
"repo_name": "hongwanliu/DarkHistory",
"repo_path": "DarkHistory_extracted/DarkHistory-master/darkhistory/numpy_groupies/aggregate.py",
"type": "Python"
} | """numpy-groupies aggregate function, numpy implementation."""
import numpy as np
"""Common helpers without certain dependencies."""
aggregate_common_doc = """
See readme file at https://github.com/ml31415/numpy-groupies for a full
description. Below we reproduce the "Full description of inputs"
section... | hongwanliuREPO_NAMEDarkHistoryPATH_START.@DarkHistory_extracted@DarkHistory-master@darkhistory@numpy_groupies@aggregate.py@.PATH_END.py |
{
"filename": "_isosurface.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/template/data/_isosurface.py",
"type": "Python"
} | from plotly.graph_objs import Isosurface
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@template@data@_isosurface.py@.PATH_END.py |
{
"filename": "disc_example.py",
"repo_name": "Jingxuan97/nemesispy",
"repo_path": "nemesispy_extracted/nemesispy-main/nemesispy/examples/disc_example.py",
"type": "Python"
} | import matplotlib
# matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import os
import time
from nemesispy.common.constants import G
from nemesispy.radtran.forward_model import ForwardModel
matplotlib.interactive(True)
# Read GCM data
from nemesispy.data.gcm.process_gcm import (nlon,nlat,xlon,xl... | Jingxuan97REPO_NAMEnemesispyPATH_START.@nemesispy_extracted@nemesispy-main@nemesispy@examples@disc_example.py@.PATH_END.py |
{
"filename": "PlotContours.py",
"repo_name": "bradkav/AntiparticleDM",
"repo_path": "AntiparticleDM_extracted/AntiparticleDM-master/analysis/PlotContours.py",
"type": "Python"
} | #!/usr/bin/python
"""
PlotContours.py
Plot individual contour plots of discrimination significance
for a given ensemble and DM mass...
BJK 30/06/2017
"""
import numpy as np
from numpy import pi
from scipy.integrate import quad
from scipy.interpolate import interp1d, interp2d
from scipy import ndimage
from matplotlib... | bradkavREPO_NAMEAntiparticleDMPATH_START.@AntiparticleDM_extracted@AntiparticleDM-master@analysis@PlotContours.py@.PATH_END.py |
{
"filename": "_customdatasrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermap/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="customdatasrc", parent_name="scattermap", **kwargs):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermap@_customdatasrc.py@.PATH_END.py |
{
"filename": "addmathjax.py",
"repo_name": "NumCosmo/NumCosmo",
"repo_path": "NumCosmo_extracted/NumCosmo-master/docs/addmathjax.py",
"type": "Python"
} | #!/usr/bin/env python3
#
# addmathjax.py
#
# Wed Nov 29 10:52:10 2023
# Copyright 2023 Sandro Dias Pinto Vitenti
# <vitenti@uel.br>
#
# addmathjax.py
# Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
#
# numcosmo is free software: you can redistribute it and/or modify it
# under the terms of the GNU Gen... | NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@docs@addmathjax.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="coloraxis", parent_name="surface", **kwargs):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@_coloraxis.py@.PATH_END.py |
{
"filename": "test_random_shapes.py",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/skimage/draw/tests/test_random_shapes.py",
"type": "Python"
} | import numpy as np
import pytest
from skimage._shared import testing
from skimage._shared._warnings import expected_warnings
from skimage.draw import random_shapes
def test_generates_color_images_with_correct_shape():
image, _ = random_shapes((128, 128), max_shapes=10)
assert image.shape == (128, 128, 3)
d... | scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@draw@tests@test_random_shapes.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/smith/realaxis/tickfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="style",
parent_name="layout.smith.realaxis.tickfont",
**kwargs,
):
super(StyleValidator, self).__init__(
plotly_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@smith@realaxis@tickfont@_style.py@.PATH_END.py |
{
"filename": "setup_package.py",
"repo_name": "LCOGT/banzai",
"repo_path": "banzai_extracted/banzai-main/banzai/utils/setup_package.py",
"type": "Python"
} | import os
import numpy as np
from distutils.core import Extension
from extension_helpers import add_openmp_flags_if_available
UTIL_DIR = os.path.relpath(os.path.dirname(__file__))
def get_extensions():
med_sources = [str(os.path.join(UTIL_DIR, "median_utils.pyx")),
str(os.path.join(UTIL_DIR, "... | LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@utils@setup_package.py@.PATH_END.py |
{
"filename": "application.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/traitlets/py2/traitlets/config/application.py",
"type": "Python"
} | # encoding: utf-8
"""A base class for a configurable application."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from copy import deepcopy
import json
import logging
import os
import re
import sys
from collections import d... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@traitlets@py2@traitlets@config@application.py@.PATH_END.py |
{
"filename": "simple_anim.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/animation/simple_anim.py",
"type": "Python"
} | """
==================
Animated line plot
==================
Output generated via `matplotlib.animation.Animation.to_jshtml`.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
fig, ax = plt.subplots()
x = np.arange(0, 2*np.pi, 0.01)
line, = ax.plot(x, np.sin(x))
def ... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@animation@simple_anim.py@.PATH_END.py |
{
"filename": "radiative_transfer.py",
"repo_name": "dust-busters/DBNets",
"repo_path": "DBNets_extracted/DBNets-main/training/radiative_transfer.py",
"type": "Python"
} | import astropy.constants as k
from astropy import units as u
import numpy as np
import matplotlib.pyplot as plt
import dsharp_opac as opacity
import oofargo
import pandas as pd
import numba as nb
rho_dust = 1.6686*u.g/u.cm**3#g/cm^3
m_star = k.M_sun.cgs
r_planet = k.au.cgs*50
obs_wl = 1.3 * u.mm
mu = 2.3
Sigma0 = 1e-3... | dust-bustersREPO_NAMEDBNetsPATH_START.@DBNets_extracted@DBNets-main@training@radiative_transfer.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/sankey/node/hoverlabel/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="sankey.node.hoverlabel.font", **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@sankey@node@hoverlabel@font@_color.py@.PATH_END.py |
{
"filename": "convolve_vlsr.ipynb",
"repo_name": "tere-valdivia/Barnard_5_infall",
"repo_path": "Barnard_5_infall_extracted/Barnard_5_infall-main/B5_NOEMA_30m/gaussfit/convolve_vlsr.ipynb",
"type": "Jupyter Notebook"
} | ```python
# original resolution: 4.07672 arcsec x 3.78778 arcsec, pa: -81.4035 deg
# matching kernel: 4.65325 arcsec x 4.40231 arcsec, pa: 8.59652 deg
# target resolution: 6 arcsec x 6 arcsec, pa: 0 deg
import numpy as np
from astropy.modeling.models import Gaussian2D
import astropy.units as u
from photutils.psf imp... | tere-valdiviaREPO_NAMEBarnard_5_infallPATH_START.@Barnard_5_infall_extracted@Barnard_5_infall-main@B5_NOEMA_30m@gaussfit@convolve_vlsr.ipynb@.PATH_END.py |
{
"filename": "MobileNetV2Spec.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/image_classifier/MobileNetV2Spec.md",
"type": "Markdown"
} | page_type: reference
description: Creates MobileNet v2 model spec. See also: <a href="../../tflite_model_maker/image_classifier/ModelSpec"><code>tflite_model_maker.image_classifier.ModelSpec</code></a>.
<link rel="stylesheet" href="/site-assets/css/style.css">
<!-- DO NOT EDIT! Automatically generated file. -->
<di... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_model_maker@image_classifier@MobileNetV2Spec.md@.PATH_END.py |
{
"filename": "panel_c_d_e.py",
"repo_name": "nespinoza/wasp39-terminators",
"repo_path": "wasp39-terminators_extracted/wasp39-terminators-main/extended-figure3/panel_c_d_e.py",
"type": "Python"
} | import numpy as np
import matplotlib
from matplotlib.gridspec import GridSpec
import matplotlib.ticker as tck
import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager
import pickle
import glob
matplotlib.rcParams['font.family'] = 'sans-serif'
matplotlib.rcParams['font.sans-serif'] = 'Arial'
mat... | nespinozaREPO_NAMEwasp39-terminatorsPATH_START.@wasp39-terminators_extracted@wasp39-terminators-main@extended-figure3@panel_c_d_e.py@.PATH_END.py |
{
"filename": "_textfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scattergl/unselected/_textfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Textfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattergl.unselected"
_path_str = "scattergl.unselected.textfont"
_valid_props = {"color"}... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scattergl@unselected@_textfont.py@.PATH_END.py |
{
"filename": "pyLIMA_example_1.py",
"repo_name": "ebachelet/pyLIMA",
"repo_path": "pyLIMA_extracted/pyLIMA-master/examples/pyLIMA_example_1.py",
"type": "Python"
} | '''
Welcome to pyLIMA (v2) tutorial 1!
In this tutorial you will learn how pyLIMA works by fitting a simulated data set.
We will cover how to read in data files, call different fitting routines and how to
make plots.
Please take some time to familiarize yourself with the pyLIMA documentation.
'''
### Import the requir... | ebacheletREPO_NAMEpyLIMAPATH_START.@pyLIMA_extracted@pyLIMA-master@examples@pyLIMA_example_1.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/streamtube/lighting/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._vertexnormalsepsilon import VertexnormalsepsilonValidator
from ._specular import SpecularValidator
from ._roughness import RoughnessValidator
from ._fresnel import FresnelValidator
from ._facenormalsep... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@streamtube@lighting@__init__.py@.PATH_END.py |
{
"filename": "TestWeights.py",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/test/TestWeights.py",
"type": "Python"
} | # run with : python3 -m unittest TestWeights
import unittest
import numpy as np
import math
import os
from numpy.testing import assert_array_equal as assertAE
from numpy.testing import assert_array_almost_equal as assertAAE
import matplotlib.pyplot as plt
from BayesicFitting import *
from BayesicFitting import forma... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@test@TestWeights.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.