metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "utils.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/datasets/utils.py",
"type": "Python"
} | from statsmodels.compat.python import lrange
from io import StringIO
from os import environ, makedirs
from os.path import abspath, dirname, exists, expanduser, join
import shutil
from urllib.error import HTTPError, URLError
from urllib.parse import urljoin
from urllib.request import urlopen
import numpy as np
from pa... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@datasets@utils.py@.PATH_END.py |
{
"filename": "_lonsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/_lonsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="lonsrc", parent_name="densitymap", **kwargs):
super(LonsrcValidator, 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@densitymap@_lonsrc.py@.PATH_END.py |
{
"filename": "argh_helper.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/igrins_recipes/argh_helper.py",
"type": "Python"
} | from collections import OrderedDict
import inspect
def get_default_values(driver_args):
default_map = OrderedDict()
for a in driver_args:
if "default" not in a:
continue
for k in a["option_strings"]:
if k.startswith("--"):
default_map[k[2:].replace("-",... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@igrins_recipes@argh_helper.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/legendgrouptitle/font/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="variant",
parent_name="scatterpolargl.legendgrouptitle.font",
**kwargs,
):
super(VariantValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@legendgrouptitle@font@_variant.py@.PATH_END.py |
{
"filename": "PseudoCmbModule.py",
"repo_name": "cosmo-ethz/CosmoHammer",
"repo_path": "CosmoHammer_extracted/CosmoHammer-master/cosmoHammer/modules/PseudoCmbModule.py",
"type": "Python"
} | from __future__ import print_function, division, absolute_import, unicode_literals
import numpy as np
from cosmoHammer import getLogger
#the real means..
WMAP7_MEANS = [70.704, 0.02256, 0.1115, 2.18474E-09, 0.9688, 0.08920]
# ...and non-trivial covariance matrix.
_cov = np.array([[6.11E+00, 0, 0, 0, 0, 0],
... | cosmo-ethzREPO_NAMECosmoHammerPATH_START.@CosmoHammer_extracted@CosmoHammer-master@cosmoHammer@modules@PseudoCmbModule.py@.PATH_END.py |
{
"filename": "_textcasesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/hoverlabel/font/_textcasesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="textcasesrc",
parent_name="scatterpolar.hoverlabel.font",
**kwargs,
):
super(TextcasesrcValidator, self).__init__(
plo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@hoverlabel@font@_textcasesrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/traitlets/py3/tests/utils/__init__.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@traitlets@py3@tests@utils@__init__.py@.PATH_END.py | |
{
"filename": "mpl_plot_forest.py",
"repo_name": "arviz-devs/arviz",
"repo_path": "arviz_extracted/arviz-main/examples/matplotlib/mpl_plot_forest.py",
"type": "Python"
} | """
Forest Plot
===========
_gallery_category: Distributions
"""
import matplotlib.pyplot as plt
import arviz as az
az.style.use("arviz-doc")
centered_data = az.load_arviz_data("centered_eight")
ax = az.plot_forest(
centered_data,
var_names=["~tau"],
combined=False,
figsize=(11.5, 5),
colors="C1... | arviz-devsREPO_NAMEarvizPATH_START.@arviz_extracted@arviz-main@examples@matplotlib@mpl_plot_forest.py@.PATH_END.py |
{
"filename": "KernelIntegrator.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/KernelIntegrator/KernelIntegrator.py",
"type": "Python"
} | from PYB11Generator import *
@PYB11template("Dimension")
@PYB11holder("std::shared_ptr")
class KernelIntegrator:
def pyinit(self,
integrationOrder = "const int",
kernel = "const std::shared_ptr<IntegrationKernel<%(Dimension)s>>",
dataBase = "const DataBase<%(Dimension)s... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@KernelIntegrator@KernelIntegrator.py@.PATH_END.py |
{
"filename": "pymc_overview.ipynb",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/docs/source/learn/core_notebooks/pymc_overview.ipynb",
"type": "Jupyter Notebook"
} | (pymc_overview)=
# Introductory Overview of PyMC
Note: This text is partly based on the [PeerJ CS publication on PyMC](https://peerj.com/articles/cs-55/) by John Salvatier, Thomas V. Wiecki, and Christopher Fonnesbeck.
:::{post} 21 December, 2021
:tags: exploratory analysis, glm, mcmc, pymc.Data, pymc.Deterministic,... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@docs@source@learn@core_notebooks@pymc_overview.ipynb@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "rodluger/planetplanet",
"repo_path": "planetplanet_extracted/planetplanet-master/docs/conf.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# planetplanet documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 9 19:49:05 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this... | rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@docs@conf.py@.PATH_END.py |
{
"filename": "Tutorial.ipynb",
"repo_name": "oliverphilcox/EffectiveHalos",
"repo_path": "EffectiveHalos_extracted/EffectiveHalos-master/docs/Tutorial.ipynb",
"type": "Jupyter Notebook"
} | # Tutorial
### Initializing the Module
To use EffectiveHalos, first load the Cosmology module to set the cosmological parameters and redshift. The class accepts either the name of a pre-loaded cosmology, or any parameters used by CLASS. For a list of available cosmologies see the docstrings, or the full API.
Here we... | oliverphilcoxREPO_NAMEEffectiveHalosPATH_START.@EffectiveHalos_extracted@EffectiveHalos-master@docs@Tutorial.ipynb@.PATH_END.py |
{
"filename": "_prefix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/delta/_prefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class PrefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="prefix", parent_name="indicator.delta", **kwargs):
super(PrefixValidator, 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@indicator@delta@_prefix.py@.PATH_END.py |
{
"filename": "test_hist2d.py",
"repo_name": "dfm/corner.py",
"repo_path": "corner.py_extracted/corner.py-main/tests/test_hist2d.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import matplotlib
import numpy as np
import pytest
from matplotlib import pyplot as pl
from matplotlib.testing.decorators import image_comparison
import corner
try:
import scipy # noqa
except ImportError:
scipy_installed = False
else:
scipy_installed = True
def _run_hist2d(nm, ... | dfmREPO_NAMEcorner.pyPATH_START.@corner.py_extracted@corner.py-main@tests@test_hist2d.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/textfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="scattermapbox.textfont", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@textfont@_style.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "jolideco/jolideco-fermi-examples",
"repo_path": "jolideco-fermi-examples_extracted/jolideco-fermi-examples-main/workflow/envs/README.md",
"type": "Markdown"
} | # Environments Folder
| jolidecoREPO_NAMEjolideco-fermi-examplesPATH_START.@jolideco-fermi-examples_extracted@jolideco-fermi-examples-main@workflow@envs@README.md@.PATH_END.py |
{
"filename": "mk_test_ascii_data.py",
"repo_name": "CIRADA-Tools/RM-Tools",
"repo_path": "RM-Tools_extracted/RM-Tools-master/RMtools_1D/mk_test_ascii_data.py",
"type": "Python"
} | #!/usr/bin/env python
# =============================================================================#
# #
# NAME: mk_test_ascii_data.py #
# ... | CIRADA-ToolsREPO_NAMERM-ToolsPATH_START.@RM-Tools_extracted@RM-Tools-master@RMtools_1D@mk_test_ascii_data.py@.PATH_END.py |
{
"filename": "nmfburst_decoder_valid.ipynb",
"repo_name": "changhoonhahn/provabgs",
"repo_path": "provabgs_extracted/provabgs-main/nb/rug/nmfburst_decoder_valid.ipynb",
"type": "Jupyter Notebook"
} | <a href="https://colab.research.google.com/github/changhoonhahn/provabgs/blob/main/nb/nmfburst_decoder_valid.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# decorder for `nmfburst` SPS model
Instead of using the PCA encoding a training a neural ne... | changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@nb@rug@nmfburst_decoder_valid.ipynb@.PATH_END.py |
{
"filename": "one_k.py",
"repo_name": "misharash/class_public",
"repo_path": "class_public_extracted/class_public-master/scripts/one_k.py",
"type": "Python"
} |
# coding: utf-8
# In[ ]:
# import necessary modules
# uncomment to get plots displayed in notebook
#%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
from scipy.optimize import fsolve
from scipy.interpolate import interp1d
import math
# In[ ]:
# esthe... | misharashREPO_NAMEclass_publicPATH_START.@class_public_extracted@class_public-master@scripts@one_k.py@.PATH_END.py |
{
"filename": "chart.py",
"repo_name": "vterron/lemon",
"repo_path": "lemon_extracted/lemon-master/juicer/chart.py",
"type": "Python"
} | #! /usr/bin/env python2
# Copyright (c) 2013 Victor Terron. All rights reserved.
# Institute of Astrophysics of Andalusia, IAA-CSIC
#
# This file is part of LEMON.
#
# LEMON 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 Softwar... | vterronREPO_NAMElemonPATH_START.@lemon_extracted@lemon-master@juicer@chart.py@.PATH_END.py |
{
"filename": "_tickvalssrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/yaxis/_tickvalssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="tickvalssrc", parent_name="layout.scene.yaxis", **kwargs
):
super(TickvalssrcValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@yaxis@_tickvalssrc.py@.PATH_END.py |
{
"filename": "S_compositionality.py",
"repo_name": "SJ001/AI-Feynman",
"repo_path": "AI-Feynman_extracted/AI-Feynman-master/aifeynman/S_compositionality.py",
"type": "Python"
} | import numpy as np
from .RPN_to_eq import RPN_to_eq
from scipy.optimize import fsolve
from sympy import lambdify, N
import torch
import torch.nn as nn
import torch.nn.functional as F
from .get_pareto import Point, ParetoSet
from .S_get_expr_complexity import get_expr_complexity
from . import test_points
import os
impor... | SJ001REPO_NAMEAI-FeynmanPATH_START.@AI-Feynman_extracted@AI-Feynman-master@aifeynman@S_compositionality.py@.PATH_END.py |
{
"filename": "thor_ic_gen.py",
"repo_name": "exoclime/THOR",
"repo_path": "THOR_extracted/THOR-main/tools/thor_ic_gen.py",
"type": "Python"
} | import numpy as np
import h5py
import asyncio
import pathlib
import configparser
import os
import scipy.interpolate as interp
# colors for console output
W = '\033[0m' # white (normal)
R = '\033[31m' # red
G = '\033[32m' # green
O = '\033[33m' # orange
B = '\033[34m' # blue is hard to read on dark background
P = ... | exoclimeREPO_NAMETHORPATH_START.@THOR_extracted@THOR-main@tools@thor_ic_gen.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "j-erler/pymf",
"repo_path": "pymf_extracted/pymf-master/doc/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# PyMF documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 14 13:06:27 2018.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable... | j-erlerREPO_NAMEpymfPATH_START.@pymf_extracted@pymf-master@doc@conf.py@.PATH_END.py |
{
"filename": "vis_formats_read.md",
"repo_name": "MWATelescope/mwa_hyperdrive",
"repo_path": "mwa_hyperdrive_extracted/mwa_hyperdrive-main/mdbook/src/defs/vis_formats_read.md",
"type": "Markdown"
} | # Supported visibility formats for reading
~~~admonish info title="Raw MWA data"
Raw "legacy" MWA data comes in "gpubox" files. "MWAX" data comes in a similar
format, and `*ch???*.fits` is a useful glob to identify them. Raw data can be
accessed from the [ASVO](https://asvo.mwatelescope.org/).
Here are examples of us... | MWATelescopeREPO_NAMEmwa_hyperdrivePATH_START.@mwa_hyperdrive_extracted@mwa_hyperdrive-main@mdbook@src@defs@vis_formats_read.md@.PATH_END.py |
{
"filename": "outlier_utils.py",
"repo_name": "nanograv/pint_pal",
"repo_path": "pint_pal_extracted/pint_pal-main/src/pint_pal/outlier_utils.py",
"type": "Python"
} | # Generic imports
import os, sys
import matplotlib.pyplot as plt
import numpy as np
from astropy import log
from multiprocessing import Pool
# Outlier/Epochalyptica imports
from pint.fitter import ConvergenceFailure
import copy
from scipy.special import fdtr
from pint_pal.utils import apply_cut_flag, apply_cut_select
... | nanogravREPO_NAMEpint_palPATH_START.@pint_pal_extracted@pint_pal-main@src@pint_pal@outlier_utils.py@.PATH_END.py |
{
"filename": "test_resnet_2d.py",
"repo_name": "ML4GW/ml4gw",
"repo_path": "ml4gw_extracted/ml4gw-main/tests/nn/resnet/test_resnet_2d.py",
"type": "Python"
} | import h5py # noqa
import pytest
import torch
from ml4gw.nn.resnet.resnet_2d import (
BasicBlock,
Bottleneck,
BottleneckResNet2D,
ResNet2D,
conv1,
)
@pytest.fixture(params=[3, 7, 8])
def kernel_size(request):
return request.param
@pytest.fixture(params=[10, 50])
def spectrogram_size(reques... | ML4GWREPO_NAMEml4gwPATH_START.@ml4gw_extracted@ml4gw-main@tests@nn@resnet@test_resnet_2d.py@.PATH_END.py |
{
"filename": "train_DESI.py",
"repo_name": "pmelchior/spender",
"repo_path": "spender_extracted/spender-main/train/train_DESI.py",
"type": "Python"
} | #!/usr/bin/env python
import argparse
import functools
import os
import time
import numpy as np
import torch
from torch import nn
from accelerate import Accelerator
from spender import SpectrumAutoencoder
from spender.data import desi
from spender.util import mem_report, resample_to_restframe
# allows one to run fp1... | pmelchiorREPO_NAMEspenderPATH_START.@spender_extracted@spender-main@train@train_DESI.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
"type": "Python"
} | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import matplotlib
import inspect
import traceback
import warnings
backend = matplotlib.get_backend()
_backend_loading_tb = "".join(
line for line in traceback.format_stack()
# Filter out l... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@backends@__init__.py@.PATH_END.py |
{
"filename": "_soliditysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/fillpattern/_soliditysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="soliditysrc", parent_name="scatter.fillpattern", **kwargs
):
super(SoliditysrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@fillpattern@_soliditysrc.py@.PATH_END.py |
{
"filename": "initializers.py",
"repo_name": "RadioAstronomySoftwareGroup/pyuvdata",
"repo_path": "pyuvdata_extracted/pyuvdata-main/src/pyuvdata/uvdata/initializers.py",
"type": "Python"
} | # Copyright (c) 2024 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""A module defining functions for initializing UVData objects from scratch."""
from __future__ import annotations
import warnings
from collections.abc import Sequence
from itertools import combinations_with_replacement
fro... | RadioAstronomySoftwareGroupREPO_NAMEpyuvdataPATH_START.@pyuvdata_extracted@pyuvdata-main@src@pyuvdata@uvdata@initializers.py@.PATH_END.py |
{
"filename": "two_population.py",
"repo_name": "schulze61/RhoPop",
"repo_path": "RhoPop_extracted/RhoPop-main/two_population.py",
"type": "Python"
} |
import pandas as pd
import dynesty
import numpy as np
import scipy.stats as sp
import scipy.interpolate as si
from multiprocessing import cpu_count
from dynesty import NestedSampler
from dynesty import utils as dyfunc
import sys
sys.path.append('./RhoPop/')
sys.path.append('./MR_files/')
import functions as f
import d... | schulze61REPO_NAMERhoPopPATH_START.@RhoPop_extracted@RhoPop-main@two_population.py@.PATH_END.py |
{
"filename": "_textsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_textsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="textsrc", parent_name="funnel", **kwargs):
super(TextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@_textsrc.py@.PATH_END.py |
{
"filename": "_enabled.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="enabled",
parent_name="scatterternary.marker.colorbar.tickformatstop",
**kwargs,
):
super(EnabledValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@colorbar@tickformatstop@_enabled.py@.PATH_END.py |
{
"filename": "join_ops.py",
"repo_name": "mjuric/lsd",
"repo_path": "lsd_extracted/lsd-master/src/lsd/join_ops.py",
"type": "Python"
} | #!/usr/bin/env python
"""
TODO: A module in need of urgent refactoring.
Contains (among others) DB, Query, QueryEngine and QueryInstance classes, as
well as the JOIN machinery.
"""
import os, json, glob, copy, sys
import numpy as np
import cPickle
import logging
import time
import locking
from contextlib import con... | mjuricREPO_NAMElsdPATH_START.@lsd_extracted@lsd-master@src@lsd@join_ops.py@.PATH_END.py |
{
"filename": "History.py",
"repo_name": "bill-cotton/Obit",
"repo_path": "Obit_extracted/Obit-master/ObitSystem/Obit/python/History.py",
"type": "Python"
} | """ Python Obit History class
This class contains processing history and allows access.
An ObitHistory is the front end to a persistent disk resident structure.
Both FITS and AIPS cataloged data are supported.
To create a History, instantiate with the InfoList from the relevant object
to which the history is attached... | bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@Obit@python@History.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/parcoords/line/colorbar/title/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "parcoords.line.colorbar.title"
_path_str = "parcoords.line.colorbar.title.font"
_valid_props =... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@parcoords@line@colorbar@title@_font.py@.PATH_END.py |
{
"filename": "types.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/contourpy/contourpy/types.py",
"type": "Python"
} | from __future__ import annotations
import numpy as np
# dtypes of arrays returned by ContourPy.
point_dtype = np.float64
code_dtype = np.uint8
offset_dtype = np.uint32
# Kind codes used in Matplotlib Paths.
MOVETO = 1
LINETO = 2
CLOSEPOLY = 79
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@contourpy@contourpy@types.py@.PATH_END.py |
{
"filename": "yellowbrick.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/vectorstores/yellowbrick.ipynb",
"type": "Jupyter Notebook"
} | # Yellowbrick
[Yellowbrick](https://yellowbrick.com/yellowbrick-data-warehouse/) is an elastic, massively parallel processing (MPP) SQL database that runs in the cloud and on-premises, using kubernetes for scale, resilience and cloud portability. Yellowbrick is designed to address the largest and most complex business... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@vectorstores@yellowbrick.ipynb@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/pie/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="pie.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@pie@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "ReplaceBoundedState.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/DataBase/ReplaceBoundedState.py",
"type": "Python"
} | from PYB11Generator import *
from PureReplaceBoundedState import *
@PYB11module("SpheralDataBase")
@PYB11holder("std::shared_ptr")
@PYB11template("Dimension", "ValueType")
class ReplaceBoundedState(PureReplaceBoundedState):
PYB11typedefs = """
using KeyType = typename ReplaceBoundedState<%(Dimension)s, %(Valu... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@DataBase@ReplaceBoundedState.py@.PATH_END.py |
{
"filename": "EccentricComets.ipynb",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/ipython_examples/EccentricComets.ipynb",
"type": "Jupyter Notebook"
} | # Integrating eccentric Comets with TRACE
In this example, we study highly eccentric comets which interact with a Neptune mass planet.
TRACE is a hybrid integration scheme which combines the WHFAST and BS algorithms. It reversibly transitions between the two integrators, and is capable of handling very eccentric orbit... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@ipython_examples@EccentricComets.ipynb@.PATH_END.py |
{
"filename": "_traceref.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/error_x/_traceref.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="traceref", parent_name="histogram.error_x", **kwargs
):
super(TracerefValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@error_x@_traceref.py@.PATH_END.py |
{
"filename": "kay.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/retrievers/kay.py",
"type": "Python"
} | from __future__ import annotations
from typing import Any, List
from langchain_core.callbacks import CallbackManagerForRetrieverRun
from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
class KayAiRetriever(BaseRetriever):
"""
Retriever for Kay.ai datasets.
T... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@retrievers@kay.py@.PATH_END.py |
{
"filename": "_densitymap.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/_densitymap.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DensitymapValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="densitymap", parent_name="", **kwargs):
super(DensitymapValidator, 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@_densitymap.py@.PATH_END.py |
{
"filename": "gtest_xml_output_unittest.py",
"repo_name": "hpc4cmb/toast",
"repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googletest/test/gtest_xml_output_unittest.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# 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... | hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googletest@test@gtest_xml_output_unittest.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "gausspy/gausspy",
"repo_path": "gausspy_extracted/gausspy-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
#
# Astropy documentation build configuration file.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this file.
#
# All configurati... | gausspyREPO_NAMEgausspyPATH_START.@gausspy_extracted@gausspy-master@docs@conf.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/packages/amuse-brutus/setup.py",
"type": "Python"
} | #!/usr/bin/env python3
from support.classifiers import classifiers
from setuptools import setup
import support
support.use("system")
from support.setup_codes import setup_commands
name = 'amuse-brutus'
author = 'The AMUSE team'
author_email = 'info@amusecode.org'
license_ = "Apache License 2.0"
url = 'http://www.amu... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@packages@amuse-brutus@setup.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/__init__.py",
"type": "Python"
} | """
Eigenvalue solver using iterative methods.
Find k eigenvectors and eigenvalues of a matrix A using the
Arnoldi/Lanczos iterative methods from ARPACK [1]_,[2]_.
These methods are most useful for large sparse matrices.
- eigs(A,k)
- eigsh(A,k)
References
----------
.. [1] ARPACK Software, http://www.caam.rice... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@sparse@linalg@eigen@arpack@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/__init__.py",
"type": "Python"
} | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@__init__.py@.PATH_END.py | |
{
"filename": "router.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/worker/router.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
from uuid import uuid4
from typing import Dict
from pprint import pforma... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@worker@router.py@.PATH_END.py |
{
"filename": "cfa.py",
"repo_name": "astrocatalogs/supernovae",
"repo_path": "supernovae_extracted/supernovae-master/tasks/cfa.py",
"type": "Python"
} | """Import tasks for the Harvard Center for Astrophysics."""
import csv
import os
from glob import glob
from math import floor
from astrocats.catalog.photometry import PHOTOMETRY
from astrocats.catalog.utils import (is_number, jd_to_mjd, pbar, pbar_strings,
uniq_cdl)
from astropy.ti... | astrocatalogsREPO_NAMEsupernovaePATH_START.@supernovae_extracted@supernovae-master@tasks@cfa.py@.PATH_END.py |
{
"filename": "file_utils.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/utils/file_utils.py",
"type": "Python"
} | import os
def ensure_dir(d):
if not os.path.exists(d):
os.makedirs(d)
| igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@utils@file_utils.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/apero/data/spirou/ccf_masks/README.md",
"type": "Markdown"
} | # CCF MASKS
Add any files here to use as masks.
Masks can be used in two ways.
1. CCF_DEFAULT_MASK = "TEFF"
In this mode the masks are determined by TEFF in the header
and which mask is used for which TEFF is controlled by CCF_TEFF_MASK_TABLE
by default CCF_TEFF_MASK_TABLE = 'teff_mask.csv'
2. C... | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@data@spirou@ccf_masks@README.md@.PATH_END.py |
{
"filename": "go.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/go.py",
"type": "Python"
} | """
pygments.lexers.go
~~~~~~~~~~~~~~~~~~
Lexers for the Google Go language.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, words
from pygments.token import Text, Comment, Operator, Ke... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@go.py@.PATH_END.py |
{
"filename": "torch_patch.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/distributions/torch_patch.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import functools
import math
import warnings
import weakref
import torch
def patch_dependency(target, root_module=torch):
try:
parts = target.split(".")
assert parts[0] == root_module.__name__
module ... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@distributions@torch_patch.py@.PATH_END.py |
{
"filename": "_stylesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/textfont/_stylesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="stylesrc", parent_name="scatter3d.textfont", **kwargs
):
super(StylesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@textfont@_stylesrc.py@.PATH_END.py |
{
"filename": "xifirstgen.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/Sandbox/mock2lss/xifirstgen.py",
"type": "Python"
} | import os
import argparse
import logging
import itertools
import numpy as np
from astropy.table import Table, vstack
from matplotlib import pyplot as plt
import random
from pycorr import TwoPointCorrelationFunction, TwoPointEstimator, KMeansSubsampler, utils, setup_logging
from LSS.tabulated_cosmo import TabulatedDESI... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@mock2lss@xifirstgen.py@.PATH_END.py |
{
"filename": "test_typing.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/typing/tests/test_typing.py",
"type": "Python"
} | from __future__ import annotations
import importlib.util
import os
import re
import shutil
from collections import defaultdict
from collections.abc import Iterator
from typing import TYPE_CHECKING
import pytest
from numpy.typing.mypy_plugin import _EXTENDED_PRECISION_LIST
# Only trigger a full `mypy` run if this en... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@typing@tests@test_typing.py@.PATH_END.py |
{
"filename": "_marker.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scattergeo/_marker.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattergeo"
_path_str = "scattergeo.marker"
_valid_props = {
"autocolorscale",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scattergeo@_marker.py@.PATH_END.py |
{
"filename": "data_objects.py",
"repo_name": "spacetelescope/specview",
"repo_path": "specview_extracted/specview-master/specview/core/data_objects.py",
"type": "Python"
} | import numpy as np
from astropy.nddata import (NDData, NDSlicingMixin, NDArithmeticMixin)
from astropy.wcs import WCS
from astropy.units import Unit
class SpectrumArray(NDSlicingMixin, NDArithmeticMixin, NDData):
"""
Basic container for spectrum data.
Contains additional metadata such as uncertainties, a... | spacetelescopeREPO_NAMEspecviewPATH_START.@specview_extracted@specview-master@specview@core@data_objects.py@.PATH_END.py |
{
"filename": "_stream.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatter/_stream.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Stream(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter"
_path_str = "scatter.stream"
_valid_props = {"maxpoints", "token"}
# maxpoints... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatter@_stream.py@.PATH_END.py |
{
"filename": "validate.py",
"repo_name": "hippke/tls",
"repo_path": "tls_extracted/tls-master/transitleastsquares/validate.py",
"type": "Python"
} | from __future__ import division, print_function
import numpy
import warnings
import multiprocessing
from transitleastsquares.helpers import cleaned_array, impact_to_inclination
import transitleastsquares.tls_constants as tls_constants
def validate_inputs(t, y, dy):
"""Check the consistency of the inputs"""
#... | hippkeREPO_NAMEtlsPATH_START.@tls_extracted@tls-master@transitleastsquares@validate.py@.PATH_END.py |
{
"filename": "LICENSE.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/libs/sqlite3/LICENSE.md",
"type": "Markdown"
} | The author disclaims copyright to this source code. In place of
a legal notice, here is a blessing:
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@sqlite3@LICENSE.md@.PATH_END.py |
{
"filename": "ah_bootstrap.py",
"repo_name": "gausspy/gausspy",
"repo_path": "gausspy_extracted/gausspy-master/ah_bootstrap.py",
"type": "Python"
} | """
This bootstrap module contains code for ensuring that the astropy_helpers
package will be importable by the time the setup.py script runs. It also
includes some workarounds to ensure that a recent-enough version of setuptools
is being used for the installation.
This module should be the first thing imported in th... | gausspyREPO_NAMEgausspyPATH_START.@gausspy_extracted@gausspy-master@ah_bootstrap.py@.PATH_END.py |
{
"filename": "raw_point_collection.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/collections/raw_point_collection.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
"""
Raw Point Collect... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@collections@raw_point_collection.py@.PATH_END.py |
{
"filename": "figure5.py",
"repo_name": "sjtumsd/crm_sim_nasa_exp_scripts",
"repo_path": "crm_sim_nasa_exp_scripts_extracted/crm_sim_nasa_exp_scripts-main/images/figure5.py",
"type": "Python"
} | import math
import numpy
from math import atan
import matplotlib
import matplotlib.pyplot as plt
line_style=['--','-.',':','--','-.',':','--','-.',':']
marker_s=['o','D','s','^','v','x','D','p','1','<','>','d']
line_color=['b','g','r','c','m','y','k','b','g','r','c','m']
line_label=[]
title_name='Single wheel test unde... | sjtumsdREPO_NAMEcrm_sim_nasa_exp_scriptsPATH_START.@crm_sim_nasa_exp_scripts_extracted@crm_sim_nasa_exp_scripts-main@images@figure5.py@.PATH_END.py |
{
"filename": "tQueueOutput.py",
"repo_name": "lofar-astron/DP3",
"repo_path": "DP3_extracted/DP3-master/pythondp3/test/unit/tQueueOutput.py",
"type": "Python"
} | # Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
"""
These tests check the collection of output data (DPBuffers)
in a queue by the QueueOutput step.
Script can be invoked in two ways:
- as standalone from the build/pythondp3/test/integration directory... | lofar-astronREPO_NAMEDP3PATH_START.@DP3_extracted@DP3-master@pythondp3@test@unit@tQueueOutput.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/gains/tec_and_offset/__init__.py",
"type": "Python"
} | import numpy as np
from collections import namedtuple
from quartical.gains.conversion import no_op, trig_to_angle
from quartical.gains.parameterized_gain import ParameterizedGain
from quartical.gains.tec_and_offset.kernel import (
tec_and_offset_solver,
tec_and_offset_params_to_gains
)
from quartical.gains.gene... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@gains@tec_and_offset@__init__.py@.PATH_END.py |
{
"filename": "test_llama_pretrain.py",
"repo_name": "OpenAccess-AI-Collective/axolotl",
"repo_path": "axolotl_extracted/axolotl-main/tests/e2e/test_llama_pretrain.py",
"type": "Python"
} | """
E2E tests for llama pretrain
"""
import logging
import os
import unittest
from pathlib import Path
from axolotl.cli import load_datasets
from axolotl.common.cli import TrainerCliArgs
from axolotl.train import train
from axolotl.utils.config import normalize_config
from axolotl.utils.dict import DictDefault
from ... | OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@tests@e2e@test_llama_pretrain.py@.PATH_END.py |
{
"filename": "2-inference.ipynb",
"repo_name": "jroulet/cogwheel",
"repo_path": "cogwheel_extracted/cogwheel-main/cogwheel/validation/2-inference.ipynb",
"type": "Jupyter Notebook"
} | # Do injections and PE
We have two options for parallelizing:
1. Use SLURM (to submit jobs to a cluster), or
1. Use `multiprocessing` (to use the cores of the machine this notebook is running on).
```python
import os
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["OPENBLAS_NUM_THREADS"] = "1"
os.environ["MKL_NUM_THRE... | jrouletREPO_NAMEcogwheelPATH_START.@cogwheel_extracted@cogwheel-main@cogwheel@validation@2-inference.ipynb@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "KeplerGO/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/tests/conftest.py",
"type": "Python"
} | import os
import tempfile
import pytest
def pytest_runtest_setup(item):
r"""Our tests will often run in headless virtual environments. For this
reason, we enforce the use of matplotlib's robust Agg backend, because it
does not require a graphical display.
This avoids errors such as:
c:\hoste... | KeplerGOREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@tests@conftest.py@.PATH_END.py |
{
"filename": "random.py",
"repo_name": "keras-team/keras-tuner",
"repo_path": "keras-tuner_extracted/keras-tuner-master/keras_tuner/backend/random.py",
"type": "Python"
} | # Copyright 2019 The KerasTuner 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 ... | keras-teamREPO_NAMEkeras-tunerPATH_START.@keras-tuner_extracted@keras-tuner-master@keras_tuner@backend@random.py@.PATH_END.py |
{
"filename": "Z4c.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/CarpetX_z4c/Z4c.py",
"type": "Python"
} | from traceback import print_exc
import grid
import os
import subprocess
from sympy import sympify
from sympy import Eq, Ne, Piecewise, Rational
from sympy import pi
from sympy.functions.elementary.miscellaneous import cbrt, Max, sqrt
import NRPy_param_funcs as par
import indexedexp as ixp
from cactusthorn import Cactu... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@CarpetX_z4c@Z4c.py@.PATH_END.py |
{
"filename": "tasoc.py",
"repo_name": "lightkurve/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/src/lightkurve/io/tasoc.py",
"type": "Python"
} | """TESS Asteroseismic Science Operations Center - https://tasoc.dk
TESS Data For Asteroseismology Lightcurves - https://archive.stsci.edu/hlsp/tasoc
Data provided with this release have been extracted using the TASOC Photometry pipeline. The TASOC
pipeline used to generate the data is open source and available... | lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@src@lightkurve@io@tasoc.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pynucastro/pynucastro",
"repo_path": "pynucastro_extracted/pynucastro-main/README.md",
"type": "Markdown"
} | # pynucastro
[](https://pypi.org/project/pynucastro)
[](https://anaconda.org/conda-forge/pynucastro)
[:
# class properties
# --------------------
_parent_path_str = "histogram.marker.colorbar"
_path_str = "histogram.marker.colorbar.tickfont"
_valid_props =... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram@marker@colorbar@_tickfont.py@.PATH_END.py |
{
"filename": "06bTempSensitivityPlot.py",
"repo_name": "MehrnooshTahani/MappingBLOS_MolecularClouds",
"repo_path": "MappingBLOS_MolecularClouds_extracted/MappingBLOS_MolecularClouds-master/MolecularClouds/06bTempSensitivityPlot.py",
"type": "Python"
} | """
This is the second part of the sixth stage of the BLOSMapping method where the dependence on temperature is assessed.
- In this part, the differences in the original BLOS and the BLOS calculated with varying electron abundances
are plotted
"""
import matplotlib.pyplot as plt
import numpy as np
import os
imp... | MehrnooshTahaniREPO_NAMEMappingBLOS_MolecularCloudsPATH_START.@MappingBLOS_MolecularClouds_extracted@MappingBLOS_MolecularClouds-master@MolecularClouds@06bTempSensitivityPlot.py@.PATH_END.py |
{
"filename": "_outlinewidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/marker/colorbar/_outlinewidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="outlinewidth",
parent_name="scattermap.marker.colorbar",
**kwargs,
):
super(OutlinewidthValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@_outlinewidth.py@.PATH_END.py |
{
"filename": "test_templating.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/tests/utilities/test_templating.py",
"type": "Python"
} | import uuid
from typing import Any, Dict
import pytest
from prefect.blocks.core import Block
from prefect.blocks.system import JSON, DateTime, Secret, String
from prefect.blocks.webhook import Webhook
from prefect.client.orchestration import PrefectClient
from prefect.utilities.annotations import NotSet
from prefect.... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@utilities@test_templating.py@.PATH_END.py |
{
"filename": "QuantizationDebugger.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tf/lite/experimental/QuantizationDebugger.md",
"type": "Markdown"
} | page_type: reference
description: Debugger for Quantized TensorFlow Lite debug mode models.
<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="tf.lite.exp... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tf@lite@experimental@QuantizationDebugger.md@.PATH_END.py |
{
"filename": "reduce_scripts.py",
"repo_name": "gbrammer/unicorn",
"repo_path": "unicorn_extracted/unicorn-master/reduce_scripts.py",
"type": "Python"
} | """
reduce_scripts.py
Reduction scripts for all fields starting with the v4.0 catalogs and images. Previously versions of these scripts resided in reduce.py.
"""
import os
import glob
import shutil
import time
import numpy as np
import matplotlib.pyplot as plt
USE_PLOT_GUI = False
import pyfits
import time
i... | gbrammerREPO_NAMEunicornPATH_START.@unicorn_extracted@unicorn-master@reduce_scripts.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/textfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="scattersmith.textfont", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@textfont@_style.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="parcoords.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@_colorscale.py@.PATH_END.py |
{
"filename": "lizardstatementcount.py",
"repo_name": "terryyin/lizard",
"repo_path": "lizard_extracted/lizard-master/lizard_ext/lizardstatementcount.py",
"type": "Python"
} | """
This is an extension of lizard, that counts the statements in a function
"""
class LizardExtension: # pylint: disable=R0903
FUNCTION_INFO = {"statement_count": {"caption": "statements"}}
def __call__(self, tokens, reader):
c_family = 'c' in reader.language_names or \
'cpp' in... | terryyinREPO_NAMElizardPATH_START.@lizard_extracted@lizard-master@lizard_ext@lizardstatementcount.py@.PATH_END.py |
{
"filename": "recipes_IMAGE.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/f2/recipes/sq/recipes_IMAGE.py",
"type": "Python"
} | """
Recipes available to data with tags ['F2', 'IMAGE'].
Default is "reduce".
"""
recipe_tags = {'F2', 'IMAGE'}
def reduce(p):
"""
This recipe process F2 data up to and including alignment and stacking.
A single stacked output image is produced.
It will attempt to do dark and flat correction if a proc... | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@f2@recipes@sq@recipes_IMAGE.py@.PATH_END.py |
{
"filename": "test_skeletonize.py",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/skimage/morphology/tests/test_skeletonize.py",
"type": "Python"
} | import numpy as np
import pytest
from numpy.testing import assert_array_equal
import scipy.ndimage as ndi
from skimage import io, draw
from skimage._shared.testing import fetch
from skimage.data import binary_blobs
from skimage.morphology import medial_axis, skeletonize, thin
from skimage.morphology._skeletonize impor... | scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@morphology@tests@test_skeletonize.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pierrexyz/pybird",
"repo_path": "pybird_extracted/pybird-master/montepython/likelihoods/eftboss/__init__.py",
"type": "Python"
} | from montepython.likelihood_class import Likelihood
import yaml
import os, sys
from pybird.likelihood import Likelihood as Likelihood_bird
class eftboss(Likelihood):
def __init__(self, path, data, command_line):
Likelihood.__init__(self, path, data, command_line)
self.c = yaml.full_load(open(os.... | pierrexyzREPO_NAMEpybirdPATH_START.@pybird_extracted@pybird-master@montepython@likelihoods@eftboss@__init__.py@.PATH_END.py |
{
"filename": "test_optimizers.py",
"repo_name": "pyro-ppl/numpyro",
"repo_path": "numpyro_extracted/numpyro-master/test/test_optimizers.py",
"type": "Python"
} | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from functools import partial
import pytest
from jax import grad, jit
import jax.numpy as jnp
from numpyro import optim
try:
import optax
# the optimizer test is parameterized by different optax optimizers, but we have
... | pyro-pplREPO_NAMEnumpyroPATH_START.@numpyro_extracted@numpyro-master@test@test_optimizers.py@.PATH_END.py |
{
"filename": "_uirevision.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/_uirevision.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="scattercarpet", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@_uirevision.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "halomod/hmf",
"repo_path": "hmf_extracted/hmf-main/src/hmf/halos/__init__.py",
"type": "Python"
} | """
A subpackage dedicated to descriptions of internal halo properties, such as their mass. See ``halomod`` for more
extended quantities in this regard.
"""
from . import mass_definitions
from .mass_definitions import MassDefinition
| halomodREPO_NAMEhmfPATH_START.@hmf_extracted@hmf-main@src@hmf@halos@__init__.py@.PATH_END.py |
{
"filename": "correlation_correction_example.ipynb",
"repo_name": "cheerfuluser/tessreduce",
"repo_path": "tessreduce_extracted/tessreduce-master/development/correlation_correction_example.ipynb",
"type": "Jupyter Notebook"
} | ```python
import tessreduce as tr
import numpy as np
import matplotlib.pyplot as plt
%matplotlib widget
```
```python
obs = tr.spacetime_lookup('04:19:24.800','-53:19:17.000')
```
!!! WARNING no MJD time specified, using default of 59000
| Sector | Covers | Time difference |
| | ... | cheerfuluserREPO_NAMEtessreducePATH_START.@tessreduce_extracted@tessreduce-master@development@correlation_correction_example.ipynb@.PATH_END.py |
{
"filename": "PL_loop_comp.py",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/py_progs/PL_loop_comp.py",
"type": "Python"
} | #!/usr/bin/env python -i
import csv, sys, os, array, warnings, subprocess
import matplotlib.pyplot as plt
import numpy as np
def cloudy_abund(fname):
'''
This reads data from a file produced as part of a cloudy PL loop -
'''
IP=[]
abundance=[]
inp=open(fname)
for line in inp.readlines():
data=line.split()... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@py_progs@PL_loop_comp.py@.PATH_END.py |
{
"filename": "evasion_v20220714.py",
"repo_name": "ARCLab-MIT/kspdg",
"repo_path": "kspdg_extracted/kspdg-main/src/kspdg/pe20220516/evasion_v20220714.py",
"type": "Python"
} | # Copyright (c) 2022, MASSACHUSETTS INSTITUTE OF TECHNOLOGY
# Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014).
# SPDX-License-Identifier: MIT
import krpc
import time
import gymnasium as gym
import numpy as np
from types import SimpleNamespace
from typing import List
from datetime imp... | ARCLab-MITREPO_NAMEkspdgPATH_START.@kspdg_extracted@kspdg-main@src@kspdg@pe20220516@evasion_v20220714.py@.PATH_END.py |
{
"filename": "test_lcdm.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Cosmo/test_lcdm.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy.testing as npt
import pytest
from lenstronomy.Cosmo.lcdm import LCDM
class TestFlatLCDM(object):
def setup_method(self):
self.cosmo = LCDM(z_lens=0.5, z_source=1.5, flat=True)
self.cosmo_k = LCDM(z_lens=0.5, z_source=1.5, flat=False)
def test_D_d(self):
... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Cosmo@test_lcdm.py@.PATH_END.py |
{
"filename": "troy_notes.md",
"repo_name": "mwvgroup/Pitt-Google-Broker",
"repo_path": "Pitt-Google-Broker_extracted/Pitt-Google-Broker-master/notes/troy_notes.md",
"type": "Markdown"
} |
# Use cases
<!-- fs -->
look in to [astrorapid](https://pypi.org/project/astrorapid/) for classification
## SN
What user wants:
* Prob(SN type...)
- selection function
- host galaxy
- mass
- SFR
How to classify:
- astrorapid
Primary catalogs to match on:
- SDSS, maybe BOSS (norther... | mwvgroupREPO_NAMEPitt-Google-BrokerPATH_START.@Pitt-Google-Broker_extracted@Pitt-Google-Broker-master@notes@troy_notes.md@.PATH_END.py |
{
"filename": "xcf.py",
"repo_name": "igmhub/picca",
"repo_path": "picca_extracted/picca-master/py/picca/xcf.py",
"type": "Python"
} | """This module defines functions and variables required for the correlation
analysis of two delta fields
This module provides several functions:
- fill_neighs
- compute_xi
- compute_xi_forest_pairs
- compute_dmat
- compute_dmat_forest_pairs
- compute_metal_dmat
- compute_wick_terms
- co... | igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@py@picca@xcf.py@.PATH_END.py |
{
"filename": "_datarevision.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/_datarevision.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DatarevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="datarevision", parent_name="layout", **kwargs):
super(DatarevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@_datarevision.py@.PATH_END.py |
{
"filename": "morphology_classification.ipynb",
"repo_name": "PolymathicAI/AstroCLIP",
"repo_path": "AstroCLIP_extracted/AstroCLIP-main/downstream_tasks/morphology_classification/morphology_classification.ipynb",
"type": "Jupyter Notebook"
} | ```
import os, sys
sys.path.append("../..")
import torch
import numpy as np
from astropy.table import Table
from astroclip.env import format_with_env
from morphology_utils.models import train_eval_on_question
from morphology_utils.plotting import plot_radar
ASTROCLIP_ROOT = format_with_env("{ASTROCLIP_ROOT}")
# L... | PolymathicAIREPO_NAMEAstroCLIPPATH_START.@AstroCLIP_extracted@AstroCLIP-main@downstream_tasks@morphology_classification@morphology_classification.ipynb@.PATH_END.py |
{
"filename": "how-to-open-a-lightcurve-in-excel.ipynb",
"repo_name": "lightkurve/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/docs/source/tutorials/1-getting-started/how-to-open-a-lightcurve-in-excel.ipynb",
"type": "Jupyter Notebook"
} | # How to open a light curve in Excel?
## Learning Goals
By the end of this tutorial, you will:
* Learn how to search and download TESS light curves.
* Make a quick plot of a light curve you found.
* Understand how to load the data into Excel.
This tutorial is aimed at first time users who may not have used *Lightku... | lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@docs@source@tutorials@1-getting-started@how-to-open-a-lightcurve-in-excel.ipynb@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.