metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "__init__.py",
"repo_name": "simonsobs/socs",
"repo_path": "socs_extracted/socs-main/socs/agents/wiregrid_kikusui/drivers/__init__.py",
"type": "Python"
} | simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@wiregrid_kikusui@drivers@__init__.py@.PATH_END.py | |
{
"filename": "trivia_my.py",
"repo_name": "AashishGpta/TIPSY",
"repo_path": "TIPSY_extracted/TIPSY-master/trivia_my.py",
"type": "Python"
} | import numpy as np
import pandas as pd
import cmasher as cmr
import plotly.express as px
import plotly.graph_objects as go
from scipy.interpolate import RegularGridInterpolator
from scipy.interpolate import CubicSpline
from gofish import imagecube
from matplotlib import cm
from matplotlib.colors import ListedColormap,... | AashishGptaREPO_NAMETIPSYPATH_START.@TIPSY_extracted@TIPSY-master@trivia_my.py@.PATH_END.py |
{
"filename": "transforms.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/distributions/copula/transforms.py",
"type": "Python"
} | """ Transformation Classes as generators for Archimedean copulas
Created on Wed Jan 27 14:33:40 2021
Author: Josef Perktold
License: BSD-3
"""
import warnings
import numpy as np
from scipy.special import expm1, gamma
class Transforms:
def __init__(self):
pass
def deriv2_inverse(self, phi, args)... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@distributions@copula@transforms.py@.PATH_END.py |
{
"filename": "_ticktextsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="ticktextsrc", parent_name="layout.polar.radialaxis", **kwargs
):
super(TicktextsrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@radialaxis@_ticktextsrc.py@.PATH_END.py |
{
"filename": "_domain.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/indicator/_domain.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Domain(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "indicator"
_path_str = "indicator.domain"
_valid_props = {"column", "row", "x", "y"}
# ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@indicator@_domain.py@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/outsidetextfont/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="waterfall.outsidetextfont", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@outsidetextfont@_colorsrc.py@.PATH_END.py |
{
"filename": "heuristics.py",
"repo_name": "realfastvla/realfast",
"repo_path": "realfast_extracted/realfast-main/realfast/heuristics.py",
"type": "Python"
} | from __future__ import print_function, division, absolute_import#, unicode_literals # not casa compatible
from builtins import bytes, dict, object, range, map, input#, str # not casa compatible
from future.utils import itervalues, viewitems, iteritems, listvalues, listitems
from io import open
import os.path
import sy... | realfastvlaREPO_NAMErealfastPATH_START.@realfast_extracted@realfast-main@realfast@heuristics.py@.PATH_END.py |
{
"filename": "_side.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/line/colorbar/title/_side.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="side", parent_name="scatter3d.line.colorbar.title", **kwargs
):
super(SideValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@line@colorbar@title@_side.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/legendgrouptitle/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="color",
parent_name="scatterpolargl.legendgrouptitle.font",
**kwargs,
):
super(ColorValidator, self).__init__(
plotly_name... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@legendgrouptitle@font@_color.py@.PATH_END.py |
{
"filename": "plot_viol.py",
"repo_name": "MNGuenther/allesfitter",
"repo_path": "allesfitter_extracted/allesfitter-master/allesfitter/postprocessing/plot_viol.py",
"type": "Python"
} | """
Pipeline to analyze allesfitter output for planet transit timings
argument 1: allesfitter path
argument 2: p-value threshold
argument 3: Boolean to select to plot wout/with TESS or wout/with/only TESS
Tansu Daylan
MIT Kavli Institute, Cambridge, MA, 02109, US
tansu.daylan@gmail.com
www.tansudaylan.com
"""
import... | MNGuentherREPO_NAMEallesfitterPATH_START.@allesfitter_extracted@allesfitter-master@allesfitter@postprocessing@plot_viol.py@.PATH_END.py |
{
"filename": "_cauto.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/marker/_cauto.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CautoValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="cauto", parent_name="scattergeo.marker", **kwargs):
super(CautoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@marker@_cauto.py@.PATH_END.py |
{
"filename": "anyscale.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/chat/anyscale.ipynb",
"type": "Jupyter Notebook"
} | ---
sidebar_label: Anyscale
---
# ChatAnyscale
This notebook demonstrates the use of `langchain.chat_models.ChatAnyscale` for [Anyscale Endpoints](https://endpoints.anyscale.com/).
* Set `ANYSCALE_API_KEY` environment variable
* or use the `anyscale_api_key` keyword argument
```python
%pip install --upgrade --quiet... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@chat@anyscale.ipynb@.PATH_END.py |
{
"filename": "test_yandex.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/embeddings/test_yandex.py",
"type": "Python"
} | import pytest
from langchain_community.embeddings.yandex import YandexGPTEmbeddings
@pytest.mark.parametrize(
"constructor_args",
[
dict(),
dict(disable_request_logging=True),
],
)
# @pytest.mark.scheduled - idk what it means
# requires YC_* env and active service
def test_yandex_embeddin... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@embeddings@test_yandex.py@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="name",
parent_name="layout.scene.yaxis.tickformatstop",
**kwargs,
):
super(NameValidator, self).__init__(
plotly_name=plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@tickformatstop@_name.py@.PATH_END.py |
{
"filename": "load_elasticc_truth.py",
"repo_name": "LSSTDESC/elasticc",
"repo_path": "elasticc_extracted/elasticc-main/tom_management/load_elasticc_truth.py",
"type": "Python"
} | raise RuntimeError( "Deprecated. See elasticc2/management/commands/load_snana_fits.py in desc-tom" )
import sys
import argparse
import logging
from truthloader import TruthLoader
class SourceTruthLoader(TruthLoader):
def __init__( self, *args, **kwargs ):
urlend = 'elasticc/addtruth'
converters =... | LSSTDESCREPO_NAMEelasticcPATH_START.@elasticc_extracted@elasticc-main@tom_management@load_elasticc_truth.py@.PATH_END.py |
{
"filename": "patch_util.py",
"repo_name": "henrysky/astroNN",
"repo_path": "astroNN_extracted/astroNN-master/src/astroNN/shared/patch_util.py",
"type": "Python"
} | """
Pure python patching with brute-force line-by-line non-recursive parsing
Original code adapted from Copyright (c) 2008-2016 Anatoly Techtonik <techtonik@gmail.com>
with MIT license
"""
import copy
import logging
import re
from os.path import exists, isfile
import os
import shutil
import itertools
# Logging is co... | henryskyREPO_NAMEastroNNPATH_START.@astroNN_extracted@astroNN-master@src@astroNN@shared@patch_util.py@.PATH_END.py |
{
"filename": "_autotypenumbers.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/xaxis/_autotypenumbers.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="autotypenumbers", parent_name="layout.xaxis", **kwargs
):
super(AutotypenumbersValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@xaxis@_autotypenumbers.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/legendgrouptitle/font/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._weight import WeightValidator
from ._variant import VariantValidator
from ._textcase import TextcaseValidator
from ._style import StyleValidator
from ._size import SizeValidator
from ._shadow impor... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@legendgrouptitle@font@__init__.py@.PATH_END.py |
{
"filename": "05a. RFC Comparison (one-vs-rest).ipynb",
"repo_name": "sidchaini/LightCurveDistanceClassification",
"repo_path": "LightCurveDistanceClassification_extracted/LightCurveDistanceClassification-main/notebooks/05. RFC Comparison/05a. RFC Comparison (one-vs-rest).ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import pandas as pd
from tqdm.auto import tqdm
import matplotlib.pyplot as plt
import seaborn as sns
from mlxtend.feature_selection import (
SequentialFeatureSelector,
)
from mlxtend.evaluate import feature_importance_permutation
from mlxtend.plotting import plot_sequential_feature_sele... | sidchainiREPO_NAMELightCurveDistanceClassificationPATH_START.@LightCurveDistanceClassification_extracted@LightCurveDistanceClassification-main@notebooks@05. RFC Comparison@05a. RFC Comparison (one-vs-rest).ipynb@.PATH_END.py |
{
"filename": "argparse_ext.py",
"repo_name": "toros-astro/corral",
"repo_path": "corral_extracted/corral-master/corral/libs/argparse_ext.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs as _codecs
import argparse as _argparse
import sys as _sys
from gettext import gettext as _
import six as _six
if _six.PY2:
class FileType(object):
"""Factory for creating file object types with unicode patch
Instances of FileType ar... | toros-astroREPO_NAMEcorralPATH_START.@corral_extracted@corral-master@corral@libs@argparse_ext.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "jzuhone/pyxsim",
"repo_path": "pyxsim_extracted/pyxsim-main/pyxsim/utils.py",
"type": "Python"
} | import logging
import numpy as np
from astropy.units import Quantity
from more_itertools import always_iterable
from soxs.constants import abund_tables, atomic_weights, elem_names
from unyt import unyt_array, unyt_quantity
pyxsimLogger = logging.getLogger("pyxsim")
ufstring = "%(name)-3s : [%(levelname)-9s] %(asctim... | jzuhoneREPO_NAMEpyxsimPATH_START.@pyxsim_extracted@pyxsim-main@pyxsim@utils.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/icicle/marker/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(self, plotly_name="colorscale", parent_name="icicle.marker", **kwargs):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@icicle@marker@_colorscale.py@.PATH_END.py |
{
"filename": "cross_section.py",
"repo_name": "franciscovillaescusa/Pylians",
"repo_path": "Pylians_extracted/Pylians-master/HI/cross_section.py",
"type": "Python"
} | import numpy as np
import readsnap
import readsubf
import HI_library as HIL
import sys
################################# UNITS #######################################
rho_crit=2.77536627e11 #h^2 Msun/Mpc^3
Mpc=3.0856e24 #cm
Msun=1.989e33 #g
Ymass=0.24 #helium mass fraction
mH=1.6726e-24 #proton mass in grams
pi=np.p... | franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@HI@cross_section.py@.PATH_END.py |
{
"filename": "h2opr.py",
"repo_name": "mpound/pdrtpy",
"repo_path": "pdrtpy_extracted/pdrtpy-master/examples/h2opr.py",
"type": "Python"
} | ############################################################################
### Listing A.5: Creating and fitting H2 excitation diagrams, ###
### including ortho-to-para ratio (OPR) ###
############################################################################
from pdrtpy.... | mpoundREPO_NAMEpdrtpyPATH_START.@pdrtpy_extracted@pdrtpy-master@examples@h2opr.py@.PATH_END.py |
{
"filename": "recipe_wvlsol_tell.py",
"repo_name": "igrins/plp",
"repo_path": "plp_extracted/plp-master/igrins/igrins_recipes/recipe_wvlsol_tell.py",
"type": "Python"
} | from __future__ import print_function
from ..pipeline.steps import Step
from .. import DESCS
import os
from ..procedures import wvlsol_tell as wvlsol_tell
def do_wvlsol_tell(obsset):
from igrins import get_obsset
# obsset = get_obsset("20190116", "H", "DARK", obsids=range(1, 11))
obsset = get_obsset("2022... | igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@igrins_recipes@recipe_wvlsol_tell.py@.PATH_END.py |
{
"filename": "print_test_kern_calc_visi_common_common.py",
"repo_name": "JLBLine/WODEN",
"repo_path": "WODEN_extracted/WODEN-master/cmake_testing/GPU_code/source_components/print_test_kern_calc_visi_common_common.py",
"type": "Python"
} | import numpy as np
np.random.seed(983745)
def make_list_arrays(num_lists):
num_list_values = np.random.uniform(5, 32, num_lists).astype(int)
total_vals = int(np.sum(num_list_values))
list_start_indexes = np.empty(num_lists, dtype=int)
list_freqs = np.empty(total_vals)
list_stokes = np.empty(... | JLBLineREPO_NAMEWODENPATH_START.@WODEN_extracted@WODEN-master@cmake_testing@GPU_code@source_components@print_test_kern_calc_visi_common_common.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "legacysurvey/imagine",
"repo_path": "imagine_extracted/imagine-main/cat/migrations/__init__.py",
"type": "Python"
} | legacysurveyREPO_NAMEimaginePATH_START.@imagine_extracted@imagine-main@cat@migrations@__init__.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/heatmap/colorbar/tickfont/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="variant", parent_name="heatmap.colorbar.tickfont", **kwargs
):
super(VariantValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@colorbar@tickfont@_variant.py@.PATH_END.py |
{
"filename": "chains.py",
"repo_name": "joezuntz/cosmosis",
"repo_path": "cosmosis_extracted/cosmosis-main/cosmosis/postprocessing/v2/chains.py",
"type": "Python"
} | """
This is the core of what will at some point become the new postprocessing
system in CosmoSIS. The plan is:
- do plotting with GetDist instead of manually
- make the plotting much simpler than the complex hierarchies we have now
- connect this to the campaign system to make it easy to specify what to do after compl... | joezuntzREPO_NAMEcosmosisPATH_START.@cosmosis_extracted@cosmosis-main@cosmosis@postprocessing@v2@chains.py@.PATH_END.py |
{
"filename": "apero_pphotpix_spirou.py",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/apero/tools/recipes/spirou/apero_pphotpix_spirou.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# CODE NAME HERE
# CODE DESCRIPTION HERE
Created on 2020-04-05 11:44:00
@author: cook
"""
import os
import numpy as np
from astropy.io import fits
from astropy.table import Table
from scipy.signal import medfilt, convolve2d
from apero import lang
from apero.base im... | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@tools@recipes@spirou@apero_pphotpix_spirou.py@.PATH_END.py |
{
"filename": "_resampling.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/stats/_resampling.py",
"type": "Python"
} | from __future__ import annotations
import warnings
import numpy as np
from itertools import combinations, permutations, product
from collections.abc import Sequence
import inspect
from scipy._lib._util import check_random_state, _rename_parameter
from scipy.special import ndtr, ndtri, comb, factorial
from scipy._lib.... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@stats@_resampling.py@.PATH_END.py |
{
"filename": "test_Acspy_Util_NodeList.py",
"repo_name": "ACS-Community/ACS",
"repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/test/test_Acspy_Util_NodeList.py",
"type": "Python"
} | #! /usr/bin/env python
#*******************************************************************************
# ALMA - Atacama Large Millimiter Array
# (c) Associated Universities Inc., 2010
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Lice... | ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@test@test_Acspy_Util_NodeList.py@.PATH_END.py |
{
"filename": "TEA-tutorial.ipynb",
"repo_name": "dzesmin/TEA",
"repo_path": "TEA_extracted/TEA-master/doc/examples/jupyter_tutorial/TEA-tutorial.ipynb",
"type": "Jupyter Notebook"
} | # `TEA` Tutorial
**TEA** is a numerical **Thermochemical Equilibrium Abundances** code, \
that calculates the abundances of gaseous molecular species in thermochemical equilibrium.
The TEA code is available on Github [https://github.com/dzesmin/TEA](https://github.com/dzesmin/TEA).
The code applies Gibbs free-energ... | dzesminREPO_NAMETEAPATH_START.@TEA_extracted@TEA-master@doc@examples@jupyter_tutorial@TEA-tutorial.ipynb@.PATH_END.py |
{
"filename": "Elsewhere.py",
"repo_name": "xpsi-group/xpsi",
"repo_path": "xpsi_extracted/xpsi-main/xpsi/Elsewhere.py",
"type": "Python"
} | from xpsi.global_imports import *
from xpsi.cellmesh.global_mesh import construct_closed_cellMesh as _construct_closed_cellMesh
from xpsi.cellmesh.rays import compute_rays as _compute_rays
from xpsi.cellmesh.integrator_for_time_invariance import integrate as _integrator
from xpsi.Parameter import Parameter
from xpsi.... | xpsi-groupREPO_NAMExpsiPATH_START.@xpsi_extracted@xpsi-main@xpsi@Elsewhere.py@.PATH_END.py |
{
"filename": "test_tz_localize.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimes/methods/test_tz_localize.py",
"type": "Python"
} | from datetime import (
datetime,
timedelta,
timezone,
)
from zoneinfo import ZoneInfo
import dateutil.tz
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas import (
DatetimeIndex,
Timestamp,
bdate_range,
date_range,
offsets,
to_datetime,
)
import pandas._tes... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimes@methods@test_tz_localize.py@.PATH_END.py |
{
"filename": "shard_op.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/ops/shard_op.py",
"type": "Python"
} | # Copyright 2022 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@data@ops@shard_op.py@.PATH_END.py |
{
"filename": "sinc_interp.py",
"repo_name": "CHIME-Pulsar-Timing/CHIME-Pulsar_automated_filterbank",
"repo_path": "CHIME-Pulsar_automated_filterbank_extracted/CHIME-Pulsar_automated_filterbank-main/presto_without_presto/sinc_interp.py",
"type": "Python"
} | import numpy as Num
import numpy.fft as FFT
def kaiser_window(xs, halfwidth, alpha):
"""
kaiser_window(xs, halfwidth, alpha):
Return the kaiser window function for the values 'xs' when the
the half-width of the window should be 'haldwidth' with
the folloff parameter 'alpha'. Th... | CHIME-Pulsar-TimingREPO_NAMECHIME-Pulsar_automated_filterbankPATH_START.@CHIME-Pulsar_automated_filterbank_extracted@CHIME-Pulsar_automated_filterbank-main@presto_without_presto@sinc_interp.py@.PATH_END.py |
{
"filename": "test_interpolative.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/linalg/tests/test_interpolative.py",
"type": "Python"
} | #******************************************************************************
# Copyright (C) 2013 Kenneth L. Ho
# 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... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@linalg@tests@test_interpolative.py@.PATH_END.py |
{
"filename": "_dash.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/mapbox/layer/line/_dash.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DashValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(
self, plotly_name="dash", parent_name="layout.mapbox.layer.line", **kwargs
):
super(DashValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@layer@line@_dash.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "threeML/threeML",
"repo_path": "threeML_extracted/threeML-master/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: "\U0001F680 Feature Request"
about: "I have a suggestion (and may want to implement it \U0001F642)!"
title: ''
labels: ''
assignees: ''
---
## Feature Request
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I have an issue when ... | threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "HGP2018_melt_benchmarks.py",
"repo_name": "geodynamics/burnman",
"repo_path": "burnman_extracted/burnman-main/misc/benchmarks/HGP2018_melt_benchmarks.py",
"type": "Python"
} | # This file is part of BurnMan - a thermoelastic and thermodynamic toolkit
# for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2021 by the BurnMan team, released under the GNU
# GPL v2 or later.
"""
HGP2018_melt_benchmarks
-----------------------
This script tests the Holland et al. (2018) melt model in
t... | geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@misc@benchmarks@HGP2018_melt_benchmarks.py@.PATH_END.py |
{
"filename": "_exponentformat.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/caxis/_exponentformat.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="exponentformat", parent_name="layout.ternary.caxis", **kwargs
):
super(ExponentformatValidator, self).__init__(
plotly_name=plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@caxis@_exponentformat.py@.PATH_END.py |
{
"filename": "test_index_tricks.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/lib/tests/test_index_tricks.py",
"type": "Python"
} | import pytest
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_almost_equal,
assert_array_almost_equal, assert_raises, assert_raises_regex,
)
from numpy.lib._index_tricks_impl import (
mgrid, ogrid, ndenumerate, fill_diagonal, diag_indices, diag_indices_f... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@lib@tests@test_index_tricks.py@.PATH_END.py |
{
"filename": "_bordercolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/gauge/_bordercolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bordercolor", parent_name="indicator.gauge", **kwargs
):
super(BordercolorValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@gauge@_bordercolor.py@.PATH_END.py |
{
"filename": "test_recfunctions.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/lib/tests/test_recfunctions.py",
"type": "Python"
} | from __future__ import division, absolute_import, print_function
import numpy as np
import numpy.ma as ma
from numpy.ma.mrecords import MaskedRecords
from numpy.ma.testutils import assert_equal
from numpy.testing import (
run_module_suite, assert_, assert_raises, dec
)
from numpy.lib.recfunctions import (
... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@lib@tests@test_recfunctions.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/barpolar/selected/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._marker import Marker
from ._textfont import Textfont
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._marker.Marker", ".... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@barpolar@selected@__init__.py@.PATH_END.py |
{
"filename": "test_celestial_transformations.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/coordinates/tests/test_celestial_transformations.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import pytest
import numpy as np
from ... import units as u
from ..distances import Distance
from ..builtin_frames impor... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@coordinates@tests@test_celestial_transformations.py@.PATH_END.py |
{
"filename": "analyze.py",
"repo_name": "jmd-dk/concept",
"repo_path": "concept_extracted/concept-master/test/fluid_drift_rigid/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@fluid_drift_rigid@analyze.py@.PATH_END.py |
{
"filename": "plot_gmm.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/examples/mixture/plot_gmm.py",
"type": "Python"
} | """
=================================
Gaussian Mixture Model Ellipsoids
=================================
Plot the confidence ellipsoids of a mixture of two Gaussians
obtained with Expectation Maximisation (``GaussianMixture`` class) and
Variational Inference (``BayesianGaussianMixture`` class models with
a Dirichlet ... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@mixture@plot_gmm.py@.PATH_END.py |
{
"filename": "_hoverinfo.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/_hoverinfo.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolargl", **kwargs):
super(HoverinfoValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@_hoverinfo.py@.PATH_END.py |
{
"filename": "sim4D.ipynb",
"repo_name": "CRPropa/CRPropa3",
"repo_path": "CRPropa3_extracted/CRPropa3-master/doc/pages/example_notebooks/sim4D/sim4D.ipynb",
"type": "Jupyter Notebook"
} | # 4D Simulation
The following is a simple 4D simulation where cosmic rays are emitted by a source at a specified spatial position at a specified time-point. A cosmic ray is detected if it arrives at the observer position within a specified time window.
**Note:** In CRPropa, time is always expressed in terms of redshi... | CRPropaREPO_NAMECRPropa3PATH_START.@CRPropa3_extracted@CRPropa3-master@doc@pages@example_notebooks@sim4D@sim4D.ipynb@.PATH_END.py |
{
"filename": "Sherlock_observation_planning_documentation.ipynb",
"repo_name": "franpoz/SHERLOCK",
"repo_path": "SHERLOCK_extracted/SHERLOCK-master/examples/Observation_planning/Sherlock_observation_planning_documentation.ipynb",
"type": "Jupyter Notebook"
} | # Documentation for the Sherlockpipe's observation planning tool
In this document we will give an example of how to use the observation planning tool of Sherlock by applying it to TIC 2527981. This star was observed by TESS in its sector 27.
## Setup
To generate an observation plan for your target, you must already... | franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@examples@Observation_planning@Sherlock_observation_planning_documentation.ipynb@.PATH_END.py |
{
"filename": "librarian.py",
"repo_name": "jvines/astroARIADNE",
"repo_path": "astroARIADNE_extracted/astroARIADNE-master/astroARIADNE/librarian.py",
"type": "Python"
} | # @auto-fold regex /^\s*if/ /^\s*else/ /^\s*elif/ /^\s*def/
"""Helper class to look up broadband photometry and stellar parameters."""
__all__ = ['Librarian']
import os
import sys
import warnings
import astropy.units as u
import numpy as np
from astropy.coordinates import SkyCoord
from astropy.utils.exceptions impor... | jvinesREPO_NAMEastroARIADNEPATH_START.@astroARIADNE_extracted@astroARIADNE-master@astroARIADNE@librarian.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2d/marker/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._colorsrc import ColorsrcValidator
from ._color import ColorValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._co... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2d@marker@__init__.py@.PATH_END.py |
{
"filename": "mass_function.py",
"repo_name": "axion-alp-dm/EBL_calculation",
"repo_path": "EBL_calculation_extracted/EBL_calculation-main/models_tests/mass_function.py",
"type": "Python"
} | #matplotlib inline
#config InlineBackend.figure_format = 'retina'
import sys, platform, os
import matplotlib
from matplotlib import pyplot as plt
import numpy as np
#Assume installed from github using "git clone --recursive https://github.com/cmbant/CAMB.git"
#This file is then in the docs folders
camb_path = os.path.... | axion-alp-dmREPO_NAMEEBL_calculationPATH_START.@EBL_calculation_extracted@EBL_calculation-main@models_tests@mass_function.py@.PATH_END.py |
{
"filename": "uratmatch.py",
"repo_name": "desihub/desitarget",
"repo_path": "desitarget_extracted/desitarget-main/py/desitarget/uratmatch.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
desitarget.uratmatch
====================
Useful `URAT`_ matching and manipulation routines.
.. _`URAT`: http://cdsarc.u-strasbg.fr/viz-bin/cat/I/329
"""
import os
import numpy as np
import fitsio
import requests
import pickle... | desihubREPO_NAMEdesitargetPATH_START.@desitarget_extracted@desitarget-main@py@desitarget@uratmatch.py@.PATH_END.py |
{
"filename": "pdf_sampler.py",
"repo_name": "bsafdi/NPTFit",
"repo_path": "NPTFit_extracted/NPTFit-master/NPTFit/pdf_sampler.py",
"type": "Python"
} | ###############################################################################
# pdf_sampler.py
###############################################################################
#
# Function to make random draws from an arbitrary PDF using inversion sampling.
#
###########################################################... | bsafdiREPO_NAMENPTFitPATH_START.@NPTFit_extracted@NPTFit-master@NPTFit@pdf_sampler.py@.PATH_END.py |
{
"filename": "make_fiducial.py",
"repo_name": "misharash/cobaya_mock_cmb",
"repo_path": "cobaya_mock_cmb_extracted/cobaya_mock_cmb-main/make_fiducial.py",
"type": "Python"
} | #!/usr/bin/env python3
# Example script to create fiducial values for mock CMB likelihoods
from cobaya.model import get_model
# from best fit with fixed massless neutrinos and nuisance-marginalized high-l
fiducial_params = {
# LambdaCDM parameters
'H0': 68.1461,
# '100*theta_s': 1.041920539e+00,
'omega... | misharashREPO_NAMEcobaya_mock_cmbPATH_START.@cobaya_mock_cmb_extracted@cobaya_mock_cmb-main@make_fiducial.py@.PATH_END.py |
{
"filename": "test_jira_api.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/utilities/test_jira_api.py",
"type": "Python"
} | """Integration test for JIRA API Wrapper."""
from langchain_community.utilities.jira import JiraAPIWrapper
def test_search() -> None:
"""Test for Searching issues on JIRA"""
jql = "project = TP"
jira = JiraAPIWrapper() # type: ignore[call-arg]
output = jira.run("jql", jql)
assert "issues" in out... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@utilities@test_jira_api.py@.PATH_END.py |
{
"filename": "set_telescope_pointing_separated.py",
"repo_name": "spacetelescope/mirage",
"repo_path": "mirage_extracted/mirage-master/mirage/utils/set_telescope_pointing_separated.py",
"type": "Python"
} | #!/usr/bin/env python
# Copyright (C) 2010-2011 Association of Universities for Research in Astronomy (AURA)
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above... | spacetelescopeREPO_NAMEmiragePATH_START.@mirage_extracted@mirage-master@mirage@utils@set_telescope_pointing_separated.py@.PATH_END.py |
{
"filename": "CHANGELOG.md",
"repo_name": "AndrewAnnex/SpiceyPy",
"repo_path": "SpiceyPy_extracted/SpiceyPy-main/CHANGELOG.md",
"type": "Markdown"
} | # Change Log
All notable changes to SpiceyPy will be documented here
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project tries to adhere to [Semantic Versioning](http://semver.org/).
## [6.0.0] - 2023-08-31
Fixed several major typos and fortran array ordering issues in tkfram, zz... | AndrewAnnexREPO_NAMESpiceyPyPATH_START.@SpiceyPy_extracted@SpiceyPy-main@CHANGELOG.md@.PATH_END.py |
{
"filename": "_legend.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/_legend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="legend", parent_name="cone", **kwargs):
super(LegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
d... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@_legend.py@.PATH_END.py |
{
"filename": "schema.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/evaluation/schema.py",
"type": "Python"
} | """Interfaces to be implemented by general evaluators."""
from __future__ import annotations
import logging
from abc import ABC, abstractmethod
from enum import Enum
from typing import Any, Optional, Sequence, Tuple, Union
from warnings import warn
from langchain_core.agents import AgentAction
from langchain_core.la... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@evaluation@schema.py@.PATH_END.py |
{
"filename": "writer.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chat_models/writer.py",
"type": "Python"
} | """Writer chat wrapper."""
from __future__ import annotations
import json
import logging
from typing import (
Any,
AsyncIterator,
Callable,
Dict,
Iterator,
List,
Literal,
Optional,
Sequence,
Tuple,
Type,
Union,
)
from langchain_core.callbacks import (
AsyncCallback... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chat_models@writer.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/splom/marker/colorbar/tickfont/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="splom.marker.colorbar.tickfont", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@splom@marker@colorbar@tickfont@_size.py@.PATH_END.py |
{
"filename": "generate_ref_ast.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/coordinates/tests/accuracy/generate_ref_ast.py",
"type": "Python"
} | """
This series of functions are used to generate the reference CSV files
used by the accuracy tests. Running this as a comand-line script will
generate them all.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import numpy as np
from ....ta... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@coordinates@tests@accuracy@generate_ref_ast.py@.PATH_END.py |
{
"filename": "Further Examples 2 - The Leja2019 non-parametric continuity SFH Model.ipynb",
"repo_name": "ACCarnall/bagpipes",
"repo_path": "bagpipes_extracted/bagpipes-master/examples/Further Examples 2 - The Leja2019 non-parametric continuity SFH Model.ipynb",
"type": "Jupyter Notebook"
} | # Using the Leja et al. (2019) continuity non-parametric SFH model
I've finally got round to implementing the [Leja et al. (2019)](https://ui.adsabs.harvard.edu/abs/2019ApJ...876....3L/abstract) continuity non-parametric SFH model in Bagpipes. This notebook should explain how to build models and run fits using this SF... | ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@examples@Further Examples 2 - The Leja2019 non-parametric continuity SFH Model.ipynb@.PATH_END.py |
{
"filename": "sql_database.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/utilities/sql_database.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import SQLDatabase
from langchain_community.utilities.sql_database import truncate_word
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic f... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@utilities@sql_database.py@.PATH_END.py |
{
"filename": "_hovertemplate.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/_hovertemplate.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="hovertemplate", parent_name="scattersmith", **kwargs
):
super(HovertemplateValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@_hovertemplate.py@.PATH_END.py |
{
"filename": "plot_evolution.py",
"repo_name": "exoclime/VULCAN",
"repo_path": "VULCAN_extracted/VULCAN-master/plot_py/plot_evolution.py",
"type": "Python"
} | import sys
sys.path.insert(0, '../') # including the upper level of directory for the path of modules
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.legend as lg
import vulcan_cfg
try: from PIL import Image
except ImportError:
try: import Image
except: vulcan_cfg.use_PIL = False
import ... | exoclimeREPO_NAMEVULCANPATH_START.@VULCAN_extracted@VULCAN-master@plot_py@plot_evolution.py@.PATH_END.py |
{
"filename": "pyrafetiparam.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/eti_core/pyrafetiparam.py",
"type": "Python"
} | from .etiparam import ETIParam
from ..utils import logutils
log = logutils.get_logger(__name__)
class PyrafETIParam(ETIParam):
inputs = None
params = None
paramdict = None
def __init__(self, inputs=None, params=None):
log.debug("PyrafETIParam __init__")
ETIParam.__init__(self, inputs,... | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@eti_core@pyrafetiparam.py@.PATH_END.py |
{
"filename": "prepare_lowl.py",
"repo_name": "CosmoLike/cocoa",
"repo_path": "cocoa_extracted/cocoa-main/Cocoa/external_modules/code/planck/code/spt_clik/src/python/tools/prepare_lowl.py",
"type": "Python"
} | #! PYTHONEXE
import numpy as nm
import healpy as hp
import sys
if __name__ == "__main__":
sys.path = ["REPLACEPATH"]+sys.path
def mode(l,m,nside,field,ordering="ring",all=False):
if m==0:
value = 1
else:
value = (1+nm.sign(m)*1j)/2.
nmode = ((l+1)*(l+2))/2
Ind = hp.Alm.getidx(l,l,abs(m))
dat = nm... | CosmoLikeREPO_NAMEcocoaPATH_START.@cocoa_extracted@cocoa-main@Cocoa@external_modules@code@planck@code@spt_clik@src@python@tools@prepare_lowl.py@.PATH_END.py |
{
"filename": "_visible.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/pathbar/_visible.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="visible", parent_name="treemap.pathbar", **kwargs):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@pathbar@_visible.py@.PATH_END.py |
{
"filename": "test_ut1.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/time/tests/test_ut1.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import functools
import pytest
import numpy as np
from ...tests.helper import remote_data
from .. import Time
from ...utils.iers import iers # used in testing
allclose_jd = functools.partial(np.allclose, rtol=1e-15, atol=0)
allclose_sec = functools.par... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@time@tests@test_ut1.py@.PATH_END.py |
{
"filename": "_align.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/cells/_align.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="align", parent_name="table.cells", **kwargs):
super(AlignValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@cells@_align.py@.PATH_END.py |
{
"filename": "che_diagram.py",
"repo_name": "orlox/mesa_input_data",
"repo_path": "mesa_input_data_extracted/mesa_input_data-master/2016_ULX/scripts/che_examples/che_diagram/che_diagram.py",
"type": "Python"
} | #!/usr/bin/env python
import matplotlib.pyplot as plt
from pylab import *
import numpy as np
import matplotlib.patheffects as pe
from scipy.interpolate import spline
params = {'backend': 'pdf',
'figure.figsize': [4.3, 3.0],
'font.family':'serif',
'font.size':10,
'font.serif': 'Ti... | orloxREPO_NAMEmesa_input_dataPATH_START.@mesa_input_data_extracted@mesa_input_data-master@2016_ULX@scripts@che_examples@che_diagram@che_diagram.py@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/outsidetextfont/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="bar.outsidetextfont", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@outsidetextfont@_colorsrc.py@.PATH_END.py |
{
"filename": "test_tools.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/regression/tests/test_tools.py",
"type": "Python"
} | import numpy as np
from numpy.testing import assert_allclose
import pytest
from statsmodels.regression.linear_model import WLS
from statsmodels.regression._tools import _MinimalWLS
class TestMinimalWLS:
@classmethod
def setup_class(cls):
rs = np.random.RandomState(1234)
cls.exog1 = rs.randn(2... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@regression@tests@test_tools.py@.PATH_END.py |
{
"filename": "_outlinewidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/colorbar/_outlinewidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="outlinewidth", parent_name="contourcarpet.colorbar", **kwargs
):
super(OutlinewidthValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@colorbar@_outlinewidth.py@.PATH_END.py |
{
"filename": "plugin_setup.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax_plugins/cuda/plugin_setup.py",
"type": "Python"
} | # Copyright 2023 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_plugins@cuda@plugin_setup.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "USNavalResearchLaboratory/eispac",
"repo_path": "eispac_extracted/eispac-main/eispac/__init__.py",
"type": "Python"
} | # __version__ = '0.94.1'
from .version import version as __version__
from . import download
from . import templates
from .core import *
from .extern import *
from .util import *
from . import data
| USNavalResearchLaboratoryREPO_NAMEeispacPATH_START.@eispac_extracted@eispac-main@eispac@__init__.py@.PATH_END.py |
{
"filename": "f2pysig.py",
"repo_name": "toshiyan/cmblensplus",
"repo_path": "cmblensplus_extracted/cmblensplus-master/py/f2pysig.py",
"type": "Python"
} | #
# This code scan f90 files and output the signature file.
#
# The code first split each subroutine, and scan lines including intent.
# The argument should be declared as
# [data type], [intent(...)], [dimension] (<- order insensitive) :: [arguments]
# For optional arguments, the code also look for a default value... | toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@py@f2pysig.py@.PATH_END.py |
{
"filename": "_tickangle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/volume/colorbar/_tickangle.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(
self, plotly_name="tickangle", parent_name="volume.colorbar", **kwargs
):
super(TickangleValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@volume@colorbar@_tickangle.py@.PATH_END.py |
{
"filename": "SNIa_yield.py",
"repo_name": "Azeret/galIMF",
"repo_path": "galIMF_extracted/galIMF-master/yield_tables/SNIa_yield.py",
"type": "Python"
} | # This function returns the element mass ejected for a type Ia supernova event
def function_mass_ejected(yield_reference_name, element_name):
mass_ejected = 0
if yield_reference_name == 'Thielemann1993':
# Reference: Thielemann et al. (1993)
# Values adopted from
# Gibson, B. K., Loewen... | AzeretREPO_NAMEgalIMFPATH_START.@galIMF_extracted@galIMF-master@yield_tables@SNIa_yield.py@.PATH_END.py |
{
"filename": "TransferFunction.py",
"repo_name": "classULDM/class.SFDM",
"repo_path": "class.SFDM_extracted/class.SFDM-master/external/RealSpaceInterface/Calc2D/TransferFunction.py",
"type": "Python"
} | import os.path
import pickle
import uuid
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline, RectBivariateSpline
import sys
import logging
from classy import Class
import Calc2D.Database as Database
import config
TRANSFER_QUANTITIES = ["d_g", "d_ur", "d_cdm", "d_b", "d_g/4 + psi"]
def Com... | classULDMREPO_NAMEclass.SFDMPATH_START.@class.SFDM_extracted@class.SFDM-master@external@RealSpaceInterface@Calc2D@TransferFunction.py@.PATH_END.py |
{
"filename": "wave_transform.py",
"repo_name": "herjy/SLIT",
"repo_path": "SLIT_extracted/SLIT-master/SLIT/wave_transform.py",
"type": "Python"
} | import numpy as np
import scipy.signal as cp
import matplotlib.pyplot as plt
import scipy.ndimage.filters as sc
def symmetrise(img, size):
n3, n4 = np.shape(img)
n1,n2 = size
img[:(n3-n1)/2, :] = np.flipud(img[(n3-n1)/2:(n3-n1),:])
img[:,:(n4-n2)/2] = np.fliplr(img[:,(n4-n2)/2:(n4-n2)])
img[(n3+n... | herjyREPO_NAMESLITPATH_START.@SLIT_extracted@SLIT-master@SLIT@wave_transform.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "bradkav/WIMpy_NREFT",
"repo_path": "WIMpy_NREFT_extracted/WIMpy_NREFT-main/old_WIMpy/FormFactors/README.md",
"type": "Markdown"
} | # WIMpy_NREFT
## NREFT form factors
The nuclear form factors are written in the form:
<p align="center"><img src="https://rawgit.com/bradkav/WIMpy_NREFT/master/svgs/0ba18dc393652bade995a9e9cec290e4.svg?invert_in_darkmode" align=middle width=177.11595pt height=37.820475pt/></p>
The definition of the dimensionless mo... | bradkavREPO_NAMEWIMpy_NREFTPATH_START.@WIMpy_NREFT_extracted@WIMpy_NREFT-main@old_WIMpy@FormFactors@README.md@.PATH_END.py |
{
"filename": "multiple_axes.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/animation/multiple_axes.py",
"type": "Python"
} | """
=======================
Multiple Axes animation
=======================
This example showcases:
- how animation across multiple subplots works,
- using a figure artist in the animation.
Output generated via `matplotlib.animation.Animation.to_jshtml`.
"""
import matplotlib.pyplot as plt
import numpy as np
impor... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@animation@multiple_axes.py@.PATH_END.py |
{
"filename": "test_legendre.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/special/tests/test_legendre.py",
"type": "Python"
} | import math
import numpy as np
import pytest
from numpy.testing import (assert_equal, assert_almost_equal, assert_array_almost_equal,
assert_allclose)
from scipy import special
from scipy.special import (legendre_p, legendre_p_all, assoc_legendre_p,
assoc_legendre_p_all, sph_legendre_p, sph_legendre_p_all)
... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@tests@test_legendre.py@.PATH_END.py |
{
"filename": "print_disabled.py",
"repo_name": "AstroGPU/swarm",
"repo_path": "swarm_extracted/swarm-master/test/monitors/close_orbits/print_disabled.py",
"type": "Python"
} | from sys import path
path.append('lib')
from libswarmng_ext import *
from numpy import *
from math import *
from random import uniform
from sys import argv
def norm(l):
s = 0
for x in l:
s += x**2
return sqrt(s)
ens = DefaultEnsemble.load_from_text(argv[1])
print "Time, Body number 1, Body numb... | AstroGPUREPO_NAMEswarmPATH_START.@swarm_extracted@swarm-master@test@monitors@close_orbits@print_disabled.py@.PATH_END.py |
{
"filename": "_lightposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/_lightposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="lightposition", parent_name="surface", **kwargs):
super(LightpositionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@_lightposition.py@.PATH_END.py |
{
"filename": "install_egg_info.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/_distutils/command/install_egg_info.py",
"type": "Python"
} | """
distutils.command.install_egg_info
Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
"""
import os
import re
import sys
from .. import dir_util
from .._log import log
from ..cmd import Command
class install_egg_info(Command):
"""Install an .egg-info file for... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@_distutils@command@install_egg_info.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="heatmap.hoverlabel.font", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "makeflat.py",
"repo_name": "HiPERCAM/hipercam",
"repo_path": "hipercam_extracted/hipercam-master/hipercam/scripts/makeflat.py",
"type": "Python"
} | import sys
import os
import tempfile
import signal
import numpy as np
from trm import cline
from trm.cline import Cline
import hipercam as hcam
from hipercam import utils, spooler
__all__ = [
"makeflat",
]
####################################################
#
# makeflat -- makes flat fields from a set of fram... | HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@scripts@makeflat.py@.PATH_END.py |
{
"filename": "_ticks.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/marker/colorbar/_ticks.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticks", parent_name="funnel.marker.colorbar", **kwargs
):
super(TicksValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@marker@colorbar@_ticks.py@.PATH_END.py |
{
"filename": "test_sampler.py",
"repo_name": "minaskar/zeus",
"repo_path": "zeus_extracted/zeus-main/tests/test_sampler.py",
"type": "Python"
} | import numpy as np
import pytest
import zeus
def logp(x):
return -0.5 * np.sum((x-1.0)**2.0)
def test_mean(logp=logp,seed=42):
np.random.seed(seed)
ndim = np.random.randint(2,5)
nwalkers = 2 * ndim
nsteps = np.random.randint(3000,5000)
sampler = zeus.EnsembleSampler(nwalkers,ndim,logp,verbos... | minaskarREPO_NAMEzeusPATH_START.@zeus_extracted@zeus-main@tests@test_sampler.py@.PATH_END.py |
{
"filename": "_visible.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/error_y/_visible.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="visible", parent_name="histogram.error_y", **kwargs
):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@error_y@_visible.py@.PATH_END.py |
{
"filename": "ELGtargnonsense.ipynb",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/Sandbox/ELGtargnonsense.ipynb",
"type": "Jupyter Notebook"
} | # Things that don't make sense in the distribution of ELG targets
### This notebook is meant to explain what does not make sense in the DESI ELG target distribution and leave room for the solutions.
### Ideally, we would find the explanations before targeting is finalized, and this might help fix some issues before we ... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@ELGtargnonsense.ipynb@.PATH_END.py |
{
"filename": "_namelengthsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="namelengthsrc",
parent_name="densitymapbox.hoverlabel",
**kwargs
):
super(NamelengthsrcValidator, self).__init__(
pl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@hoverlabel@_namelengthsrc.py@.PATH_END.py |
{
"filename": "distutilsLib.py",
"repo_name": "ggobi/ggobi",
"repo_path": "ggobi_extracted/ggobi-master/plugins/Python/Install/distutilsLib.py",
"type": "Python"
} | from distutils.sysconfig import *
print get_config_vars()['LIBP'] + "/config"
# print get_config_vars()['LIBRARY']
| ggobiREPO_NAMEggobiPATH_START.@ggobi_extracted@ggobi-master@plugins@Python@Install@distutilsLib.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.