metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "_zmid.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymapbox/_zmid.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZmidValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="zmid", parent_name="densitymapbox", **kwargs):
super(ZmidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
e... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymapbox@_zmid.py@.PATH_END.py |
{
"filename": "Frame_Input_Planets.py",
"repo_name": "francescoa97outlook/pyExoRaMa",
"repo_path": "pyExoRaMa_extracted/pyExoRaMa-main/GUI_Plot/Frame_Input_Planets.py",
"type": "Python"
} | import tkinter as tk
from tkinter import messagebox as msgbox
def helpButtonFunc():
msgbox.showinfo(title="INFO",
message="Plot and statistical options: \nInsert the range for each selected parameter. Any of this parameter can be used as the third variable in the 3D colormap plot.\n\nSelect th... | francescoa97outlookREPO_NAMEpyExoRaMaPATH_START.@pyExoRaMa_extracted@pyExoRaMa-main@GUI_Plot@Frame_Input_Planets.py@.PATH_END.py |
{
"filename": "plotTest.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/cx_freeze/plotTest.py",
"type": "Python"
} | import sys
import pyqtgraph as pg
from pyqtgraph.Qt import QtWidgets
# For packages that require scipy, these may be needed:
# from scipy.stats import futil
# from scipy.sparse.csgraph import _validation
pg.setConfigOption('background','w')
pg.setConfigOption('foreground','k')
app = QtWidgets.QApplication(sys.a... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@cx_freeze@plotTest.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/mesh3d/_lightposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="lightposition", parent_name="mesh3d", **kwargs):
super(LightpositionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@_lightposition.py@.PATH_END.py |
{
"filename": "test_deepinfra.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/chat_models/test_deepinfra.py",
"type": "Python"
} | from langchain_community.chat_models import ChatDeepInfra
def test_deepinfra_model_name_param() -> None:
llm = ChatDeepInfra(model_name="foo") # type: ignore[call-arg]
assert llm.model_name == "foo"
def test_deepinfra_model_param() -> None:
llm = ChatDeepInfra(model="foo")
assert llm.model_name == ... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@chat_models@test_deepinfra.py@.PATH_END.py |
{
"filename": "python-reference_catboost_save_borders.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboost_save_borders.md",
"type": "Markdown"
} | # save_borders
Save the model borders to a file.
## {{ dl--invoke-format }}
```python
save_borders(fname)
```
## {{ dl--parameters }}
### fname
#### Description
The name of the output file with borders.
**Possible types**
{{ python-type--string }}
**Default value**
{{ python--required }}
## {{ dl--output-fo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboost_save_borders.md@.PATH_END.py |
{
"filename": "gold_standard_versions.py",
"repo_name": "trident-project/trident",
"repo_path": "trident_extracted/trident-main/tests/gold_standard_versions.py",
"type": "Python"
} | """
Testing utilities for Trident
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2017, Trident Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
#--------------... | trident-projectREPO_NAMEtridentPATH_START.@trident_extracted@trident-main@tests@gold_standard_versions.py@.PATH_END.py |
{
"filename": "statistics.py",
"repo_name": "sambit-giri/tools21cm",
"repo_path": "tools21cm_extracted/tools21cm-master/src/tools21cm/statistics.py",
"type": "Python"
} | '''
This file contains various useful statistical methods
'''
import numpy as np
#from lightcone import _get_slice
def skewness(x):
'''
Calculate the skewness of an array.
Note that IDL calculates the skewness in a slightly different way than Python.
This routine uses the IDL definition.
Parameters:
x (nd... | sambit-giriREPO_NAMEtools21cmPATH_START.@tools21cm_extracted@tools21cm-master@src@tools21cm@statistics.py@.PATH_END.py |
{
"filename": "map-subplots-and-small-multiples.md",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/doc/python/map-subplots-and-small-multiples.md",
"type": "Markdown"
} | ---
jupyter:
jupytext:
notebook_metadata_filter: all
text_representation:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.6
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name:... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@python@map-subplots-and-small-multiples.md@.PATH_END.py |
{
"filename": "testing.py",
"repo_name": "pysat/pysat",
"repo_path": "pysat_extracted/pysat-main/pysat/utils/testing.py",
"type": "Python"
} | #!/usr/bin/env python
# Full license can be found in License.md
# Full author list can be found in .zenodo.json file
# DOI:10.5281/zenodo.1199703
#
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
# unlimited.
# ----------------------------------------------------------------------------
"""Util... | pysatREPO_NAMEpysatPATH_START.@pysat_extracted@pysat-main@pysat@utils@testing.py@.PATH_END.py |
{
"filename": "fix_json_files.py",
"repo_name": "spacetelescope/drizzlepac",
"repo_path": "drizzlepac_extracted/drizzlepac-main/drizzlepac/devutils/fix_json_files.py",
"type": "Python"
} | #!/usr/bin/env python
"""This script removes the 'input' and 'output' fields and sets the 'build' and
['STATE OF INPUT FILES']['clean'] fields to 'True' in all astrodrizzle parameter .json files."""
import json
import glob
from pathlib import Path
code_dir = os.path.abspath(__file__)
base_dir = os.path.dirname(os.pa... | spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@drizzlepac@devutils@fix_json_files.py@.PATH_END.py |
{
"filename": "test_wavelets.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/signal/tests/test_wavelets.py",
"type": "Python"
} | import numpy as np
from numpy.testing import assert_equal, \
assert_array_equal, assert_array_almost_equal, assert_array_less, assert_
import scipy.signal._wavelets as wavelets
class TestWavelets:
def test_qmf(self):
assert_array_equal(wavelets.qmf([1, 1]), [1, -1])
def test_daub(self):
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@signal@tests@test_wavelets.py@.PATH_END.py |
{
"filename": "sample_covariance.py",
"repo_name": "LSSTDESC/NaMaster",
"repo_path": "NaMaster_extracted/NaMaster-master/test/sample_covariance.py",
"type": "Python"
} | import numpy as np
import healpy as hp
import matplotlib.pyplot as plt
import pymaster as nmt
# This script showcases the ability of namaster to compute Gaussian
# estimates of the covariance matrix.
# A similar example for flat-sky fields can be found in
# test/sample_covariance_flat.py
# HEALPix map resolution
nsid... | LSSTDESCREPO_NAMENaMasterPATH_START.@NaMaster_extracted@NaMaster-master@test@sample_covariance.py@.PATH_END.py |
{
"filename": "grid.py",
"repo_name": "agnwinds/python",
"repo_path": "python_extracted/python-main/py_progs/py4py/py4py/grid.py",
"type": "Python"
} | """
Work with Grid output from
"""
from typing import Tuple
import numpy as np
from numpy.typing import NDArray
from numpy import floating
def load_grid(filename: str) -> Tuple[NDArray[floating], NDArray[floating]]:
"""
Loads a pair of grid files from a root name.
Example:
x_r10, z_r10 = load_gr... | agnwindsREPO_NAMEpythonPATH_START.@python_extracted@python-main@py_progs@py4py@py4py@grid.py@.PATH_END.py |
{
"filename": "test_basic.py",
"repo_name": "shkarupa-alex/tfswin",
"repo_path": "tfswin_extracted/tfswin-master/tfswin/tests/test_basic.py",
"type": "Python"
} | from keras.src import testing
from tfswin.basic import BasicLayer
class TestBasicLayer(testing.TestCase):
def test_layer(self):
self.run_layer_test(
BasicLayer,
init_kwargs={'depth': 2, 'num_heads': 3, 'window_size': 7, 'mlp_ratio': 4., 'qkv_bias': True, 'qk_scale': None,
... | shkarupa-alexREPO_NAMEtfswinPATH_START.@tfswin_extracted@tfswin-master@tfswin@tests@test_basic.py@.PATH_END.py |
{
"filename": "Megno.ipynb",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/ipython_examples/Megno.ipynb",
"type": "Jupyter Notebook"
} | # Stability map with MEGNO and WHFast
In this tutorial, we'll create a stability map of a two planet system using the chaos indicator MEGNO (Mean Exponential Growth of Nearby Orbits) and the symplectic integrator WHFast (Rein and Tamayo 2015).
We will integrate a two planet system with massive planets. We vary two orb... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@ipython_examples@Megno.ipynb@.PATH_END.py |
{
"filename": "test_parameter.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/cosmology/parameter/tests/test_parameter.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Testing :mod:`astropy.cosmology.parameter`."""
from collections.abc import Callable
import numpy as np
import pytest
import astropy.units as u
from astropy.cosmology import Cosmology, Parameter
from astropy.cosmology.core import _COSMOLOGY_CLASSES, ... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@cosmology@parameter@tests@test_parameter.py@.PATH_END.py |
{
"filename": "calc_ext.py",
"repo_name": "karllark/measure_extinction",
"repo_path": "measure_extinction_extracted/measure_extinction-master/measure_extinction/utils/calc_ext.py",
"type": "Python"
} | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, unicode_literals
import pkg_resources
import argparse
from measure_extinction.stardata import StarData
from measure_extinction.extdata import ExtData, AverageExtData
def calc_extinction(
redstarname,
compstarname,
p... | karllarkREPO_NAMEmeasure_extinctionPATH_START.@measure_extinction_extracted@measure_extinction-master@measure_extinction@utils@calc_ext.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/textfont/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self, plotly_name="lineposition", parent_name="scattercarpet.textfont", **kwargs
):
super(LinepositionValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@textfont@_lineposition.py@.PATH_END.py |
{
"filename": "deploy.md",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/docs/customization_guide/deploy.md",
"type": "Markdown"
} | <!--
# Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. 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, th... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@docs@customization_guide@deploy.md@.PATH_END.py |
{
"filename": "_variantsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/hoverlabel/font/_variantsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="variantsrc",
parent_name="choroplethmapbox.hoverlabel.font",
**kwargs,
):
super(VariantsrcValidator, self).__init__(
pl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@hoverlabel@font@_variantsrc.py@.PATH_END.py |
{
"filename": "deblend.py",
"repo_name": "astropy/photutils",
"repo_path": "photutils_extracted/photutils-main/photutils/segmentation/deblend.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools for deblending overlapping sources labeled in
a segmentation image.
"""
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from functools import partial
from mu... | astropyREPO_NAMEphotutilsPATH_START.@photutils_extracted@photutils-main@photutils@segmentation@deblend.py@.PATH_END.py |
{
"filename": "cxxgen.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pythran/pythran/cxxgen.py",
"type": "Python"
} | """
Generator for C/C++.
"""
# Serge Guelton: The licensing terms are not set in the source package, but
# pypi[1] says the software is under the MIT license, so I reproduce it here
# [1] http://pypi.python.org/pypi/cgen
#
# Copyright (C) 2008 Andreas Kloeckner
#
# Permission is hereby granted, free of charge, to any ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pythran@pythran@cxxgen.py@.PATH_END.py |
{
"filename": "gnilc_dust_spectralindex_Tdust.ipynb",
"repo_name": "galsci/pysm",
"repo_path": "pysm_extracted/pysm-main/docs/preprocess-templates/gnilc_dust_spectralindex_Tdust.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
os.environ[
"OMP_NUM_THREADS"
] = "64" # for jupyter.nersc.gov otherwise the notebook only uses 2 cores
```
```python
from pathlib import Path
import healpy as hp
import matplotlib.pyplot as plt
import numpy as np
import pymaster as nmt
from astropy.io import fits
%matplotlib inline
```
`... | galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@docs@preprocess-templates@gnilc_dust_spectralindex_Tdust.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "vortex-exoplanet/VIP",
"repo_path": "VIP_extracted/VIP-master/vip_hci/fits/__init__.py",
"type": "Python"
} | """
Subpackage ``fits`` includes fits handling functions:
- fits opening
- fits info
- fits writing
- appending extensions to a fit file
- ADI cube opening (cube with PA attached as HDU extension)
"""
from .fits import *
from .headers import *
| vortex-exoplanetREPO_NAMEVIPPATH_START.@VIP_extracted@VIP-master@vip_hci@fits@__init__.py@.PATH_END.py |
{
"filename": "constants.py",
"repo_name": "CASTOR-telescope/ETC",
"repo_path": "ETC_extracted/ETC-master/castor_etc/constants.py",
"type": "Python"
} | """
Useful constants. (N.B. use cgs units when possible)
---
GNU General Public License v3 (GNU GPLv3)
(c) 2022. (c) 2022.
Government of Canada Gouvernement du Canada
National Research Council Conseil national de recherches
Ottawa, Canada, K1A 0R6 ... | CASTOR-telescopeREPO_NAMEETCPATH_START.@ETC_extracted@ETC-master@castor_etc@constants.py@.PATH_END.py |
{
"filename": "input_pipeline.py",
"repo_name": "google/flax",
"repo_path": "flax_extracted/flax-main/examples/seq2seq/input_pipeline.py",
"type": "Python"
} | # Copyright 2024 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@seq2seq@input_pipeline.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "LiyrAstroph/pyCALI",
"repo_path": "pyCALI_extracted/pyCALI-master/setup.py",
"type": "Python"
} | from glob import glob
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension
import os, sys
# force to use g++
os.environ["CC"] = "g++"
os.environ["CXX"] = "g++"
basedir = os.path.dirname(os.path.abspath(__file__))
# libraries
libraries = ['m', 'c', 'gsl', 'gslcblas', 'lapack', 'lapacke','... | LiyrAstrophREPO_NAMEpyCALIPATH_START.@pyCALI_extracted@pyCALI-master@setup.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "wathela/FIRST-CLASSIFIER",
"repo_path": "FIRST-CLASSIFIER_extracted/FIRST-CLASSIFIER-master/README.md",
"type": "Markdown"
} | [](https://www.python.org/)
[](https://github.com/wathela/pymerger/blob/main/LICENSE)
[](https://zenodo.org/records/13941128)
## FIRST Classifier:... | wathelaREPO_NAMEFIRST-CLASSIFIERPATH_START.@FIRST-CLASSIFIER_extracted@FIRST-CLASSIFIER-master@README.md@.PATH_END.py |
{
"filename": "validation_improp_nz.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/validation/validation_improp_nz.py",
"type": "Python"
} | import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
import os
import sys
import argparse
import fitsio
from astropy.table import join,Table
import healpy as hp
from LSS.imaging import densvar
parser = argparse.ArgumentParser()
parser.add_argument("--basedir", help=... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@validation@validation_improp_nz.py@.PATH_END.py |
{
"filename": "auto.py",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/src/peft/auto.py",
"type": "Python"
} | # Copyright 2023-present the HuggingFace Inc. team.
#
# 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... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@src@peft@auto.py@.PATH_END.py |
{
"filename": "server_lib_same_variables_clear_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/server_lib_same_variables_clear_test.py",
"type": "Python"
} | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@training@server_lib_same_variables_clear_test.py@.PATH_END.py |
{
"filename": "prepare_data.py",
"repo_name": "Samreay/Barry",
"repo_path": "Barry_extracted/Barry-master/barry/data/ross_2017_dr12_corr/prepare_data.py",
"type": "Python"
} | import pickle
import pandas as pd
import numpy as np
import os
def getdata(xi0file, xi2file):
dfxi0 = pd.read_csv(xi0file, comment="#", delim_whitespace=True, names=["s", "xi0", "xi0err"]).drop("xi0err", axis=1)
dfxi2 = pd.read_csv(xi2file, comment="#", delim_whitespace=True, names=["s", "xi2", "xi2err"]).dro... | SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@data@ross_2017_dr12_corr@prepare_data.py@.PATH_END.py |
{
"filename": "test_effective_area.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/gammapy/irf/tests/test_effective_area.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
import astropy.units as u
from gammapy.irf import EffectiveAreaTable2D
from gammapy.maps import MapAxis
from gammapy.utils.testing import (
assert_quantity_allclos... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@irf@tests@test_effective_area.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/simbad/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
SIMBAD Query Tool
=================
The SIMBAD query tool creates `TAP ADQL queries
<https://cds.unistra.fr/help/documentation/simbad-more/adql-simbad/>`__ that return VOtable XML
data. This is then parsed into a `~astropy.table.Table` object.
"""
fro... | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@simbad@__init__.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="scattermapbox.hoverlabel.font", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
p... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@hoverlabel@font@_style.py@.PATH_END.py |
{
"filename": "_arrayminussrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/error_x/_arrayminussrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="arrayminussrc", parent_name="scatter.error_x", **kwargs
):
super(ArrayminussrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@error_x@_arrayminussrc.py@.PATH_END.py |
{
"filename": "series.py",
"repo_name": "spacetelescope/astronify",
"repo_path": "astronify_extracted/astronify-main/astronify/series/series.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Data Series Sonification
========================
Functionality for sonifying data series.
"""
import warnings
from inspect import signature, Parameter
import numpy as np
from astropy.table import Table, MaskedColumn
from astropy.time import Time
... | spacetelescopeREPO_NAMEastronifyPATH_START.@astronify_extracted@astronify-main@astronify@series@series.py@.PATH_END.py |
{
"filename": "_textsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/_textsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="textsrc", parent_name="contourcarpet", **kwargs):
super(TextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contourcarpet@_textsrc.py@.PATH_END.py |
{
"filename": "test_rrule.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/python-dateutil/py3/tests/test_rrule.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime, date
import unittest
from six import PY2
from dateutil import tz
from dateutil.rrule import (
rrule, rruleset, rrulestr,
YEARLY, MONTHLY, WEEKLY, DAILY,
HOURLY, MINUTELY, SECONDLY,
MO, TU, WE, TH, FR, SA, SU... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@python-dateutil@py3@tests@test_rrule.py@.PATH_END.py |
{
"filename": "refactor-test.ipynb",
"repo_name": "timothydmorton/isochrones",
"repo_path": "isochrones_extracted/isochrones-master/notebooks/refactor-test.ipynb",
"type": "Jupyter Notebook"
} | ```python
from isochrones.dartmouth import Dartmouth_Isochrone
dar = Dartmouth_Isochrone()
```
```python
%%file example.obs
name band resolution mag e_mag separation pa relative
twomass J 2.8 10 0.02 0 0 False
twomass H 2.9 9.6 0.02 0 0 False
twomass K 3.0 9.4 0.02 0 0 False
UKIRT J 1.0 11 0.02 0 0 True
UKIRT J 1... | timothydmortonREPO_NAMEisochronesPATH_START.@isochrones_extracted@isochrones-master@notebooks@refactor-test.ipynb@.PATH_END.py |
{
"filename": "create_input.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/cosmo_input/create_input.py",
"type": "Python"
} | # Global
from copy import deepcopy
from typing import MutableMapping, Mapping
# Local
from cobaya.input import get_default_info, merge_info
from cobaya.parameterization import reduce_info_param
from cobaya.typing import InputDict
from . import input_database
def translate(p, info=None, dictionary=None):
dictiona... | ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@cosmo_input@create_input.py@.PATH_END.py |
{
"filename": "test_light_model.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LightModel/test_light_model.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy as np
import numpy.testing as npt
import pytest
import unittest
import lenstronomy.Util.util as util
import lenstronomy.Util.param_util as param_util
from lenstronomy.LightModel.light_model import LightModel
from lenstronomy.LightModel.Profiles.gaussian import Gaussian
class Test... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LightModel@test_light_model.py@.PATH_END.py |
{
"filename": "dashvector.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/dashvector.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import DashVector
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPREC... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@dashvector.py@.PATH_END.py |
{
"filename": "copy_injection_recovery.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_TF2/injection_46/copy_injection_recovery.py",
"type": "Python"
} | import os
os.environ['CUDA_VISIBLE_DEVICES'] = "3"
os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25"
import numpy as np
import argparse
# The following is needed on CIT cluster to avoid an obscure Python error
import psutil
p = psutil.Process()
p.cpu_affinity([0])
# Regular imports
import argparse
import copy
impo... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_TF2@injection_46@copy_injection_recovery.py@.PATH_END.py |
{
"filename": "ragged_reverse_op_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/ragged_reverse_op_test.py",
"type": "Python"
} | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@ragged@ragged_reverse_op_test.py@.PATH_END.py |
{
"filename": "semantic-chunker.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/semantic-chunker.ipynb",
"type": "Jupyter Notebook"
} | # How to split text based on semantic similarity
Taken from Greg Kamradt's wonderful notebook:
[5_Levels_Of_Text_Splitting](https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/tutorials/LevelsOfTextSplitting/5_Levels_Of_Text_Splitting.ipynb)
All credit to him.
This guide covers how to split chunks... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@semantic-chunker.ipynb@.PATH_END.py |
{
"filename": "executable_scratch.py",
"repo_name": "hmuellergoe/mrbeam",
"repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/ga/GA/executable_scratch.py",
"type": "Python"
} | import pygmo as pg
import numpy as np
import GA.solver as solver
import sys
config_file = sys.argv[1]
outfile = sys.argv[2]
inputs = {'probl':'EHT',
'dim':'not needed',
'config':config_file
}
udp, fit, pop, config = solver.solve(**inputs)
weights = pg.decomposition_weights(n_f=udp.get_nf... | hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@ga@GA@executable_scratch.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/splom/marker/line/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self, plotly_name="coloraxis", parent_name="splom.marker.line", **kwargs
):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@splom@marker@line@_coloraxis.py@.PATH_END.py |
{
"filename": "Using_pyCloudy_2.ipynb",
"repo_name": "Morisset/pyCloudy",
"repo_path": "pyCloudy_extracted/pyCloudy-master/pyCloudy/docs/Using_pyCloudy_2.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import os
home_dir = os.environ['HOME'] + '/'
```
```python
import pyCloudy as pc
```
```python
# Changing the location and version of the cloudy executable.
pc.config.cloudy_exe = '/usr/local/Cloudy/c17.03/source/cloudy.exe'
```
```... | MorissetREPO_NAMEpyCloudyPATH_START.@pyCloudy_extracted@pyCloudy-master@pyCloudy@docs@Using_pyCloudy_2.ipynb@.PATH_END.py |
{
"filename": "Clf_supervised_POC.py",
"repo_name": "pedro-acunha/AMELIA",
"repo_path": "AMELIA_extracted/AMELIA-main/Clf_supervised_POC.py",
"type": "Python"
} | from pipeline_data_preprocessing import *
from pipeline_classification_functions import *
path_data_train1 = './data/SDSS_WISE_QSO2_Alexandroff.csv'
path_data_train2 = './data/SDSS_Galaxy_Highz_PCunha.csv'
path_data_test = '' # Can be left empty for supervised tasks
list_features = ['modelMag_u', 'modelMag_g','modelMa... | pedro-acunhaREPO_NAMEAMELIAPATH_START.@AMELIA_extracted@AMELIA-main@Clf_supervised_POC.py@.PATH_END.py |
{
"filename": "b02eb31402b1_add_index_on_fileinstance_name.py",
"repo_name": "hera-team/librarian",
"repo_path": "librarian_extracted/librarian-main/alembic/versions/b02eb31402b1_add_index_on_fileinstance_name.py",
"type": "Python"
} | # Copyright 2017 the HERA Collaboration
# Licensed under the 2-clause BSD License.
"""add index on FileInstance.name
Revision ID: b02eb31402b1
Revises: 0e0e6d02a01a
Create Date: 2017-02-09 17:32:01.979450
"""
import sqlalchemy as sa
from alembic import op
revision = "b02eb31402b1"
down_revision = "0e0e6d02a01a"
br... | hera-teamREPO_NAMElibrarianPATH_START.@librarian_extracted@librarian-main@alembic@versions@b02eb31402b1_add_index_on_fileinstance_name.py@.PATH_END.py |
{
"filename": "master_flat_framework.py",
"repo_name": "Keck-DataReductionPipelines/KPF-Pipeline",
"repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/master_flat/src/master_flat_framework.py",
"type": "Python"
} | from os.path import exists
from os import getenv
import numpy as np
import numpy.ma as ma
import configparser as cp
from datetime import datetime, timezone
from scipy.ndimage import gaussian_filter
from scipy.stats import mode
from astropy.io import fits
from astropy.time import Time
import re
import pandas as pd
impo... | Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@master_flat@src@master_flat_framework.py@.PATH_END.py |
{
"filename": "pippi_pare.py",
"repo_name": "GambitBSM/pippi",
"repo_path": "pippi_extracted/pippi-master/pippi_pare.py",
"type": "Python"
} |
#############################################################
# pippi: parse it, plot it
# ------------------------
# Post-processing module for pippi.
#
# Author: Pat Scott (patscott@physics.mcgill.ca)
# Originally developed: March 2012
#############################################################
from __future__ im... | GambitBSMREPO_NAMEpippiPATH_START.@pippi_extracted@pippi-master@pippi_pare.py@.PATH_END.py |
{
"filename": "_bordercolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bordercolorsrc", parent_name="histogram.hoverlabel", **kwargs
):
super(BordercolorsrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@hoverlabel@_bordercolorsrc.py@.PATH_END.py |
{
"filename": "DIES_demo.py",
"repo_name": "mjuvela/ISM",
"repo_path": "ISM_extracted/ISM-master/DIES/DIES_demo.py",
"type": "Python"
} | import os, sys
import numpy as np
from matplotlib.pylab import *
sys.path.append('./')
from DIES_Aux import *
"""
Full example of DIES run.
- The cloud file is created here (demo.cloud).
- The file for point source luminosity is created here (demo_ps.dat)
- The dust file is assumed to exist in the current directory ... | mjuvelaREPO_NAMEISMPATH_START.@ISM_extracted@ISM-master@DIES@DIES_demo.py@.PATH_END.py |
{
"filename": "exceptions.py",
"repo_name": "transientskp/tkp",
"repo_path": "tkp_extracted/tkp-master/tkp/utility/exceptions.py",
"type": "Python"
} | """
This module defines exceptions specific to the TKP package
"""
class TKPException(Exception):
"""General TKP exception"""
pass
class TKPDataBaseError(TKPException):
"""Database exceptions specific to the TKP"""
pass
| transientskpREPO_NAMEtkpPATH_START.@tkp_extracted@tkp-master@tkp@utility@exceptions.py@.PATH_END.py |
{
"filename": "_stream.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/_stream.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StreamValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="stream", parent_name="scatterternary", **kwargs):
super(StreamValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@_stream.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/scattergl/hoverlabel/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattergl.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@hoverlabel@font@_color.py@.PATH_END.py |
{
"filename": "CONTRIBUTING.md",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/CONTRIBUTING.md",
"type": "Markdown"
} | ## Contributing guidelines
All guidelines for contributing to the OpenCV repository can be found at [`How to contribute guideline`](https://github.com/opencv/opencv/wiki/How_to_contribute).
| itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@CONTRIBUTING.md@.PATH_END.py |
{
"filename": "run_cadence_metric.py",
"repo_name": "lsstdesc/sn_pipe",
"repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/metrics/run_cadence_metric.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import lsst.sims.maf.metricBundles as metricBundles
import lsst.sims.maf.slicers as slicers
import lsst.sims.maf.db as db
import lsst.sims.maf.utils as utils
import argparse
import time
import yaml
from importlib import import_module
import sqlite3
import numpy as np
import sn_plotters.s... | lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@metrics@run_cadence_metric.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "JLBLine/CHIPS_wrappers",
"repo_path": "CHIPS_wrappers_extracted/CHIPS_wrappers-main/chips_wrappers/setup/__init__.py",
"type": "Python"
} | JLBLineREPO_NAMECHIPS_wrappersPATH_START.@CHIPS_wrappers_extracted@CHIPS_wrappers-main@chips_wrappers@setup@__init__.py@.PATH_END.py | |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/unselected/marker/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="scatterpolar.unselected.marker", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@unselected@marker@_size.py@.PATH_END.py |
{
"filename": "utils_sphere_steady_state.py",
"repo_name": "hveerten/katu",
"repo_path": "katu_extracted/katu-main/utils/utils_sphere_steady_state.py",
"type": "Python"
} | import numpy as np
from string import Template
ndim = 9
labels=["$\\left( p_1 - 1 \\right) \\log_{10}\\left(\\gamma_{min}\\right)$", \
"$\\log_{10}\\left(\\Gamma \\cdot B \\cdot \\gamma_{break}^2\\right)$", \
"$\\left( 3 - p_2 \\right) \\log_{10}\\left(\\gamma_{max}\\right)$", \
"$p_1 - \\left... | hveertenREPO_NAMEkatuPATH_START.@katu_extracted@katu-main@utils@utils_sphere_steady_state.py@.PATH_END.py |
{
"filename": "validation.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/validation.py",
"type": "Python"
} | """
Input validation for a `Buffer`.
(Validators will be called before accepting input.)
"""
from __future__ import annotations
from abc import ABCMeta, abstractmethod
from typing import Callable
from prompt_toolkit.eventloop import run_in_executor_with_context
from .document import Document
from .filters import Fi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@validation.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/packages/amuse-phigrape/README.md",
"type": "Markdown"
} | This package installs the phiGRAPE community code for AMUSE.
| amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@packages@amuse-phigrape@README.md@.PATH_END.py |
{
"filename": "segmentation.py",
"repo_name": "sambit-giri/tools21cm",
"repo_path": "tools21cm_extracted/tools21cm-master/src/tools21cm/segmentation.py",
"type": "Python"
} | """
Created by Michele Bianco, 9 July 2021
"""
import numpy as np
from tqdm import tqdm
import warnings
warnings.filterwarnings("ignore")
# import tensorflow as tf
# try:
# from tensorflow.keras.models import load_model
# from tensorflow.keras import backend as K
# except:
# from tensorflow.python.keras.m... | sambit-giriREPO_NAMEtools21cmPATH_START.@tools21cm_extracted@tools21cm-master@src@tools21cm@segmentation.py@.PATH_END.py |
{
"filename": "main.py",
"repo_name": "cdslaborg/paramonte",
"repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distKolm/setKolmQuan/main.py",
"type": "Python"
} | #!/usr/bin/env python
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import glob
import sys
linewidth = 2
fontsize = 17
marker ={ "CK" : "-"
, "IK" : "."
, "RK" : "-"
}
xlab = { "CK" : "CDF ( real/imaginary components )"
, "IK" : "CDF ( integer-valued )"
... | cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distKolm@setKolmQuan@main.py@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/docstore/base.py",
"type": "Python"
} | """Interface to access to place that stores documents."""
from abc import ABC, abstractmethod
from typing import Dict, List, Union
from langchain_core.documents import Document
class Docstore(ABC):
"""Interface to access to place that stores documents."""
@abstractmethod
def search(self, search: str) -... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@docstore@base.py@.PATH_END.py |
{
"filename": "_minexponent.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/_minexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="minexponent", parent_name="layout.xaxis", **kwargs):
super(MinexponentValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@_minexponent.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/line/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="bar.marker.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@line@_colorscale.py@.PATH_END.py |
{
"filename": "RG_STS.py",
"repo_name": "JoeMcEwen/FAST-PT",
"repo_path": "FAST-PT_extracted/FAST-PT-master/fastpt/RG_STS.py",
"type": "Python"
} | '''
Code to calcualte Renormalization group resutls using
a super time step (STS) integrator. The integrator we use is Eq. 2.9 of
'SUPER-TIME-STEPPING ACCELERATION OF
EXPLICIT SCHEMES FOR PARABOLIC PROBLEMS
Vasilios Alexiades* Genevieve Amiezy and Pierre-Alain Gremaudz '
The STS integrator works best for k_max... | JoeMcEwenREPO_NAMEFAST-PTPATH_START.@FAST-PT_extracted@FAST-PT-master@fastpt@RG_STS.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/odr/__init__.py",
"type": "Python"
} | """
=================================================
Orthogonal distance regression (:mod:`scipy.odr`)
=================================================
.. currentmodule:: scipy.odr
Package Content
===============
.. autosummary::
:toctree: generated/
Data -- The data to fit.
RealData -- Dat... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@odr@__init__.py@.PATH_END.py |
{
"filename": "_xperiod0.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/_xperiod0.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="xperiod0", parent_name="contour", **kwargs):
super(Xperiod0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@_xperiod0.py@.PATH_END.py |
{
"filename": "observatory.py",
"repo_name": "ucberkeleyseti/blimpy",
"repo_path": "blimpy_extracted/blimpy-master/blimpy/ephemeris/observatory.py",
"type": "Python"
} | r"""
observatory.py
blimpy
"""
import os
import pandas as pd
DEBUGGING = False
class Observatory:
r""" Class for handling observatory data.
The Pandas dataframe is defined in ./observatory_info.csv
"""
def __init__(self, telescope_id=None, telescope_name=None):
""" init method for Obse... | ucberkeleysetiREPO_NAMEblimpyPATH_START.@blimpy_extracted@blimpy-master@blimpy@ephemeris@observatory.py@.PATH_END.py |
{
"filename": "interface.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/sparse/linalg/interface.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.sparse.linalg` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = [ # noqa: F822
'LinearOperator', 'aslinearoperator',
]
def __dir__():
re... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@sparse@linalg@interface.py@.PATH_END.py |
{
"filename": "_maxpoints.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/choroplethmapbox/stream/_maxpoints.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="maxpoints", parent_name="choroplethmapbox.stream", **kwargs
):
super(MaxpointsValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@choroplethmapbox@stream@_maxpoints.py@.PATH_END.py |
{
"filename": "center_crop.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/image_preprocessing/center_crop.py",
"type": "Python"
} | from keras.src.api_export import keras_export
from keras.src.layers.preprocessing.image_preprocessing.base_image_preprocessing_layer import ( # noqa: E501
BaseImagePreprocessingLayer,
)
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters import ( # noqa: E501
clip_to_image_size,
... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@image_preprocessing@center_crop.py@.PATH_END.py |
{
"filename": "wheeled_tire.md",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/doxygen/documentation/manuals/vehicle/wheeled_tire.md",
"type": "Markdown"
} | Tire models {#wheeled_tire}
===========================
\tableofcontents
Chrono::Vehicle currently supports three different classes of tire models: rigid, handling, and finite element.
## Rigid tire model {#wheeled_tire_rigid}
The rigid tires are the simplest of the three tire classes offered. The assumption fo... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@manuals@vehicle@wheeled_tire.md@.PATH_END.py |
{
"filename": "plots_sfr.py",
"repo_name": "bronreichardtchu/koffee",
"repo_path": "koffee_extracted/koffee-main/plotting_scripts/plots_sfr.py",
"type": "Python"
} | """
NAME:
sfr_plots.py
AUTHOR:
Bronwyn Reichardt Chu
Swinburne
2020
EMAIL:
<breichardtchu@swin.edu.au>
PURPOSE:
To make plots of results from koffee against the SFR or Sigma SFR
Written on MacOS Mojave 10.14.5, with Python 3.7
FUNCTIONS INCLUDED:
plot_sfr_vout
plot_sfr_mlf_flux
plot_sfr_flux
... | bronreichardtchuREPO_NAMEkoffeePATH_START.@koffee_extracted@koffee-main@plotting_scripts@plots_sfr.py@.PATH_END.py |
{
"filename": "_labelsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/link/_labelsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="labelsrc", parent_name="sankey.link", **kwargs):
super(LabelsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@link@_labelsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "mit-ll/spacegym-kspdg",
"repo_path": "spacegym-kspdg_extracted/spacegym-kspdg-main/src/kspdg/private_src/python3_9/Darwin_arm64/kspdg_envs/__init__.py",
"type": "Python"
} | # Pyarmor 8.5.11 (trial), 000000, non-profits, 2024-12-09T10:19:40.520429
from kspdg.private_src.python3_9.Darwin_arm64.pyarmor_runtime_000000 import __pyarmor__
__pyarmor__(__name__, __file__, b'PY000000\x00\x03\t\x00a\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00V\x01\x00\x00\x12\t\x04\x00\xfcNqp... | mit-llREPO_NAMEspacegym-kspdgPATH_START.@spacegym-kspdg_extracted@spacegym-kspdg-main@src@kspdg@private_src@python3_9@Darwin_arm64@kspdg_envs@__init__.py@.PATH_END.py |
{
"filename": "pxsas.py",
"repo_name": "ruizca/pxsas",
"repo_path": "pxsas_extracted/pxsas-main/pxsas.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Utility functions for using XMM-Newton SAS through Python.
@author: A. Ruiz
"""
import os
import logging
import subprocess
from pathlib import Path
logger = logging.getLogger(__name__)
if "SAS_DIR" not in os.environ:
raise ImportError("SAS has not been initialized in your system!")
... | ruizcaREPO_NAMEpxsasPATH_START.@pxsas_extracted@pxsas-main@pxsas.py@.PATH_END.py |
{
"filename": "_editable.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/shape/_editable.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class EditableValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="editable", parent_name="layout.shape", **kwargs):
super(EditableValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@shape@_editable.py@.PATH_END.py |
{
"filename": "concurrency_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/concurrency_test.py",
"type": "Python"
} | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@compiler@mlir@quantization@tensorflow@python@integration_test@concurrency_test.py@.PATH_END.py |
{
"filename": "new-kernel.ipynb",
"repo_name": "dfm/george",
"repo_path": "george_extracted/george-main/docs/_static/notebooks/new-kernel.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
%config InlineBackend.figure_format = "retina"
from __future__ import print_function
from matplotlib import rcParams
rcParams["savefig.dpi"] = 100
rcParams["figure.dpi"] = 100
rcParams["font.size"] = 20
```
# Implementing new kernels
This notebook was made with the following version of ... | dfmREPO_NAMEgeorgePATH_START.@george_extracted@george-main@docs@_static@notebooks@new-kernel.ipynb@.PATH_END.py |
{
"filename": "interpolate.py",
"repo_name": "cta-observatory/cta-lstchain",
"repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/high_level/interpolate.py",
"type": "Python"
} | import numpy as np
import logging
import astropy.units as u
from astropy.table import QTable, Table
from astropy.io import fits
from astropy.time import Time
from lstchain.__init__ import __version__
from pyirf.io.gadf import (
create_aeff2d_hdu,
create_energy_dispersion_hdu,
create_psf_table_hdu,
)
from ... | cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@high_level@interpolate.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="scattercarpet.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "muLAn-project/muLAn",
"repo_path": "muLAn_extracted/muLAn-master/muLAn/__init__.py",
"type": "Python"
} | from ._version import version_info, __version__
| muLAn-projectREPO_NAMEmuLAnPATH_START.@muLAn_extracted@muLAn-master@muLAn@__init__.py@.PATH_END.py |
{
"filename": "ex_eos_had_plot.py",
"repo_name": "awsteiner/o2scl",
"repo_path": "o2scl_extracted/o2scl-main/examples/plot/ex_eos_had_plot.py",
"type": "Python"
} | """
Plot data from ex_eos_had
"""
def text_abs(axes,x,y,str,**kwargs):
axes.text(x,y,str,transform=axes.transAxes,
fontsize=16,va='center',ha='center',**kwargs)
def text(axes,x,y,str,**kwargs):
axes.text(x,y,str,fontsize=16,va='center',ha='center',**kwargs)
def left_text(axes,x,y,str,**kwargs):... | awsteinerREPO_NAMEo2sclPATH_START.@o2scl_extracted@o2scl-main@examples@plot@ex_eos_had_plot.py@.PATH_END.py |
{
"filename": "test_ndgriddata.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/interpolate/tests/test_ndgriddata.py",
"type": "Python"
} | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_equal, assert_array_equal, assert_allclose
from pytest import raises as assert_raises
from scipy.interpolate import griddata, NearestNDInterpolator
class TestGriddata(object):
def test_fill_value... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@interpolate@tests@test_ndgriddata.py@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="shadowsrc", parent_name="surface.hoverlabel.font", **kwargs
):
super(ShadowsrcValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "fgmc_plots.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/pycbc/population/fgmc_plots.py",
"type": "Python"
} | # Copyright (C) 2021 Jolien Creighton & Thomas Dent
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
import json
impor... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@population@fgmc_plots.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "perwin/imfit",
"repo_path": "imfit_extracted/imfit-master/solvers/README.md",
"type": "Markdown"
} | ## solvers
This directory contains code for the various different "solvers" (minimization algorithms)
used by Imfit.
| perwinREPO_NAMEimfitPATH_START.@imfit_extracted@imfit-master@solvers@README.md@.PATH_END.py |
{
"filename": "_xpad.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/line/colorbar/_xpad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="xpad", parent_name="parcats.line.colorbar", **kwargs
):
super(XpadValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@line@colorbar@_xpad.py@.PATH_END.py |
{
"filename": "test.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/lib/simple_hash/test.py",
"type": "Python"
} | import subprocess
import random
import sys
class HashTableWrapper:
def __init__(self, pathToExe):
self.p = subprocess.Popen(pathToExe, stdin=subprocess.PIPE, stdout=subprocess.PIPE,bufsize=0)
# self.p.stdin = DebugPrintFilter(self.p.stdin)
def __setitem__(self, key, value):
# print 'inser... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@lib@simple_hash@test.py@.PATH_END.py |
{
"filename": "run_time_domain.py",
"repo_name": "COINtoolbox/ActSNClass",
"repo_path": "ActSNClass_extracted/ActSNClass-master/actsnclass/scripts/run_time_domain.py",
"type": "Python"
} | # Copyright 2019 snactclass software
# Author: Emille E. O. Ishida
# Based on initial prototype developed by the CRP #4 team
#
# created on 10 August 2019
#
# Licensed GNU General Public License v3.0;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
... | COINtoolboxREPO_NAMEActSNClassPATH_START.@ActSNClass_extracted@ActSNClass-master@actsnclass@scripts@run_time_domain.py@.PATH_END.py |
{
"filename": "plot.py",
"repo_name": "jwreep/ebtel_abundances",
"repo_path": "ebtel_abundances_extracted/ebtel_abundances-main/src/scripts/plot.py",
"type": "Python"
} | """
Plots the temperature, density, and abundance factor from an ebtel++ simulation
"""
import paths
import numpy as np
from matplotlib import pyplot as plt
def plot_figures(time, temperature, density, L, H, t, filename=None, xlim=None, show_legend=False):
"""
Plot the temperature, density, and abundance fact... | jwreepREPO_NAMEebtel_abundancesPATH_START.@ebtel_abundances_extracted@ebtel_abundances-main@src@scripts@plot.py@.PATH_END.py |
{
"filename": "_align.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/hoverlabel/_align.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="align", parent_name="volume.hoverlabel", **kwargs):
super(AlignValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@hoverlabel@_align.py@.PATH_END.py |
{
"filename": "test_standalone_codec.py",
"repo_name": "facebookresearch/faiss",
"repo_path": "faiss_extracted/faiss-main/tests/test_standalone_codec.py",
"type": "Python"
} | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
""" test byte codecs """
from __future__ import print_function
import numpy as np
import unittest
import faiss
from common_faiss_tests imp... | facebookresearchREPO_NAMEfaissPATH_START.@faiss_extracted@faiss-main@tests@test_standalone_codec.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.