metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "full_simulation.py", "repo_name": "lsstdesc/sn_pipe", "repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/fakes/full_simulation.py", "type": "Python" }
import os from optparse import OptionParser import numpy as np parser = OptionParser() parser.add_option("--fake_config", type="str", default='Fake_cadence.yaml', help="config file name for fake obs[%default]") parser.add_option("--fake_output", type="str", default='Fake_DESC', hel...
lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@fakes@full_simulation.py@.PATH_END.py
{ "filename": "annotation_polar.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/text_labels_and_annotations/annotation_polar.py", "type": "Python" }
""" ==================== Annotate polar plots ==================== This example shows how to create an annotation on a polar graph. For a complete overview of the annotation capabilities, also see the :ref:`annotations`. .. redirect-from:: /gallery/pyplots/annotation_polar """ import matplotlib.pyplot as plt import ...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@text_labels_and_annotations@annotation_polar.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "esheldon/ngmix", "repo_path": "ngmix_extracted/ngmix-master/ngmix/__init__.py", "type": "Python" }
# flake8: noqa from numba.core.errors import NumbaExperimentalFeatureWarning import warnings warnings.simplefilter('ignore', category=NumbaExperimentalFeatureWarning) from ._version import __version__ from . import util from .util import print_pars from . import flags from . import defaults from . import gmix from...
esheldonREPO_NAMEngmixPATH_START.@ngmix_extracted@ngmix-master@ngmix@__init__.py@.PATH_END.py
{ "filename": "potentials.py", "repo_name": "hmuellergoe/mrbeam", "repo_path": "mrbeam_extracted/mrbeam-main/mr_beam/itreg/regpy/util/potentials.py", "type": "Python" }
import numpy as np def bell(domain): v = domain.zeros() r = np.linalg.norm(domain.coords, axis=0) v[r < 1] = np.exp(-1 / (1 - r[r < 1]**2)) return v def peaks(domain): r = np.linalg.norm(domain.coords, axis=0) M = mollifier(r) X = domain.coords f = 3 * (1 - X[0])**2 * np.exp(-X[0]**2...
hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@mr_beam@itreg@regpy@util@potentials.py@.PATH_END.py
{ "filename": "within_saa.py", "repo_name": "jotaylor/acdc-hst", "repo_path": "acdc-hst_extracted/acdc-hst-main/src/acdc/database/within_saa.py", "type": "Python" }
import numpy as np import math # Model 31 from https://github.com/spacetelescope/costools/blob/master/costools/saamodel.py COS_FUV_MODEL = [ (-28.3, 14.0), (-27.5, 15.0), (-26.1, 13.0), (-19.8, 1.5), ( -9.6, 341.0), ( -7.6, 330.4), ( -6.0, 318.8), ( -7.9, ...
jotaylorREPO_NAMEacdc-hstPATH_START.@acdc-hst_extracted@acdc-hst-main@src@acdc@database@within_saa.py@.PATH_END.py
{ "filename": "halo_model.py", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/pyccl/halos/halo_model.py", "type": "Python" }
__all__ = ("HMCalculator",) import numpy as np from scipy.integrate import simpson from .. import CCLAutoRepr, unlock_instance from .. import physical_constants as const from . import MassDef from ..pyutils import _spline_integrate class HMCalculator(CCLAutoRepr): """This class implements a set of methods that ...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@halos@halo_model.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/legendgrouptitle/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): super(StyleValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@legendgrouptitle@font@_style.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "hpparvi/PyTransit", "repo_path": "PyTransit_extracted/PyTransit-master/README.md", "type": "Markdown" }
PyTransit ========= [![Licence](http://img.shields.io/badge/license-GPLv2-blue.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html) [![MNRAS](https://img.shields.io/badge/MNRAS-10.1093%2Fmnras%2Fstv894-blue.svg)](http://mnras.oxfordjournals.org/content/450/3/3233) [![arXiv](http://img.shields.io/badge/arXiv-1504...
hpparviREPO_NAMEPyTransitPATH_START.@PyTransit_extracted@PyTransit-master@README.md@.PATH_END.py
{ "filename": "paper.md", "repo_name": "galsci/pysm", "repo_path": "pysm_extracted/pysm-main/paper/paper.md", "type": "Markdown" }
--- title: 'The Python Sky Model 3 software' tags: - cosmology - astronomy - python authors: - name: Andrea Zonca orcid: 0000-0001-6841-1058 affiliation: "1" - name: Ben Thorne orcid: 0000-0002-0457-0153 affiliation: "2" - name: Nicoletta Krachmalnicoff affiliation: "3,4,5" - name: Julian Borri...
galsciREPO_NAMEpysmPATH_START.@pysm_extracted@pysm-main@paper@paper.md@.PATH_END.py
{ "filename": "pyNTHCOMP.py", "repo_name": "scotthgn/relagn", "repo_path": "relagn_extracted/relagn-main/src/python_version/pyNTHCOMP.py", "type": "Python" }
""" This was taken from https://github.com/arnauqb/qsosed/tree/master/qsosed, which in turn was taken from https://github.com/ADThomas-astro/oxaf/blob/master/oxaf.py . Credit to A.D. Thomas. Code was adapted from Xspec for https://arxiv.org/pdf/1611.05165.pdf . """ import numpy as np def donthcomp(ear, param): ...
scotthgnREPO_NAMErelagnPATH_START.@relagn_extracted@relagn-main@src@python_version@pyNTHCOMP.py@.PATH_END.py
{ "filename": "plots.py", "repo_name": "jcforbes/gidget", "repo_path": "gidget_extracted/gidget-master/py/plots.py", "type": "Python" }
from readoutput import * from balanceplot import balance, balancesig import argparse import cleanup import pdb def makeThePlots(args): if args.time is False and args.radial is False and args.scaled is False and args.mass==0 and args.balance is False: print ("Warning: you did not ask me to produce any plo...
jcforbesREPO_NAMEgidgetPATH_START.@gidget_extracted@gidget-master@py@plots.py@.PATH_END.py
{ "filename": "_upperfence.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/box/_upperfence.py", "type": "Python" }
import _plotly_utils.basevalidators class UpperfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="upperfence", parent_name="box", **kwargs): super(UpperfenceValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@box@_upperfence.py@.PATH_END.py
{ "filename": "body.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/base/body.py", "type": "Python" }
import numpy as np from typing import Dict from copy import copy from abc import ( ABCMeta, abstractmethod ) from .. utils import is_empty from .. base.spot import Spot from .. logger import getLogger from .. import ( units as u, umpy as up ) logger = getLogger('base.body') class Body(metaclass=ABC...
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@base@body.py@.PATH_END.py
{ "filename": "obsrate_metric.md", "repo_name": "lsstdesc/sn_pipe", "repo_path": "sn_pipe_extracted/sn_pipe-master/docs/Metrics/obsrate_metric.md", "type": "Markdown" }
# ObsRate metric ## Definition This metric is an estimate of the observation rate of faint [(x1,color) = (-2.0,0.2)] using gri (default) bands. It is defined as the fraction of supernovae with minimal SNR per band. Let us suppose that we have a set of measurements of (fluxes,error fluxes): (f<sub>i</sub>,&sigma;<sub>...
lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@docs@Metrics@obsrate_metric.md@.PATH_END.py
{ "filename": "check_templates.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/scripts/check_templates.py", "type": "Python" }
import json import re import sys from functools import cache from pathlib import Path from typing import Dict, Iterable, List, Union CURR_DIR = Path(__file__).parent.absolute() CLI_TEMPLATE_DIR = ( CURR_DIR.parent.parent / "libs/cli/langchain_cli/integration_template/docs" ) INFO_BY_DIR: Dict[str, Dict[str, Union...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@scripts@check_templates.py@.PATH_END.py
{ "filename": "ktransit.py", "repo_name": "mrtommyb/ktransit", "repo_path": "ktransit_extracted/ktransit-master/ktransit/ktransit.py", "type": "Python" }
from __future__ import absolute_import import numpy as np from ._tmodtom import transitmodel class LCModel(object): def __init__(self): self.nplanets = 0 self.T0 = [] self.period = [] self.impact = [] self.rprs = [] self.ecosw = [] self.esinw = [] s...
mrtommybREPO_NAMEktransitPATH_START.@ktransit_extracted@ktransit-master@ktransit@ktransit.py@.PATH_END.py
{ "filename": "test_toa_shuffle.py", "repo_name": "nanograv/PINT", "repo_path": "PINT_extracted/PINT-master/tests/test_toa_shuffle.py", "type": "Python" }
import io import os from copy import deepcopy import numpy as np import pytest from hypothesis import given from hypothesis.strategies import ( composite, permutations, ) from astropy import units as u from pinttestdata import datadir from pint import simulation, toa import pint.residuals from pint.models i...
nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@tests@test_toa_shuffle.py@.PATH_END.py
{ "filename": "_minexponent.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram2dcontour/colorbar/_minexponent.py", "type": "Python" }
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="histogram2dcontour.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram2dcontour@colorbar@_minexponent.py@.PATH_END.py
{ "filename": "errors.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/parso/py3/parso/python/errors.py", "type": "Python" }
# -*- coding: utf-8 -*- import codecs import sys import warnings import re from contextlib import contextmanager from parso.normalizer import Normalizer, NormalizerConfig, Issue, Rule from parso.python.tokenize import _get_token_collection _BLOCK_STMTS = ('if_stmt', 'while_stmt', 'for_stmt', 'try_stmt', 'with_stmt') ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@parso@py3@parso@python@errors.py@.PATH_END.py
{ "filename": "TauRunner_examples.ipynb", "repo_name": "icecube/TauRunner", "repo_path": "TauRunner_extracted/TauRunner-master/examples/TauRunner_examples.ipynb", "type": "Jupyter Notebook" }
## TauRunner Welcome to the TauRunner tutorial! This software is capable of simulating neutrinos (and anti-neutrinos) of all flavors, accounting for tau regeneration and losses in the nutau channel. The output is a set of particle energies, number of interactions, angle, and particle type. The user has the option to ...
icecubeREPO_NAMETauRunnerPATH_START.@TauRunner_extracted@TauRunner-master@examples@TauRunner_examples.ipynb@.PATH_END.py
{ "filename": "nimrod.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/nimrod.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.nimrod ~~~~~~~~~~~~~~~~~~~~~~ Lexer for the Nim language (formerly known as Nimrod). :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@nimrod.py@.PATH_END.py
{ "filename": "feature_set.py", "repo_name": "dwkim78/upsilon", "repo_path": "upsilon_extracted/upsilon-master/upsilon/extract_features/feature_set.py", "type": "Python" }
def get_feature_set(): """ Return a list of features' names. Features' name that are used to train a model and predict a class. Sorted by the names. Returns ------- feature_names : list A list of features' names. """ features = ['amplitude', 'hl_amp_ratio', 'kurtosis', 'pe...
dwkim78REPO_NAMEupsilonPATH_START.@upsilon_extracted@upsilon-master@upsilon@extract_features@feature_set.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/colorbar/title/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.colorbar.title.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@colorbar@title@font@_family.py@.PATH_END.py
{ "filename": "finecenter.py", "repo_name": "t-brandt/acorns-adi", "repo_path": "acorns-adi_extracted/acorns-adi-master/centroid/finecenter.py", "type": "Python" }
#!/usr/bin/env python # # Original filename: finecenter.py # # Author: Tim Brandt # Email: tbrandt@astro.princeton.edu # Date: May 2012 # # Summary: Interactively refine the centroid of an image sequence # #from speckle_centroid import speckle_centroid from easygui import * from pylab import * import pyfits as pyf ...
t-brandtREPO_NAMEacorns-adiPATH_START.@acorns-adi_extracted@acorns-adi-master@centroid@finecenter.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "nespinoza/mc-spam", "repo_path": "mc-spam_extracted/mc-spam-master/README.md", "type": "Markdown" }
# mc-spam MC-SPAM (Monte-Carlo Synthetic-Photometry/Atmosphere-Model) is an algorithm to generate limb-darkening coefficients from models that are comparable to transit photometry according to the formalism described in Espinoza & Jordan (2015), which improves the original SPAM algorithm proposed by Howarth (2011) b...
nespinozaREPO_NAMEmc-spamPATH_START.@mc-spam_extracted@mc-spam-master@README.md@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/ohlc/legendgrouptitle/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="ohlc.legendgrouptitle.font", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@ohlc@legendgrouptitle@font@_variant.py@.PATH_END.py
{ "filename": "html.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/io/html.py", "type": "Python" }
""" :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. """ from __future__ import annotations from collections import abc import errno import numbers import os import re from re import Pattern from typing import ( TYPE_CHECKING, Literal, cast, ) from pandas._libs import...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@html.py@.PATH_END.py
{ "filename": "from_vizier_table.ipynb", "repo_name": "cds-astro/mocpy", "repo_path": "mocpy_extracted/mocpy-master/notebooks/from_vizier_table.ipynb", "type": "Jupyter Notebook" }
# Get the MOC corresponding to a table ```python from mocpy import MOC ``` ```python gum_qso_moc = MOC.from_vizier_table("VI/137/gum_qso", nside=512) ``` WARNING: Keyword 'TTYPE1' found more than once in a same HDU! We use the first occurrence. ```python gum_qso_moc.display_preview() ``` ![png](outpu...
cds-astroREPO_NAMEmocpyPATH_START.@mocpy_extracted@mocpy-master@notebooks@from_vizier_table.ipynb@.PATH_END.py
{ "filename": "EarthSystem.ipynb", "repo_name": "james-trayford/strauss", "repo_path": "strauss_extracted/strauss-main/examples/colab/EarthSystem.ipynb", "type": "Jupyter Notebook" }
#### Preamble for `CoLab` To use this notebook (if you haven't already) you can first save a copy to your local drive by clicking `File > Save a Copy in Drive` and run on that copy. _Note_: `Colab` is a really handy way to test and try `strauss`, though it will generally run and display audio more slowly than runnin...
james-trayfordREPO_NAMEstraussPATH_START.@strauss_extracted@strauss-main@examples@colab@EarthSystem.ipynb@.PATH_END.py
{ "filename": "ImagePath.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/ImagePath.py", "type": "Python" }
# # The Python Imaging Library # $Id$ # # path interface # # History: # 1996-11-04 fl Created # 2002-04-14 fl Added documentation stub class # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on usage and redistribution. # from __future__ import annota...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@ImagePath.py@.PATH_END.py
{ "filename": "_namelengthsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/hoverlabel/_namelengthsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="treemap.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@hoverlabel@_namelengthsrc.py@.PATH_END.py
{ "filename": "openapi.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/utilities/openapi.py", "type": "Python" }
"""Utility functions for parsing an OpenAPI spec.""" from __future__ import annotations import copy import json import logging import re from enum import Enum from pathlib import Path from typing import TYPE_CHECKING, Dict, List, Optional, Union import requests import yaml from pydantic import ValidationError logge...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@utilities@openapi.py@.PATH_END.py
{ "filename": "spl.py", "repo_name": "COSMOGRAIL/PyCS", "repo_path": "PyCS_extracted/PyCS-master/pycs/gen/spl.py", "type": "Python" }
""" Module defining the Spline class, something easy to wrap around SciPy splines. Includes BOK algorithms (Mollinari et al) Some rules of splrep (k = 3) - do not put more then 2 knots between data points. - splrep wants inner knots only, do not give extremal knots, even only "once". """ import numpy as np import ...
COSMOGRAILREPO_NAMEPyCSPATH_START.@PyCS_extracted@PyCS-master@pycs@gen@spl.py@.PATH_END.py
{ "filename": "3GC_split_model_images.py", "repo_name": "IanHeywood/oxkat", "repo_path": "oxkat_extracted/oxkat-master/oxkat/3GC_split_model_images.py", "type": "Python" }
#!/usr/bin/env python # ian.heywood@physics.ox.ac.uk import glob import numpy import shutil from astropy import wcs from astropy.io import fits from optparse import OptionParser # --------------------------------------------------------------------------------------- def hms2deg(hms,delimiter=':'): """ ...
IanHeywoodREPO_NAMEoxkatPATH_START.@oxkat_extracted@oxkat-master@oxkat@3GC_split_model_images.py@.PATH_END.py
{ "filename": "_spectral.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/optimize/_spectral.py", "type": "Python" }
""" Spectral Algorithm for Nonlinear Equations """ import collections import numpy as np from scipy.optimize import OptimizeResult from scipy.optimize._optimize import _check_unknown_options from ._linesearch import _nonmonotone_line_search_cruz, _nonmonotone_line_search_cheng class _NoConvergence(Exception): pas...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@optimize@_spectral.py@.PATH_END.py
{ "filename": "spawn.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/_distutils/spawn.py", "type": "Python" }
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. """ from __future__ import annotations import os import platform import shutil import subprocess import sys import warnings from typing import Mapping from ._log i...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@_distutils@spawn.py@.PATH_END.py
{ "filename": "suspect.py", "repo_name": "astrocatalogs/supernovae", "repo_path": "supernovae_extracted/supernovae-master/tasks/suspect.py", "type": "Python" }
"""Import tasks for SUSPECT. """ import csv import json import os import re import urllib from glob import glob from html import unescape from math import floor from astropy.time import Time as astrotime from bs4 import BeautifulSoup from astrocats.catalog.utils import (get_sig_digits, is_number, jd_to_mjd, ...
astrocatalogsREPO_NAMEsupernovaePATH_START.@supernovae_extracted@supernovae-master@tasks@suspect.py@.PATH_END.py
{ "filename": "dev_ops.md", "repo_name": "andreatramacere/jetset", "repo_path": "jetset_extracted/jetset-master/dev_ops.md", "type": "Markdown" }
## local operations - update version: update the tag in `jetset/pkg_info.json` - clean `__pycache__`: ```find . -type d -name __pycache__ | xargs rm -r``` - If you want to make a tag you can use the script, the `-do_remote_tag` option will create the tag remotely, deleting remotely the one with the same name...
andreatramacereREPO_NAMEjetsetPATH_START.@jetset_extracted@jetset-master@dev_ops.md@.PATH_END.py
{ "filename": "nasm.py", "repo_name": "duvall3/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/nasm.py", "type": "Python" }
"""SCons.Tool.nasm Tool-specific initialization for nasm, the famous Netwide Assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 ...
duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@nasm.py@.PATH_END.py
{ "filename": "test_endpoint.py", "repo_name": "jdswinbank/Comet", "repo_path": "Comet_extracted/Comet-master/comet/utility/test/test_endpoint.py", "type": "Python" }
from twisted.internet import reactor from twisted.trial import unittest from comet.utility import coerce_to_client_endpoint, coerce_to_server_endpoint class coerce_to_client_endpoint_TestCase(unittest.TestCase): HOST, PORT, DEFAULT_PORT = "test", 1234, 4321 def test_good_tcp_parse(self): ep = coerce...
jdswinbankREPO_NAMECometPATH_START.@Comet_extracted@Comet-master@comet@utility@test@test_endpoint.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/src/axolotl/core/trainers/__init__.py", "type": "Python" }
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@core@trainers@__init__.py@.PATH_END.py
{ "filename": "3)_Simple_Visualization.ipynb", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/doc/source/quickstart/3)_Simple_Visualization.ipynb", "type": "Jupyter Notebook" }
# Simple Visualizations of Data Just like in our first notebook, we have to load yt and then some data. ```python import yt ``` For this notebook, we'll load up a cosmology dataset. ```python ds = yt.load_sample("enzo_tiny_cosmology") print("Redshift =", ds.current_redshift) ``` In the terms that yt uses, a proj...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@doc@source@quickstart@3)_Simple_Visualization.ipynb@.PATH_END.py
{ "filename": "README.md", "repo_name": "desihub/desitarget", "repo_path": "desitarget_extracted/desitarget-main/py/desitarget/streams/gaia_dr3_parallax_zero_point/README.md", "type": "Markdown" }
## Attribution The code and coefficient files in this directory are a snapshot of the [gaiadr3_zeropoint](https://gitlab.com/icc-ub/public/gaiadr3_zeropoint/-/blob/master/) package (downloaded on 2024-03-05). Please refer to [the original code](https://gitlab.com/icc-ub/public/gaiadr3_zeropoint/) for details and attri...
desihubREPO_NAMEdesitargetPATH_START.@desitarget_extracted@desitarget-main@py@desitarget@streams@gaia_dr3_parallax_zero_point@README.md@.PATH_END.py
{ "filename": "_exponentformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/_exponentformat.py", "type": "Python" }
import _plotly_utils.basevalidators class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="parcoords.line.colorbar", **kwargs, ): super(ExponentformatValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@_exponentformat.py@.PATH_END.py
{ "filename": "likelihood.py", "repo_name": "aconley/mbb_emcee", "repo_path": "mbb_emcee_extracted/mbb_emcee-master/mbb_emcee/likelihood.py", "type": "Python" }
import numpy as np import math import copy from .modified_blackbody import modified_blackbody from .response import response, response_set, special_types __all__ = ["likelihood"] #hack for basestring try: basestring except: #Python 3 basestring = str class likelihood(object): """Class holding data, ...
aconleyREPO_NAMEmbb_emceePATH_START.@mbb_emcee_extracted@mbb_emcee-master@mbb_emcee@likelihood.py@.PATH_END.py
{ "filename": "5_residual_profiles.py", "repo_name": "ldolan05/ACID", "repo_path": "ACID_extracted/ACID-main/.other_scripts/5_residual_profiles.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 22 14:14:17 2021 @author: lucydolan """ import numpy as np import math import glob import Mandel_Agol as ma from scipy.interpolate import interp1d from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.optimize import curve_fit import ma...
ldolan05REPO_NAMEACIDPATH_START.@ACID_extracted@ACID-main@.other_scripts@5_residual_profiles.py@.PATH_END.py
{ "filename": "_contours.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/contour/_contours.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contours(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "contour" _path_str = "contour.contours" _valid_props = { "coloring", "end"...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@contour@_contours.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatter", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@_stream.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/histogram2d/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@histogram2d@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "_enabled.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/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="scattermap.marker.colorbar.tickformatstop", **kwargs, ): super(EnabledValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@marker@colorbar@tickformatstop@_enabled.py@.PATH_END.py
{ "filename": "_family.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/hoverlabel/font/_family.py", "type": "Python" }
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): super(FamilyValidator, self).__init__( plotly_name=pl...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@hoverlabel@font@_family.py@.PATH_END.py
{ "filename": "psd_math.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/toast/fod/psd_math.py", "type": "Python" }
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import numpy as np from scipy.signal import fftconvolve from ..mpi import MPI from ..timing import function_timer from .._...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@toast@fod@psd_math.py@.PATH_END.py
{ "filename": "XID+_example_pyvo_prior.ipynb", "repo_name": "H-E-L-P/XID_plus", "repo_path": "XID_plus_extracted/XID_plus-master/docs/notebooks/examples/XID+_example_pyvo_prior.ipynb", "type": "Jupyter Notebook" }
```python from astropy.io import ascii, fits import astropy import pylab as plt %matplotlib inline from astropy import wcs from astropy.table import Table,Column,join,hstack from astropy.coordinates import SkyCoord from astropy import units as u import pymoc import glob from time import sleep import os import numpy a...
H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@notebooks@examples@XID+_example_pyvo_prior.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/streamtube/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@streamtube@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "_type.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/marker/gradient/_type.py", "type": "Python" }
import _plotly_utils.basevalidators class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scattergeo.marker.gradient", **kwargs ): super(TypeValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@marker@gradient@_type.py@.PATH_END.py
{ "filename": "_stats_py.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/_stats_py.py", "type": "Python" }
# Copyright 2002 Gary Strangman. All rights reserved # Copyright 2002-2016 The SciPy Developers # # The original code from Gary Strangman was heavily adapted for # use in SciPy by Travis Oliphant. The original code came with the # following disclaimer: # # This software is provided "as-is". There are no expressed or...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@_stats_py.py@.PATH_END.py
{ "filename": "polarizability.py", "repo_name": "HajimeKawahara/exojax", "repo_path": "exojax_extracted/exojax-master/src/exojax/atm/polarizability.py", "type": "Python" }
""" Gas Polarizability Notes: Originally taken from PICASO/GPLv3 picaso/rayleigh.py polarizabilities are mainly taken from CRC handbook of chemistry and physics vol. 95 unit=cm3 H3+ taken from Kawaoka & Borkman, 1971 Number density at reference conditions of refractive i...
HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@src@exojax@atm@polarizability.py@.PATH_END.py
{ "filename": "gaussian_noise.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/regularization/gaussian_noise.py", "type": "Python" }
from keras.src import backend from keras.src import layers from keras.src import ops from keras.src.api_export import keras_export @keras_export("keras.layers.GaussianNoise") class GaussianNoise(layers.Layer): """Apply additive zero-centered Gaussian noise. This is useful to mitigate overfitting (you cou...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@regularization@gaussian_noise.py@.PATH_END.py
{ "filename": "_densitymap.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_densitymap.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Densitymap(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "densitymap" _valid_props = { "autocolorscale", "below", "coloraxis", ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_densitymap.py@.PATH_END.py
{ "filename": "_len.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/colorbar/_len.py", "type": "Python" }
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="len", parent_name="barpolar.marker.colorbar", **kwargs ): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@_len.py@.PATH_END.py
{ "filename": "radec_to_chip.py", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/tests/roman_files/radec_to_chip.py", "type": "Python" }
# Copyright (c) 2012-2023 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@tests@roman_files@radec_to_chip.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/tools/__init__.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # CODE NAME HERE # CODE DESCRIPTION HERE Created on 2019-01-17 at 14:31 @author: cook """ __all__ = [] # ============================================================================= # Define functions # =============================================================...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@tools@__init__.py@.PATH_END.py
{ "filename": "test_cassandra.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/vectorstores/test_cassandra.py", "type": "Python" }
"""Test Cassandra functionality.""" import asyncio import json import math import os import time from contextlib import asynccontextmanager, contextmanager from typing import ( Any, AsyncGenerator, Generator, Iterable, List, Optional, Tuple, Union, ) import pytest from langchain_core.d...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@vectorstores@test_cassandra.py@.PATH_END.py
{ "filename": "drs_lang.py", "repo_name": "njcuk9999/apero-drs", "repo_path": "apero-drs_extracted/apero-drs-main/apero/lang/core/drs_lang.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Language database functionality Created on 2020-11-2020-11-13 10:41 @author: cook # import rules only from: - apero.base.base - apero.base.drs_base - apero.base.drs_db """ import os import shutil from typing import Any, Dict, List, Union import numpy a...
njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@lang@core@drs_lang.py@.PATH_END.py
{ "filename": "mu_velfields.py", "repo_name": "kapteyn-astro/kapteyn", "repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/mu_velfields.py", "type": "Python" }
#!/usr/bin/env python from kapteyn import wcsgrat, maputils from matplotlib import pylab as plt import numpy # Create a maputils FITS object from a FITS file on disk fitsobject = maputils.FITSimage(promptfie=maputils.prompt_fitsfile) fitsobject.set_imageaxes(promptfie=maputils.prompt_imageaxes) fitsobject.set_limit...
kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@mu_velfields.py@.PATH_END.py
{ "filename": "_side.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py", "type": "Python" }
import _plotly_utils.basevalidators class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatterpolargl.marker.colorbar.title", **kwargs ): super(SideValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@marker@colorbar@title@_side.py@.PATH_END.py
{ "filename": "test_RHT_timings.py", "repo_name": "mjuvela/ISM", "repo_path": "ISM_extracted/ISM-master/TM/test_RHT_timings.py", "type": "Python" }
import os, sys ISM_DIRECTORY = os.path.expanduser('~/GITHUB') try: ISM_DIRECTORY = os.environ(['ISM_DIRECTORY']) except: pass sys.path.append(ISM_DIRECTORY) import ISM.Defs from ISM.FITS.FITS import * from scipy.ndimage import zoom from ISM.TM.Pattern import RollingHoughTransformBasic # set the direc...
mjuvelaREPO_NAMEISMPATH_START.@ISM_extracted@ISM-master@TM@test_RHT_timings.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "AMReX-Astro/Castro", "repo_path": "Castro_extracted/Castro-main/Exec/science/flame/flame_wave_tests/triple_alpha_plus_cago/README.md", "type": "Markdown" }
These files go together with the boosted flame for the `flame_wave` problem. You should compile with the `triple_alpha_plus_cago` network.
AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Exec@science@flame@flame_wave_tests@triple_alpha_plus_cago@README.md@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/LineOfSight/LOSModels/__init__.py", "type": "Python" }
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@LineOfSight@LOSModels@__init__.py@.PATH_END.py
{ "filename": "releases.py", "repo_name": "sdss/marvin", "repo_path": "marvin_extracted/marvin-main/python/marvin/utils/datamodel/vacs/releases.py", "type": "Python" }
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2018-07-17 23:36:37 # @Last modified by: Brian Cherinka # @Last Modified time: 2018-07-19 15:44:42 from __future__ import print_function, division, absolute_import from collections import ...
sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@python@marvin@utils@datamodel@vacs@releases.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/outsidetextfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.outsidetextfont", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@outsidetextfont@_variant.py@.PATH_END.py
{ "filename": "class_lmv.py", "repo_name": "radio-astro-tools/spectral-cube", "repo_path": "spectral-cube_extracted/spectral-cube-master/spectral_cube/io/class_lmv.py", "type": "Python" }
import numpy as np import struct import warnings import string from astropy import log from astropy.io import registry as io_registry from ..spectral_cube import BaseSpectralCube from .fits import load_fits_cube """ .. TODO:: When any section length is zero, that means the following values are to be ignored. ...
radio-astro-toolsREPO_NAMEspectral-cubePATH_START.@spectral-cube_extracted@spectral-cube-master@spectral_cube@io@class_lmv.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "ajshajib/dolphin", "repo_path": "dolphin_extracted/dolphin-main/docs_test/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
ajshajibREPO_NAMEdolphinPATH_START.@dolphin_extracted@dolphin-main@docs_test@conf.py@.PATH_END.py
{ "filename": "mntes.py", "repo_name": "tijmen/dfmux_calc", "repo_path": "dfmux_calc_extracted/dfmux_calc-main/mntes.py", "type": "Python" }
""" Electro-thermal solution for Transition Edge Sensors (TES) read out with DfMux. Author: Tijmen de Haan Email: <tijmen.dehaan@gmail.com> Date: 15 May 2024 This module provides functions for simulating the thermal and electrical behavior of Transition Edge Sensors (TES) based on the MNTES model. As of May 2024, th...
tijmenREPO_NAMEdfmux_calcPATH_START.@dfmux_calc_extracted@dfmux_calc-main@mntes.py@.PATH_END.py
{ "filename": "dunne2009.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/input/litdata/dunne2009.py", "type": "Python" }
""" Dunne, L., et al. 2009, MNRAS, 394, 3 http://arxiv.org/abs/0808.3139v2 For ssfr, values are corrected as seen in Behroozi et al. 2013 (http://arxiv.org/abs/1207.6105), Table 4, for I (Initial Mass Function) corrections. """ import numpy as np info = \ { 'reference':'Dunne, L., et al. 2009, MNRAS, 394, 3', 'da...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@input@litdata@dunne2009.py@.PATH_END.py
{ "filename": "test_flexionfg.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Profiles/test_flexionfg.py", "type": "Python" }
__author__ = "ylilan" from lenstronomy.LensModel.Profiles.flexionfg import Flexionfg from lenstronomy.LensModel.lens_model import LensModel import numpy as np import numpy.testing as npt import pytest class TestFlexionfg(object): """Tests the Gaussian methods.""" def setup_method(self): self.flex ...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Profiles@test_flexionfg.py@.PATH_END.py
{ "filename": "binding.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/datamodel/binding.py", "type": "Python" }
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@datamodel@binding.py@.PATH_END.py
{ "filename": "_tickcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/colorbar/_tickcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="heatmap.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@colorbar@_tickcolor.py@.PATH_END.py
{ "filename": "acb.py", "repo_name": "bcalden/ClusterPyXT", "repo_path": "ClusterPyXT_extracted/ClusterPyXT-master/acb.py", "type": "Python" }
import cluster import pypeline_io as io import numpy as np import time import argparse import data_operations as do from astropy.io import fits import multiprocessing as mp import ciao_contrib.runtool as rt import ciao from tqdm import tqdm def get_arguments(): help_str = """ This part of the pypeline creates ...
bcaldenREPO_NAMEClusterPyXTPATH_START.@ClusterPyXT_extracted@ClusterPyXT-master@acb.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "ConorMacBride/mcalf", "repo_path": "mcalf_extracted/mcalf-main/src/mcalf/utils/plot.py", "type": "Python" }
import astropy.units import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from packaging import version __all__ = ['hide_existing_labels', 'calculate_axis_extent', 'calculate_extent', 'class_cmap'] def _get_mpl_cmap(name): if version.parse(mpl.__version__) >= version.parse("3.5"): ...
ConorMacBrideREPO_NAMEmcalfPATH_START.@mcalf_extracted@mcalf-main@src@mcalf@utils@plot.py@.PATH_END.py
{ "filename": "_opacity.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/_opacity.py", "type": "Python" }
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="barpolar", **kwargs): super(OpacityValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@_opacity.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/astropy/vo/validator/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os from ... import config as _config from ...utils.data import get_pkg_data_contents # NOTE: This is deprecated along with other Cone Search stuff, but it feels # weird for config item to be issuing deprecation warnings. class Conf(_confi...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@vo@validator@__init__.py@.PATH_END.py
{ "filename": "base_pipeline.py", "repo_name": "MichelleLochner/astronomaly", "repo_path": "astronomaly_extracted/astronomaly-main/astronomaly/base/base_pipeline.py", "type": "Python" }
from astronomaly.base import logging_tools from os import path import pandas as pd import numpy as np from pandas.util import hash_pandas_object import time class PipelineStage(object): def __init__(self, *args, **kwargs): """ Base class defining functionality for all pipeline stages. To c...
MichelleLochnerREPO_NAMEastronomalyPATH_START.@astronomaly_extracted@astronomaly-main@astronomaly@base@base_pipeline.py@.PATH_END.py
{ "filename": "test_simulation.py", "repo_name": "dmentipl/plonk", "repo_path": "plonk_extracted/plonk-main/tests/test_simulation.py", "type": "Python" }
"""Testing Simulation.""" from pathlib import Path import numpy as np import pytest import plonk DIR_PATH = Path(__file__).parent / 'data/phantom' PREFIX = 'dustseparate' TS_FILENAME = 'dustseparate01.ev' def test_init_simulation(): """Testing initialising simulation.""" plonk.load_simulation(prefix=PREFI...
dmentiplREPO_NAMEplonkPATH_START.@plonk_extracted@plonk-main@tests@test_simulation.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/insidetextfont/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._weight import WeightValidator from ._variant import VariantValidator from ._textcase import TextcaseValidator from ._style import StyleValidator from ._size import SizeValidator from ._shadow impor...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@insidetextfont@__init__.py@.PATH_END.py
{ "filename": "flatiter.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/typing/tests/data/pass/flatiter.py", "type": "Python" }
import numpy as np a = np.empty((2, 2)).flat a.base a.copy() a.coords a.index iter(a) next(a) a[0] a[[0, 1, 2]] a[...] a[:] a.__array__() a.__array__(np.dtype(np.float64))
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@typing@tests@data@pass@flatiter.py@.PATH_END.py
{ "filename": "cde_loss.py", "repo_name": "lee-group-cmu/cdetools", "repo_path": "cdetools_extracted/cdetools-master/python/src/cdetools/cde_loss.py", "type": "Python" }
import numpy as np from scipy.spatial import KDTree def cde_loss(cde_estimates, z_grid, z_test): """ Calculates conditional density estimation loss on holdout data @param cde_estimates: a numpy array where each row is a density estimate on z_grid @param z_grid: a numpy array of the grid points at...
lee-group-cmuREPO_NAMEcdetoolsPATH_START.@cdetools_extracted@cdetools-master@python@src@cdetools@cde_loss.py@.PATH_END.py
{ "filename": "test_jplspec_remote.py", "repo_name": "astropy/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/jplspec/tests/test_jplspec_remote.py", "type": "Python" }
import pytest from astropy import units as u from astropy.table import Table from ...jplspec import JPLSpec @pytest.mark.remote_data def test_remote(): tbl = JPLSpec.query_lines(min_frequency=500 * u.GHz, max_frequency=1000 * u.GHz, min_strength=-500, ...
astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@jplspec@tests@test_jplspec_remote.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/coloraxis/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.coloraxis.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@coloraxis@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "calc_k_coeffs.py", "repo_name": "ideasrule/platon", "repo_path": "platon_extracted/platon-master/misc/calc_k_coeffs.py", "type": "Python" }
import scipy.special import numpy as np import sys import matplotlib.pyplot as plt def get_k_coeffs(absorb_coeffs, binsize=200, n_gauss=10): points, weights = scipy.special.roots_legendre(n_gauss) percentiles = 100 * (points + 1) / 2 k_coeffs = [] for i in range(absorb_coeffs.shape[2] // binsize): ...
ideasruleREPO_NAMEplatonPATH_START.@platon_extracted@platon-master@misc@calc_k_coeffs.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/hoverlabel/font/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="image.hoverlabel.font", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@hoverlabel@font@_variant.py@.PATH_END.py
{ "filename": "evolution.py", "repo_name": "astropy/SPISEA", "repo_path": "SPISEA_extracted/SPISEA-main/spisea/evolution.py", "type": "Python" }
import math import logging from numpy import genfromtxt import numpy as np import os import glob import pdb import warnings from astropy.table import Table, vstack, Column from scipy import interpolate import pylab as py from spisea.utils import objects from spisea import exceptions logger = logging.getLogger('evoluti...
astropyREPO_NAMESPISEAPATH_START.@SPISEA_extracted@SPISEA-main@spisea@evolution.py@.PATH_END.py
{ "filename": "ConcurrentMpiCosmoHammerSampler.py", "repo_name": "JulianBMunoz/21cmvFAST", "repo_path": "21cmvFAST_extracted/21cmvFAST-master/public_21CMvFAST_MC/Programs/CosmoHammer_21CMMC/sampler/ConcurrentMpiCosmoHammerSampler.py", "type": "Python" }
from .MpiCosmoHammerSampler import MpiCosmoHammerSampler import multiprocessing class ConcurrentMpiCosmoHammerSampler(MpiCosmoHammerSampler): """ A sampler implementation extending the mpi sampler in order to allow to distribute the computation with MPI and using multiprocessing on a single node. :...
JulianBMunozREPO_NAME21cmvFASTPATH_START.@21cmvFAST_extracted@21cmvFAST-master@public_21CMvFAST_MC@Programs@CosmoHammer_21CMMC@sampler@ConcurrentMpiCosmoHammerSampler.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ratt-ru/montblanc", "repo_path": "montblanc_extracted/montblanc-master/montblanc/impl/rime/tensorflow/helpers/__init__.py", "type": "Python" }
ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@impl@rime@tensorflow@helpers@__init__.py@.PATH_END.py
{ "filename": "_lineposition.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymap/colorbar/title/font/_lineposition.py", "type": "Python" }
import _plotly_utils.basevalidators class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.colorbar.title.font", **kwargs, ): super(LinepositionValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymap@colorbar@title@font@_lineposition.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/semi_supervised/tests/__init__.py", "type": "Python" }
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@semi_supervised@tests@__init__.py@.PATH_END.py
{ "filename": "test_filestorage_io.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/modules/python/test/test_filestorage_io.py", "type": "Python" }
#!/usr/bin/env python """Algorithm serialization test.""" from __future__ import print_function import base64 import json import tempfile import os import cv2 as cv import numpy as np from tests_common import NewOpenCVTests class MyData: def __init__(self): self.A = 97 self.X = np.pi self.n...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@python@test@test_filestorage_io.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/json/__init__.py", "type": "Python" }
"""Tools for interacting with a JSON file."""
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@json@__init__.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "martenlourens/pySDR", "repo_path": "pySDR_extracted/pySDR-master/python/sphinx/source/conf.py", "type": "Python" }
# If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. import pathlib import sys sys.path.insert(1, pathlib.Path(__file__).parents[2].resolve().as_posix()) # Configuration file for the Sphinx documentation builder. # # For the full list of built-in con...
martenlourensREPO_NAMEpySDRPATH_START.@pySDR_extracted@pySDR-master@python@sphinx@source@conf.py@.PATH_END.py
{ "filename": "compiler.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipykernel/py3/ipykernel/compiler.py", "type": "Python" }
"""Compiler helpers for the debugger.""" import os import sys import tempfile from IPython.core.compilerop import CachingCompiler def murmur2_x86(data, seed): """Get the murmur2 hash.""" m = 0x5BD1E995 data = [chr(d) for d in str.encode(data, "utf8")] length = len(data) h = seed ^ length roun...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipykernel@py3@ipykernel@compiler.py@.PATH_END.py