metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "rfi_inspect_2458087.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/rfi_inspect/rfi_inspect_2458087.ipynb",
"type": "Jupyter Notebook"
} | # RFI Inspection Daily RTP Notebook
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import glob
import os
from astropy import units
from copy import deepcopy
from pyuvdata import UVFlag
import matplotlib.colors as colors
from matplotlib import cm
%matplotlib inline
%config InlineBacken... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@rfi_inspect@rfi_inspect_2458087.ipynb@.PATH_END.py |
{
"filename": "pvhub.py",
"repo_name": "KSaid-1/pvhub",
"repo_path": "pvhub_extracted/pvhub-main/pvhub.py",
"type": "Python"
} | import os
import inspect
import numpy as np
from abc import ABC
import pandas as pd
import astropy.units as u
import astropy.constants as const
from astropy.coordinates import SkyCoord
class Recon(ABC):
"""Abstract base class for the reconstruction data included in pvhub
Meant to only be accessed through the... | KSaid-1REPO_NAMEpvhubPATH_START.@pvhub_extracted@pvhub-main@pvhub.py@.PATH_END.py |
{
"filename": "python-reference_catboost_is_fitted.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboost_is_fitted.md",
"type": "Markdown"
} | # is_fitted
{% include [sections-with-methods-desc-is_fitted--purpose](../_includes/work_src/reusage/is_fitted--purpose.md) %}
## {{ dl--invoke-format }} {#call-format}
```python
is_fitted()
```
## {{ dl--output-format }} {#output-format}
{% include [sections-with-methods-desc-is_fitted--return-value-type](../_in... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboost_is_fitted.md@.PATH_END.py |
{
"filename": "cluster.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/gammapy/utils/cluster.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Utilities for hierarchical/agglomerative clustering."""
import numpy as np
import scipy.cluster.hierarchy as sch
__all__ = ["standard_scaler", "hierarchical_clustering"]
def standard_scaler(features):
r"""Compute standardized features by removing... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@utils@cluster.py@.PATH_END.py |
{
"filename": "predict_from_fits.py",
"repo_name": "ratt-ru/Stimela-classic",
"repo_path": "Stimela-classic_extracted/Stimela-classic-master/stimela/cargo/cab/lwimager/src/predict_from_fits.py",
"type": "Python"
} | import pyfits as fitsio
import numpy
from pyrap.tables import table
import numpy
import os
import sys
import tempfile
import subprocess
import shlex
imagename = sys.argv[1]
msname = sys.argv[2]
cell = sys.argv[3]
hdulist = fitsio.open(imagename)
if isinstance(hdulist, list):
hdu = hdulist[0]
else:
hdu = hduli... | ratt-ruREPO_NAMEStimela-classicPATH_START.@Stimela-classic_extracted@Stimela-classic-master@stimela@cargo@cab@lwimager@src@predict_from_fits.py@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/cells/font/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="family", parent_name="table.cells.font", **kwargs):
super(FamilyValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@cells@font@_family.py@.PATH_END.py |
{
"filename": "benchmark_utils.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/benchmarks/torch_ctl_benchmark/benchmark_utils.py",
"type": "Python"
} | import time
import numpy as np
import torch
def train_loop(model, train_loader, num_epochs, optimizer, loss_fn, framework):
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model.to(device)
start = None
average_batch_time_per_epoch = []
for _ in range(num_epochs):
r... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@benchmarks@torch_ctl_benchmark@benchmark_utils.py@.PATH_END.py |
{
"filename": "old_build_ext.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Distutils/old_build_ext.py",
"type": "Python"
} | """Cython.Distutils.old_build_ext
Implements a version of the Distutils 'build_ext' command, for
building Cython extension modules.
Note that this module is deprecated. Use cythonize() instead.
"""
__revision__ = "$Id:$"
import inspect
import sys
import os
from distutils.errors import DistutilsPlatformError
from d... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Distutils@old_build_ext.py@.PATH_END.py |
{
"filename": "_namelengthsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/hoverlabel/_namelengthsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="namelengthsrc", parent_name="histogram.hoverlabel", **kwargs
):
super(NamelengthsrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@hoverlabel@_namelengthsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/src/amuse/rfi/tools/__init__.py",
"type": "Python"
} | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@rfi@tools@__init__.py@.PATH_END.py | |
{
"filename": "cls_registration.py",
"repo_name": "pysat/pysat",
"repo_path": "pysat_extracted/pysat-main/pysat/tests/classes/cls_registration.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.
# ----------------------------------------------------------------------------
"""Stan... | pysatREPO_NAMEpysatPATH_START.@pysat_extracted@pysat-main@pysat@tests@classes@cls_registration.py@.PATH_END.py |
{
"filename": "vmaxtest.ipynb",
"repo_name": "solerjuan/astroHOG",
"repo_path": "astroHOG_extracted/astroHOG-master/examples/vmaxtest.ipynb",
"type": "Jupyter Notebook"
} | ```python
#
#
import sys
sys.path.append('../')
from astrohog2d import *
```
```python
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
from astropy.io import fits
```
```python
nx=100; ny=200
```
```python
weights=1.0
```
```python
image1=np.random.rand(nx,ny)
```
```python
image2=np.random.r... | solerjuanREPO_NAMEastroHOGPATH_START.@astroHOG_extracted@astroHOG-master@examples@vmaxtest.ipynb@.PATH_END.py |
{
"filename": "path.py",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/hazma/spectra/_photon/path.py",
"type": "Python"
} | from importlib.resources import path
import pathlib
THIS_DIR = pathlib.Path(__file__).absolute().parent
DATA_DIR = THIS_DIR.joinpath("data")
| LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@spectra@_photon@path.py@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/box/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="name", parent_name="box", **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=k... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@box@_name.py@.PATH_END.py |
{
"filename": "dispatcher.py",
"repo_name": "bd-j/forcepho",
"repo_path": "forcepho_extracted/forcepho-main/forcepho/dispatcher.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""dispatcher.py
Parent side classes for MPI queues.
"""
import os
import json
import logging
import argparse
import time
from argparse import Namespace
import socket
import numpy as np
from astropy.io import fits
from .superscene import SuperScene, LinkedSuperScene, r... | bd-jREPO_NAMEforcephoPATH_START.@forcepho_extracted@forcepho-main@forcepho@dispatcher.py@.PATH_END.py |
{
"filename": "test_iter.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimes/test_iter.py",
"type": "Python"
} | import dateutil.tz
import numpy as np
import pytest
from pandas import (
DatetimeIndex,
date_range,
to_datetime,
)
from pandas.core.arrays import datetimes
class TestDatetimeIndexIteration:
@pytest.mark.parametrize(
"tz", [None, "UTC", "US/Central", dateutil.tz.tzoffset(None, -28800)]
)
... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimes@test_iter.py@.PATH_END.py |
{
"filename": "2023_01_26_152801_0a1250a5aa25_expand_work_queue_table.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2023_01_26_152801_0a1250a5aa25_expand_work_queue_table.py",
"type": "Python"
} | """Expand work queue table
Revision ID: 0a1250a5aa25
Revises: d481d5058a19
Create Date: 2023-01-25 15:28:01.263916
"""
import sqlalchemy as sa
from alembic import op
import prefect
# revision identifiers, used by Alembic.
revision = "0a1250a5aa25"
down_revision = "2882cd2df466"
branch_labels = None
depends_on = No... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2023_01_26_152801_0a1250a5aa25_expand_work_queue_table.py@.PATH_END.py |
{
"filename": "timetag.py",
"repo_name": "spacetelescope/calcos",
"repo_path": "calcos_extracted/calcos-master/calcos/timetag.py",
"type": "Python"
} | from __future__ import absolute_import, division # confidence high
import math
import os
import time
import numpy as np
from numpy import random
import astropy.io.fits as fits
from . import cosutil
from . import burst
from . import ccos
from . import concurrent
from . import dispersion
from . import phot
from ... | spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@calcos@timetag.py@.PATH_END.py |
{
"filename": "ComboBox.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/widgets/ComboBox.py",
"type": "Python"
} | import sys
from collections import OrderedDict
from ..Qt import QtWidgets
__all__ = ['ComboBox']
class ComboBox(QtWidgets.QComboBox):
"""Extends QComboBox to add extra functionality.
* Handles dict mappings -- user selects a text key, and the ComboBox indicates
the selected value.
* Requires... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@widgets@ComboBox.py@.PATH_END.py |
{
"filename": "debug_utils_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/debug/lib/debug_utils_test.py",
"type": "Python"
} | # Copyright 2016 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@debug@lib@debug_utils_test.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/contours/labelfont/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="contour.contours.labelfont", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@contours@labelfont@_size.py@.PATH_END.py |
{
"filename": "index.md",
"repo_name": "philbull/FastBox",
"repo_path": "FastBox_extracted/FastBox-main/docs/index.md",
"type": "Markdown"
} | # FastBox
Fast simulations of cosmological density fields, subject to anisotropic filtering, biasing, redshift-space distortions, foregrounds etc. This is intended to be a fast and simple simulator for post-EoR 21cm intensity maps and their cross-correlation with galaxy samples, with enough complexity to test realisti... | philbullREPO_NAMEFastBoxPATH_START.@FastBox_extracted@FastBox-main@docs@index.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/examples/cvae/__init__.py",
"type": "Python"
} | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@examples@cvae@__init__.py@.PATH_END.py | |
{
"filename": "evaluate_all.py",
"repo_name": "LSSTDESC/rail_pipelines",
"repo_path": "rail_pipelines_extracted/rail_pipelines-main/src/rail/pipelines/evaluation/evaluate_all.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# Prerquisites, os, and numpy
import os
from rail.core.stage import RailStage, RailPipeline
from rail.evaluation.single_evaluator import SingleEvaluator
from rail.utils.algo_library import PZ_ALGORITHMS
shared_stage_opts = dict(
metrics=['all'],
exclude_metrics=['rmse',... | LSSTDESCREPO_NAMErail_pipelinesPATH_START.@rail_pipelines_extracted@rail_pipelines-main@src@rail@pipelines@evaluation@evaluate_all.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "aabdurrouf/piXedfit",
"repo_path": "piXedfit_extracted/piXedfit-main/__init__.py",
"type": "Python"
} | from . import piXedfit | aabdurroufREPO_NAMEpiXedfitPATH_START.@piXedfit_extracted@piXedfit-main@__init__.py@.PATH_END.py |
{
"filename": "test_skymax.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/test/test_skymax.py",
"type": "Python"
} | import copy
import unittest
import random
import os
import numpy
from numpy import complex128, real, sqrt, sin, cos, angle, ceil, log
from numpy import zeros, argmax, array
from astropy.utils.data import download_file
from pycbc import DYN_RANGE_FAC
from pycbc.waveform import get_td_waveform, get_fd_waveform, td_approx... | gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@test@test_skymax.py@.PATH_END.py |
{
"filename": "test_cco_vec.py",
"repo_name": "mpi4py/mpi4py",
"repo_path": "mpi4py_extracted/mpi4py-master/test/test_cco_vec.py",
"type": "Python"
} | from mpi4py import MPI
import mpiunittest as unittest
import arrayimpl
def maxvalue(a):
try:
typecode = a.typecode
except AttributeError:
typecode = a.dtype.char
if typecode == ('f'):
return 1e30
elif typecode == ('d'):
return 1e300
else:
return 2 ** (a.item... | mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_cco_vec.py@.PATH_END.py |
{
"filename": "ex_nucmass_plot.py",
"repo_name": "awsteiner/o2scl",
"repo_path": "o2scl_extracted/o2scl-main/examples/plot/old/ex_nucmass_plot.py",
"type": "Python"
} | """
Plot data from ex_nucmass
"""
import numpy as np
import matplotlib.pyplot as plot
import o2sclpy
import math
gc=o2sclpy.plotter()
gc.read('../ex_nucmass_table.o2')
gc.canvas_flag=1
Zgrid=range(1,121)
Ngrid=range(1,181)
sl=np.zeros(shape=(120,180))
labels=['Semi-empirical',
'Moller et al. (1995)',
... | awsteinerREPO_NAMEo2sclPATH_START.@o2scl_extracted@o2scl-main@examples@plot@old@ex_nucmass_plot.py@.PATH_END.py |
{
"filename": "Exoplanet_Watch_API.ipynb",
"repo_name": "rzellem/EXOTIC",
"repo_path": "EXOTIC_extracted/EXOTIC-main/examples/Exoplanet_Watch_API.ipynb",
"type": "Jupyter Notebook"
} | # Exoplanet Watch API
Learn how to explore the light curves, model fits and planetary ephemerides from EW using python programming.
- Download light curve parameters, errors, posteriors or the raw data and fit it yourself
- O-C plots with data curated from the NASA Exoplanet Archive and Exoplanet Watch
- Over 100 ta... | rzellemREPO_NAMEEXOTICPATH_START.@EXOTIC_extracted@EXOTIC-main@examples@Exoplanet_Watch_API.ipynb@.PATH_END.py |
{
"filename": "Container-Configuration.md",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/docs-old/pages/administration/worker/Container-Configuration.md",
"type": "Markdown"
} | title: Container Configuration
toc: [Documentation, Administration, Processes, Container Configuration]
# Container Configuration
**Containers** are worker processes spawned by Crossbar.io which *directly* host application classes written in Python deriving from `autobahn.twisted.wamp.ApplicationSession`.
This relie... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs-old@pages@administration@worker@Container-Configuration.md@.PATH_END.py |
{
"filename": "plot.py",
"repo_name": "andycasey/AnniesLasso",
"repo_path": "AnniesLasso_extracted/AnniesLasso-master/thecannon/plot.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Plotting utilities for The Cannon.
"""
from __future__ import (division, print_function, absolute_import,
unicode_literals)
__all__ = ["theta", "scatter", "one_to_one"]
import logging
import numpy as np
logger = logging.getLogger(__name__)
... | andycaseyREPO_NAMEAnniesLassoPATH_START.@AnniesLasso_extracted@AnniesLasso-master@thecannon@plot.py@.PATH_END.py |
{
"filename": "_discrete_distns.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/stats/_discrete_distns.py",
"type": "Python"
} | #
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
from __future__ import division, print_function, absolute_import
from scipy import special
from scipy.special import entr, logsumexp, betaln, gammaln as gamln
from scipy._lib._numpy_compat import broadcast_to
from ... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@stats@_discrete_distns.py@.PATH_END.py |
{
"filename": "_xysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pointcloud/_xysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xysrc", parent_name="pointcloud", **kwargs):
super(XysrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pointcloud@_xysrc.py@.PATH_END.py |
{
"filename": "efw.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/rbsp/efw.py",
"type": "Python"
} | from .load import load
def efw(trange=['2015-11-5', '2015-11-6'],
probe='a',
datatype='spec',
level='l3',
suffix='',
prefix='',
force_download=False,
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot... | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@rbsp@efw.py@.PATH_END.py |
{
"filename": "Data_exploration.ipynb",
"repo_name": "mperezcarrasco/AnomalyALeRCE",
"repo_path": "AnomalyALeRCE_extracted/AnomalyALeRCE-main/presentation/notebooks/Data_exploration.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
```
```python
train = pd.read_pickle('./data/train_data_filtered.pkl')
test = pd.read_pickle('./data/test_data_filtered.pkl')
data = pd.concat((train, test))
data.shape
```
(116351, 204)
```python
classes, counts = np.unique(... | mperezcarrascoREPO_NAMEAnomalyALeRCEPATH_START.@AnomalyALeRCE_extracted@AnomalyALeRCE-main@presentation@notebooks@Data_exploration.ipynb@.PATH_END.py |
{
"filename": "_row.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sunburst/domain/_row.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class RowValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="row", parent_name="sunburst.domain", **kwargs):
super(RowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
e... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sunburst@domain@_row.py@.PATH_END.py |
{
"filename": "version.py",
"repo_name": "KeplerGO/k2mosaic",
"repo_path": "k2mosaic_extracted/k2mosaic-master/k2mosaic/version.py",
"type": "Python"
} | # It is important to store the version number in a separate file
# so that we can read it from setup.py without importing the package
__version__ = "3.0.2"
| KeplerGOREPO_NAMEk2mosaicPATH_START.@k2mosaic_extracted@k2mosaic-master@k2mosaic@version.py@.PATH_END.py |
{
"filename": "_align.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/hoverlabel/_align.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="align", parent_name="contour.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@contour@hoverlabel@_align.py@.PATH_END.py |
{
"filename": "_tickformatstops.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self,
plotly_name="tickformatstops",
parent_name="barpolar.marker.colorbar",
**kwargs,
):
super(TickformatstopsValidator, self).__init_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@_tickformatstops.py@.PATH_END.py |
{
"filename": "_values.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/_values.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="values", parent_name="treemap", **kwargs):
super(ValuesValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@_values.py@.PATH_END.py |
{
"filename": "mainwindow_widget.py",
"repo_name": "Varnani/pywd2015-qt5",
"repo_path": "pywd2015-qt5_extracted/pywd2015-qt5-master/gui/mainwindow_widget.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow_widget.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | VarnaniREPO_NAMEpywd2015-qt5PATH_START.@pywd2015-qt5_extracted@pywd2015-qt5-master@gui@mainwindow_widget.py@.PATH_END.py |
{
"filename": "lowess.ipynb",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/examples/notebooks/lowess.ipynb",
"type": "Jupyter Notebook"
} | # LOWESS Smoother
This notebook introduces the LOWESS smoother in the `nonparametric` package. LOWESS performs weighted local linear fits.
We generated some non-linear data and perform a LOWESS fit, then compute a 95% confidence interval around the LOWESS fit by performing bootstrap resampling.
```python
import num... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@examples@notebooks@lowess.ipynb@.PATH_END.py |
{
"filename": "extension_classification.md",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/docs/protocol/extension_classification.md",
"type": "Markdown"
} | <!--
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@docs@protocol@extension_classification.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "QEF/q-e",
"repo_path": "q-e_extracted/q-e-master/test-suite/testcode/lib/testcode2/__init__.py",
"type": "Python"
} | '''
testcode2
---------
A framework for regression testing numerical programs.
:copyright: (c) 2012 James Spencer.
:license: modified BSD; see LICENSE for more details.
'''
from __future__ import print_function
import glob
import os
import pipes
import shutil
import subprocess
import sys
try:
import yaml
_H... | QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@test-suite@testcode@lib@testcode2@__init__.py@.PATH_END.py |
{
"filename": "Programming-Guide.md",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/docs-old/pages/programming-guide/Programming-Guide.md",
"type": "Markdown"
} | title: Programming Guide
toc: [Documentation, Programming Guide]
# Programming Guide
Programming WAMP application components is tied to the particular client library you're using. The [Autobahn](/autobahn) family of WAMP client libraries is provided by us, whereas you can find more WAMP client libraries [here](http:/... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@docs-old@pages@programming-guide@Programming-Guide.md@.PATH_END.py |
{
"filename": "TimeKeeping.py",
"repo_name": "dsavransky/EXOSIMS",
"repo_path": "EXOSIMS_extracted/EXOSIMS-master/EXOSIMS/Prototypes/TimeKeeping.py",
"type": "Python"
} | from EXOSIMS.util.vprint import vprint
from EXOSIMS.util.get_dirs import get_cache_dir
import numpy as np
import astropy.units as u
from astropy.time import Time
import os
import csv
class TimeKeeping(object):
""":ref:`TimeKeeping` Prototype
This class keeps track of the current mission elapsed time
for ... | dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@EXOSIMS@Prototypes@TimeKeeping.py@.PATH_END.py |
{
"filename": "_legendgroup.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/_legendgroup.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="legendgroup", parent_name="scattergl", **kwargs):
super(LegendgroupValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@_legendgroup.py@.PATH_END.py |
{
"filename": "CloseLoopTask.py",
"repo_name": "lsst-ts/ts_phosim",
"repo_path": "ts_phosim_extracted/ts_phosim-main/python/lsst/ts/phosim/CloseLoopTask.py",
"type": "Python"
} | #!/usr/bin/env python
# This file is part of ts_phosim.
#
# Developed for the LSST Telescope and Site Systems.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This prog... | lsst-tsREPO_NAMEts_phosimPATH_START.@ts_phosim_extracted@ts_phosim-main@python@lsst@ts@phosim@CloseLoopTask.py@.PATH_END.py |
{
"filename": "yaml2avsc.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/utility/DP03/yaml2avsc.py",
"type": "Python"
} | import json, sys
from yaml import load, dump
from yaml import CLoader as Loader, CDumper as Dumper
def fix_type(typ):
if typ == 'char': return 'string'
else: return typ
def table_schema(table):
fields = []
for column in table['columns']:
field = {
'name':column['name'],
... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@utility@DP03@yaml2avsc.py@.PATH_END.py |
{
"filename": "so_crosstalk_app.py",
"repo_name": "JulienPeloton/s4cmb",
"repo_path": "s4cmb_extracted/s4cmb-master/examples/contamination/so_crosstalk_app.py",
"type": "Python"
} | ## This examples describes how to use some basic functionalities
## of s4cmb such as:
## * simulate an input sky
## * simulate an instrument
## * simulate a scanning strategy
## * simulate TOD from the 3 previous guys
## * project back your TOD to sky maps.
from __future__ import division, absolute_import, print_functi... | JulienPelotonREPO_NAMEs4cmbPATH_START.@s4cmb_extracted@s4cmb-master@examples@contamination@so_crosstalk_app.py@.PATH_END.py |
{
"filename": "_L_align.py",
"repo_name": "kyleaoman/martini",
"repo_path": "martini_extracted/martini-main/martini/sources/_L_align.py",
"type": "Python"
} | """
Provides the :func:`~martini.sources._L_align.L_align` function to align particles
according to their angular momentum vector.
Copied from github.com/kyleaoman/kyleaoman_utilities/kyleaoman_utilities/
commit-id 63dc535c5de1a0dc3caf09f98a33c9d09aa0eddc
Note: No git-based solution (e.g. via submodules) seems practic... | kyleaomanREPO_NAMEmartiniPATH_START.@martini_extracted@martini-main@martini@sources@_L_align.py@.PATH_END.py |
{
"filename": "denoiser.py",
"repo_name": "epfl-radio-astro/LiSA",
"repo_path": "LiSA_extracted/LiSA-main/modules/denoiser.py",
"type": "Python"
} | import numpy as np
from .util.wavelets import StarletTransform, Wavelet2D1DTransform
# quick copy-paste for debug
# import matplotlib.pyplot as plt
# plt.figure()
# plt.imshow(model_k, cmap='gist_stern')
# plt.title(i)
# plt.colorbar()
# plt.show()
class SimpleStarletDenoiser(object):
"""
Class that manages... | epfl-radio-astroREPO_NAMELiSAPATH_START.@LiSA_extracted@LiSA-main@modules@denoiser.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "cosmostatistics/ebms_mcmc",
"repo_path": "ebms_mcmc_extracted/ebms_mcmc-main/ebms_mcmc/eval/__init__.py",
"type": "Python"
} | cosmostatisticsREPO_NAMEebms_mcmcPATH_START.@ebms_mcmc_extracted@ebms_mcmc-main@ebms_mcmc@eval@__init__.py@.PATH_END.py | |
{
"filename": "fishing_advanced.ipynb",
"repo_name": "richteague/gofish",
"repo_path": "gofish_extracted/gofish-master/docs/user/fishing_advanced.ipynb",
"type": "Jupyter Notebook"
} | # Advanced Fishing
This Notebook goes through some of the slightly more advanced tasks which can be performed with `GoFish`. As with the previous Notebook we will be using the [CS (3-2) data from TW Hya](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/LO2QZM). Make sure that cube is accessible... | richteagueREPO_NAMEgofishPATH_START.@gofish_extracted@gofish-master@docs@user@fishing_advanced.ipynb@.PATH_END.py |
{
"filename": "dmtree_impl.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/tree/dmtree_impl.py",
"type": "Python"
} | import collections
import collections.abc
import itertools
from keras.src.backend.config import backend
from keras.src.utils.module_utils import dmtree
# NOTE: There are two known discrepancies between this `dmtree` implementation
# of the tree API and the `optree` implementation:
#
# 1. `map_structure` with *multipl... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@tree@dmtree_impl.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/wfss_contam/tests/data/__init__.py",
"type": "Python"
} | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@wfss_contam@tests@data@__init__.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/scattercarpet/marker/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattercarpet.marker", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@_color.py@.PATH_END.py |
{
"filename": "dual.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/dual.py",
"type": "Python"
} | """
Aliases for functions which may be accelerated by Scipy.
Scipy_ can be built to use accelerated or otherwise improved libraries
for FFTs, linear algebra, and special functions. This module allows
developers to transparently support these accelerated functions when
scipy is available but still support users who hav... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@dual.py@.PATH_END.py |
{
"filename": "S_get_expr_complexity.py",
"repo_name": "SJ001/AI-Feynman",
"repo_path": "AI-Feynman_extracted/AI-Feynman-master/aifeynman/S_get_expr_complexity.py",
"type": "Python"
} | import numpy as np
from .S_snap import bestApproximation
from .S_get_number_DL_snapped import get_number_DL_snapped
from sympy.parsing.sympy_parser import parse_expr
from sympy import preorder_traversal, count_ops
def get_expr_complexity(expr):
expr = parse_expr(expr)
compl = 0
is_atomic_number = lambda ... | SJ001REPO_NAMEAI-FeynmanPATH_START.@AI-Feynman_extracted@AI-Feynman-master@aifeynman@S_get_expr_complexity.py@.PATH_END.py |
{
"filename": "testme.py",
"repo_name": "idefix-code/idefix",
"repo_path": "idefix_extracted/idefix-master/test/Dust/DustEnergy/testme.py",
"type": "Python"
} | #!/usr/bin/env python3
"""
@author: glesur
"""
import os
import sys
sys.path.append(os.getenv("IDEFIX_DIR"))
import pytools.idfx_test as tst
name="dump.0001.dmp"
def testMe(test):
test.configure()
test.compile()
inifiles=["idefix.ini"]
# loop on all the ini files for this test
for ini in inifiles:
t... | idefix-codeREPO_NAMEidefixPATH_START.@idefix_extracted@idefix-master@test@Dust@DustEnergy@testme.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/qa/L0_backend_python/restart/models/restart/1/model.py",
"type": "Python"
} | # Copyright 2022-2023, 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, this list o... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_backend_python@restart@models@restart@1@model.py@.PATH_END.py |
{
"filename": "yuan2.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/chat/yuan2.ipynb",
"type": "Jupyter Notebook"
} | ---
sidebar_label: Yuan2.0
---
# Yuan2.0
This notebook shows how to use [YUAN2 API](https://github.com/IEIT-Yuan/Yuan-2.0/blob/main/docs/inference_server.md) in LangChain with the langchain.chat_models.ChatYuan2.
[*Yuan2.0*](https://github.com/IEIT-Yuan/Yuan-2.0/blob/main/README-EN.md) is a new generation Fundamental... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@chat@yuan2.ipynb@.PATH_END.py |
{
"filename": "citation_fuzzy_match.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/openai_functions/citation_fuzzy_match.py",
"type": "Python"
} | from typing import Iterator, List
from langchain_core._api import deprecated
from langchain_core.language_models import BaseChatModel, BaseLanguageModel
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_core.output_parsers.openai_functions import PydanticOutputFunctionsParser
from langchai... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@openai_functions@citation_fuzzy_match.py@.PATH_END.py |
{
"filename": "logging_tools.py",
"repo_name": "kammerje/spaceKLIP",
"repo_path": "spaceKLIP_extracted/spaceKLIP-main/spaceKLIP/logging_tools.py",
"type": "Python"
} | import logging
# Define logging
_log = logging.getLogger(__name__)
_log.setLevel(logging.INFO)
from contextlib import contextmanager
@contextmanager
def all_logging_disabled(highest_level=logging.CRITICAL):
"""
A context manager that will prevent any logging messages
triggered during the body from being p... | kammerjeREPO_NAMEspaceKLIPPATH_START.@spaceKLIP_extracted@spaceKLIP-main@spaceKLIP@logging_tools.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/scattersmith/marker/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._colorbar import ColorBar
from ._gradient import Gradient
from ._line import Line
from . import colorbar
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = re... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@scattersmith@marker@__init__.py@.PATH_END.py |
{
"filename": "mescal.py",
"repo_name": "peppedilillo/mescal",
"repo_path": "mescal_extracted/mescal-main/mescal.py",
"type": "Python"
} | import argparse
import atexit
from collections import namedtuple
import configparser
import logging
from os import cpu_count
from pathlib import Path
import sys
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
from source import paths
from source.calibrate import Calibrate
from source.calibrate i... | peppedililloREPO_NAMEmescalPATH_START.@mescal_extracted@mescal-main@mescal.py@.PATH_END.py |
{
"filename": "_legendgroup.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/_legendgroup.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="legendgroup", parent_name="scatterpolargl", **kwargs
):
super(LegendgroupValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@_legendgroup.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/layers/__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.export.export_lib import TFSMLayer
from keras.src.layers import deserialize
from keras.src.layers import serialize
from keras.src.layers.activations.activation import Activation
from ... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@layers@__init__.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/qa/L0_model_config/autofill_noplatform/python/input_missing_dims/model.py",
"type": "Python"
} | # Copyright 2022-2023, 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, this list o... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_model_config@autofill_noplatform@python@input_missing_dims@model.py@.PATH_END.py |
{
"filename": "shellapp.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py3/IPython/core/shellapp.py",
"type": "Python"
} | # encoding: utf-8
"""
A mixin for :class:`~IPython.core.application.Application` classes that
launch InteractiveShell instances, load extensions, etc.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import glob
from itertools import chain
import os
import sys
i... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py3@IPython@core@shellapp.py@.PATH_END.py |
{
"filename": "resnet.py",
"repo_name": "nuclear-multimessenger-astronomy/nmma",
"repo_path": "nmma_extracted/nmma-main/nmma/mlmodel/resnet.py",
"type": "Python"
} | from typing import Callable, List, Literal, Optional, Tuple
import torch
import torch.nn as nn
from torch import Tensor
class ChannelNorm(torch.nn.Module):
def __init__(
self,
num_channels: int,
num_groups: Optional[int] = None,
eps: float = 1e-5,
):
super().__init__()... | nuclear-multimessenger-astronomyREPO_NAMEnmmaPATH_START.@nmma_extracted@nmma-main@nmma@mlmodel@resnet.py@.PATH_END.py |
{
"filename": "run_mc.py",
"repo_name": "NumCosmo/NumCosmo",
"repo_path": "NumCosmo_extracted/NumCosmo-master/numcosmo_py/app/run_mc.py",
"type": "Python"
} | #
# run_mc.py
#
# Tue Nov 19 09:36:55 2024
# Copyright 2024 Sandro Dias Pinto Vitenti
# <vitenti@uel.br>
#
# run_mc.py
# Copyright (C) 2024 Sandro Dias Pinto Vitenti <vitenti@uel.br>
#
# numcosmo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as publishe... | NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@numcosmo_py@app@run_mc.py@.PATH_END.py |
{
"filename": "ccf.py",
"repo_name": "Hoeijmakers/tayph",
"repo_path": "tayph_extracted/tayph-master/tayph/ccf.py",
"type": "Python"
} | __all__ = [
"xcor",
"mask_cor",
"clean_ccf",
"filter_ccf",
"construct_KpVsys"
]
def xcor(list_of_wls,list_of_orders,list_of_wlm,list_of_fxm,drv,RVrange,list_of_errors=None,
parallel=False):
"""
This routine takes a combined dataset (in the form of lists of wl spaces,
spectral orders and... | HoeijmakersREPO_NAMEtayphPATH_START.@tayph_extracted@tayph-master@tayph@ccf.py@.PATH_END.py |
{
"filename": "constants_cgs.py",
"repo_name": "danieljprice/phantom",
"repo_path": "phantom_extracted/phantom-master/scripts/pyphantom/constants_cgs.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Physical constants in cgs units
R = 8.31451e7 # Gas constant
k = 1.38066e-16 # Boltzman constant
au = 1.496e13 # Astronomical unit
G = 6.672041e-8 # Gravity constant
year = 3.1556926e7 # Length of year
solarm = 1.991e33 # Solar mass | danieljpriceREPO_NAMEphantomPATH_START.@phantom_extracted@phantom-master@scripts@pyphantom@constants_cgs.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "RafiKueng/SpaghettiLens",
"repo_path": "SpaghettiLens_extracted/SpaghettiLens-master/SpaghettiLensProject/SpaghettiLens_app/__init__.py",
"type": "Python"
} | RafiKuengREPO_NAMESpaghettiLensPATH_START.@SpaghettiLens_extracted@SpaghettiLens-master@SpaghettiLensProject@SpaghettiLens_app@__init__.py@.PATH_END.py | |
{
"filename": "wx_mayavi_embed_in_notebook.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/examples/mayavi/interactive/wx_mayavi_embed_in_notebook.py",
"type": "Python"
} | """
This example show how to embedded Mayavi in a wx notebook.
This is a slightly more complex example than the `wx_embedding` example (
:ref:`example_wx_embedding`), and can be used to see how a large wx
application can use different Mayavi views.
In this example, we embed one single Mayavi scene in a Wx notebook, w... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@examples@mayavi@interactive@wx_mayavi_embed_in_notebook.py@.PATH_END.py |
{
"filename": "test_util.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/tests/contrib/test_util.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
from collections import OrderedDict
import pytest
import torch
from pyro.contrib.util import (
get_indices,
lexpand,
rdiag,
rexpand,
rmv,
rtril,
rvv,
tensor_to_dict,
)
from tests.common import asse... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@contrib@test_util.py@.PATH_END.py |
{
"filename": "make_toi_predictions.sync-checkpoint.ipynb",
"repo_name": "JulioHC00/PEPITA",
"repo_path": "PEPITA_extracted/PEPITA-main/notebooks/tois/.ipynb_checkpoints/make_toi_predictions.sync-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
## Generate predictions for the radius ratio precision of TESS Objects of Interest (TOIs)
```
## Load required packages
```python
import pandas as pd
import lightkurve as lk
import numpy as np
import astropy.units as u
import astropy.constants as c
from scipy.constants import G
from IPython.display impor... | JulioHC00REPO_NAMEPEPITAPATH_START.@PEPITA_extracted@PEPITA-main@notebooks@tois@.ipynb_checkpoints@make_toi_predictions.sync-checkpoint.ipynb@.PATH_END.py |
{
"filename": "bitmap.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/Pythonwin/pywin/framework/bitmap.py",
"type": "Python"
} | import os
import sys
import win32api
import win32con
import win32ui
from pywin.mfc import docview, window
bStretch = 1
class BitmapDocument(docview.Document):
"A bitmap document. Holds the bitmap data itself."
def __init__(self, template):
docview.Document.__init__(self, template)
self.bit... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@Pythonwin@pywin@framework@bitmap.py@.PATH_END.py |
{
"filename": "test_tukeylambda_stats.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/tests/test_tukeylambda_stats.py",
"type": "Python"
} | import numpy as np
from numpy.testing import assert_allclose, assert_equal
from scipy.stats._tukeylambda_stats import (tukeylambda_variance,
tukeylambda_kurtosis)
def test_tukeylambda_stats_known_exact():
"""Compare results with some known exact formulas."""
# Some... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@tests@test_tukeylambda_stats.py@.PATH_END.py |
{
"filename": "color_color.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/lib/RRGtools/color_color.py",
"type": "Python"
} | import numpy as np
from matplotlib import pyplot as plt
from astropy.io import fits
from . import nearest_neighbour as nearest
from scipy.stats import gaussian_kde
from . import match_cat as mc
def magnitude( flux, zpt, exptime, apcor ):
return zpt - 2.5*np.log10(flux/exptime) - apcor
def correct_zpt( zpt, ... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@lib@RRGtools@color_color.py@.PATH_END.py |
{
"filename": "Untitled.ipynb",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/test/test_pevents/jupyter/notebooks/Untitled.ipynb",
"type": "Jupyter Notebook"
} | ```python
%autoawait asyncio
```
```python
from autobahn.asyncio.component import Component, run
from autobahn.wamp.types import RegisterOptions
import asyncio
component = Component(
transports=[
{
"type": "websocket",
"url": "ws://localhost:8080/ws",
#"url": "ws://c... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@test_pevents@jupyter@notebooks@Untitled.ipynb@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/histogram/marker/colorbar/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram.marker.colorbar"
_path_str = "histogram.marker.colorbar.title"
_valid_props = {"fon... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@histogram@marker@colorbar@_title.py@.PATH_END.py |
{
"filename": "test_funcs.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_funcs.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for miscellaneous functionality in the `funcs` module
"""
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.coordinates import FK5, ICRS, SkyCoord
from astropy.coordinates import repr... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_funcs.py@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "healpy/healpy",
"repo_path": "healpy_extracted/healpy-main/test/conftest.py",
"type": "Python"
} | ../lib/healpy/conftest.py | healpyREPO_NAMEhealpyPATH_START.@healpy_extracted@healpy-main@test@conftest.py@.PATH_END.py |
{
"filename": "test_log_gaussian.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/mapper/prior/test_log_gaussian.py",
"type": "Python"
} | import pickle
import pytest
import autofit as af
from autofit.mapper.identifier import Identifier
@pytest.fixture(name="log_gaussian")
def make_log_gaussian():
return af.LogGaussianPrior(mean=1.0, sigma=2.0)
@pytest.mark.parametrize(
"unit, value",
[
# (0.0, 0.0),
(0.1, 0.2),
(... | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@mapper@prior@test_log_gaussian.py@.PATH_END.py |
{
"filename": "random_test.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/tests/random_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... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@random_test.py@.PATH_END.py |
{
"filename": "tools_as_openai_functions.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/tools_as_openai_functions.ipynb",
"type": "Jupyter Notebook"
} | # How to convert tools to OpenAI Functions
This notebook goes over how to use LangChain [tools](/docs/concepts/tools/) as OpenAI functions.
```python
%pip install -qU langchain-community langchain-openai
```
```python
from langchain_community.tools import MoveFileTool
from langchain_core.messages import HumanMessa... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@tools_as_openai_functions.ipynb@.PATH_END.py |
{
"filename": "progress.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/lib/progress.py",
"type": "Python"
} | """Provide a visual progress bar facility
The actual functionality is provided by the external library `progress`
https://pypi.org/project/progress/
If the module is not available, then stub it out.
"""
import logging
__all__ = ['Bar']
# Configure logging
logger = logging.getLogger(__name__)
logger.addHandler(logg... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@lib@progress.py@.PATH_END.py |
{
"filename": "test_regression.py",
"repo_name": "keflavich/plfit",
"repo_path": "plfit_extracted/plfit-master/plfit/tests/test_regression.py",
"type": "Python"
} | import numpy as np
from .. import plfit
def test_issue6():
# Issue 6 turned out to be a bug in the python 2 discrete fitter related to
# types
np.random.seed(0)
test_results = [plfit(np.random.zipf(1.5,1000), discrete=True).plfit() for ii in range(20)]
correct_results = [(11, 1.446205203835651),... | keflavichREPO_NAMEplfitPATH_START.@plfit_extracted@plfit-master@plfit@tests@test_regression.py@.PATH_END.py |
{
"filename": "_tickfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/isosurface/colorbar/_tickfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "isosurface.colorbar"
_path_str = "isosurface.colorbar.tickfont"
_valid_props = {
"... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@isosurface@colorbar@_tickfont.py@.PATH_END.py |
{
"filename": "module_ros_installation.md",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/doxygen/documentation/installation/module_ros_installation.md",
"type": "Markdown"
} | # Install the ROS module {#module_ros_installation}
[TOC]
This is an optional module that enables direct integration of Chrono with the Robot Operating System (ROS).
Read [the introduction to modules](modularity.html) for a technical background on the modularity of the Chrono project.
## Features
The **ROS module*... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@installation@module_ros_installation.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "mwvgroup/Pitt-Google-Broker",
"repo_path": "Pitt-Google-Broker_extracted/Pitt-Google-Broker-master/broker/night_conductor/README.md",
"type": "Markdown"
} | # Night Conductor
See the broker-level [../README.md](../README.md) for instructions on setting up a broker instance.
- [`gcloud compute instances create`](https://cloud.google.com/sdk/gcloud/reference/compute/instances/create)
- [Startup scripts](https://cloud.google.com/compute/docs/startupscript)
- [Storing and re... | mwvgroupREPO_NAMEPitt-Google-BrokerPATH_START.@Pitt-Google-Broker_extracted@Pitt-Google-Broker-master@broker@night_conductor@README.md@.PATH_END.py |
{
"filename": "optimizer_sparse_test.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/optimizers/optimizer_sparse_test.py",
"type": "Python"
} | from unittest import mock
import pytest
from absl.testing import parameterized
from keras.src import backend
from keras.src import ops
from keras.src import optimizers
from keras.src import testing
class ScatterUpdateOptimizer(optimizers.Optimizer):
def __init__(self):
super().__init__(learning_rate=0.0... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@optimizers@optimizer_sparse_test.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/marker/colorbar/title/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="font",
parent_name="scattergeo.marker.colorbar.title",
**kwargs,
):
super(FontValidator, self).__init__(
plotly_name=plo... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@marker@colorbar@title@_font.py@.PATH_END.py |
{
"filename": "ADMNSParameters.py",
"repo_name": "mikaelLEROY/AxionNS_RayTracing",
"repo_path": "AxionNS_RayTracing_extracted/AxionNS_RayTracing-master/codes/ADMNSParameters.py",
"type": "Python"
} | import numpy as np
#########################################################
##### FUNDAMENTAL CONSTANTS (FROM PDG BOOKLET 2016) #####
##### ***** NEEDED TO CONVERT RESULTS IN SI ****** ######
#########################################################
c=299792458.
c2,c3,c4,c5=c**2,c**3,c**4,c**5
G=6.67408e-11
M0=1.98848... | mikaelLEROYREPO_NAMEAxionNS_RayTracingPATH_START.@AxionNS_RayTracing_extracted@AxionNS_RayTracing-master@codes@ADMNSParameters.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "ESDS-Leipzig/sen2nbar",
"repo_path": "sen2nbar_extracted/sen2nbar-main/docs/conf.py",
"type": "Python"
} | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | ESDS-LeipzigREPO_NAMEsen2nbarPATH_START.@sen2nbar_extracted@sen2nbar-main@docs@conf.py@.PATH_END.py |
{
"filename": "dynamic_ragged_shape.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/dynamic_ragged_shape.py",
"type": "Python"
} | # Copyright 2021 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@dynamic_ragged_shape.py@.PATH_END.py |
{
"filename": "logging.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipython/py2/IPython/core/magics/logging.py",
"type": "Python"
} | """Implementation of magic functions for IPython's own logging.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distribut... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython@py2@IPython@core@magics@logging.py@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/mapbox/layer/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="name", parent_name="layout.mapbox.layer", **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@mapbox@layer@_name.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.