metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "hypothesisB.py",
"repo_name": "nickfarrow/GalacticDNSMass",
"repo_path": "GalacticDNSMass_extracted/GalacticDNSMass-master/mainCode/hypothesisB.py",
"type": "Python"
} | import pymultinest
import numpy as np
from scipy import stats
from scipy.special import erf
import os
import sys
from datetime import datetime
startTime = datetime.now()
###
# Directory of current script
# Required by Condor jobs to find relevant samples etc.
topDirectory = os.path.dirname(os.path.realpath(__file__))... | nickfarrowREPO_NAMEGalacticDNSMassPATH_START.@GalacticDNSMass_extracted@GalacticDNSMass-master@mainCode@hypothesisB.py@.PATH_END.py |
{
"filename": "_tickformatstop.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickformatstop(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "mesh3d.colorbar"
_path_str = "mesh3d.colorbar.tickformatstop"
_valid_props = {"dtick... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@mesh3d@colorbar@_tickformatstop.py@.PATH_END.py |
{
"filename": "TestNFWPotential.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/unit/ExternalForce/TestNFWPotential.py",
"type": "Python"
} | from Spheral import *
from SpheralTestUtilities import *
from SpheralGnuPlotUtilities import *
from math import *
#-------------------------------------------------------------------------------
# Generic problem parameters
#-------------------------------------------------------------------------------
rmin, rmax = (... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@unit@ExternalForce@TestNFWPotential.py@.PATH_END.py |
{
"filename": "test_basic.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/linalg/tests/test_basic.py",
"type": "Python"
} | #
# Created by: Pearu Peterson, March 2002
#
""" Test functions for linalg.basic module
"""
from __future__ import division, print_function, absolute_import
import warnings
import itertools
import numpy as np
from numpy import (arange, array, dot, zeros, identity, conjugate, transpose,
float32)
imp... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@linalg@tests@test_basic.py@.PATH_END.py |
{
"filename": "PlotMR.py",
"repo_name": "mplotnyko/SuperEarth.py",
"repo_path": "SuperEarth.py_extracted/SuperEarth.py-master/src/superearth/PlotMR.py",
"type": "Python"
} | import os
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter,NullFormatter
import numpy as np
import pandas as pd
from superearth import st_pl,guess_R
from superearth.utils import check_cache_archive,plot_cont,plot_cmf,MR_H2O,MR_HHe
package_dir = os.path.dirname(__file__)
check_cache_archive()... | mplotnykoREPO_NAMESuperEarth.pyPATH_START.@SuperEarth.py_extracted@SuperEarth.py-master@src@superearth@PlotMR.py@.PATH_END.py |
{
"filename": "_y1.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/shape/_y1.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Y1Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="y1", parent_name="layout.shape", **kwargs):
super(Y1Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=k... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@shape@_y1.py@.PATH_END.py |
{
"filename": "_xanchor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/marker/colorbar/_xanchor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="xanchor", parent_name="barpolar.marker.colorbar", **kwargs
):
super(XanchorValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@marker@colorbar@_xanchor.py@.PATH_END.py |
{
"filename": "test_xi.py",
"repo_name": "andreicuceu/vega",
"repo_path": "vega_extracted/vega-master/tests/test_xi.py",
"type": "Python"
} | import pytest
import numpy as np
import configparser
from astropy.io import fits
from vega.correlation_func import CorrelationFunction
from vega import utils
def test_xi():
pass
| andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@tests@test_xi.py@.PATH_END.py |
{
"filename": "Filament2D_tutorial.ipynb",
"repo_name": "e-koch/FilFinder",
"repo_path": "FilFinder_extracted/FilFinder-master/examples/Filament2D_tutorial.ipynb",
"type": "Jupyter Notebook"
} | Filament2D Tutorial
===========
This tutorial demonstrates the usage of the `FilFinder2D` object to perform the analysis on an individual filament. The general tutorial for FilFinder can be found [here](http://fil-finder.readthedocs.io/en/latest/tutorial.html).
```python
%matplotlib inline
import matplotlib.pyplot a... | e-kochREPO_NAMEFilFinderPATH_START.@FilFinder_extracted@FilFinder-master@examples@Filament2D_tutorial.ipynb@.PATH_END.py |
{
"filename": "results.py",
"repo_name": "ConorMacBride/mcalf",
"repo_path": "mcalf_extracted/mcalf-main/src/mcalf/models/results.py",
"type": "Python"
} | import numpy as np
from astropy.io import fits
from mcalf.utils.misc import make_iter
from mcalf.version import version
__all__ = ['FitResult', 'FitResults']
class FitResult:
"""Class that holds the result of a fit.
Parameters
----------
fitted_parameters : numpy.ndarray
The parameters fitt... | ConorMacBrideREPO_NAMEmcalfPATH_START.@mcalf_extracted@mcalf-main@src@mcalf@models@results.py@.PATH_END.py |
{
"filename": "_zhoverformat.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2dcontour/_zhoverformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="zhoverformat", parent_name="histogram2dcontour", **kwargs
):
super(ZhoverformatValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@_zhoverformat.py@.PATH_END.py |
{
"filename": "_array.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_x/_array.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="array", parent_name="scattergl.error_x", **kwargs):
super(ArrayValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_x@_array.py@.PATH_END.py |
{
"filename": "labels.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/webencodings/labels.py",
"type": "Python"
} | """
webencodings.labels
~~~~~~~~~~~~~~~~~~~
Map encoding labels to their name.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
# XXX Do not edit!
# This file is automatically generated by mklabels.py
LABELS = {
'unicode-1-1-utf-8': 'utf-8',
'utf-... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@webencodings@labels.py@.PATH_END.py |
{
"filename": "_domain.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/_domain.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DomainValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="domain", parent_name="parcoords", **kwargs):
super(DomainValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@_domain.py@.PATH_END.py |
{
"filename": "_legend.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/_legend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="legend", parent_name="scattermapbox", **kwargs):
super(LegendValidator, 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@scattermapbox@_legend.py@.PATH_END.py |
{
"filename": "test_grid_gradient.py",
"repo_name": "dmvandamt/beyonce",
"repo_path": "beyonce_extracted/beyonce-main/beyonce/tests/test_grid_gradient.py",
"type": "Python"
} | from beyonce.shallot.grid_parameters import Parameters
from beyonce.shallot.grid_components import Gradient
from beyonce.shallot.errors import LoadError, InvalidShapeError
import numpy as np
import pytest
import shutil
import os
@pytest.fixture
def grid_gradient() -> Gradient:
"""This function produces a grid gr... | dmvandamtREPO_NAMEbeyoncePATH_START.@beyonce_extracted@beyonce-main@beyonce@tests@test_grid_gradient.py@.PATH_END.py |
{
"filename": "redcal_inspect_2458106.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458106.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Redundant Calibration Nightly Notebook
**Josh Dillon**, Last Revised 7/30/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal
from hera_qm.metrics_io import load_metric_file
import glob
import os
from copy import deepcopy
import inspe... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@redcal_inspect@redcal_inspect_2458106.ipynb@.PATH_END.py |
{
"filename": "_autocontour.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/_autocontour.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="autocontour", parent_name="histogram2dcontour", **kwargs
):
super(AutocontourValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@_autocontour.py@.PATH_END.py |
{
"filename": "bincount_ops.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/bincount_ops.py",
"type": "Python"
} | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@bincount_ops.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/applications/xception/__init__.py",
"type": "Python"
} | """DO NOT EDIT.
This file was autogenerated. Do not edit it by hand,
since your modifications would be overwritten.
"""
from keras.src.applications.xception import Xception
from keras.src.applications.xception import decode_predictions
from keras.src.applications.xception import preprocess_input
| fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@applications@xception@__init__.py@.PATH_END.py |
{
"filename": "boris_dust.py",
"repo_name": "LSSTDESC/lsstdesc-diffsky",
"repo_path": "lsstdesc-diffsky_extracted/lsstdesc-diffsky-main/lsstdesc_diffsky/dspspop/boris_dust.py",
"type": "Python"
} | """
"""
from collections import OrderedDict
import numpy as np
from dsps.utils import _inverse_sigmoid, _sigmoid, powerlaw_rvs
from jax import jit as jjit
from jax import numpy as jnp
from jax import vmap
powerlaw_rvs_vmap = jjit(vmap(powerlaw_rvs, in_axes=(None, 0, 0, 0)))
DEFAULT_PDICT = OrderedDict(
funo_logf... | LSSTDESCREPO_NAMElsstdesc-diffskyPATH_START.@lsstdesc-diffsky_extracted@lsstdesc-diffsky-main@lsstdesc_diffsky@dspspop@boris_dust.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="size",
parent_name="scattergeo.marker.colorbar.title.font",
**kwargs
):
super(SizeValidator, self).__init__(
plotly_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@marker@colorbar@title@font@_size.py@.PATH_END.py |
{
"filename": "dop.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/integrate/dop.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
import warnings
from . import _dop # type: ignore
__all__ = [ # noqa: F822
'dopri5',
'dop853'
]
def __dir__():
return __all__
def __getattr__(name):
if name not in __all__:
raise AttributeError(
"s... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@integrate@dop.py@.PATH_END.py |
{
"filename": "tfsa-2022-075.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-075.md",
"type": "Markdown"
} | ## TFSA-2022-075: Missing validation results in undefined behavior in `QuantizedConv2D`
### CVE Number
CVE-2022-29201
### Impact
The implementation of [`tf.raw_ops.QuantizedConv2D`](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/quantized_conv_ops.cc) do... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-075.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/arrays/numpy_/__init__.py",
"type": "Python"
} | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@arrays@numpy_@__init__.py@.PATH_END.py | |
{
"filename": "setup.py",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/py_progs/py4py/setup.py",
"type": "Python"
} | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="py4py",
version="0.9.0",
author="Python Collaboration",
author_email="s.mangham@soton.ac.uk",
description="Analysing and plotting module for the radiative transfer code called Python.",
... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@py_progs@py4py@setup.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattermap/selected/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._marker import Marker
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"])
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattermap@selected@__init__.py@.PATH_END.py |
{
"filename": "_vhoverformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/_vhoverformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VhoverformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="vhoverformat", parent_name="streamtube", **kwargs):
super(VhoverformatValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@_vhoverformat.py@.PATH_END.py |
{
"filename": "plot_softdtw_path.py",
"repo_name": "tslearn-team/tslearn",
"repo_path": "tslearn_extracted/tslearn-main/docs/examples/metrics/plot_softdtw_path.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Soft Dynamic Time Warping
=========================
This example illustrates Soft Dynamic Time Warping (DTW) computation between
time series and plots the optimal soft alignment matrices [1]_.
.. [1] M. Cuturi, M. Blondel "Soft-DTW: a Differentiable Loss Function for
Time-Series," ... | tslearn-teamREPO_NAMEtslearnPATH_START.@tslearn_extracted@tslearn-main@docs@examples@metrics@plot_softdtw_path.py@.PATH_END.py |
{
"filename": "09_plot_relative_gain.ipynb",
"repo_name": "markusbonse/fours",
"repo_path": "fours_extracted/fours-main/docs/source/04_use_the_fours/paper_experiments/09_plot_relative_gain.ipynb",
"type": "Jupyter Notebook"
} | # Figure 9: Relative improvement of 4S over PCA
```python
from pathlib import Path
import pandas as pd
import pickle
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from fours.utils.data_handling import read_fours_root_dir
```
## Load the contrast curves
```python
root_dir = Path(read_fo... | markusbonseREPO_NAMEfoursPATH_START.@fours_extracted@fours-main@docs@source@04_use_the_fours@paper_experiments@09_plot_relative_gain.ipynb@.PATH_END.py |
{
"filename": "scaling_prelim.ipynb",
"repo_name": "Smith42/astroPT",
"repo_path": "astroPT_extracted/astroPT-main/explore/scaling_prelim.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage import uniform_filter1d
from functools import partial
```
```python
smooth = partial(uniform_filter1d, mode="nearest", size=10)
```
```python
loss300 = np.genfromtxt("loss_300M.txt", delimiter=",")
loss700 = np.genfromtxt("loss_700M.txt... | Smith42REPO_NAMEastroPTPATH_START.@astroPT_extracted@astroPT-main@explore@scaling_prelim.ipynb@.PATH_END.py |
{
"filename": "_sizey.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/image/_sizey.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeyValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="sizey", parent_name="layout.image", **kwargs):
super(SizeyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@image@_sizey.py@.PATH_END.py |
{
"filename": "plot_killMS.py",
"repo_name": "IanHeywood/oxkat",
"repo_path": "oxkat_extracted/oxkat-master/tools/plot_killMS.py",
"type": "Python"
} | #!/usr/bin/python
# Plot killMS gain tables
# ian.heywood@physics.ox.ac.uk
import logging
import matplotlib
matplotlib.use('Agg')
import numpy
from optparse import OptionParser
import os
import pylab
import sys
from astropy.time import Time
from astropy.coordinates import ICRS
from astropy import units as u
from dat... | IanHeywoodREPO_NAMEoxkatPATH_START.@oxkat_extracted@oxkat-master@tools@plot_killMS.py@.PATH_END.py |
{
"filename": "_showlegend.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/_showlegend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showlegend", parent_name="scattergeo", **kwargs):
super(ShowlegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@_showlegend.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/updatemenu/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="y", parent_name="layout.updatemenu", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_t... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@updatemenu@_y.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/treemap/outsidetextfont/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="treemap.outsidetextfont", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@outsidetextfont@_color.py@.PATH_END.py |
{
"filename": "conv1dsame.py",
"repo_name": "AlexandreAdam/score_models",
"repo_path": "score_models_extracted/score_models-master/score_models/layers/conv1dsame.py",
"type": "Python"
} | import torch.nn as nn
import torch.nn.functional as F
from typing import Union
from .spectral_normalization import SpectralNorm
"""
Implements same padding behavior as in Tensorflow
"""
class Conv1dSame(nn.Module):
def __init__(
self,
in_channels: int,
out_channels: int,
... | AlexandreAdamREPO_NAMEscore_modelsPATH_START.@score_models_extracted@score_models-master@score_models@layers@conv1dsame.py@.PATH_END.py |
{
"filename": "cacheutil.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/py/_path/cacheutil.py",
"type": "Python"
} | """
This module contains multithread-safe cache implementations.
All Caches have
getorbuild(key, builder)
delentry(key)
methods and allow configuration when instantiating the cache class.
"""
from time import time as gettime
class BasicCache(object):
def __init__(self, maxentries=128):
self.maxe... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@py@_path@cacheutil.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._namelengthsrc import NamelengthsrcValidator
from ._namelength import NamelengthValidator
from ._font import FontValidator
from ._bordercolorsrc import BordercolorsrcValidator
from ._bordercolor import ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "base_command.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_internal/cli/base_command.py",
"type": "Python"
} | """Base Command class, and related routines"""
from __future__ import absolute_import, print_function
import logging
import logging.config
import optparse
import os
import platform
import sys
import traceback
from pip._internal.cli import cmdoptions
from pip._internal.cli.command_context import CommandContextMixIn
f... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_internal@cli@base_command.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "CosmicFish/CosmicFish",
"repo_path": "CosmicFish_extracted/CosmicFish-master/python/apps/__init__.py",
"type": "Python"
} | #----------------------------------------------------------------------------------------
#
# This file is part of CosmicFish.
#
# Copyright (C) 2015 by the CosmicFish authors
#
# The CosmicFish code is free software;
# You can use it, redistribute it, and/or modify it under the terms
# of the GNU General Public Licens... | CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@python@apps@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/_lib/highs/src/interfaces/highspy/highspy/tests/__init__.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@_lib@highs@src@interfaces@highspy@highspy@tests@__init__.py@.PATH_END.py | |
{
"filename": "database.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/server/events/storage/database.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Sequence, Tuple
import pydantic
import sqlalchemy as sa
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import aliased
from prefect.logging.loggers import get_logger
from prefect.server.database.dependencies import db_injector... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@events@storage@database.py@.PATH_END.py |
{
"filename": "extinction.py",
"repo_name": "threeML/astromodels",
"repo_path": "astromodels_extracted/astromodels-master/astromodels/functions/functions_1D/extinction.py",
"type": "Python"
} | import math
from dataclasses import dataclass
from enum import Enum
from typing import Dict
import astropy.units as astropy_units
import numba as nb
import numpy as np
from astromodels.functions.function import Function1D, FunctionMeta
from astromodels.utils.logging import setup_logger
log = setup_logger(__name__)
... | threeMLREPO_NAMEastromodelsPATH_START.@astromodels_extracted@astromodels-master@astromodels@functions@functions_1D@extinction.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/isosurface/hoverlabel/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@isosurface@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "_densitymap.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/template/data/_densitymap.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DensitymapValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="densitymap", parent_name="layout.template.data", **kwargs
):
super(DensitymapValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@template@data@_densitymap.py@.PATH_END.py |
{
"filename": "_dispatch_ndinterp.py",
"repo_name": "dask/dask-image",
"repo_path": "dask-image_extracted/dask-image-main/dask_image/dispatch/_dispatch_ndinterp.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import numpy as np
from scipy import ndimage
from ._dispatcher import Dispatcher
__all__ = [
"dispatch_affine_transform",
"dispatch_asarray",
]
dispatch_affine_transform = Dispatcher(name="dispatch_affine_transform")
# ================== affine_transform ==================
@dispatc... | daskREPO_NAMEdask-imagePATH_START.@dask-image_extracted@dask-image-main@dask_image@dispatch@_dispatch_ndinterp.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/box/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="customdatasrc", parent_name="box", **kwargs):
super(CustomdatasrcValidator, 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@box@_customdatasrc.py@.PATH_END.py |
{
"filename": "seismic.py",
"repo_name": "AishwaryaC26/RIS-Vis",
"repo_path": "RIS-Vis_extracted/RIS-Vis-main/app/seismic.py",
"type": "Python"
} | import dash
import dash_bootstrap_components as dbc
from dash import Input, Output, dcc, html, State
import elementstyling
from datetime import date
import os, ast
from dotenv import load_dotenv
import componentbuilder
load_dotenv()
stations = ast.literal_eval(os.environ["SEISMIC_STATIONS"])
coords = ast.literal_eval... | AishwaryaC26REPO_NAMERIS-VisPATH_START.@RIS-Vis_extracted@RIS-Vis-main@app@seismic.py@.PATH_END.py |
{
"filename": "test_predict.py",
"repo_name": "DLR-RM/stable-baselines3",
"repo_path": "stable-baselines3_extracted/stable-baselines3-master/tests/test_predict.py",
"type": "Python"
} | import gymnasium as gym
import numpy as np
import pytest
import torch as th
from gymnasium import spaces
from stable_baselines3 import A2C, DQN, PPO, SAC, TD3
from stable_baselines3.common.env_checker import check_env
from stable_baselines3.common.envs import IdentityEnv
from stable_baselines3.common.utils import get_... | DLR-RMREPO_NAMEstable-baselines3PATH_START.@stable-baselines3_extracted@stable-baselines3-master@tests@test_predict.py@.PATH_END.py |
{
"filename": "primitives.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/pallas/mosaic_gpu/primitives.py",
"type": "Python"
} | # Copyright 2024 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@pallas@mosaic_gpu@primitives.py@.PATH_END.py |
{
"filename": "swish.py",
"repo_name": "eelregit/map2map",
"repo_path": "map2map_extracted/map2map-master/map2map/models/swish.py",
"type": "Python"
} | import torch
class Swish(torch.nn.Module):
def forward(self, x):
return x * torch.sigmoid(x)
| eelregitREPO_NAMEmap2mapPATH_START.@map2map_extracted@map2map-master@map2map@models@swish.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "davidwhogg/NoDataInterpolation",
"repo_path": "NoDataInterpolation_extracted/NoDataInterpolation-main/setup.py",
"type": "Python"
} | from setuptools import setup, find_packages
setup(
name="NoDataInterpolation",
version="0.0.1",
package_dir={"": "python"},
packages=find_packages(where="python"),
install_requires=["numpy"]
)
| davidwhoggREPO_NAMENoDataInterpolationPATH_START.@NoDataInterpolation_extracted@NoDataInterpolation-main@setup.py@.PATH_END.py |
{
"filename": "vnet.py",
"repo_name": "eelregit/map2map",
"repo_path": "map2map_extracted/map2map-master/map2map/models/vnet.py",
"type": "Python"
} | import torch
import torch.nn as nn
from .conv import ConvBlock, ResBlock
from .narrow import narrow_by
class VNet(nn.Module):
def __init__(self, in_chan, out_chan, bypass=None, **kwargs):
"""V-Net like network
Note:
Global bypass connection adding the input to the output (similar to
... | eelregitREPO_NAMEmap2mapPATH_START.@map2map_extracted@map2map-master@map2map@models@vnet.py@.PATH_END.py |
{
"filename": "yuque.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/yuque.py",
"type": "Python"
} | import re
from typing import Dict, Iterator, List
import requests
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
class YuqueLoader(BaseLoader):
"""Load documents from `Yuque`."""
def __init__(self, access_token: str, api_url: str = "https://ww... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@yuque.py@.PATH_END.py |
{
"filename": "watson.py",
"repo_name": "PlanetHunters/watson",
"repo_path": "watson_extracted/watson-main/watson/watson.py",
"type": "Python"
} | # from __future__ import print_function, absolute_import, division
import base64
import logging
import multiprocessing
import shutil
import traceback
import requests
import zipfile
import io
from exoml.iatson.IATSON_planet import IATSON_planet
from exoml.ml.model.base_model import HyperParams
from foldedleastsquares.st... | PlanetHuntersREPO_NAMEwatsonPATH_START.@watson_extracted@watson-main@watson@watson.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "manodeep/Corrfunc",
"repo_path": "Corrfunc_extracted/Corrfunc-master/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want t... | manodeepREPO_NAMECorrfuncPATH_START.@Corrfunc_extracted@Corrfunc-master@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "Cross Validation Testing.ipynb",
"repo_name": "ChrisBeaumont/brut",
"repo_path": "brut_extracted/brut-master/notebooks/Cross Validation Testing.ipynb",
"type": "Jupyter Notebook"
} | In the earlier hyperparameter optimization (Daisy Features notebook), we used the full set of + labels. Is this causing over-fitting during hyperoptimization?
#### Conclusion
Splitting the + labels in the validation data into independent validate/test samples converges to the same set of hyperparameters, and almost ... | ChrisBeaumontREPO_NAMEbrutPATH_START.@brut_extracted@brut-master@notebooks@Cross Validation Testing.ipynb@.PATH_END.py |
{
"filename": "test_read_status.py",
"repo_name": "CP3-Origins/cp3-bench",
"repo_path": "cp3-bench_extracted/cp3-bench-master/tests/test_read_status.py",
"type": "Python"
} | import os
import sys
import pathlib
from unittest import TestCase
# Method to test
sys.path.append(os.path.join(os.path.dirname(__file__),'../'))
from bench.utils.read_status import read_status
PATH = pathlib.Path(__file__).parent.resolve()
class TestReadStatus(TestCase):
def setUp(self) -> None:
self.... | CP3-OriginsREPO_NAMEcp3-benchPATH_START.@cp3-bench_extracted@cp3-bench-master@tests@test_read_status.py@.PATH_END.py |
{
"filename": "test_block_docstring.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/f2py/tests/test_block_docstring.py",
"type": "Python"
} | import sys
import pytest
from . import util
from numpy.testing import IS_PYPY
class TestBlockDocString(util.F2PyTest):
sources = [util.getpath("tests", "src", "block_docstring", "foo.f")]
@pytest.mark.skipif(sys.platform == "win32",
reason="Fails with MinGW64 Gfortran (Issue #9673)")... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@f2py@tests@test_block_docstring.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "LSSTDESC/descqa",
"repo_path": "descqa_extracted/descqa-master/descqa/utils.py",
"type": "Python"
} | """
utility functions for descqa
"""
from __future__ import unicode_literals, division, print_function, absolute_import
import numpy as np
import healpy as hp
__all__ = [
'get_sky_volume',
'get_opt_binpoints',
'get_healpixel_footprint',
'generate_uniform_random_ra_dec',
'generate_uniform_random_ra... | LSSTDESCREPO_NAMEdescqaPATH_START.@descqa_extracted@descqa-master@descqa@utils.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/insidetextfont/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="weight", parent_name="treemap.insidetextfont", **kwargs
):
super(WeightValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@insidetextfont@_weight.py@.PATH_END.py |
{
"filename": "cosmicRayEnergyReconstructor.py",
"repo_name": "nu-radio/NuRadioMC",
"repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/modules/cosmicRayEnergyReconstructor.py",
"type": "Python"
} | import numpy as np
from NuRadioReco.modules.base.module import register_run
from NuRadioReco.framework.parameters import stationParameters as stnp
from NuRadioReco.framework.parameters import electricFieldParameters as efp
from NuRadioReco.utilities import units
import NuRadioReco.utilities.trace_utilities
import loggi... | nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@modules@cosmicRayEnergyReconstructor.py@.PATH_END.py |
{
"filename": "mcmc_rv_noperiod.py",
"repo_name": "mikecokina/elisa",
"repo_path": "elisa_extracted/elisa-master/scripts/analytics/mcmc_rv_noperiod.py",
"type": "Python"
} | import json
import os.path as op
import numpy as np
from elisa.analytics import RVData, RVBinaryAnalyticsTask
from elisa.analytics.params.parameters import BinaryInitialParameters
from elisa.binary_system import t_layer
from elisa import units
np.random.seed(1)
DATA = op.join(op.abspath(op.dirname(__file__)), "data"... | mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@scripts@analytics@mcmc_rv_noperiod.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pie/insidetextfont/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._sizesrc import SizesrcValidator
from ._size import SizeValidator
from ._familysrc import FamilysrcValidator
from ._family import FamilyValidator
from ._colorsrc import ColorsrcValidator
from ._color import ColorValidator
else:
from _plotly_uti... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pie@insidetextfont@__init__.py@.PATH_END.py |
{
"filename": "test_GALEXField.ipynb",
"repo_name": "rbuehler/vasca",
"repo_path": "vasca_extracted/vasca-main/vasca/examples/old/test_GALEXField.ipynb",
"type": "Jupyter Notebook"
} | ```python
%load_ext autoreload
%autoreload 2
%matplotlib widget
```
```python
from pprint import pprint
from copy import copy
import time
import warnings
from itertools import cycle, islice
import sys
from astropy.stats import gaussian_sigma_to_fwhm
from astropy.coordinates import SkyCoord, search_around_sky, Angle
... | rbuehlerREPO_NAMEvascaPATH_START.@vasca_extracted@vasca-main@vasca@examples@old@test_GALEXField.ipynb@.PATH_END.py |
{
"filename": "_check_module.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/argcomplete/py3/argcomplete/_check_module.py",
"type": "Python"
} | """
Utility for locating a module (or package's __main__.py) with a given name
and verifying it contains the PYTHON_ARGCOMPLETE_OK marker.
The module name should be specified in a form usable with `python -m`.
Intended to be invoked by argcomplete's global completion function.
"""
import os
import sys
import tokeniz... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@argcomplete@py3@argcomplete@_check_module.py@.PATH_END.py |
{
"filename": "visualize.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/autofit/example/visualize.py",
"type": "Python"
} | import os
import matplotlib.pyplot as plt
import numpy as np
from typing import List
import autofit as af
class VisualizerExample(af.Visualizer):
"""
Methods associated with visualising analysis, model and data before, during
or after an optimisation.
"""
@staticmethod
def visualize_before_f... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@autofit@example@visualize.py@.PATH_END.py |
{
"filename": "random_crop_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/random/random_crop_test.py",
"type": "Python"
} | # Copyright 2015 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@kernel_tests@random@random_crop_test.py@.PATH_END.py |
{
"filename": "test_module_remote.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/template_module/tests/test_module_remote.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# performs similar tests as test_module.py, but performs
# the actual HTTP request rather than monkeypatching them.
# should be disabled or enabled at will - use the
# remote_data decorator from astropy:
import pytest
@pytest.mark.remote_data
class Te... | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@template_module@tests@test_module_remote.py@.PATH_END.py |
{
"filename": "irafhelp.py",
"repo_name": "iraf-community/pyraf",
"repo_path": "pyraf_extracted/pyraf-main/pyraf/irafhelp.py",
"type": "Python"
} | """Give help on variables, functions, modules, classes, IRAF tasks,
IRAF packages, etc.
- help() with no arguments will list all the defined variables.
- help("taskname") or help(IrafTaskObject) display the IRAF help for the task
- help("taskname",html=1) or help(IrafTaskObject,html=1) will direct a browser
to displ... | iraf-communityREPO_NAMEpyrafPATH_START.@pyraf_extracted@pyraf-main@pyraf@irafhelp.py@.PATH_END.py |
{
"filename": "gooseai.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/llms/gooseai.py",
"type": "Python"
} | import logging
from typing import Any, Dict, List, Mapping, Optional
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.utils import (
convert_to_secret_str,
get_from_dict_or_env,
get_pydantic_field_names,
)
from pydantic im... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@llms@gooseai.py@.PATH_END.py |
{
"filename": "_yaxes.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/grid/_yaxes.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(self, plotly_name="yaxes", parent_name="layout.grid", **kwargs):
super(YaxesValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@grid@_yaxes.py@.PATH_END.py |
{
"filename": "test_powm1.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/special/tests/test_powm1.py",
"type": "Python"
} | import pytest
import numpy as np
from numpy.testing import assert_allclose
from scipy.special import powm1
# Expected values were computed with mpmath, e.g.
#
# >>> import mpmath
# >>> mpmath.np.dps = 200
# >>> print(float(mpmath.powm1(2.0, 1e-7))
# 6.931472045825965e-08
#
powm1_test_cases = [
(1.25, 0.75... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@special@tests@test_powm1.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "hmtabernero/StePar",
"repo_path": "StePar_extracted/StePar-master/README.md",
"type": "Markdown"
} | How to install StePar
======================
StePar is a code used to automatically infer stellar atmospheric parameters using the EW method.For the time being this is the code and the installation instructions.
A paper describing this code has been accepted in A&A:
https://ui.adsabs.harvard.edu/abs/2019A%26A...628A... | hmtaberneroREPO_NAMESteParPATH_START.@StePar_extracted@StePar-master@README.md@.PATH_END.py |
{
"filename": "mg_growth.py",
"repo_name": "philbull/RadioFisher",
"repo_path": "RadioFisher_extracted/RadioFisher-master/radiofisher/mg_growth.py",
"type": "Python"
} | #!/usr/bin/python
"""
Solve modified gravity linear growth rate equation from arXiv:1310.1086 and
calculate finite difference derivatives.
"""
import numpy as np
import scipy.integrate
import scipy.interpolate
import copy
def xi(a, k, cosmo):
"""
Modified growth parameter, mu / gamma.
"""
w0 = cosmo['... | philbullREPO_NAMERadioFisherPATH_START.@RadioFisher_extracted@RadioFisher-master@radiofisher@mg_growth.py@.PATH_END.py |
{
"filename": "conv_with_shared_weights.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/conv_with_shared_weights.py",
"type": "Python"
} | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@testing@op_tests@conv_with_shared_weights.py@.PATH_END.py |
{
"filename": "_outlinecolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="outlinecolor",
parent_name="choroplethmapbox.colorbar",
**kwargs,
):
super(OutlinecolorValidator, self).__init__(
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@colorbar@_outlinecolor.py@.PATH_END.py |
{
"filename": "loops.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/lax/control_flow/loops.py",
"type": "Python"
} | # Copyright 2022 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@lax@control_flow@loops.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "chianti-atomic/ChiantiPy",
"repo_path": "ChiantiPy_extracted/ChiantiPy-master/ChiantiPy/tools/io.py",
"type": "Python"
} | """
Reading and writing functions
TODO: see if klgfbRead is needed or not
"""
import os
from datetime import date
import pickle
import configparser
from fnmatch import fnmatch
import numpy as np
import ChiantiPy.tools.util as util
import ChiantiPy.tools.constants as const
import ChiantiPy.Gui as chgui
from Chianti... | chianti-atomicREPO_NAMEChiantiPyPATH_START.@ChiantiPy_extracted@ChiantiPy-master@ChiantiPy@tools@io.py@.PATH_END.py |
{
"filename": "3_info_and_plots.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/docs/src_examples/cosmo_external_likelihood/3_info_and_plots.py",
"type": "Python"
} | info = {
'params': {
# Fixed
'ombh2': 0.022, 'omch2': 0.12, 'H0': 68, 'tau': 0.07,
'mnu': 0.06, 'nnu': 3.046,
# Sampled
'As': {'prior': {'min': 1e-9, 'max': 4e-9}, 'latex': 'A_s'},
'ns': {'prior': {'min': 0.9, 'max': 1.1}, 'latex': 'n_s'},
'noise_std_pixel': {... | ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@docs@src_examples@cosmo_external_likelihood@3_info_and_plots.py@.PATH_END.py |
{
"filename": "arangodb_graph.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/graphs/arangodb_graph.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import ArangoGraph
from langchain_community.graphs.arangodb_graph import get_arangodb_client
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@graphs@arangodb_graph.py@.PATH_END.py |
{
"filename": "test_3x2fom.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/tests/maf/test_3x2fom.py",
"type": "Python"
} | import os
import shutil
import tempfile
import unittest
from rubin_scheduler.data import get_data_dir
from rubin_scheduler.utils.code_utilities import sims_clean_up
import rubin_sim.maf as maf
TEST_DB = "example_v3.4_0yrs.db"
class Test3x2(unittest.TestCase):
@classmethod
def tearDownClass(cls):
si... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@tests@maf@test_3x2fom.py@.PATH_END.py |
{
"filename": "chi2_fitting.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/examples/python/chi2_fitting.py",
"type": "Python"
} | #!/usr/bin/env python
# DO NOT EDIT
# Autogenerated from the notebook chi2_fitting.ipynb.
# Edit the notebook and then sync the output with this file.
#
# flake8: noqa
# DO NOT EDIT
# # Least squares fitting of models to data
# This is a quick introduction to `statsmodels` for physical scientists
# (e.g. physicists,... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@examples@python@chi2_fitting.py@.PATH_END.py |
{
"filename": "_lenmode.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/_lenmode.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="lenmode", parent_name="contour.colorbar", **kwargs):
super(LenmodeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@_lenmode.py@.PATH_END.py |
{
"filename": "example_grid.ipynb",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/docs/examples/example_grid.ipynb",
"type": "Jupyter Notebook"
} | # Simple Parameter Study: 2-D Model Grid
Often we want to study how the 21-cm signal changes over a range of parameters. We can do so using the ModelGrid class, and use numpy arrays to represent the range of values we’re interested in.
Before we start, the few usual imports:
```python
%pylab inline
import ares
impo... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@docs@examples@example_grid.ipynb@.PATH_END.py |
{
"filename": "examples_test.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/examples/examples_test.py",
"type": "Python"
} | # Copyright 2018 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@examples@examples_test.py@.PATH_END.py |
{
"filename": "test_bayesian_blocks.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/stats/tests/test_bayesian_blocks.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy.stats import RegularEvents, bayesian_blocks
def test_single_change_point(rseed=0):
rng = np.random.default_rng(rseed)
x = np.concatenate([rng.random(100), 1... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@stats@tests@test_bayesian_blocks.py@.PATH_END.py |
{
"filename": "dismissable.py",
"repo_name": "ratt-ru/Stimela-classic",
"repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/dismissable.py",
"type": "Python"
} | # -*- coding: future_fstrings -*-
class dismissable:
'''
Wrapper for optional parameters to stimela
Initialize with val == None to force stimela to skip
parsing parameter.
'''
def __init__(self, val=None):
self.__val = val
def __call__(self):
return self.__val
| ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@dismissable.py@.PATH_END.py |
{
"filename": "operations.py",
"repo_name": "Hoeijmakers/StarRotator",
"repo_path": "StarRotator_extracted/StarRotator-master/lib/operations.py",
"type": "Python"
} | #This file contains a collection of functions that operate on spectra.
def convolve(array,kernel,edge_degree=1,fit_width=2):
"""np.convolve with accounting for edge effects via extrapolation of the edge of the array using a polynomial fit
to the edge elements. By default, I fit over a range that is twice the le... | HoeijmakersREPO_NAMEStarRotatorPATH_START.@StarRotator_extracted@StarRotator-master@lib@operations.py@.PATH_END.py |
{
"filename": "signalkernel.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/jupyter-client/py2/jupyter_client/tests/signalkernel.py",
"type": "Python"
} | """Test kernel for signalling subprocesses"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from subprocess import Popen, PIPE
import sys
import time
from ipykernel.displayhook import ZMQDisplayHook
from ipykernel.kernelbas... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jupyter-client@py2@jupyter_client@tests@signalkernel.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/urllib3/__init__.py",
"type": "Python"
} | """
urllib3 - Thread-safe connection pooling and re-using.
"""
from __future__ import absolute_import
import warnings
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
from . import exceptions
from .filepost import encode_multipart_formdata
from .poolmanager import PoolManager, ... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@urllib3@__init__.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/scattercarpet/textfont/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="weightsrc", parent_name="scattercarpet.textfont", **kwargs
):
super(WeightsrcValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@textfont@_weightsrc.py@.PATH_END.py |
{
"filename": "_textfont.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnelarea/_textfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="textfont", parent_name="funnelarea", **kwargs):
super(TextfontValidator, 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@funnelarea@_textfont.py@.PATH_END.py |
{
"filename": "IMRPhenomNSBH.py",
"repo_name": "CosmoStatGW/WF4Py",
"repo_path": "WF4Py_extracted/WF4Py-master/WF4Py/waveform_models/IMRPhenomNSBH.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2022 Francesco Iacovelli <francesco.iacovelli@unige.ch>
#
# All rights reserved. Use of this source code is governed by the
# license that can be found in the LICENSE file.
import numpy as np
import os
import sys
import h5py
from WF4Py import WFu... | CosmoStatGWREPO_NAMEWF4PyPATH_START.@WF4Py_extracted@WF4Py-master@WF4Py@waveform_models@IMRPhenomNSBH.py@.PATH_END.py |
{
"filename": "arpack.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/sparse/linalg/_eigen/arpack/arpack.py",
"type": "Python"
} | """
Find a few eigenvectors and eigenvalues of a matrix.
Uses ARPACK: https://github.com/opencollab/arpack-ng
"""
# Wrapper implementation notes
#
# ARPACK Entry Points
# -------------------
# The entry points to ARPACK are
# - (s,d)seupd : single and double precision symmetric matrix
# - (s,d,c,z)neupd: single,doub... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@sparse@linalg@_eigen@arpack@arpack.py@.PATH_END.py |
{
"filename": "test_solver2.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Solver/test_solver2.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy as np
import numpy.testing as npt
import pytest
import unittest
from lenstronomy.LensModel.Profiles.nfw import NFW
from lenstronomy.LensModel.lens_model import LensModel
from lenstronomy.LensModel.Solver.lens_equation_solver import LensEquationSolver
from lenstronomy.LensModel.Solv... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Solver@test_solver2.py@.PATH_END.py |
{
"filename": "test_custom.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/distributions/test_custom.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# 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 ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@distributions@test_custom.py@.PATH_END.py |
{
"filename": "test_telemetry.py",
"repo_name": "lwa-project/lsl",
"repo_path": "lsl_extracted/lsl-main/tests/test_telemetry.py",
"type": "Python"
} | """
Unit test for the lsl.misc.telemetry module.
"""
import os
import time
import warnings
import unittest
from lsl.misc import telemetry
__version__ = "0.1"
__author__ = "Jayce Dowell"
@telemetry.track_function
def _trivial(x):
return x + 5
@telemetry.track_function_timed
def _trivial2(x):
return x... | lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@tests@test_telemetry.py@.PATH_END.py |
{
"filename": "main.py",
"repo_name": "cdslaborg/paramonte",
"repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distKolm/getKolmPDF/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" : "X ( real/imaginary components )"
, "IK" : "X ( integer-valued )"
,... | cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distKolm@getKolmPDF@main.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.