metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "raenn.py",
"repo_name": "villrv/SuperRAENN",
"repo_path": "SuperRAENN_extracted/SuperRAENN-master/superraenn/raenn.py",
"type": "Python"
} | # lstm autoencoder recreate sequence
from argparse import ArgumentParser
from keras.models import Model
from keras.layers import Input, GRU, TimeDistributed
from keras.layers import Dense, concatenate
from keras.layers import RepeatVector
from keras.optimizers import Adam
import numpy as np
import matplotlib.pyplot as ... | villrvREPO_NAMESuperRAENNPATH_START.@SuperRAENN_extracted@SuperRAENN-master@superraenn@raenn.py@.PATH_END.py |
{
"filename": "_cauto.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/marker/_cauto.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CautoValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="cauto", parent_name="bar.marker", **kwargs):
super(CautoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@marker@_cauto.py@.PATH_END.py |
{
"filename": "test_mlab_source.py",
"repo_name": "enthought/mayavi",
"repo_path": "mayavi_extracted/mayavi-master/mayavi/tests/test_mlab_source.py",
"type": "Python"
} | """
Test for MlabSource and its subclasses.
"""
# Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
import unittest
import numpy as np
from unittest.mock import patch
from tvtk.api import tvtk
from mayavi.tools import sources
from mayavi.sources.vtk_data_... | enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@mayavi@tests@test_mlab_source.py@.PATH_END.py |
{
"filename": "search.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/gmail/search.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import GmailSearch
from langchain_community.tools.gmail.search import Resource, SearchArgsSchema
# Create a way to dynamically look up deprecated imports.
# Used to consolidate lo... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@gmail@search.py@.PATH_END.py |
{
"filename": "manip.py",
"repo_name": "Johannes-Sahlmann/pygacs",
"repo_path": "pygacs_extracted/pygacs-master/pygacs/authen/manip.py",
"type": "Python"
} | """
Tools to allow manipulating tables in GACS using authenticated and synchronous access.
Some example capabilities are:
- send a command to GACS
- upload a user table
- delete a user table
- query the progress of a job submitted to GACS
- retrieve the results of a job
- set the flags of a user table
- retrieve the ... | Johannes-SahlmannREPO_NAMEpygacsPATH_START.@pygacs_extracted@pygacs-master@pygacs@authen@manip.py@.PATH_END.py |
{
"filename": "ufuncs.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/doc/ufuncs.py",
"type": "Python"
} | """
===================
Universal Functions
===================
Ufuncs are, generally speaking, mathematical functions or operations that are
applied element-by-element to the contents of an array. That is, the result
in each output array element only depends on the value in the corresponding
input array (or arrays) a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@doc@ufuncs.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/unselected/marker/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="size",
parent_name="scatterpolargl.unselected.marker",
**kwargs,
):
super(SizeValidator, self).__init__(
plotly_name=plotl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@unselected@marker@_size.py@.PATH_END.py |
{
"filename": "make_changelog.py",
"repo_name": "cosmicrays/hermes",
"repo_path": "hermes_extracted/hermes-master/lib/pybind11/tools/make_changelog.py",
"type": "Python"
} | #!/usr/bin/env python3
from __future__ import annotations
import re
import ghapi.all
from rich import print
from rich.syntax import Syntax
ENTRY = re.compile(
r"""
Suggested \s changelog \s entry:
.*
```rst
\s*
(.*?)
\s*
```
""",
re.DOTALL | re.VERBOSE,
)
print()
api = ghapi.al... | cosmicraysREPO_NAMEhermesPATH_START.@hermes_extracted@hermes-master@lib@pybind11@tools@make_changelog.py@.PATH_END.py |
{
"filename": "04_anisotropy.ipynb",
"repo_name": "mgieles/limepy",
"repo_path": "limepy_extracted/limepy-master/notebooks/04_anisotropy.ipynb",
"type": "Jupyter Notebook"
} | ## Anisotropy
One of the advantages of LIMEPY is that it is straightforward to include radially biased anisotropy. The results are quickly obtained because (quasi-)analytic expressions for the density as a function of potential and radius are derived in Gieles & Zocchi 2015. Here is how to generate a King (1966) model... | mgielesREPO_NAMElimepyPATH_START.@limepy_extracted@limepy-master@notebooks@04_anisotropy.ipynb@.PATH_END.py |
{
"filename": "_opacityscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/_opacityscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="opacityscale", parent_name="surface", **kwargs):
super(OpacityscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@_opacityscale.py@.PATH_END.py |
{
"filename": "macho.py",
"repo_name": "mavrix93/LightCurvesClassifier",
"repo_path": "LightCurvesClassifier_extracted/LightCurvesClassifier-master/lcc/db_tier/connectors/macho.py",
"type": "Python"
} | import collections
from lcc.db_tier.base_query import LightCurvesDb
from lcc.db_tier.vizier_tap_base import VizierTapBase
class Macho(VizierTapBase, LightCurvesDb):
"""
Client for MACHO database of variable stars. It inherits `VizierTapBase` - see
documentation of this class to class attributes descripti... | mavrix93REPO_NAMELightCurvesClassifierPATH_START.@LightCurvesClassifier_extracted@LightCurvesClassifier-master@lcc@db_tier@connectors@macho.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/_legendgrouptitle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="legendgrouptitle", parent_name="scattercarpet", **kwargs
):
super(LegendgrouptitleValidator, self).__init__(
plotly_name=plotly_name... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "extended_source.py",
"repo_name": "threeML/astromodels",
"repo_path": "astromodels_extracted/astromodels-master/astromodels/sources/extended_source.py",
"type": "Python"
} | import collections
import astropy.units as u
import numpy as np
from astromodels.core.spectral_component import SpectralComponent
from astromodels.core.tree import Node
from astromodels.core.units import get_units
from astromodels.functions import Constant
from astromodels.sources.source import Source, SourceType
fro... | threeMLREPO_NAMEastromodelsPATH_START.@astromodels_extracted@astromodels-master@astromodels@sources@extended_source.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/indicator/title/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "indicator.title"
_path_str = "indicator.title.font"
_valid_props = {
"color",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@indicator@title@_font.py@.PATH_END.py |
{
"filename": "analyze.py",
"repo_name": "jmd-dk/concept",
"repo_path": "concept_extracted/concept-master/test/nprocs_pm/analyze.py",
"type": "Python"
} | # This file has to be run in pure Python mode!
# Imports from the CO𝘕CEPT code
from commons import *
from snapshot import load
import species
plt = get_matplotlib().pyplot
# Absolute path and name of this test
this_dir = os.path.dirname(os.path.realpath(__file__))
this_test = os.path.basename(os.path.dirname(this_d... | jmd-dkREPO_NAMEconceptPATH_START.@concept_extracted@concept-master@test@nprocs_pm@analyze.py@.PATH_END.py |
{
"filename": "single_data_2D_generator.py",
"repo_name": "BiaPyX/BiaPy",
"repo_path": "BiaPy_extracted/BiaPy-master/biapy/data/generators/single_data_2D_generator.py",
"type": "Python"
} | import numpy as np
from biapy.utils.util import save_tif
from biapy.data.generators.single_base_data_generator import SingleBaseDataGenerator
class Single2DImageDataGenerator(SingleBaseDataGenerator):
"""
Custom 2D data generator based on `imgaug <https://github.com/aleju/imgaug-doc>`_
and our own `augme... | BiaPyXREPO_NAMEBiaPyPATH_START.@BiaPy_extracted@BiaPy-master@biapy@data@generators@single_data_2D_generator.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "amusecode/TRES",
"repo_path": "TRES_extracted/TRES-main/__init__.py",
"type": "Python"
} | amusecodeREPO_NAMETRESPATH_START.@TRES_extracted@TRES-main@__init__.py@.PATH_END.py | |
{
"filename": "README.md",
"repo_name": "yyamato-as/specfit",
"repo_path": "specfit_extracted/specfit-main/README.md",
"type": "Markdown"
} | # Package for Spectral Fit of the Interferometric Molecular Line Data in Protoplantary Disks
- The most easy-to-use package for spectral modeling of the line emission
- Useful functions to determine column density, excitation temperature, and gas density from observed spectra
- Several useful functions for querying the... | yyamato-asREPO_NAMEspecfitPATH_START.@specfit_extracted@specfit-main@README.md@.PATH_END.py |
{
"filename": "check_intermediate_merge.py",
"repo_name": "HETDEX/elixer",
"repo_path": "elixer_extracted/elixer-main/elixer/check_intermediate_merge.py",
"type": "Python"
} | import os
import sys
import numpy as np
import tables
args = list(map(str.lower,sys.argv))
mergelist_file = args[1]
with open(mergelist_file,'r') as f:
lines = f.readlines()
for line in lines:
fn = line[:-1] #strip the trailing \n
if not os.path.isfile(fn):
print(line, "No file.")
else:
... | HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@check_intermediate_merge.py@.PATH_END.py |
{
"filename": "test_series.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/plotting/test_series.py",
"type": "Python"
} | """Test cases for Series.plot"""
from datetime import datetime
from itertools import chain
import numpy as np
import pytest
from pandas.compat import is_platform_linux
from pandas.compat.numpy import np_version_gte1p24
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
DataFrame,... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@plotting@test_series.py@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="scattersmith.marker", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@_colorsrc.py@.PATH_END.py |
{
"filename": "_make_pert.py",
"repo_name": "deepmind/optax",
"repo_path": "optax_extracted/optax-main/optax/perturbations/_make_pert.py",
"type": "Python"
} | # Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | deepmindREPO_NAMEoptaxPATH_START.@optax_extracted@optax-main@optax@perturbations@_make_pert.py@.PATH_END.py |
{
"filename": "_dtick.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/geo/lataxis/_dtick.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="dtick", parent_name="layout.geo.lataxis", **kwargs):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@geo@lataxis@_dtick.py@.PATH_END.py |
{
"filename": "requirements.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/pkg_resources/_vendor/packaging/requirements.py",
"type": "Python"
} | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from typing import Any, Iterator, Optional, Set
from ._parser import parse_requirement as _parse_requirement
from ._tokenizer import Parse... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@pkg_resources@_vendor@packaging@requirements.py@.PATH_END.py |
{
"filename": "jax_to_ir_test.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/tests/jax_to_ir_test.py",
"type": "Python"
} | # Copyright 2019 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@jax_to_ir_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spedas/pyspedas",
"repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/particles/spd_part_products/__init__.py",
"type": "Python"
} | from .spd_pgs_do_fac import spd_pgs_do_fac
from .spd_pgs_regrid import spd_pgs_regrid | spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@particles@spd_part_products@__init__.py@.PATH_END.py |
{
"filename": "keys.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/keys.py",
"type": "Python"
} | from __future__ import annotations
from enum import Enum
__all__ = [
"Keys",
"ALL_KEYS",
]
class Keys(str, Enum):
"""
List of keys for use in key bindings.
Note that this is an "StrEnum", all values can be compared against
strings.
"""
value: str
Escape = "escape" # Also Cont... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@keys.py@.PATH_END.py |
{
"filename": "makeAppendixTables-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_dr25RadCut/.ipynb_checkpoints/makeAppendixTables-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import requests
import pandas as pd
from astropy.io import fits
from cStringIO import StringIO
import numpy as np
import matplotlib.pyplot as plt
```
This notebook is for generating text for the tables in appendix A of the paper.
```python
def printTable(table):
print("Model Name & Median AI... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_dr25RadCut@.ipynb_checkpoints@makeAppendixTables-checkpoint.ipynb@.PATH_END.py |
{
"filename": "working-with-pytrees.md",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/working-with-pytrees.md",
"type": "Markdown"
} | ---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
---
```{code-cell}
:tags: [remove-cell]
# This ensures that code cell tracebacks appearing belo... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@working-with-pytrees.md@.PATH_END.py |
{
"filename": "atmosphere.py",
"repo_name": "MartianColonist/POSEIDON",
"repo_path": "POSEIDON_extracted/POSEIDON-main/POSEIDON/atmosphere.py",
"type": "Python"
} | '''
Functions for calculating atmospheric temperature, mixing ratio, and other profiles.
'''
import numpy as np
import scipy
import scipy.constants as sc
from scipy.ndimage import gaussian_filter1d as gauss_conv
from scipy.interpolate import pchip_interpolate
from numba.core.decorators import jit
from .supported_ch... | MartianColonistREPO_NAMEPOSEIDONPATH_START.@POSEIDON_extracted@POSEIDON-main@POSEIDON@atmosphere.py@.PATH_END.py |
{
"filename": "settings_BKPonly.py",
"repo_name": "cmbant/CosmoMC",
"repo_path": "CosmoMC_extracted/CosmoMC-master/python/planck/settings_BKPonly.py",
"type": "Python"
} | from __future__ import absolute_import
# settings to test out BKP-only runs
from paramgrid import batchjob
# Directory to find .ini files
ini_dir = 'batch2/'
# directory to look for existing covariance matrices
covmat = 'planck_covmats/BKPlanck.covmat'
# ini files you want to base each set of runs on
defaults = ['co... | cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@python@planck@settings_BKPonly.py@.PATH_END.py |
{
"filename": "hermite_e.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/polynomial/hermite_e.py",
"type": "Python"
} | """
Objects for dealing with Hermite_e series.
This module provides a number of objects (mostly functions) useful for
dealing with Hermite_e series, including a `HermiteE` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@polynomial@hermite_e.py@.PATH_END.py |
{
"filename": "h5py_wrap.py",
"repo_name": "galtay/urchin",
"repo_path": "urchin_extracted/urchin-main/src/eagle/h5py_wrap.py",
"type": "Python"
} | """ Simple convenience functions to access the h5py library. """
import h5py as _h5py
import numpy as _np
class _Error(Exception):
"""Base class for exceptions in this module."""
pass
class _OverwriteError(_Error):
"""Exception raised for attempting to overwrite data. """
def __init__(self, messa... | galtayREPO_NAMEurchinPATH_START.@urchin_extracted@urchin-main@src@eagle@h5py_wrap.py@.PATH_END.py |
{
"filename": "fetch_catalogue.py",
"repo_name": "HeRTA/FRBSTATS",
"repo_path": "FRBSTATS_extracted/FRBSTATS-main/fetch_catalogue.py",
"type": "Python"
} | import urllib.request
import os
# Fetch sheet as CSV
sheet_url = 'https://docs.google.com/spreadsheets/d/1W27KNa6yJzYA_b8HLSz4hxtWEZQtxUhGTXfQjlXgpzY/gviz/tq?tqx=out:csv&sheet={{Catalogue}}'
urllib.request.urlretrieve(sheet_url, 'catalogue_tmp.csv')
# Replace blank instances with "-"
with open('catalogue_tmp.csv', 'r... | HeRTAREPO_NAMEFRBSTATSPATH_START.@FRBSTATS_extracted@FRBSTATS-main@fetch_catalogue.py@.PATH_END.py |
{
"filename": "llm_rails.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/embeddings/llm_rails.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.embeddings import LLMRailsEmbeddings
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@embeddings@llm_rails.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "kumikokotera/GRAND_tools",
"repo_path": "GRAND_tools_extracted/GRAND_tools-master/grid_shape/__init__.py",
"type": "Python"
} | kumikokoteraREPO_NAMEGRAND_toolsPATH_START.@GRAND_tools_extracted@GRAND_tools-master@grid_shape@__init__.py@.PATH_END.py | |
{
"filename": "SherpaLike.py",
"repo_name": "threeML/threeML",
"repo_path": "threeML_extracted/threeML-master/threeML/plugins/experimental/SherpaLike.py",
"type": "Python"
} | from __future__ import division
from builtins import zip
from builtins import range
from past.utils import old_div
from builtins import object
import numpy as np
from sherpa.astro import datastack
from sherpa.models import TableModel
from threeML.plugin_prototype import PluginPrototype
import matplotlib.pyplot as plt
... | threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@plugins@experimental@SherpaLike.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/colorbar/title/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="text", parent_name="barpolar.marker.colorbar.title", **kwargs
):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@title@_text.py@.PATH_END.py |
{
"filename": "_cmid.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/line/_cmid.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CmidValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="cmid", parent_name="funnel.marker.line", **kwargs):
super(CmidValidator, 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@funnel@marker@line@_cmid.py@.PATH_END.py |
{
"filename": "_hovertext.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/_hovertext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="hovertext", parent_name="icicle", **kwargs):
super(HovertextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@_hovertext.py@.PATH_END.py |
{
"filename": "util_test.py",
"repo_name": "yuliang419/AstroNet-Vetting",
"repo_path": "AstroNet-Vetting_extracted/AstroNet-Vetting-master/light_curve_util/util_test.py",
"type": "Python"
} | # Copyright 2018 The TensorFlow 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | yuliang419REPO_NAMEAstroNet-VettingPATH_START.@AstroNet-Vetting_extracted@AstroNet-Vetting-master@light_curve_util@util_test.py@.PATH_END.py |
{
"filename": "tube.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/visuals/tube.py",
"type": "Python"
} | from __future__ import division
from .mesh import MeshVisual
import numpy as np
from numpy.linalg import norm
from ..util.transforms import rotate
from ..color import ColorArray
class TubeVisual(MeshVisual):
"""Displays a tube around a piecewise-linear path.
The tube mesh is corrected following its Frenet c... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@visuals@tube.py@.PATH_END.py |
{
"filename": "test_mappings.py",
"repo_name": "cnsetzer/kilopop",
"repo_path": "kilopop_extracted/kilopop-main/tests/test_mappings.py",
"type": "Python"
} | import unittest
from kilopop import mappings
from kilopop.kilonovae import bns_kilonova as kilonova
class test_mappings(unittest.TestCase):
def test_equation_4(self):
result = mappings.compute_equation_4(2.0, 1.5, 0.2, 0.15)
self.assertAlmostEqual(result, 0.0057, None, 'Should be ', 0.0001)
d... | cnsetzerREPO_NAMEkilopopPATH_START.@kilopop_extracted@kilopop-main@tests@test_mappings.py@.PATH_END.py |
{
"filename": "fake_output_parser.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/partners/prompty/tests/unit_tests/fake_output_parser.py",
"type": "Python"
} | from typing import Optional, Tuple, Union
from langchain.agents import AgentOutputParser
from langchain_core.agents import AgentAction, AgentFinish
def extract_action_details(text: str) -> Tuple[Optional[str], Optional[str]]:
# Split the text into lines and strip whitespace
lines = [line.strip() for line in ... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@prompty@tests@unit_tests@fake_output_parser.py@.PATH_END.py |
{
"filename": "CalcDiscrimination.py",
"repo_name": "bradkav/AntiparticleDM",
"repo_path": "AntiparticleDM_extracted/AntiparticleDM-master/calc/CalcDiscrimination.py",
"type": "Python"
} | import sys
import CalcParamPoint as CPP
from CalcLikelihood import *
from WIMpy.Experiment import Experiment
from WIMpy.MyParser import ReadParam
from scipy.interpolate import interp1d
from WIMpy.DMUtils import *
from scipy.integrate import quad
print " "
print " **********************************"
print " * Calc... | bradkavREPO_NAMEAntiparticleDMPATH_START.@AntiparticleDM_extracted@AntiparticleDM-master@calc@CalcDiscrimination.py@.PATH_END.py |
{
"filename": "bandpowers.py",
"repo_name": "carronj/plancklens",
"repo_path": "plancklens_extracted/plancklens-master/plancklens/bandpowers.py",
"type": "Python"
} | """Band-powers construction module.
This is used to construct anistropy band-powers from a parameter file.
"""
import os
import numpy as np
import plancklens
from plancklens import utils
from plancklens import nhl
def get_blbubc(bin_type):
if bin_type == 'consext8':
bins_l = np.array([8, 41, 85, 13... | carronjREPO_NAMEplancklensPATH_START.@plancklens_extracted@plancklens-master@plancklens@bandpowers.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "LSSTDESC/CCL",
"repo_path": "CCL_extracted/CCL-master/pyccl/modified_gravity/__init__.py",
"type": "Python"
} | from .modified_gravity_base import *
from .mu_Sigma import *
| LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@pyccl@modified_gravity@__init__.py@.PATH_END.py |
{
"filename": "particle_fields.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/fields/particle_fields.py",
"type": "Python"
} | import numpy as np
from yt.fields.derived_field import ValidateParameter, ValidateSpatial
from yt.units._numpy_wrapper_functions import uconcatenate, ucross
from yt.utilities.lib.misc_utilities import (
obtain_position_vector,
obtain_relative_velocity_vector,
)
from yt.utilities.math_utils import (
get_cyl... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@fields@particle_fields.py@.PATH_END.py |
{
"filename": "python-reference_catboost_eval-metrics.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/concepts/python-reference_catboost_eval-metrics.md",
"type": "Markdown"
} | # eval_metrics
{% include [sections-with-methods-desc-python__eval-metrics__purpose](../_includes/work_src/reusage/python__eval-metrics__purpose.md) %}
## {{ dl--invoke-format }} {#call-format}
```python
{{ python__eval-metrics__function-name }}(data,
metrics,
ntree_start=0,
n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@concepts@python-reference_catboost_eval-metrics.md@.PATH_END.py |
{
"filename": "ops.py",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/utils/ops.py",
"type": "Python"
} | # Ultralytics YOLO 🚀, AGPL-3.0 license
import contextlib
import math
import re
import time
import cv2
import numpy as np
import torch
import torch.nn.functional as F
from ultralytics.utils import LOGGER
from ultralytics.utils.metrics import batch_probiou
class Profile(contextlib.ContextDecorator):
"""
YOL... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@utils@ops.py@.PATH_END.py |
{
"filename": "formatter_locator.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/visualization/wcsaxes/formatter_locator.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# This file defines the AngleFormatterLocator class which is a class that
# provides both a method for a formatter and one for a locator, for a given
# label spacing. The advantage of keeping the two connected is that we need to
# make sure that the form... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@visualization@wcsaxes@formatter_locator.py@.PATH_END.py |
{
"filename": "test_polarimetry.py",
"repo_name": "juliotux/astropop",
"repo_path": "astropop_extracted/astropop-main/tests/test_polarimetry.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# flake8: noqa: F403, F405
import pytest
import numpy as np
from astropop.polarimetry import match_pairs, estimate_dxdy, \
_compute_theta, quarterwave_model, \
halfwave_model, \
... | juliotuxREPO_NAMEastropopPATH_START.@astropop_extracted@astropop-main@tests@test_polarimetry.py@.PATH_END.py |
{
"filename": "linalg.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/lax/linalg.py",
"type": "Python"
} | # Copyright 2018 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@lax@linalg.py@.PATH_END.py |
{
"filename": "Spectroscopy.py",
"repo_name": "bretonr/Icarus",
"repo_path": "Icarus_extracted/Icarus-master/Icarus/Spectroscopy/Spectroscopy.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE
from __future__ import print_function, division
__all__ = ["Spectroscopy", "Doppler_shift", "Normalize_spectrum", "Rebin", "Process_flux", "Process_flux1"]
import sys
import glob
from ..Utils.import_modules import *
from .. import Utils
from .. import Core
... | bretonrREPO_NAMEIcarusPATH_START.@Icarus_extracted@Icarus-master@Icarus@Spectroscopy@Spectroscopy.py@.PATH_END.py |
{
"filename": "test_chunking.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/data_objects/tests/test_chunking.py",
"type": "Python"
} | from numpy.testing import assert_equal
from yt.testing import fake_random_ds
from yt.units._numpy_wrapper_functions import uconcatenate
def _get_dobjs(c):
dobjs = [
("sphere", ("center", (1.0, "unitary"))),
("sphere", ("center", (0.1, "unitary"))),
("ortho_ray", (0, (c[1], c[2]))),
... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@data_objects@tests@test_chunking.py@.PATH_END.py |
{
"filename": "test_imports.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/chat_message_histories/test_imports.py",
"type": "Python"
} | from langchain_community.chat_message_histories import __all__, _module_lookup
EXPECTED_ALL = [
"AstraDBChatMessageHistory",
"CassandraChatMessageHistory",
"ChatMessageHistory",
"CosmosDBChatMessageHistory",
"DynamoDBChatMessageHistory",
"ElasticsearchChatMessageHistory",
"FileChatMessageHi... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@chat_message_histories@test_imports.py@.PATH_END.py |
{
"filename": "fitstime.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/io/fits/fitstime.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import re
import warnings
from collections import OrderedDict, defaultdict
import numpy as np
from astropy import units as u
from astropy.coordinates import EarthLocation
from astropy.table import Column, MaskedColumn
from astropy.table.column import co... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@fits@fitstime.py@.PATH_END.py |
{
"filename": "axes_wcs.py",
"repo_name": "leejjoon/pywcsgrid2",
"repo_path": "pywcsgrid2_extracted/pywcsgrid2-main/lib/axes_wcs.py",
"type": "Python"
} | from __future__ import absolute_import
import warnings, sys
import six
import matplotlib.axes as maxes
import numpy as np
from .wcs_transforms import (WcsSky2PixelTransform,
WcsPixel2SkyTransform,
WcsSky2SkyTransform)
from matplotlib.transforms import Affine... | leejjoonREPO_NAMEpywcsgrid2PATH_START.@pywcsgrid2_extracted@pywcsgrid2-main@lib@axes_wcs.py@.PATH_END.py |
{
"filename": "test_dkl.py",
"repo_name": "handley-lab/fgivenx",
"repo_path": "fgivenx_extracted/fgivenx-master/fgivenx/test/test_dkl.py",
"type": "Python"
} | import numpy
import os
import pytest
from shutil import rmtree
from numpy.testing import assert_allclose, assert_almost_equal
from fgivenx.dkl import DKL, compute_dkl
def gaussian_dkl(mu, sig, mu_, sig_):
return numpy.log(sig_/sig) + (sig**2+(mu-mu_)**2)/2/sig_**2 - 0.5
def test_DKL():
numpy.random.seed(0)
... | handley-labREPO_NAMEfgivenxPATH_START.@fgivenx_extracted@fgivenx-master@fgivenx@test@test_dkl.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "agnwinds/python",
"repo_path": "python_extracted/python-main/py_progs/py4py/py4py/reverb/timeseries/__init__.py",
"type": "Python"
} | agnwindsREPO_NAMEpythonPATH_START.@python_extracted@python-main@py_progs@py4py@py4py@reverb@timeseries@__init__.py@.PATH_END.py | |
{
"filename": "_xsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/streamtube/_xsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="streamtube", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_ty... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@streamtube@_xsrc.py@.PATH_END.py |
{
"filename": "_autorangeoptions.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/xaxis/_autorangeoptions.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Autorangeoptions(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.xaxis"
_path_str = "layout.xaxis.autorangeoptions"
_valid_props = {
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@xaxis@_autorangeoptions.py@.PATH_END.py |
{
"filename": "test_pathology.py",
"repo_name": "joshspeagle/dynesty",
"repo_path": "dynesty_extracted/dynesty-master/tests/test_pathology.py",
"type": "Python"
} | from __future__ import (print_function, division)
import numpy as np
import dynesty
import pytest
import itertools
from utils import get_rstate, get_printing
nlive = 1000
printing = get_printing()
alpha = 1e-8
def loglike(x):
# this is 1/|x} distribution along the x axis
# it stops rising near zero at alpha
... | joshspeagleREPO_NAMEdynestyPATH_START.@dynesty_extracted@dynesty-master@tests@test_pathology.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/preprocessing/text/__init__.py",
"type": "Python"
} | """DO NOT EDIT.
This file was autogenerated. Do not edit it by hand,
since your modifications would be overwritten.
"""
from keras.src.legacy.preprocessing.text import Tokenizer
from keras.src.legacy.preprocessing.text import hashing_trick
from keras.src.legacy.preprocessing.text import one_hot
from keras.src.legacy.... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@preprocessing@text@__init__.py@.PATH_END.py |
{
"filename": "aaomega_2df.py",
"repo_name": "astropy/specutils",
"repo_path": "specutils_extracted/specutils-main/specutils/io/default_loaders/aaomega_2df.py",
"type": "Python"
} | from copy import deepcopy
import numpy as np
from astropy.nddata import VarianceUncertainty
from astropy.table import Table
import astropy.units as u
from specutils import Spectrum1D, SpectrumList
from specutils.io.registers import data_loader
from .dc_common import (
FITS_FILE_EXTS, compute_wcs_from_keys_and_va... | astropyREPO_NAMEspecutilsPATH_START.@specutils_extracted@specutils-main@specutils@io@default_loaders@aaomega_2df.py@.PATH_END.py |
{
"filename": "healpix_map.py",
"repo_name": "fraserevans/speedystar",
"repo_path": "speedystar_extracted/speedystar-main/speedystar/utils/selectionfunctions/healpix_map.py",
"type": "Python"
} | #!/usr/bin/env python
#
# healpix_map.py
# A set of HEALPix map classes.
#
# Copyright (C) 2020 Douglas Boubert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License... | fraserevansREPO_NAMEspeedystarPATH_START.@speedystar_extracted@speedystar-main@speedystar@utils@selectionfunctions@healpix_map.py@.PATH_END.py |
{
"filename": "frame.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py3/zmq/sugar/frame.py",
"type": "Python"
} | """0MQ Frame pure Python methods."""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import zmq
from zmq.backend import Frame as FrameBase
from .attrsettr import AttributeSetter
def _draft(v, feature):
zmq.error._check_version(v, feature)
if not zmq.DRAFT_API:
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py3@zmq@sugar@frame.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/_legendgrouptitle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="legendgrouptitle", parent_name="scatterpolargl", **kwargs
):
super(LegendgrouptitleValidator, self).__init__(
plotly_name=plotly_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "plot_species.py",
"repo_name": "AMReX-Astro/Castro",
"repo_path": "Castro_extracted/Castro-main/Util/scripts/plot_species.py",
"type": "Python"
} | #!/usr/bin/env python3
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from cycler import cycler
from numpy.lib import recfunctions as rfn
from diag_parser import deduplicate, read_diag_file
data = deduplicate(read_diag_file(sys.argv[1]))
mass_columns = [name for name in rfn.g... | AMReX-AstroREPO_NAMECastroPATH_START.@Castro_extracted@Castro-main@Util@scripts@plot_species.py@.PATH_END.py |
{
"filename": "utils_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/arrow/utils_test.py",
"type": "Python"
} | import pyarrow as pa
from .utils import list_unwrap
def test_list_wrap_basics():
data = ['aap', 'noot', None], None, [], ['aap', 'noot', 'mies']
string_list = pa.array(data)
values, wrapper = list_unwrap(string_list)
assert values.tolist() == string_list.flatten().tolist()
data_reversed = [['paa',... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@arrow@utils_test.py@.PATH_END.py |
{
"filename": "reduction_control.py",
"repo_name": "pyDANDIA/pyDANDIA",
"repo_path": "pyDANDIA_extracted/pyDANDIA-main/pyDANDIA/reduction_control.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 9 11:01:19 2017
@author: rstreet
"""
from os import getcwd, path, remove, mkdir
from sys import argv, exit
from sys import path as systempath
import copy
import glob
import subprocess
from datetime import datetime
from pyDANDIA import pipeline_setup
from pyDANDIA import ... | pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@pyDANDIA@reduction_control.py@.PATH_END.py |
{
"filename": "testMedialGeneratorSphereDensity2d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/Generators/testMedialGeneratorSphereDensity2d.py",
"type": "Python"
} | import mpi
from Spheral2d import *
from MultiScaleMedialGenerator import *
from SpheralTestUtilities import *
from VoronoiDistributeNodes import distributeNodes2d as distributeNodes
from siloPointmeshDump import *
commandLine(ncore = 2000,
rhocore0 = 10.0,
rhomantle0 = 5.0,
R... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Generators@testMedialGeneratorSphereDensity2d.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "astro-datalab/notebooks-latest",
"repo_path": "notebooks-latest_extracted/notebooks-latest-master/06_EPO/e-TeenAstronomyCafe/11_GravLensing_by_Galaxies/README.md",
"type": "Markdown"
} | **11 GravLensing by Galaxies**
For information about the program, please visit: http://www.teenastronomycafe.org/
If you want to test this notebook you can:
[](https://colab.research.google.com/github/astro-datalab/notebooks-latest/blob/maste... | astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@06_EPO@e-TeenAstronomyCafe@11_GravLensing_by_Galaxies@README.md@.PATH_END.py |
{
"filename": "sherlock_explorer.py",
"repo_name": "franpoz/SHERLOCK",
"repo_path": "SHERLOCK_extracted/SHERLOCK-master/experimental/sherlock_explorer.py",
"type": "Python"
} | import logging
import foldedleastsquares
import lightkurve as lk
import numpy as np
import pandas as pd
import re
import plotly.express as px
import plotly.graph_objects as go
import pylab
import wotan
from astropy.stats import sigma_clip
from lcbuilder.lcbuilder_class import LcBuilder
from lcbuilder.objectinfo.Missio... | franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@experimental@sherlock_explorer.py@.PATH_END.py |
{
"filename": "_opacity.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermap/cluster/_opacity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacityValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="opacity", parent_name="scattermap.cluster", **kwargs
):
super(OpacityValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermap@cluster@_opacity.py@.PATH_END.py |
{
"filename": "single.ipynb",
"repo_name": "lgrcia/nuance",
"repo_path": "nuance_extracted/nuance-main/docs/notebooks/single.ipynb",
"type": "Jupyter Notebook"
} | # Single transit search
In this notebook, we use `nuance` to search for a single transit.
```python
# in order to run on all CPUs
import os
import jax
jax.config.update("jax_enable_x64", True)
os.environ["XLA_FLAGS"] = f"--xla_force_host_platform_device_count={os.cpu_count()}"
```
## Generating the data
Let's gen... | lgrciaREPO_NAMEnuancePATH_START.@nuance_extracted@nuance-main@docs@notebooks@single.ipynb@.PATH_END.py |
{
"filename": "_cmin.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/line/_cmin.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CminValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="cmin", parent_name="scatter3d.marker.line", **kwargs
):
super(CminValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@line@_cmin.py@.PATH_END.py |
{
"filename": "VoronoiRedistributeNodes.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/Distributed/VoronoiRedistributeNodes.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# VoronoiRedistributeNodes
#-------------------------------------------------------------------------------
from PYB11Generator import *
from RedistributeNodes import *
@PYB11template("Dimension")
class VoronoiRedistributeNodes(Redistribu... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Distributed@VoronoiRedistributeNodes.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/Sandbox/fiberassign_tests/scripts/__init__.py",
"type": "Python"
} | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@fiberassign_tests@scripts@__init__.py@.PATH_END.py | |
{
"filename": "specpolcombine.py",
"repo_name": "saltastro/polsalt",
"repo_path": "polsalt_extracted/polsalt-master/polsalt/specpolcombine.py",
"type": "Python"
} | #! /usr/bin/env python
"""
specpolcombine
Combine stokes.fits data
"""
import os, sys, glob, inspect
import numpy as np
import pyfits
from pyraf import iraf
from iraf import pysalt
from saltobslog import obslog
from scrunch1d import scrunch1d
from specpolview import viewstokes
np.set_printoptions(threshold=np.nan... | saltastroREPO_NAMEpolsaltPATH_START.@polsalt_extracted@polsalt-master@polsalt@specpolcombine.py@.PATH_END.py |
{
"filename": "cuda_svd_cusolver_gesvd.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/internal_test_util/export_back_compat_test_data/cuda_svd_cusolver_gesvd.py",
"type": "Python"
} | # Copyright 2024 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@internal_test_util@export_back_compat_test_data@cuda_svd_cusolver_gesvd.py@.PATH_END.py |
{
"filename": "_nticks.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_nticks.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NticksValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="nticks", parent_name="parcoords.line.colorbar", **kwargs
):
super(NticksValidator, self).__init__(
plotly_name=plotly_name,
parent_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_nticks.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "rehamelkholy/StellarAL",
"repo_path": "StellarAL_extracted/StellarAL-main/utils.py",
"type": "Python"
} | ######################
### Load Libraries ###
######################
import numpy as np
import pickle as pkl
import pandas as pd
import matplotlib.pyplot as plt
from IPython.display import clear_output
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from sklearn.preprocessing i... | rehamelkholyREPO_NAMEStellarALPATH_START.@StellarAL_extracted@StellarAL-main@utils.py@.PATH_END.py |
{
"filename": "inheritance_diagram.py",
"repo_name": "pyspeckit/pyspeckit",
"repo_path": "pyspeckit_extracted/pyspeckit-master/docs/sphinxext/inheritance_diagram.py",
"type": "Python"
} | """
Defines a docutils directive for inserting inheritance diagrams.
Provide the directive with one or more classes or modules (separated
by whitespace). For modules, all of the classes in that module will
be used.
Example::
Given the following classes:
class A: pass
class B(A): pass
class C(A): pass
... | pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@docs@sphinxext@inheritance_diagram.py@.PATH_END.py |
{
"filename": "inference.py",
"repo_name": "GCArullo/bayRing",
"repo_path": "bayRing_extracted/bayRing-main/bayRing/inference.py",
"type": "Python"
} | import itertools as it, numpy as np, os, pandas as pd, traceback
from scipy.optimize import least_squares as l_s
try: import configparser
except ImportError: import ConfigParser as configparser
from cpnest.nest2pos import draw_posterior, compute_weights
import cpnest, cpnest.model
import pyRing.utils ... | GCArulloREPO_NAMEbayRingPATH_START.@bayRing_extracted@bayRing-main@bayRing@inference.py@.PATH_END.py |
{
"filename": "FortesFit_ModelManagement.py",
"repo_name": "vikalibrate/FortesFit",
"repo_path": "FortesFit_extracted/FortesFit-master/fortesfit/FortesFit_ModelManagement.py",
"type": "Python"
} | import sys
import os
import shutil
import glob
import importlib.util
import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate
from astropy.table import Table
import h5py
from fortesfit import FortesFit_Settings
from fortesfit import FortesFit_Filters
""" A module that handles model registratio... | vikalibrateREPO_NAMEFortesFitPATH_START.@FortesFit_extracted@FortesFit-master@fortesfit@FortesFit_ModelManagement.py@.PATH_END.py |
{
"filename": "cambPlots.py",
"repo_name": "CosmicFish/CosmicFish",
"repo_path": "CosmicFish_extracted/CosmicFish-master/camb/mgcamb/python/cambPlots.py",
"type": "Python"
} | # Handy routines from plotting CAMB/CAMB_sources outputs
# See covCompare.py for sample script to plot outs
from pylab import *
import numpy as np
def_colors = ['b', 'r', 'm', 'c', 'g', 'k', 'y', '0.25', '0.75']
def saveCls(f, ls, vecs):
np.savetxt(f, hstack([ls.reshape(-1, 1) ] + [x.reshape(-1, 1) for x in vecs... | CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@camb@mgcamb@python@cambPlots.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rapidsai/cuml",
"repo_path": "cuml_extracted/cuml-main/python/cuml/cuml/dask/neighbors/__init__.py",
"type": "Python"
} | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | rapidsaiREPO_NAMEcumlPATH_START.@cuml_extracted@cuml-main@python@cuml@cuml@dask@neighbors@__init__.py@.PATH_END.py |
{
"filename": "birch_murnaghan_4th.py",
"repo_name": "CaymanUnterborn/ExoPlex",
"repo_path": "ExoPlex_extracted/ExoPlex-master/ExoPlex/burnman/eos/birch_murnaghan_4th.py",
"type": "Python"
} | from __future__ import absolute_import
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU
# GPL v2 or later.
import numpy as np
import scipy.optimize as opt
from . import equation_of_sta... | CaymanUnterbornREPO_NAMEExoPlexPATH_START.@ExoPlex_extracted@ExoPlex-master@ExoPlex@burnman@eos@birch_murnaghan_4th.py@.PATH_END.py |
{
"filename": "ex_tracing.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/test/management/ex_tracing.py",
"type": "Python"
} | # Copyright (c) typedef int GmbH, licensed under The MIT License (MIT)
import pprint
import asyncio
from crossbar.shell import client
async def main(session):
"""
Iterate over all nodes, and all workers on each nodes to retrieve and
print worker information. then exit.
"""
# stop currently runni... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@management@ex_tracing.py@.PATH_END.py |
{
"filename": "run.py",
"repo_name": "PoulinV/AxiCLASS",
"repo_path": "AxiCLASS_extracted/AxiCLASS-master/external_fz/models/simple_mix/run.py",
"type": "Python"
} | '''
This model has two input parameters:
1) mass (between 50 and 100 GeV)
2) the relative contribution of muons as primaries
'''
import numpy as np
import itertools
import dill
import os
import sys
if os.environ['DARKAGES_BASE']:
sys.path.insert(0, os.environ['DARKAGES_BASE'] )
import DarkAges
from DarkAges.... | PoulinVREPO_NAMEAxiCLASSPATH_START.@AxiCLASS_extracted@AxiCLASS-master@external_fz@models@simple_mix@run.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/colorbar/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showtickprefix", parent_name="heatmap.colorbar", **kwargs
):
super(ShowtickprefixValidator, self).__init__(
plotly_name=plotly_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@colorbar@_showtickprefix.py@.PATH_END.py |
{
"filename": "pulsemodels.py",
"repo_name": "fjankowsk/scatfit",
"repo_path": "scatfit_extracted/scatfit-master/scatfit/pulsemodels.py",
"type": "Python"
} | #
# Pulse models.
# 2022 Fabian Jankowski
#
import numpy as np
from scipy import signal
try:
from scatfit.pulsemodels_cython import (
gaussian_normed,
scattered_gaussian_pulse,
bandintegrated_model,
)
except ImportError:
print(
"Could not import Cython pulse model imple... | fjankowskREPO_NAMEscatfitPATH_START.@scatfit_extracted@scatfit-master@scatfit@pulsemodels.py@.PATH_END.py |
{
"filename": "test_public_api.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/agents/test_public_api.py",
"type": "Python"
} | from langchain.agents import __all__ as agents_all
_EXPECTED = [
"Agent",
"AgentExecutor",
"AgentExecutorIterator",
"AgentOutputParser",
"AgentType",
"BaseMultiActionAgent",
"BaseSingleActionAgent",
"ConversationalAgent",
"ConversationalChatAgent",
"LLMSingleActionAgent",
"M... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@agents@test_public_api.py@.PATH_END.py |
{
"filename": "cam_complex_sfr_tutorial.ipynb",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/docs/notebooks/cam_modeling/cam_complex_sfr_tutorial.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
```
```python
import numpy as np
from matplotlib import pyplot as plt
```
## Generate powerlaw distributed stellar mass
```python
from scipy.stats import powerlaw
ngals_tot = int(1e5)
slope = 2
log_mstar = 3*(1-powerlaw.rvs(slope, size=ngals_tot)) + 9
galaxy_mstar = 10**log_mstar
fig... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@docs@notebooks@cam_modeling@cam_complex_sfr_tutorial.ipynb@.PATH_END.py |
{
"filename": "_tickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickprefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="tickprefix",
parent_name="scatterpolar.marker.colorbar",
**kwargs,
):
super(TickprefixValidator, self).__init__(
plo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@marker@colorbar@_tickprefix.py@.PATH_END.py |
{
"filename": "SpectroReduction.py",
"repo_name": "avigan/SPHERE",
"repo_path": "SPHERE_extracted/SPHERE-master/sphere/IRDIS/SpectroReduction.py",
"type": "Python"
} | import pandas as pd
import subprocess
import logging
import numpy as np
import shutil
import matplotlib
import matplotlib.pyplot as plt
import configparser
import collections
from pathlib import Path
from astropy.io import fits
from matplotlib.backends.backend_pdf import PdfPages
import sphere
import sphere.utils as ... | aviganREPO_NAMESPHEREPATH_START.@SPHERE_extracted@SPHERE-master@sphere@IRDIS@SpectroReduction.py@.PATH_END.py |
{
"filename": "_alignsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/hoverlabel/_alignsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="alignsrc", parent_name="treemap.hoverlabel", **kwargs
):
super(AlignsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@hoverlabel@_alignsrc.py@.PATH_END.py |
{
"filename": "lower_cholesky_affine.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/distributions/transforms/lower_cholesky_affine.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import torch
from torch.distributions.transforms import Transform
from .. import constraints
from ..util import copy_docs_from
@copy_docs_from(Transform)
class LowerCholeskyAffine(Transform):
"""
A bijection of the form,... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@distributions@transforms@lower_cholesky_affine.py@.PATH_END.py |
{
"filename": "validation_class.py",
"repo_name": "yaojian95/ForSEplus",
"repo_path": "ForSEplus_extracted/ForSEplus-main/src/ForSEplus/validation_class.py",
"type": "Python"
} | import numpy as np
import healpy as hp
from .utility import cl_nmt, plot_spectra, cl_anafast
import matplotlib.pyplot as plt
class validate_3amin(object):
def __init__(self, maps_80amin, input_3amin, poltens_3amin):
'''
maps only contain QU
'''
self.maps_80amin = maps_... | yaojian95REPO_NAMEForSEplusPATH_START.@ForSEplus_extracted@ForSEplus-main@src@ForSEplus@validation_class.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.