metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "equations.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/GRHD/equations.py",
"type": "Python"
} | # As documented in the NRPy+ tutorial module
# Tutorial-GRHD_Equations-Cartesian.ipynb
# this module will construct useful quantities
# for the IllinoisGRMHD implementation of
# general relativistic hydrodynamics (GRHD)
#
# Authors: Zachariah B. Etienne
# zachetie **at** gmail **dot* com
# Pat... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@GRHD@equations.py@.PATH_END.py |
{
"filename": "thin_slice_projection.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/doc/source/cookbook/thin_slice_projection.py",
"type": "Python"
} | import yt
# Load the dataset.
ds = yt.load("Enzo_64/DD0030/data0030")
# Make a projection that is the full width of the domain,
# but only 5 Mpc in depth. This is done by creating a
# region object with this exact geometry and providing it
# as a data_source for the projection.
# Center on the domain center
center ... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@doc@source@cookbook@thin_slice_projection.py@.PATH_END.py |
{
"filename": "lcmodel.py",
"repo_name": "nye17/javelin",
"repo_path": "javelin_extracted/javelin-master/javelin/lcmodel.py",
"type": "Python"
} | # Last-modified: 28 Apr 2014 05:06:35
# generic packages
from __future__ import absolute_import
from __future__ import print_function
import numpy as np
# np.seterr(all='raise')
from scipy.optimize import fmin
import matplotlib.pyplot as plt
# internal packages
from .cholesky_utils import cholesky, chosolve_from_tri, ... | nye17REPO_NAMEjavelinPATH_START.@javelin_extracted@javelin-master@javelin@lcmodel.py@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/graph_vectorstores/base.py",
"type": "Python"
} | from __future__ import annotations
import logging
from abc import abstractmethod
from collections.abc import AsyncIterable, Collection, Iterable, Iterator
from typing import (
Any,
ClassVar,
Optional,
Sequence,
cast,
)
from langchain_core._api import beta
from langchain_core.callbacks import (
... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@graph_vectorstores@base.py@.PATH_END.py |
{
"filename": "tfsa-2021-111.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-111.md",
"type": "Markdown"
} | ## TFSA-2021-111: Null pointer dereference in `CompressElement`
### CVE Number
CVE-2021-37637
### Impact
It is possible to trigger a null pointer dereference in TensorFlow by passing an
invalid input to `tf.raw_ops.CompressElement`:
```python
import tensorflow as tf
tf.raw_ops.CompressElement(components=[[]])
```
... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-111.md@.PATH_END.py |
{
"filename": "_hovertext.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/_hovertext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="hovertext", parent_name="scatterpolargl", **kwargs):
super(HovertextValidator, 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@scatterpolargl@_hovertext.py@.PATH_END.py |
{
"filename": "StatsStart.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_support/metadata_schema_py_generated/StatsStart.md",
"type": "Markdown"
} | page_type: reference
<link rel="stylesheet" href="/site-assets/css/style.css">
<!-- DO NOT EDIT! Automatically generated file. -->
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tflite_support.metadata_schema_py_generated.StatsStart" />
<meta itemprop="path" co... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_support@metadata_schema_py_generated@StatsStart.md@.PATH_END.py |
{
"filename": "test_cpu_features.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_cpu_features.py",
"type": "Python"
} | import os
import re
import sys
import pathlib
import platform
import subprocess
import pytest
from numpy._core._multiarray_umath import (
__cpu_features__,
__cpu_baseline__,
__cpu_dispatch__,
)
import numpy as np
def assert_features_equal(actual, desired, fname):
__tracebackhide__ = True # Hide traceb... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_cpu_features.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/recipes/qa/tests/__init__.py",
"type": "Python"
} | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@recipes@qa@tests@__init__.py@.PATH_END.py | |
{
"filename": "test_grids.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_api/test_v2/test_grids.py",
"type": "Python"
} | from __future__ import absolute_import
import json as _json
from chart_studio.api.v2 import grids
from chart_studio.tests.test_plot_ly.test_api import PlotlyApiTestCase
class GridsTest(PlotlyApiTestCase):
def setUp(self):
super(GridsTest, self).setUp()
# Mock the actual api call, we don't want ... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@chart-studio@chart_studio@tests@test_plot_ly@test_api@test_v2@test_grids.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="box.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "paper.md",
"repo_name": "ejhigson/perfectns",
"repo_path": "perfectns_extracted/perfectns-master/docs/paper/paper.md",
"type": "Markdown"
} | ---
title: '``perfectns``: perfect dynamic and standard nested sampling for spherically symmetric likelihoods and priors'
tags:
- Python
- nested sampling
- dynamic nested sampling
- Bayesian inference
authors:
- name: Edward Higson
orcid: 0000-0001-8383-4614
affiliation: "1, 2"
affiliations:
- name:... | ejhigsonREPO_NAMEperfectnsPATH_START.@perfectns_extracted@perfectns-master@docs@paper@paper.md@.PATH_END.py |
{
"filename": "_ypad.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ypad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="ypad", parent_name="scattercarpet.marker.colorbar", **kwargs
):
super(YpadValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_ypad.py@.PATH_END.py |
{
"filename": "acs_basic_fullframe_hstaxe_cookbook.ipynb",
"repo_name": "spacetelescope/hstaxe",
"repo_path": "hstaxe_extracted/hstaxe-main/cookbooks/ACS/WFC_basic_fullframe_extraction/acs_basic_fullframe_hstaxe_cookbook.ipynb",
"type": "Jupyter Notebook"
} | ## HSTaXe Cookbook: Extraction for ACS/WFC Full Frame G800L Data
This notebook contains a step-by-step guide for performing a basic spectral extraction with HSTaXe for G800L full frame data from ACS/WFC.
## 1. HSTaXe Installation
Follow instructions from https://github.com/spacetelescope/hstaxe to install HSTaXe sof... | spacetelescopeREPO_NAMEhstaxePATH_START.@hstaxe_extracted@hstaxe-main@cookbooks@ACS@WFC_basic_fullframe_extraction@acs_basic_fullframe_hstaxe_cookbook.ipynb@.PATH_END.py |
{
"filename": "_showticksuffix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/colorbar/_showticksuffix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showticksuffix", parent_name="contour.colorbar", **kwargs
):
super(ShowticksuffixValidator, self).__init__(
plotly_name=plotly_name,... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@colorbar@_showticksuffix.py@.PATH_END.py |
{
"filename": "cmb.py",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/hazma/cmb.py",
"type": "Python"
} | from scipy.interpolate import interp1d
import numpy as np
from pkg_resources import resource_filename
from hazma.parameters import temp_cmb_formation
"""
Functions required for computing CMB limits and related quantities.
"""
# Get paths to files inside the module
f_eff_ep_rf = resource_filename(__name__, "cmb_data/f... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@cmb.py@.PATH_END.py |
{
"filename": "_lat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/geo/center/_lat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LatValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="lat", parent_name="layout.geo.center", **kwargs):
super(LatValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@geo@center@_lat.py@.PATH_END.py |
{
"filename": "get_d_perp.py",
"repo_name": "CPM-project/MCPM",
"repo_path": "MCPM_extracted/MCPM-master/examples/get_d_perp.py",
"type": "Python"
} | import numpy as np
from astropy.coordinates import SkyCoord
from astropy import units as u
import MulensModel as MM
def get_d_perp(ra_deg, dec_deg, t_0_par, ephemeris_file):
"""
extract D_perp for satellite for given epoch
"""
parameters = {'t_0': t_0_par, 'u_0': 0, 't_E': 100.,
'pi... | CPM-projectREPO_NAMEMCPMPATH_START.@MCPM_extracted@MCPM-master@examples@get_d_perp.py@.PATH_END.py |
{
"filename": "_bordercolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bordercolorsrc", parent_name="sunburst.hoverlabel", **kwargs
):
super(BordercolorsrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@hoverlabel@_bordercolorsrc.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/candlestick/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="candlestick.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@candlestick@hoverlabel@font@_shadow.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/histogram/outsidetextfont/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="histogram.outsidetextfont", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@outsidetextfont@_color.py@.PATH_END.py |
{
"filename": "test_mapper_kv450.py",
"repo_name": "xC-ell/growth-history",
"repo_path": "growth-history_extracted/growth-history-main/xCell/xcell/tests/test_mapper_kv450.py",
"type": "Python"
} | import numpy as np
import xcell as xc
import healpy as hp
import os
def get_config():
return {'data_catalogs': ['xcell/tests/data/catalog.fits',
'xcell/tests/data/catalog_stars.fits'],
'file_nz': 'xcell/tests/data/Nz_DIR_z0.1t0.3.asc',
'zbin': 0, 'nside': 32, ... | xC-ellREPO_NAMEgrowth-historyPATH_START.@growth-history_extracted@growth-history-main@xCell@xcell@tests@test_mapper_kv450.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "handley-lab/anesthetic",
"repo_path": "anesthetic_extracted/anesthetic-master/docs/source/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | handley-labREPO_NAMEanestheticPATH_START.@anesthetic_extracted@anesthetic-master@docs@source@conf.py@.PATH_END.py |
{
"filename": "sampler.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/references/classification/sampler.py",
"type": "Python"
} | import math
import torch
import torch.distributed as dist
class RASampler(torch.utils.data.Sampler):
"""Sampler that restricts data loading to a subset of the dataset for distributed,
with repeated augmentation.
It ensures that different each augmented version of a sample will be visible to a
differe... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@references@classification@sampler.py@.PATH_END.py |
{
"filename": "DOCS.md",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/cli/DOCS.md",
"type": "Markdown"
} | # `langchain`
**Usage**:
```console
$ langchain [OPTIONS] COMMAND [ARGS]...
```
**Options**:
* `--help`: Show this message and exit.
* `-v, --version`: Print current CLI version.
**Commands**:
* `app`: Manage LangChain apps
* `serve`: Start the LangServe app, whether it's a...
* `template`: Develop installable te... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@DOCS.md@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "afd-illinois/grim",
"repo_path": "grim_extracted/grim-master/src/physics/conftest.py",
"type": "Python"
} | import sys
import pytest
def pytest_addoption(parser):
parser.addoption("--build_path", action="store", default=None,
help='set build directory path'
)
parser.addoption("--N1", action="store", default=64,
help='grid zones in X1'
)
parser.a... | afd-illinoisREPO_NAMEgrimPATH_START.@grim_extracted@grim-master@src@physics@conftest.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/isosurface/caps/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._z import ZValidator
from ._y import YValidator
from ._x import XValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XVali... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@isosurface@caps@__init__.py@.PATH_END.py |
{
"filename": "vis_sampler.py",
"repo_name": "HydraRadio/Hydra",
"repo_path": "Hydra_extracted/Hydra-main/hydra/vis_sampler.py",
"type": "Python"
} | import numpy as np
import numpy.fft as fft
def apply_sqrt_pspec(sqrt_pspec, v, group_id, ifft=False):
"""
Apply the square root of the power spectrum to a set of complex Fourier
coefficients. This is a way of implementing the operation "S^1/2 x" if S is
diagonal, represented only by a 2D power spectru... | HydraRadioREPO_NAMEHydraPATH_START.@Hydra_extracted@Hydra-main@hydra@vis_sampler.py@.PATH_END.py |
{
"filename": "_textsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/_textsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="textsrc", parent_name="scatterpolar", **kwargs):
super(TextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@_textsrc.py@.PATH_END.py |
{
"filename": "exochat.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/exochat.py",
"type": "Python"
} | import openai
import sys, os
#import numpy as np
import json
from PyQt6.QtCore import Qt, QTextStream, QIODevice
from PyQt6.QtWidgets import (QApplication, QWidget, QVBoxLayout, QHBoxLayout,
QTextEdit, QLineEdit, QPushButton)
from PyQt6.QtGui import QColor,QIcon
from exochat_opt import... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@exochat.py@.PATH_END.py |
{
"filename": "test_donutImageCheck.py",
"repo_name": "lsst-ts/ts_wep",
"repo_path": "ts_wep_extracted/ts_wep-main/tests/test_donutImageCheck.py",
"type": "Python"
} | # This file is part of ts_wep.
#
# Developed for the LSST Telescope and Site Systems.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you ... | lsst-tsREPO_NAMEts_wepPATH_START.@ts_wep_extracted@ts_wep-main@tests@test_donutImageCheck.py@.PATH_END.py |
{
"filename": "move.py",
"repo_name": "dfm/emcee",
"repo_path": "emcee_extracted/emcee-main/src/emcee/moves/move.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import numpy as np
__all__ = ["Move"]
class Move(object):
def tune(self, state, accepted):
pass
def update(self, old_state, new_state, accepted, subset=None):
"""Update a given subset of the ensemble with an accepted proposal
Args:
coords: The or... | dfmREPO_NAMEemceePATH_START.@emcee_extracted@emcee-main@src@emcee@moves@move.py@.PATH_END.py |
{
"filename": "eccen_calc_orderl2.py",
"repo_name": "jrenaud90/TidalPy",
"repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/tides/modes/mode_calc_helper/eccen_calc_orderl2.py",
"type": "Python"
} | from typing import Dict, TYPE_CHECKING
from TidalPy.utilities.performance import njit
from ...eccentricity_funcs import orderl2
if TYPE_CHECKING:
from TidalPy.utilities.types import FloatArray
from ...eccentricity_funcs import EccenOutput
@njit(cacheable=True)
def eccentricity_truncation_2_maxl_2(eccentri... | jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@tides@modes@mode_calc_helper@eccen_calc_orderl2.py@.PATH_END.py |
{
"filename": "GetRefractiveIndexRange.py",
"repo_name": "claudiok/clsim",
"repo_path": "clsim_extracted/clsim-master/python/util/GetRefractiveIndexRange.py",
"type": "Python"
} | #
# Copyright (c) 2012
# Claudio Kopper <claudio.kopper@icecube.wisc.edu>
# and the IceCube Collaboration <http://www.icecube.wisc.edu>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permi... | claudiokREPO_NAMEclsimPATH_START.@clsim_extracted@clsim-master@python@util@GetRefractiveIndexRange.py@.PATH_END.py |
{
"filename": "ex_misc_tmodel.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/examples/ex_misc_tmodel.py",
"type": "Python"
} | import numpy as np
from scipy import stats
import statsmodels.api as sm
from statsmodels.miscmodels import TLinearModel
from statsmodels.tools.numdiff import approx_hess
#Example:
#np.random.seed(98765678)
nobs = 50
nvars = 6
df = 3
rvs = np.random.randn(nobs, nvars-1)
data_exog = sm.add_constant(rvs, prepend=False)
... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@examples@ex_misc_tmodel.py@.PATH_END.py |
{
"filename": "read_class.py",
"repo_name": "pyspeckit/pyspeckit",
"repo_path": "pyspeckit_extracted/pyspeckit-master/pyspeckit/spectrum/readers/read_class.py",
"type": "Python"
} | """
------------------------
GILDAS CLASS file reader
------------------------
Read a CLASS file into an :class:`pyspeckit.spectrum.ObsBlock`
"""
from __future__ import print_function
from six.moves import xrange
from six import iteritems
import six
import astropy.io.fits as pyfits
import numpy
import numpy as np
from... | pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@pyspeckit@spectrum@readers@read_class.py@.PATH_END.py |
{
"filename": "model_resnet.py",
"repo_name": "mommermi/cloudynight",
"repo_path": "cloudynight_extracted/cloudynight-master/scripts/model_resnet.py",
"type": "Python"
} | """ Licensed under a 3-clause BSD style license - see LICENSE.rst
This stand-alone script contains the ResNet-18 adaptation for cloudynight.
The script only works with raw image data and labels for training and does
thus not depend on the cloudynight module. While this script shows the
training and prediction processe... | mommermiREPO_NAMEcloudynightPATH_START.@cloudynight_extracted@cloudynight-master@scripts@model_resnet.py@.PATH_END.py |
{
"filename": "concatenate.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/merging/concatenate.py",
"type": "Python"
} | import copy
from keras.src import ops
from keras.src.api_export import keras_export
from keras.src.layers.merging.base_merge import Merge
@keras_export("keras.layers.Concatenate")
class Concatenate(Merge):
"""Concatenates a list of inputs.
It takes as input a list of tensors, all of the same shape except
... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@merging@concatenate.py@.PATH_END.py |
{
"filename": "her_replay_buffer.py",
"repo_name": "DLR-RM/stable-baselines3",
"repo_path": "stable-baselines3_extracted/stable-baselines3-master/stable_baselines3/her/her_replay_buffer.py",
"type": "Python"
} | import copy
import warnings
from typing import Any, Optional, Union
import numpy as np
import torch as th
from gymnasium import spaces
from stable_baselines3.common.buffers import DictReplayBuffer
from stable_baselines3.common.type_aliases import DictReplayBufferSamples
from stable_baselines3.common.vec_env import Ve... | DLR-RMREPO_NAMEstable-baselines3PATH_START.@stable-baselines3_extracted@stable-baselines3-master@stable_baselines3@her@her_replay_buffer.py@.PATH_END.py |
{
"filename": "audio.py",
"repo_name": "ledatelescope/bifrost",
"repo_path": "bifrost_extracted/bifrost-master/python/bifrost/blocks/audio.py",
"type": "Python"
} |
# Copyright (c) 2016-2023, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | ledatelescopeREPO_NAMEbifrostPATH_START.@bifrost_extracted@bifrost-master@python@bifrost@blocks@audio.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "magic-sph/magic",
"repo_path": "magic_extracted/magic-master/src/README.md",
"type": "Markdown"
} | # Makefile options
### 1. Select compiler
Set a suitable compiler in the first line of the Makefile: `COMPILER = <compiler_phrase>`. The options are `intel`, `gnu` or `portland` - depending on your available compilers.
**Table** : List of default compilers
| Compiler Option | Normal | With MPI |
|:--... | magic-sphREPO_NAMEmagicPATH_START.@magic_extracted@magic-master@src@README.md@.PATH_END.py |
{
"filename": "_yperiod0.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/_yperiod0.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="yperiod0", parent_name="contour", **kwargs):
super(Yperiod0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@_yperiod0.py@.PATH_END.py |
{
"filename": "test_doppler_greedy.py",
"repo_name": "rodluger/starry",
"repo_path": "starry_extracted/starry-master/tests/greedy/test_doppler_greedy.py",
"type": "Python"
} | import starry
import numpy as np
from scipy.linalg import block_diag
from scipy.sparse import diags
import pytest
@pytest.fixture(scope="module", params=[1, 2])
def map(request):
nc = request.param
map = starry.DopplerMap(ydeg=10, udeg=2, nt=3, nc=nc, veq=50000)
map.load(maps=["spot", "earth"][:nc])
y... | rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@tests@greedy@test_doppler_greedy.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/wrap/basic/__init__.py",
"type": "Python"
} | import basic.delens
import basic.bispec
import basic.flat
import basic.galaxy
import basic.cosmofuncs
import basic.wigner_funcs
| toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@wrap@basic@__init__.py@.PATH_END.py |
{
"filename": "prep_input.py",
"repo_name": "Astro-Sean/autophot",
"repo_path": "autophot_extracted/autophot-master/autophot/prep_input.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Script to load in default commands to autophot
to allow user to update values for their work
'''
def load():
import os
from functools import reduce
from autophot.packages.call_yaml import yaml_autophot_input as cs
# Get location of this script
f... | Astro-SeanREPO_NAMEautophotPATH_START.@autophot_extracted@autophot-master@autophot@prep_input.py@.PATH_END.py |
{
"filename": "plot_constant_temporal.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/examples/models/temporal/plot_constant_temporal.py",
"type": "Python"
} | r"""
.. _constant-temporal-model:
Constant temporal model
=======================
This model parametrises a constant time model.
.. math:: F(t) = k
"""
# %%
# Example plot
# ------------
# Here is an example plot of the model:
from astropy import units as u
from astropy.time import Time
import matplotlib.pyplot a... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@examples@models@temporal@plot_constant_temporal.py@.PATH_END.py |
{
"filename": "api_test.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/tests/api_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@api_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/rbsp/rbspice_lib/__init__.py",
"type": "Python"
} | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@rbsp@rbspice_lib@__init__.py@.PATH_END.py | |
{
"filename": "_nticks.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcats/line/colorbar/_nticks.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NticksValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="nticks", parent_name="parcats.line.colorbar", **kwargs
):
super(NticksValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcats@line@colorbar@_nticks.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "sibirrer/psfr",
"repo_path": "psfr_extracted/psfr-main/setup.py",
"type": "Python"
} | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [ ]
test_requirements = ['pytest>=3', ]
setup(
author="S... | sibirrerREPO_NAMEpsfrPATH_START.@psfr_extracted@psfr-main@setup.py@.PATH_END.py |
{
"filename": "plotter_interface.py",
"repo_name": "Jammy2211/PyAutoLens",
"repo_path": "PyAutoLens_extracted/PyAutoLens-main/autolens/imaging/model/plotter_interface.py",
"type": "Python"
} | from os import path
from typing import List
import autoarray.plot as aplt
from autogalaxy.imaging.model.plotter_interface import PlotterInterfaceImaging as AgPlotterInterfaceImaging
from autolens.analysis.plotter_interface import PlotterInterface
from autolens.imaging.fit_imaging import FitImaging
from autolens.imag... | Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@autolens@imaging@model@plotter_interface.py@.PATH_END.py |
{
"filename": "filters.py",
"repo_name": "bccp/nbodykit",
"repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/filters.py",
"type": "Python"
} | from nbodykit.base.mesh import MeshFilter
import numpy
class TopHat(MeshFilter):
""" A TopHat filter defined in Fourier space.
Notes
-----
A fourier space filter is different from a configuration space
filter. The TopHat in fourier space creates ringing effects
due to the ... | bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@filters.py@.PATH_END.py |
{
"filename": "get_data.ipynb",
"repo_name": "astrockragh/Mangrove",
"repo_path": "Mangrove_extracted/Mangrove-main/pysr_final/get_data.ipynb",
"type": "Jupyter Notebook"
} | ```python
import torch, os, pickle, time
import torch_geometric as tg
from torch_geometric.data import Data
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from tqdm import tqdm
import os.path as osp
import networkx as nx
path='~/../../tigress/cj1223/merger_trees/isotrees/'
transform_path='~/../.... | astrockraghREPO_NAMEMangrovePATH_START.@Mangrove_extracted@Mangrove-main@pysr_final@get_data.ipynb@.PATH_END.py |
{
"filename": "obs_campaign_LST.ipynb",
"repo_name": "astro-transients/tilepy",
"repo_path": "tilepy_extracted/tilepy-master/examples/visualization/obs_campaign_LST.ipynb",
"type": "Jupyter Notebook"
} | ```python
from tilepy.tools.VisualizationTools import Pretty_Plot
from tilepy.include.PointingTools import ObservationParameters
import datetime
```
/Users/md274436/software/miniforge3/envs/tilepy/lib/python3.11/site-packages/ligo/lw/lsctables.py:89: UserWarning: Wswiglal-redir-stdio:
SWIGLAL standard out... | astro-transientsREPO_NAMEtilepyPATH_START.@tilepy_extracted@tilepy-master@examples@visualization@obs_campaign_LST.ipynb@.PATH_END.py |
{
"filename": "test_you.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/retrievers/test_you.py",
"type": "Python"
} | from unittest.mock import AsyncMock, patch
import responses
from langchain_community.retrievers.you import YouRetriever
from ..utilities.test_you import (
LIMITED_PARSED_OUTPUT,
MOCK_PARSED_OUTPUT,
MOCK_RESPONSE_RAW,
NEWS_RESPONSE_PARSED,
NEWS_RESPONSE_RAW,
TEST_ENDPOINT,
)
class TestYouRet... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@retrievers@test_you.py@.PATH_END.py |
{
"filename": "param_plotter_example.py",
"repo_name": "htjb/maxsmooth",
"repo_path": "maxsmooth_extracted/maxsmooth-master/example_codes/param_plotter_example.py",
"type": "Python"
} | """
We can assess the parameter space around the optimum solution
found using ``maxsmooth`` with the param_plotter() function.
This can help us identify how well a problem can be solved using the
sign sampling approach employed by ``maxsmooth`` or simply
be used to identify correlations between the foreground parameter... | htjbREPO_NAMEmaxsmoothPATH_START.@maxsmooth_extracted@maxsmooth-master@example_codes@param_plotter_example.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ExoSim/ExoSimPublic",
"repo_path": "ExoSimPublic_extracted/ExoSimPublic-master/exosim/classes/__init__.py",
"type": "Python"
} | from exosim.classes.options import *
from exosim.classes.planet import *
from exosim.classes.sed import *
from exosim.classes.zodi import *
from exosim.classes.channel import *
| ExoSimREPO_NAMEExoSimPublicPATH_START.@ExoSimPublic_extracted@ExoSimPublic-master@exosim@classes@__init__.py@.PATH_END.py |
{
"filename": "test_processor_master.py",
"repo_name": "loostrum/darc",
"repo_path": "darc_extracted/darc-master/test/test_processor_master.py",
"type": "Python"
} | #!/usr/bin/env python3
import os
import logging
import logging.handlers
import unittest
import multiprocessing as mp
import shutil
import socket
from astropy.time import Time, TimeDelta
import yaml
from darc import ProcessorMaster
from darc import util
from darc.definitions import TIME_UNIT
# disable debug log messa... | loostrumREPO_NAMEdarcPATH_START.@darc_extracted@darc-master@test@test_processor_master.py@.PATH_END.py |
{
"filename": "hierarchy_test_data.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/cluster/tests/hierarchy_test_data.py",
"type": "Python"
} | from numpy import array
Q_X = array([[5.26563660e-01, 3.14160190e-01, 8.00656370e-02],
[7.50205180e-01, 4.60299830e-01, 8.98696460e-01],
[6.65461230e-01, 6.94011420e-01, 9.10465700e-01],
[9.64047590e-01, 1.43082200e-03, 7.39874220e-01],
[1.08159060e-01, 5.53028790e-... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@cluster@tests@hierarchy_test_data.py@.PATH_END.py |
{
"filename": "test_simpleforms.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/core/tests/test_simpleforms.py",
"type": "Python"
} | import pytest
from ..simpleforms import IntOption, FloatOption, BoolOption
class Stub(object):
int_opt = IntOption(min=0, max=10, default=3)
float_opt = FloatOption(min=1, max=2, default=1.5)
bool_opt = BoolOption()
class TestSimpleForms(object):
def test_get_set_int(self):
assert Stub.int... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@core@tests@test_simpleforms.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/sankey/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 ... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "speed_estimation.py",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/solutions/speed_estimation.py",
"type": "Python"
} | # Ultralytics YOLO 🚀, AGPL-3.0 license
from time import time
import numpy as np
from ultralytics.solutions.solutions import BaseSolution
from ultralytics.utils.plotting import Annotator, colors
class SpeedEstimator(BaseSolution):
"""
A class to estimate the speed of objects in a real-time video stream bas... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@solutions@speed_estimation.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="barpolar.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "_hoverlabel.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/funnel/_hoverlabel.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Hoverlabel(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "funnel"
_path_str = "funnel.hoverlabel"
_valid_props = {
"align",
"align... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@funnel@_hoverlabel.py@.PATH_END.py |
{
"filename": "_token.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/stream/_token.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TokenValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs):
super(TokenValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@stream@_token.py@.PATH_END.py |
{
"filename": "regexopt.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/regexopt.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
pygments.regexopt
~~~~~~~~~~~~~~~~~
An algorithm that generates optimized regexes for matching long lists of
literal strings.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from re import esc... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@regexopt.py@.PATH_END.py |
{
"filename": "corner.ipynb",
"repo_name": "sotzee/CPREX",
"repo_path": "CPREX_extracted/CPREX-main/corner.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import pandas as pd
import seaborn
import corner
import matplotlib.pyplot as plt
from load_all_data import *
likelihood_name=['none', 'all', 'crex', 'prex']
```
```python
```
```python
Skyrme_Sv_fit=np.array([[-527.63517486, 960.90032367, 32.57190263], [7.9034604, 5.54229394, np.s... | sotzeeREPO_NAMECPREXPATH_START.@CPREX_extracted@CPREX-main@corner.ipynb@.PATH_END.py |
{
"filename": "test_integrate.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/integrate/tests/test_integrate.py",
"type": "Python"
} | # Authors: Nils Wagner, Ed Schofield, Pauli Virtanen, John Travers
"""
Tests for numerical integration.
"""
import numpy as np
from numpy import (arange, zeros, array, dot, sqrt, cos, sin, eye, pi, exp,
allclose)
from numpy.testing import (
assert_, assert_array_almost_equal,
assert_allclose... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@integrate@tests@test_integrate.py@.PATH_END.py |
{
"filename": "SOPRANOS.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/astro/+astro/+supernova/+SOPRANOS/SOPRANOS.md",
"type": "Markdown"
} | # Overview
# List of Subpackages
# Subpackages
# Usage
# Notes
# Known Issues
# See Also
| EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@astro@+astro@+supernova@+SOPRANOS@SOPRANOS.md@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/hoverlabel/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="treemap.hoverlabel", **kwargs):
super(FontValidator, 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@treemap@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/mms/fpi/__init__.py",
"type": "Python"
} | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@mms@fpi@__init__.py@.PATH_END.py | |
{
"filename": "_xaxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/_xaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XaxisValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="xaxis", parent_name="layout.scene", **kwargs):
super(XaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@_xaxis.py@.PATH_END.py |
{
"filename": "FBR.py",
"repo_name": "AdiPandya/Fast_Bayesian_Regression",
"repo_path": "Fast_Bayesian_Regression_extracted/Fast_Bayesian_Regression-main/FBR.py",
"type": "Python"
} | import numpy as np
from numba import jit, njit, types, vectorize
import matplotlib.pyplot as plt
import seaborn
@njit(nogil=True)
def ln_likelihood(param, x, y, xerr, yerr, method=0):
"""Functon to setup the log likelihoods
Args:
param (float array eg. np.array((0.0, 0.0, 0.0))): initial values of t... | AdiPandyaREPO_NAMEFast_Bayesian_RegressionPATH_START.@Fast_Bayesian_Regression_extracted@Fast_Bayesian_Regression-main@FBR.py@.PATH_END.py |
{
"filename": "example_7dq2.ipynb",
"repo_name": "vijayvarma392/surfinBH",
"repo_path": "surfinBH_extracted/surfinBH-master/examples/example_7dq2.ipynb",
"type": "Jupyter Notebook"
} | # Example usage of surfinBH7dq2 fit.
```python
import surfinBH
```
```python
fit_name = 'surfinBH7dq2'
```
## Load the fit, this only needs to be done once at the start of a script
```python
fit = surfinBH.LoadFits(fit_name)
```
Loaded surfinBH7dq2 fit.
## Read the documentation
```python
help(fit)
```
... | vijayvarma392REPO_NAMEsurfinBHPATH_START.@surfinBH_extracted@surfinBH-master@examples@example_7dq2.ipynb@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "ArgonneCPAC/diffstar",
"repo_path": "diffstar_extracted/diffstar-main/diffstar/fitting_helpers/utils.py",
"type": "Python"
} | """
"""
import numpy as np
from jax import jit as jjit
from jax import value_and_grad
from jax.example_libraries import optimizers as jax_opt
from scipy.optimize import minimize
def minimizer(loss_func, loss_func_deriv, p_init, loss_data, nstep, *args, **kwargs):
"""Minimizer mixing scipy's L-BFGS-B minimizer wit... | ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@diffstar@fitting_helpers@utils.py@.PATH_END.py |
{
"filename": "theil_sen.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/linear_model/theil_sen.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
A Theil-Sen Estimator for Multiple Linear Regression Model
"""
# Author: Florian Wilhelm <florian.wilhelm@gmail.com>
#
# License: BSD 3 clause
from __future__ import division, print_function, absolute_import
import warnings
from itertools import combinations
import numpy as np
from scipy... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@linear_model@theil_sen.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/stream/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._token import TokenValidator
from ._maxpoints import MaxpointsValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolar@stream@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "tardis-sn/tardis",
"repo_path": "tardis_extracted/tardis-main/tardis/util/__init__.py",
"type": "Python"
} | # Utilities for TARDIS
| tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@util@__init__.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "AndreasKvammen/ML_dust_detection",
"repo_path": "ML_dust_detection_extracted/ML_dust_detection-main/README.md",
"type": "Markdown"
} | ## Machine learning detection of dust impact signals<br>observed by the Solar Orbiter
[](https://doi.org/10.5281/zenodo.7404457)
This repository contains the code and data to reproduce some of the main results from the paper "Machine learning detection of ... | AndreasKvammenREPO_NAMEML_dust_detectionPATH_START.@ML_dust_detection_extracted@ML_dust_detection-main@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/signal/spectral/__init__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2017-2020)
#
# This file is part of GWpy.
#
# GWpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@signal@spectral@__init__.py@.PATH_END.py |
{
"filename": "pipeTestServiceClient.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/win32/Demos/service/pipeTestServiceClient.py",
"type": "Python"
} | # A Test Program for pipeTestService.py
#
# Install and start the Pipe Test service, then run this test
# either from the same machine, or from another using the "-s" param.
#
# Eg: pipeTestServiceClient.py -s server_name Hi There
# Should work.
import os
import sys
import traceback
import pywintypes
import win32api
... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@Demos@service@pipeTestServiceClient.py@.PATH_END.py |
{
"filename": "OTF.py",
"repo_name": "bill-cotton/Obit",
"repo_path": "Obit_extracted/Obit-master/ObitSystem/ObitSD/python/OTF.py",
"type": "Python"
} | """ Python Obit "On-the-fly" (OTF) single dish data class
This class contains single dish data and allows access.
An ObitOTF is the front end to a persistent disk resident structure.
There maybe (usually are) associated tables which either describe
the data or contain calibration and/or editing information.
OTF Membe... | bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@ObitSD@python@OTF.py@.PATH_END.py |
{
"filename": "_tickformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="tickformat",
parent_name="scatterpolar.marker.colorbar",
**kwargs
):
super(TickformatValidator, self).__init__(
plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@marker@colorbar@_tickformat.py@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/portalocker/py2/tests/conftest.py",
"type": "Python"
} | import py
import pytest
@pytest.fixture
def tmpfile(tmpdir_factory):
tmpdir = tmpdir_factory.mktemp('temp')
filename = tmpdir.join('tmpfile')
yield str(filename)
try:
filename.remove(ignore_errors=True)
except (py.error.EBUSY, py.error.ENOENT):
pass
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@portalocker@py2@tests@conftest.py@.PATH_END.py |
{
"filename": "_hoverlabel.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_hoverlabel.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="hoverlabel", parent_name="box", **kwargs):
super(HoverlabelValidator, 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@_hoverlabel.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/waterfall/_legend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="legend", parent_name="waterfall", **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@waterfall@_legend.py@.PATH_END.py |
{
"filename": "synthetic_obs.py",
"repo_name": "antoinemarchal/ROHSA",
"repo_path": "ROHSA_extracted/ROHSA-master/publication/SIMU/synthetic_obs.py",
"type": "Python"
} | #!/home/amarchal/py2env/bin/python
'''This program build synthetic obs (21cm line) from T,n and vz which are the three-dimensional
field of the numerical simulation based on the work of Saury et al. 2014'''
import numpy as np
from glob import glob
from tqdm import tqdm
import matplotlib.pyplot as plt
from astropy.io ... | antoinemarchalREPO_NAMEROHSAPATH_START.@ROHSA_extracted@ROHSA-master@publication@SIMU@synthetic_obs.py@.PATH_END.py |
{
"filename": "dashboard_objs.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/chart-studio/chart_studio/dashboard_objs/dashboard_objs.py",
"type": "Python"
} | """
dashboard_objs
==========
A module for creating and manipulating dashboard content. You can create
a Dashboard object, insert boxes, swap boxes, remove a box and get an HTML
preview of the Dashboard.
```
"""
import pprint
import _plotly_utils.exceptions
from _plotly_utils import optional_imports
from chart_studi... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@chart-studio@chart_studio@dashboard_objs@dashboard_objs.py@.PATH_END.py |
{
"filename": "flip_frequencies.py",
"repo_name": "JordanHoffmann3/RedisperseFRB",
"repo_path": "RedisperseFRB_extracted/RedisperseFRB-main/src/flip_frequencies.py",
"type": "Python"
} | """
Program: incoherent_dedispersion.py
Author: Jordan Hoffmann
Date: 07/03/2023
Purpose: Incoherently dedispersed an FRB and obtains the SNR for it
Last update: Initial creation
Inputs:
frb = FRB ID number
DM = Dispersion measure to redisperse to
f_low = Lowest observational frequency (MHz)
f_high = H... | JordanHoffmann3REPO_NAMERedisperseFRBPATH_START.@RedisperseFRB_extracted@RedisperseFRB-main@src@flip_frequencies.py@.PATH_END.py |
{
"filename": "init_testrunner.py",
"repo_name": "bwinkel/pycraf",
"repo_path": "pycraf_extracted/pycraf-master/pycraf/init_testrunner.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
try:
# Create the test function for self test
from astropy.tests.runner import TestRunner
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))
except ImportError:
def test():
import warnings
warnings.warn(
... | bwinkelREPO_NAMEpycrafPATH_START.@pycraf_extracted@pycraf-master@pycraf@init_testrunner.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/apero/tools/recipes/bin/README.md",
"type": "Markdown"
} | # General tools
General tools for use by the user should be placed here. | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@tools@recipes@bin@README.md@.PATH_END.py |
{
"filename": "helpers.py",
"repo_name": "smfactor/Argus",
"repo_path": "Argus_extracted/Argus-main/helpers.py",
"type": "Python"
} | import numpy as np
def get8(im,i,j):
if i==255 and j==255:
a = np.array([im[i-1,j-1],im[i-1,j],im[i,j-1]])
elif i==255 and j==0:
a = np.array([im[i-1,j+1],im[i-1,j],im[i,j+1]])
elif i==0 and j==255:
a = np.array([im[i+1,j-1],im[i+1,j],im[i,j-1]])
elif i==255:
a = np.arra... | smfactorREPO_NAMEArgusPATH_START.@Argus_extracted@Argus-main@helpers.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/densitymapbox/_customdatasrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="customdatasrc", parent_name="densitymapbox", **kwargs
):
super(CustomdatasrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@_customdatasrc.py@.PATH_END.py |
{
"filename": "convergence.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/pymc/stats/convergence.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@pymc@stats@convergence.py@.PATH_END.py |
{
"filename": "photometry.py",
"repo_name": "desihub/fastspecfit",
"repo_path": "fastspecfit_extracted/fastspecfit-main/py/fastspecfit/photometry.py",
"type": "Python"
} | """
fastspecfit.photometry
======================
Tools for handling filters and photometry calculations.
"""
import os
import numpy as np
import fitsio
from astropy.table import Table
from fastspecfit.logger import log
from fastspecfit.util import trapz, C_LIGHT, FLUXNORM
class Photometry(object):
"""Class to... | desihubREPO_NAMEfastspecfitPATH_START.@fastspecfit_extracted@fastspecfit-main@py@fastspecfit@photometry.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="y", parent_name="scatterpolar.marker.colorbar", **kwargs
):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@_y.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/experimental/sparse/__init__.py",
"type": "Python"
} | # Copyright 2021 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@sparse@__init__.py@.PATH_END.py |
{
"filename": "test_pysemenov.py",
"repo_name": "DariaGangardt/pAGN",
"repo_path": "pAGN_extracted/pAGN-main/utils/opacity_sources/Semenov2003/test_pysemenov.py",
"type": "Python"
} | """
test_pysemenov.py
Authors: Alessandro A. Trani, Daria Gangardt
This file performs a simple test of the python interface for the Semenov2003 opacity fortran code
Check pysemenov_module.sh for instructions how to compile the interface,
and check generate_combined_tables.py for how to generate a table of opacities ... | DariaGangardtREPO_NAMEpAGNPATH_START.@pAGN_extracted@pAGN-main@utils@opacity_sources@Semenov2003@test_pysemenov.py@.PATH_END.py |
{
"filename": "train.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/modes/train.md",
"type": "Markdown"
} | ---
comments: true
description: Learn how to efficiently train object detection models using YOLO11 with comprehensive instructions on settings, augmentation, and hardware utilization.
keywords: Ultralytics, YOLO11, model training, deep learning, object detection, GPU training, dataset augmentation, hyperparameter tuni... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@modes@train.md@.PATH_END.py |
{
"filename": "onsite_create_cat_B_calibration_files_with_batch.py",
"repo_name": "cta-observatory/cta-lstchain",
"repo_path": "cta-lstchain_extracted/cta-lstchain-main/lstchain/scripts/onsite/onsite_create_cat_B_calibration_files_with_batch.py",
"type": "Python"
} | #!/usr/bin/env python
"""
Onsite script to process (in batch) the interleaved events of several runs
and to create the Cat-B calibration files
--> onsite_create_catB_calibration_files_with_batch -r xxx yyy zzz
"""
import argparse
import shutil
import subprocess
import sys
from datetime import datetime
from pat... | cta-observatoryREPO_NAMEcta-lstchainPATH_START.@cta-lstchain_extracted@cta-lstchain-main@lstchain@scripts@onsite@onsite_create_cat_B_calibration_files_with_batch.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.