metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "_layer.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/mapbox/_layer.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Layer(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox"
_path_str = "layout.mapbox.layer"
_valid_props = {
"below",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@mapbox@_layer.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/cone/colorbar/tickfont/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="cone.colorbar.tickfont", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@cone@colorbar@tickfont@_variant.py@.PATH_END.py |
{
"filename": "contrast_tools.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/sandbox/stats/contrast_tools.py",
"type": "Python"
} | '''functions to work with contrasts for multiple tests
contrast matrices for comparing all pairs, all levels to reference level, ...
extension to 2-way groups in progress
TwoWay: class for bringing two-way analysis together and try out
various helper functions
Idea for second part
- get all transformation matrices ... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@sandbox@stats@contrast_tools.py@.PATH_END.py |
{
"filename": "test_params.py",
"repo_name": "cpinte/pymcfost",
"repo_path": "pymcfost_extracted/pymcfost-master/tests/test_params.py",
"type": "Python"
} | import pytest
from pymcfost.parameters import _word_to_bool
true_strings = ["True", ".True.", "TRUE", ".TRUE.", "true", ".true.", "t", ".t.", "T", ".T."]
@pytest.mark.parametrize("string", true_strings)
def test_read_true_string(string):
assert _word_to_bool(string)
false_strings = ["False", ".False.", "FALSE", ... | cpinteREPO_NAMEpymcfostPATH_START.@pymcfost_extracted@pymcfost-master@tests@test_params.py@.PATH_END.py |
{
"filename": "_marker.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/_marker.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="marker", parent_name="funnel", **kwargs):
super(MarkerValidator, 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.py@.PATH_END.py |
{
"filename": "dashline.md",
"repo_name": "jbroll/starbase",
"repo_path": "starbase_extracted/starbase-master/docs/dashline.md",
"type": "Markdown"
} |
### `dashline` - output the dashline of a starbase data table.
SYNOPSYS
--------
```
dashline [-i input] [-o output] [-t ~template~] [column]
```
DESCRIPTION
-----------
`dashline` prints the dashed line that separates the header and data portions
of a starbase data table.
OPTIONS
-------
All of the opt... | jbrollREPO_NAMEstarbasePATH_START.@starbase_extracted@starbase-master@docs@dashline.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "lgrcia/prose",
"repo_path": "prose_extracted/prose-main/prose/blocks/__init__.py",
"type": "Python"
} | from prose.core.block import Block
from .alignment import *
from .catalogs import *
from .centroids import *
from .detection import *
from .geometry import *
from .photometry import *
from .psf import *
from .utils import *
from .visualization import *
| lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@prose@blocks@__init__.py@.PATH_END.py |
{
"filename": "fno.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/models/fno.py",
"type": "Python"
} | from functools import partialmethod
from typing import Tuple, List, Union
Number = Union[float, int]
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..layers.embeddings import GridEmbeddingND, GridEmbedding2D
from ..layers.spectral_convolution import SpectralConv
from ..layers.padding import ... | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@models@fno.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/model/transform/__init__.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@model@transform@__init__.py@.PATH_END.py |
{
"filename": "sotl2_jax.ipynb",
"repo_name": "HajimeKawahara/sot",
"repo_path": "sot_extracted/sot-master/tutorial/sotl2_jax.ipynb",
"type": "Jupyter Notebook"
} | ## SOT JAX using L2
This code retrieves a surface map from reflection integrated light curve of an Earth analog.
See
- Kawahara & Fujii 2010 (http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1004.5152)
- Kawahara & Fujii 2011 (http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1106.0136)
- Fujii & Kawahara 2012 (ht... | HajimeKawaharaREPO_NAMEsotPATH_START.@sot_extracted@sot-master@tutorial@sotl2_jax.ipynb@.PATH_END.py |
{
"filename": "test_rss.py",
"repo_name": "sdss/marvin",
"repo_path": "marvin_extracted/marvin-main/tests/tools/test_rss.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: Brian Cherinka, José Sánchez-Gallego, and Brett Andrews
# @Date: 2018-07-24
# @Filename: test_rss.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
#
# @Last modified by: José Sánchez-Gallego (gallegoj@uw.edu)
# @Last modified time: ... | sdssREPO_NAMEmarvinPATH_START.@marvin_extracted@marvin-main@tests@tools@test_rss.py@.PATH_END.py |
{
"filename": "_ticktext.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_ticktext.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self, plotly_name="ticktext", parent_name="scatter.marker.colorbar", **kwargs
):
super(TicktextValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@_ticktext.py@.PATH_END.py |
{
"filename": "test_roman.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/tests/test_roman.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@test_roman.py@.PATH_END.py |
{
"filename": "how_to_run_TRES_from_AMUSE.py",
"repo_name": "amusecode/TRES",
"repo_path": "TRES_extracted/TRES-main/developer/how_to_run_TRES_from_AMUSE.py",
"type": "Python"
} | # the default method to run TRES is described in README.md
# in some cases you may want to run TRES from within AMUSE
# aka to run TRES as a sort of community code or to allow for more flexibility
# this document provides a few examples of how to do this
import numpy as np
import matplotlib.pyplot as plt
from amuse.d... | amusecodeREPO_NAMETRESPATH_START.@TRES_extracted@TRES-main@developer@how_to_run_TRES_from_AMUSE.py@.PATH_END.py |
{
"filename": "model.py",
"repo_name": "triton-inference-server/server",
"repo_path": "server_extracted/server-main/qa/python_models/model_init_del/model.py",
"type": "Python"
} | # Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of con... | triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@python_models@model_init_del@model.py@.PATH_END.py |
{
"filename": "_labelfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Labelfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram2dcontour.contours"
_path_str = "histogram2dcontour.contours.labelfont"
_valid_p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram2dcontour@contours@_labelfont.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "samb8s/PsrPopPy",
"repo_path": "PsrPopPy_extracted/PsrPopPy-master/docs/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# PsrPopPy documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 22 16:36:12 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | samb8sREPO_NAMEPsrPopPyPATH_START.@PsrPopPy_extracted@PsrPopPy-master@docs@conf.py@.PATH_END.py |
{
"filename": "micro_lensing.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Cosmo/micro_lensing.py",
"type": "Python"
} | import numpy as np
from lenstronomy.Util import constants
# routines to conveniently compute micro-lensing events
def einstein_radius(mass, d_l, d_s):
"""Einstein radius for a given point mass and distances to lens and source.
:param mass: point source mass [M_sun]
:param d_l: distance to lens [pc]
... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Cosmo@micro_lensing.py@.PATH_END.py |
{
"filename": "lens_reconstruction.py",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/example/flatlens/lens_reconstruction.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# ### A simple lensing reconstruction in flat sky
# In[1]:
import numpy as np
import tqdm
import basic
import flatsky
import cmb
import binning
from matplotlib.pyplot import *
# In[2]:
# parameters
Tcmb = 2.72e6
lmax = 3000
rL = [100,2500]
oL = [2,3000]
nx, ny = 512, 512
D ... | toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@example@flatlens@lens_reconstruction.py@.PATH_END.py |
{
"filename": "graph.py",
"repo_name": "jiayindong/obliquity",
"repo_path": "obliquity_extracted/obliquity-main/src/scripts/graph.py",
"type": "Python"
} | import os
from pathlib import Path
os.environ["PATH"] += os.pathsep + str(Path.home() / "bin")
import paths
import sys
import subprocess
from matplotlib import rc
rc('font', **{'family':'sans-serif'})
rc('text', usetex=True)
rc('text.latex', preamble=r'\usepackage{physics}')
import daft
import daft
pgm = daft.PGM... | jiayindongREPO_NAMEobliquityPATH_START.@obliquity_extracted@obliquity-main@src@scripts@graph.py@.PATH_END.py |
{
"filename": "_error_x.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatter3d/_error_x.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ErrorX(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter3d"
_path_str = "scatter3d.error_x"
_valid_props = {
"array",
"arraym... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatter3d@_error_x.py@.PATH_END.py |
{
"filename": "environment.py",
"repo_name": "lucabaldini/ixpeobssim",
"repo_path": "ixpeobssim_extracted/ixpeobssim-main/ixpeobssim/utils/environment.py",
"type": "Python"
} | # Copyright (C) 2022, the ixpeobssim team.
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distrib... | lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@ixpeobssim@utils@environment.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "barentsen/dave",
"repo_path": "dave_extracted/dave-master/vetting/__init__.py",
"type": "Python"
} | barentsenREPO_NAMEdavePATH_START.@dave_extracted@dave-master@vetting@__init__.py@.PATH_END.py | |
{
"filename": "test_json.py",
"repo_name": "grahambell/pymoc",
"repo_path": "pymoc_extracted/pymoc-main/test/test_json.py",
"type": "Python"
} | # Copyright (C) 2014 Science and Technology Facilities Council.
# Copyright (C) 2017-2024 East Asian Observatory.
#
# 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 3 of the Licens... | grahambellREPO_NAMEpymocPATH_START.@pymoc_extracted@pymoc-main@test@test_json.py@.PATH_END.py |
{
"filename": "configurations_test.py",
"repo_name": "google/flax",
"repo_path": "flax_extracted/flax-main/tests/configurations_test.py",
"type": "Python"
} | # Copyright 2024 The Flax 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 in wri... | googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@tests@configurations_test.py@.PATH_END.py |
{
"filename": "TT_unbinned.py",
"repo_name": "ggalloni/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/likelihoods/planck_2018_highl_plik/TT_unbinned.py",
"type": "Python"
} | from cobaya.likelihoods.base_classes import Planck2018Clik
class TT_unbinned(Planck2018Clik):
r"""
Unbinned high-$\ell$ temperature-only \textsc{plik} likelihood of Planck's 2018 data
release \cite{Aghanim:2019ame}.
"""
pass
| ggalloniREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@likelihoods@planck_2018_highl_plik@TT_unbinned.py@.PATH_END.py |
{
"filename": "header.py",
"repo_name": "n-claes/legolas",
"repo_path": "legolas_extracted/legolas-master/post_processing/pylbo/utilities/datfiles/header.py",
"type": "Python"
} | from __future__ import annotations
from typing import Any, BinaryIO
import numpy as np
from pylbo._version import VersionHandler
from pylbo.utilities.datfiles.istream_reader import (
SIZE_COMPLEX,
SIZE_DOUBLE,
SIZE_INT,
read_boolean_from_istream,
read_complex_from_istream,
read_float_from_istr... | n-claesREPO_NAMElegolasPATH_START.@legolas_extracted@legolas-master@post_processing@pylbo@utilities@datfiles@header.py@.PATH_END.py |
{
"filename": "texture.py",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/skimage/feature/texture.py",
"type": "Python"
} | """
Methods to characterize image textures.
"""
import warnings
import numpy as np
from .._shared.utils import check_nD
from ..color import gray2rgb
from ..util import img_as_float
from ._texture import _glcm_loop, _local_binary_pattern, _multiblock_lbp
def graycomatrix(image, distances, angles, levels=None, symme... | scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@feature@texture.py@.PATH_END.py |
{
"filename": "_tickwidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/_tickwidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="tickwidth", parent_name="parcoords.line.colorbar", **kwargs
):
super(TickwidthValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@_tickwidth.py@.PATH_END.py |
{
"filename": "wshow.py",
"repo_name": "msiebert1/UCSC_spectral_pipeline",
"repo_path": "UCSC_spectral_pipeline_extracted/UCSC_spectral_pipeline-master/spectral_reduction/tmath/wombat/wshow.py",
"type": "Python"
} | def wshow():
import matplotlib.pyplot as plt
# plt.ioff()
wm=plt.get_current_fig_manager()
blah=wm.window.attributes('-topmost',1)
blah=wm.window.attributes('-topmost',0)
# plt.ion()
return
| msiebert1REPO_NAMEUCSC_spectral_pipelinePATH_START.@UCSC_spectral_pipeline_extracted@UCSC_spectral_pipeline-master@spectral_reduction@tmath@wombat@wshow.py@.PATH_END.py |
{
"filename": "WriteRatesToCSV_EM.py",
"repo_name": "FloorBroekgaarden/Double-Compact-Object-Mergers",
"repo_path": "Double-Compact-Object-Mergers_extracted/Double-Compact-Object-Mergers-main/otherCode/WriteRatesToCSV_EM.py",
"type": "Python"
} | # from __future__ import print_function
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import h5py as h5
import time
import sys
import copy
#Quick fudge to make import from ../Scripts work
import sys
sys.path.append('../Scripts')
import string
# import ClassCosmicIntegrator as CI #... | FloorBroekgaardenREPO_NAMEDouble-Compact-Object-MergersPATH_START.@Double-Compact-Object-Mergers_extracted@Double-Compact-Object-Mergers-main@otherCode@WriteRatesToCSV_EM.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "PrincetonUniversity/athena",
"repo_path": "athena_extracted/athena-master/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for Athena++
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to ha... | PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "_sizesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="sizesrc",
parent_name="densitymapbox.hoverlabel.font",
**kwargs,
):
super(SizesrcValidator, self).__init__(
plotly_name=pl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@hoverlabel@font@_sizesrc.py@.PATH_END.py |
{
"filename": "spawn.py",
"repo_name": "jdswinbank/Comet",
"repo_path": "Comet_extracted/Comet-master/comet/handler/spawn.py",
"type": "Python"
} | # Comet VOEvent Broker.
# Event handler to spawn an external command & supply a VOEvent on stdin.
import os
from twisted.internet import reactor
from twisted.internet import defer
from twisted.internet.protocol import ProcessProtocol
from zope.interface import implementer
from comet.icomet import IHandler
import com... | jdswinbankREPO_NAMECometPATH_START.@Comet_extracted@Comet-master@comet@handler@spawn.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/core/__init__.py",
"type": "Python"
} | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@core@__init__.py@.PATH_END.py | |
{
"filename": "_opensrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/candlestick/_opensrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="opensrc", parent_name="candlestick", **kwargs):
super(OpensrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@candlestick@_opensrc.py@.PATH_END.py |
{
"filename": "pickle_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/tests/pickle_test.py",
"type": "Python"
} | import pytest
import pickle
import numpy as np
import vaex
N_rows = 1024*4
def test_pickle_roundtrip(df_local):
df = df_local
data = pickle.dumps(df)
df2 = pickle.loads(data)
if 'obj' in df:
# comparison fails for obj
df = df.drop('obj')
df2 = df2.drop('obj')
df['x'].tolist... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@pickle_test.py@.PATH_END.py |
{
"filename": "_legend.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/_legend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="legend", parent_name="barpolar", **kwargs):
super(LegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@_legend.py@.PATH_END.py |
{
"filename": "minimax.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/llms/minimax.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import Minimax
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@llms@minimax.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/api/ops/numpy/__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.ops.numpy import abs
from keras.src.ops.numpy import absolute
from keras.src.ops.numpy import add
from keras.src.ops.numpy import all
from keras.src.ops.numpy import amax
from keras.s... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@ops@numpy@__init__.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/hoverlabel/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="scatter.hoverlabel", **kwargs):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/io/harwell_boeing/tests/__init__.py",
"type": "Python"
} | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@io@harwell_boeing@tests@__init__.py@.PATH_END.py | |
{
"filename": "compare_results.py",
"repo_name": "spacetelescope/hst_cosmic_rays",
"repo_path": "hst_cosmic_rays_extracted/hst_cosmic_rays-master/analyzing_cr_rejection/compare_results.py",
"type": "Python"
} | import argparse
from collections import defaultdict
import glob
import json
import logging
import os
_MOD_DIR = os.path.dirname(os.path.abspath(__file__))
_BASE = os.path.join('/', *_MOD_DIR.split('/')[:-1])
import shutil
import sys
sys.path.append(os.path.join(_BASE, 'pipeline'))
import warnings
warnings.simplefilte... | spacetelescopeREPO_NAMEhst_cosmic_raysPATH_START.@hst_cosmic_rays_extracted@hst_cosmic_rays-master@analyzing_cr_rejection@compare_results.py@.PATH_END.py |
{
"filename": "plot.py",
"repo_name": "lgrcia/paper-nuance",
"repo_path": "paper-nuance_extracted/paper-nuance-main/workflows/benchmark/scripts/plot.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import numpy as np
import yaml
plt.figure(figsize=(8, 2.5))
nuance = np.array([yaml.safe_load(open(f))["linear"] for f in snakemake.input.nuance])
bls = np.array([yaml.safe_load(open(f))["biweight"] for f in snakemake.input.bls])
points = np.array(snakemake.params.points)
plt.subplot(... | lgrciaREPO_NAMEpaper-nuancePATH_START.@paper-nuance_extracted@paper-nuance-main@workflows@benchmark@scripts@plot.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/marker/colorbar/tickfont/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="variant",
parent_name="funnel.marker.colorbar.tickfont",
**kwargs,
):
super(VariantValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@marker@colorbar@tickfont@_variant.py@.PATH_END.py |
{
"filename": "test_representation.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/coordinates/tests/test_representation.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from copy import deepcopy
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
from astropy import units as u
from astropy.coordinates import Angle, Latitude, Longitude
from astropy.coordinates.distances import ... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@coordinates@tests@test_representation.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/fits/__init__.py",
"type": "Python"
} | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@fits@__init__.py@.PATH_END.py | |
{
"filename": "test_parser_asdf.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/imviz/tests/test_parser_asdf.py",
"type": "Python"
} | import asdf
import numpy as np
import astropy.units as u
from jdaviz.configs.imviz.tests.utils import create_example_gwcs
def test_asdf_not_rdm(imviz_helper):
# test support for ASDF files that look like Roman files
# for users with or without roman_datamodels:
in_unit = u.Jy
in_data = np.arange(16, ... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@imviz@tests@test_parser_asdf.py@.PATH_END.py |
{
"filename": "mpfit.py",
"repo_name": "PaulKuin/uvotpy",
"repo_path": "uvotpy_extracted/uvotpy-master/uvotpy/mpfit.py",
"type": "Python"
} | """
Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1.
AUTHORS
The original version of this software, called LMFIT, was written in FORTRAN
as part of the MINPACK-1 package by XXX.
Craig Markwardt converted the FORTRAN code to IDL. The information for the
IDL version is:
... | PaulKuinREPO_NAMEuvotpyPATH_START.@uvotpy_extracted@uvotpy-master@uvotpy@mpfit.py@.PATH_END.py |
{
"filename": "abscal_inspect_2458043.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458043.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Absolute Calibration Nightly Notebook
**Josh Dillon**, Last Revised 9/23/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal, abscal, utils
from hera_cal.smooth_cal import build_time_blacklist
from hera_qm.metrics_io import load_metri... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458043.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "nanograv/PINT",
"repo_path": "PINT_extracted/PINT-master/src/pint/templates/__init__.py",
"type": "Python"
} | nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@templates@__init__.py@.PATH_END.py | |
{
"filename": "conf.py",
"repo_name": "apertif/apercal",
"repo_path": "apercal_extracted/apercal-master/docs/source/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | apertifREPO_NAMEapercalPATH_START.@apercal_extracted@apercal-master@docs@source@conf.py@.PATH_END.py |
{
"filename": "test_funcs.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/tests/test_funcs.py",
"type": "Python"
} | import os
from nose.tools import assert_raises
from numpy.testing import assert_equal
from yt.funcs import (
just_one,
levenshtein_distance,
simple_download_file,
validate_axis,
validate_center,
)
from yt.testing import fake_amr_ds
from yt.units import YTArray, YTQuantity
def test_validate_axis(... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@tests@test_funcs.py@.PATH_END.py |
{
"filename": "_opacity.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/selected/marker/_opacity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacityValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="opacity",
parent_name="scattermapbox.selected.marker",
**kwargs
):
super(OpacityValidator, self).__init__(
plotly_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@selected@marker@_opacity.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "kammerje/spaceKLIP",
"repo_path": "spaceKLIP_extracted/spaceKLIP-main/spaceKLIP/resources/PCEs/MIRI/__init__.py",
"type": "Python"
} | kammerjeREPO_NAMEspaceKLIPPATH_START.@spaceKLIP_extracted@spaceKLIP-main@spaceKLIP@resources@PCEs@MIRI@__init__.py@.PATH_END.py | |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/slider/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="y", parent_name="layout.slider", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@slider@_y.py@.PATH_END.py |
{
"filename": "test_sort_index.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/methods/test_sort_index.py",
"type": "Python"
} | import numpy as np
import pytest
import pandas as pd
from pandas import (
CategoricalDtype,
CategoricalIndex,
DataFrame,
IntervalIndex,
MultiIndex,
RangeIndex,
Series,
Timestamp,
)
import pandas._testing as tm
class TestDataFrameSortIndex:
def test_sort_index_and_reconstruction_do... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@methods@test_sort_index.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "microsoft/vscode",
"repo_path": "vscode_extracted/vscode-main/extensions/simple-browser/README.md",
"type": "Markdown"
} | # Simple Browser
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
Provides a very basic browser preview using an iframe embedded in a [webviewW](). This extension is primarily meant to be used by other extensions for showing simple web content.
| microsoftREPO_NAMEvscodePATH_START.@vscode_extracted@vscode-main@extensions@simple-browser@README.md@.PATH_END.py |
{
"filename": "derivative_util.py",
"repo_name": "lenstronomy/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/Util/derivative_util.py",
"type": "Python"
} | """Routines to compute derivatives of spherical functions."""
import numpy as np
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
def d_r_dx(x, y):
"""Derivative of r with respect to x :param x:
:param y:
:return:
"""
return x / np.sqrt(x**2 + y**2)
@ex... | lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@Util@derivative_util.py@.PATH_END.py |
{
"filename": "inter_rater.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/stats/inter_rater.py",
"type": "Python"
} | """Inter Rater Agreement
contains
--------
fleiss_kappa
cohens_kappa
aggregate_raters:
helper function to get data into fleiss_kappa format
to_table:
helper function to create contingency table, can be used for cohens_kappa
Created on Thu Dec 06 22:57:56 2012
Author: Josef Perktold
License: BSD-3
References... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@stats@inter_rater.py@.PATH_END.py |
{
"filename": "test_INS.py",
"repo_name": "mwilensky768/SSINS",
"repo_path": "SSINS_extracted/SSINS-master/SSINS/tests/test_INS.py",
"type": "Python"
} | from SSINS import INS, SS
from SSINS.data import DATA_PATH
import numpy as np
import os
import pytest
from pyuvdata import UVData, UVFlag
from datetime import datetime
@pytest.fixture
def mix_obs():
return "1061312640_mix"
@pytest.fixture
def mix_file(mix_obs):
return os.path.join(DATA_PATH, f"{mix_obs}.uvfit... | mwilensky768REPO_NAMESSINSPATH_START.@SSINS_extracted@SSINS-master@SSINS@tests@test_INS.py@.PATH_END.py |
{
"filename": "fibonacci.py",
"repo_name": "carronj/lenspyx",
"repo_path": "lenspyx_extracted/lenspyx-master/lenspyx/tests/fibonacci.py",
"type": "Python"
} | import numpy as np
from lenspyx.utils_hp import synalm
from lenspyx.utils import timer
from lenspyx.tests.helper import cls_unl
from ducc0.sht.experimental import synthesis_general
def syn_fibo(N:int, lmax:int, nthreads=4):
"""Number of points is P = 2N + 1"""
npix = 2 * N + 1
Psi = (1 + np.sqrt(5.))/2
... | carronjREPO_NAMElenspyxPATH_START.@lenspyx_extracted@lenspyx-master@lenspyx@tests@fibonacci.py@.PATH_END.py |
{
"filename": "test_atomic_remote.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/atomic/tests/test_atomic_remote.py",
"type": "Python"
} | import numpy as np
import pytest
from bs4 import BeautifulSoup
from astropy import units as u
from astropy.table import Table
from ...atomic import AtomicLineList
pytestmark = pytest.mark.remote_data
def test_default_form_values():
default_response = AtomicLineList._request(
method="GET", url=AtomicLine... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@atomic@tests@test_atomic_remote.py@.PATH_END.py |
{
"filename": "test_hawc.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/gammapy/catalog/tests/test_hawc.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.utils.data import get_pkg_data_filename
from gammapy.catalog import SourceCatalog2HWC
from gammapy.catalog.hawc import SourceCatalog3HWC
from gammapy.modeling.mo... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@catalog@tests@test_hawc.py@.PATH_END.py |
{
"filename": "PN-MOmega.ipynb",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/NRPyPN/PN-MOmega.ipynb",
"type": "Jupyter Notebook"
} | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-59152712-8');
</script>
# $M\Omega$, the orbital angular velocity, up to and includ... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@NRPyPN@PN-MOmega.ipynb@.PATH_END.py |
{
"filename": "get_flux_mass_conv.py",
"repo_name": "sbetti22/ImSeg",
"repo_path": "ImSeg_extracted/ImSeg-master/get_flux_mass_conv.py",
"type": "Python"
} | ## written by Sarah Betti 2019
## updated 5 November 2019
import numpy as np
from astropy import units as u
from astropy import constants as const
def get_flux_mass_conv(pcdist,T, wavelength=1100):
'''
PURPOSE
--------
Return mass conversion factor for total flux in Jy.
Parameters
-----... | sbetti22REPO_NAMEImSegPATH_START.@ImSeg_extracted@ImSeg-master@get_flux_mass_conv.py@.PATH_END.py |
{
"filename": "run_node.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/schema/nodes/run_node.py",
"type": "Python"
} | import datetime
from typing import TYPE_CHECKING, Annotated, Optional, cast
import strawberry
from sqlalchemy import select
from strawberry.types import Info
from nextline_rdb.db import DB
from nextline_rdb.models import Prompt, Run, Stdout, Trace, TraceCall
from nextline_rdb.pagination import SortField
from ..pagin... | simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@schema@nodes@run_node.py@.PATH_END.py |
{
"filename": "parameter.py",
"repo_name": "lmfit/lmfit-py",
"repo_path": "lmfit-py_extracted/lmfit-py-master/lmfit/parameter.py",
"type": "Python"
} | """Parameter class."""
from copy import deepcopy
import json
from asteval import Interpreter, get_ast_names, valid_symbol_name
from numpy import arcsin, array, cos, inf, isclose, sin, sqrt
from scipy.linalg import LinAlgError
import scipy.special
from uncertainties import correlated_values, ufloat
from uncertainties ... | lmfitREPO_NAMElmfit-pyPATH_START.@lmfit-py_extracted@lmfit-py-master@lmfit@parameter.py@.PATH_END.py |
{
"filename": "likelihoods.py",
"repo_name": "stevengiacalone/triceratops",
"repo_path": "triceratops_extracted/triceratops-master/triceratops/likelihoods.py",
"type": "Python"
} | import numpy as np
from astropy import constants
from pytransit import QuadraticModel
Msun = constants.M_sun.cgs.value
Rsun = constants.R_sun.cgs.value
Rearth = constants.R_earth.cgs.value
G = constants.G.cgs.value
au = constants.au.cgs.value
pi = np.pi
tm = QuadraticModel(interpolate=False)
tm_sec = QuadraticModel(i... | stevengiacaloneREPO_NAMEtriceratopsPATH_START.@triceratops_extracted@triceratops-master@triceratops@likelihoods.py@.PATH_END.py |
{
"filename": "plotmodel.py",
"repo_name": "valboz/RTModel",
"repo_path": "RTModel_extracted/RTModel-main/RTModel/plotmodel/plotmodel.py",
"type": "Python"
} | import VBMicrolensing
import math
import matplotlib.pyplot as plt
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
import matplotlib.animation as animation
from matplotlib.patches import Circle
import os
import numpy as np
import shutil
from PIL import Image
from tqdm import tqdm
import sys
import insp... | valbozREPO_NAMERTModelPATH_START.@RTModel_extracted@RTModel-main@RTModel@plotmodel@plotmodel.py@.PATH_END.py |
{
"filename": "test_geodesic.py",
"repo_name": "einsteinpy/einsteinpy",
"repo_path": "einsteinpy_extracted/einsteinpy-main/tests/test_geodesic/test_geodesic.py",
"type": "Python"
} | import warnings
import numpy as np
import pytest
from numpy.testing import assert_allclose
from einsteinpy.geodesic import Geodesic, Nulllike, Timelike
from einsteinpy.geodesic.utils import _kerr
@pytest.fixture()
def dummy_timegeod():
"""
Equatorial Capture
"""
return Timelike(
metric="Ker... | einsteinpyREPO_NAMEeinsteinpyPATH_START.@einsteinpy_extracted@einsteinpy-main@tests@test_geodesic@test_geodesic.py@.PATH_END.py |
{
"filename": "infeed_test.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/tests/infeed_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... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@infeed_test.py@.PATH_END.py |
{
"filename": "_bordercolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/hoverlabel/_bordercolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bordercolor", parent_name="surface.hoverlabel", **kwargs
):
super(BordercolorValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@hoverlabel@_bordercolor.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._area import Area
from ._bar import Bar
from ._barpolar import Barpolar
from ._box import Box
from ._candlestick import Candlestick
from ._carpet import Carpet
from ._choropleth import Choropleth
from ._choroplethmapbox import Choroplethmap... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@__init__.py@.PATH_END.py |
{
"filename": "galCat.py",
"repo_name": "CosmoStatGW/DarkSirensStat",
"repo_path": "DarkSirensStat_extracted/DarkSirensStat-master/DarkSirensStat/galCat.py",
"type": "Python"
} | #
# Copyright (c) 2021 Andreas Finke <andreas.finke@unige.ch>,
# Michele Mancarella <michele.mancarella@unige.ch>
#
# All rights reserved. Use of this source code is governed by a modified BSD
# license that can be found in the LICENSE file.
####
# This module contains a abstract classes... | CosmoStatGWREPO_NAMEDarkSirensStatPATH_START.@DarkSirensStat_extracted@DarkSirensStat-master@DarkSirensStat@galCat.py@.PATH_END.py |
{
"filename": "colored.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/colored.py",
"type": "Python"
} | import sys
def not_colored(a,_):
return repr(a)
colors = {
"red":"\033[31m",
"green":"\033[32m",
"yellow":"\033[33m",
"blue":"\033[34m",
"magenta":"\033[35m",
"cyan":"\033[36m",
}
reset = "\033[0m"
def colored(arg,c):
assert isinstance(c, str)
assert c in colors
s = str(arg)
return co... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@colored.py@.PATH_END.py |
{
"filename": "Example 2 - Loading observational data.ipynb",
"repo_name": "ACCarnall/bagpipes",
"repo_path": "bagpipes_extracted/bagpipes-master/examples/Example 2 - Loading observational data.ipynb",
"type": "Jupyter Notebook"
} | # Loading observational data into Bagpipes
This example will show you how to input observational data. For further information see the [loading observational data](http://bagpipes.readthedocs.io/en/latest/loading_galaxies.html) page of the documentation.
## The load_data function
In order to load up data you need to... | ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@examples@Example 2 - Loading observational data.ipynb@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "hopehhchen/Droplets",
"repo_path": "Droplets_extracted/Droplets-master/README.md",
"type": "Markdown"
} | # Droplets
Repo for an upcoming paper analyzing gravitationally unbound, coherent structures with significant velocity gradients in nearby star forming molecular clouds. The repo is prepared to work with [binder](http://mybinder.org) and will be shared alongside the paper on Authorea. By working between *Github* and ... | hopehhchenREPO_NAMEDropletsPATH_START.@Droplets_extracted@Droplets-master@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/astronify",
"repo_path": "astronify_extracted/astronify-main/astronify/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# Packages may add whatever they like to this file, but
# should keep this content at the top.
# ----------------------------------------------------------------------------
from ._astropy_init import * # noqa
# ----------------------------------------... | spacetelescopeREPO_NAMEastronifyPATH_START.@astronify_extracted@astronify-main@astronify@__init__.py@.PATH_END.py |
{
"filename": "ssl_support.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/setuptools/ssl_support.py",
"type": "Python"
} | import os
import socket
import atexit
import re
import functools
from setuptools.extern.six.moves import urllib, http_client, map, filter
from pkg_resources import ResolutionError, ExtractionError
try:
import ssl
except ImportError:
ssl = None
__all__ = [
'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_a... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@setuptools@ssl_support.py@.PATH_END.py |
{
"filename": "_hovertemplate.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/_hovertemplate.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="hovertemplate", parent_name="histogram2d", **kwargs
):
super(HovertemplateValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@_hovertemplate.py@.PATH_END.py |
{
"filename": "_stream.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/_stream.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StreamValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="stream", parent_name="histogram", **kwargs):
super(StreamValidator, 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@histogram@_stream.py@.PATH_END.py |
{
"filename": "correlation.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/graphics/correlation.py",
"type": "Python"
} | '''correlation plots
Author: Josef Perktold
License: BSD-3
example for usage with different options in
statsmodels/sandbox/examples/thirdparty/ex_ratereturn.py
'''
import numpy as np
from . import utils
def plot_corr(dcorr, xnames=None, ynames=None, title=None, normcolor=False,
ax=None, cmap='RdYlBu... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@graphics@correlation.py@.PATH_END.py |
{
"filename": "parameter_server_strategy.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/parameter_server_strategy.py",
"type": "Python"
} | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@distribute@parameter_server_strategy.py@.PATH_END.py |
{
"filename": "axes_size.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/axes_grid/axes_size.py",
"type": "Python"
} | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from mpl_toolkits.axes_grid1.axes_size import *
| waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@axes_grid@axes_size.py@.PATH_END.py |
{
"filename": "freq_vs_phase.py",
"repo_name": "plazar/TOASTER",
"repo_path": "TOASTER_extracted/TOASTER-master/diagnostics/freq_vs_phase.py",
"type": "Python"
} | import tempfile
import os
import shutil
import utils
import errors
import base
class FreqVsPhasePlotDiagnostic(base.PlotDiagnostic):
name = 'Freq vs. Phase'
def _compute(self):
utils.print_info("Creating freq vs. phase plot for %s" % self.fn, 3)
params = utils.prep_file(self.fn)
if no... | plazarREPO_NAMETOASTERPATH_START.@TOASTER_extracted@TOASTER-master@diagnostics@freq_vs_phase.py@.PATH_END.py |
{
"filename": "_side.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/colorbar/title/_side.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="side", parent_name="contourcarpet.colorbar.title", **kwargs
):
super(SideValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@colorbar@title@_side.py@.PATH_END.py |
{
"filename": "test_ccddata.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/nddata/tests/test_ccddata.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import textwrap
from contextlib import nullcontext
import numpy as np
import pytest
from astropy import log
from astropy import units as u
from astropy.io import fits
from astropy.nddata import _testing as nd_testing
from astropy.nddata.ccddat... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@nddata@tests@test_ccddata.py@.PATH_END.py |
{
"filename": "radam.py",
"repo_name": "tingyuansen/The_Payne",
"repo_path": "The_Payne_extracted/The_Payne-master/The_Payne/radam.py",
"type": "Python"
} | # the codes are adapted from
#Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. "On the Variance of the Adaptive Learning Rate and Beyond." arXiv preprint arXiv:1908.03265 (2019).
import math
import torch
from torch.optim.optimizer import Optimizer, required
class RAdam... | tingyuansenREPO_NAMEThe_PaynePATH_START.@The_Payne_extracted@The_Payne-master@The_Payne@radam.py@.PATH_END.py |
{
"filename": "make_pollack_10cm.py",
"repo_name": "psheehan/pdspy",
"repo_path": "pdspy_extracted/pdspy-master/pdspy/dust/data/make_pollack_10cm.py",
"type": "Python"
} | #!/usr/bin/env python3
from pdspy.dust import *
import numpy
iron = Dust()
iron.set_optical_constants_from_henn("optical_constants/iron.txt")
iron.set_density(7.87)
olivine = Dust()
olivine.set_optical_constants_from_henn("optical_constants/olivine.txt")
olivine.set_density(3.49)
orthopyroxene = Dust()
orthopyroxen... | psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@dust@data@make_pollack_10cm.py@.PATH_END.py |
{
"filename": "_showscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/_showscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="showscale", parent_name="scattermapbox.marker", **kwargs
):
super(ShowscaleValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@_showscale.py@.PATH_END.py |
{
"filename": "MCeff.ipynb",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/Sandbox/MCeff.ipynb",
"type": "Jupyter Notebook"
} | ```python
import sys,os
import numpy as np
import matplotlib.pyplot as plt
from pkg_resources import resource_filename
from desiutil.log import get_logger
from desitarget import cuts
#import astropy.io.fits as pyfits
import fitsio
import healpy as hp
```
```python
def mag2flux(mag) :
return 10**(-0.4*(mag-22.5))... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@MCeff.ipynb@.PATH_END.py |
{
"filename": "vlite.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/vlite.py",
"type": "Python"
} | from __future__ import annotations
# Standard library imports
from typing import Any, Dict, Iterable, List, Optional, Tuple
from uuid import uuid4
# LangChain imports
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.vectorstores import VectorStore
cl... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@vlite.py@.PATH_END.py |
{
"filename": "test_integrations.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/tests/_internal/test_integrations.py",
"type": "Python"
} | import re
import prefect
from prefect._internal.integrations import KNOWN_EXTRAS_FOR_PACKAGES
def extract_extras_require(setup_py_content):
# Use regular expressions to find the extras_require dictionary
match = re.search(r"extras_require\s*=\s*(\{.*?\})", setup_py_content, re.DOTALL)
if match:
e... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@_internal@test_integrations.py@.PATH_END.py |
{
"filename": "templates.py",
"repo_name": "smsharma/fermi-gce-flows",
"repo_path": "fermi-gce-flows_extracted/fermi-gce-flows-main/utils/templates.py",
"type": "Python"
} | import sys
sys.path.append("../")
import numpy as np
import healpy as hp
from utils import create_mask as cm
def mod(dividends, divisor):
""" Return dividends (array) mod divisor (double)
Stolen from Nick's code
"""
output = np.zeros(len(dividends))
for i in range(len(dividends)):
... | smsharmaREPO_NAMEfermi-gce-flowsPATH_START.@fermi-gce-flows_extracted@fermi-gce-flows-main@utils@templates.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/histogram2dcontour/hoverlabel/font/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="colorsrc",
parent_name="histogram2dcontour.hoverlabel.font",
**kwargs,
):
super(ColorsrcValidator, self).__init__(
plotly... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@hoverlabel@font@_colorsrc.py@.PATH_END.py |
{
"filename": "langsmith_dataset.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/chat_loaders/langsmith_dataset.ipynb",
"type": "Jupyter Notebook"
} | # LangSmith Chat Datasets
This notebook demonstrates an easy way to load a LangSmith chat dataset fine-tune a model on that data.
The process is simple and comprises 3 steps.
1. Create the chat dataset.
2. Use the LangSmithDatasetChatLoader to load examples.
3. Fine-tune your model.
Then you can use the fine-tuned m... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@chat_loaders@langsmith_dataset.ipynb@.PATH_END.py |
{
"filename": "read_radtrans.py",
"repo_name": "tomasstolker/species",
"repo_path": "species_extracted/species-main/species/read/read_radtrans.py",
"type": "Python"
} | """
Module for generating atmospheric model spectra with ``petitRADTRANS``.
Details on the radiative transfer, atmospheric setup, and opacities
can be found in `Mollière et al. (2019) <https://ui.adsabs.harvard.edu
/abs/2019A%26A...627A..67M/abstract>`_.
"""
import warnings
from typing import Dict, List, Optional, Tu... | tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@read@read_radtrans.py@.PATH_END.py |
{
"filename": "test_url_helpers.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/utils/tests/test_url_helpers.py",
"type": "Python"
} | from ...utils.url_helpers import urljoin_keep_path
BASE_URL = 'http://example.com/foo/'
def test_urljoin_keep_path():
assert urljoin_keep_path(BASE_URL, '') == BASE_URL
assert urljoin_keep_path('', BASE_URL) == BASE_URL
assert urljoin_keep_path(BASE_URL, 'bar') == 'http://example.com/foo/bar'
assert ... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@utils@tests@test_url_helpers.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._namelengthsrc import NamelengthsrcValidator
from ._namelength import NamelengthValidator
from ._font import FontValidator
from ._bordercolorsrc import BordercolorsrcValidator
from ._bordercolor import ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@hoverlabel@__init__.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.