metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "test_arithmetic.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/scalar/timestamp/test_arithmetic.py",
"type": "Python"
} | from datetime import (
datetime,
timedelta,
timezone,
)
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas._libs.tslibs import (
OutOfBoundsDatetime,
OutOfBoundsTimedelta,
Timedelta,
Timestamp,
offsets,
to_offset,
)
import pandas._testing as tm
class Test... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@scalar@timestamp@test_arithmetic.py@.PATH_END.py |
{
"filename": "_version.py",
"repo_name": "svalenti/FLOYDS_pipeline",
"repo_path": "FLOYDS_pipeline_extracted/FLOYDS_pipeline-master/src/floyds/_version.py",
"type": "Python"
} | __version__ = "2.2.2"
| svalentiREPO_NAMEFLOYDS_pipelinePATH_START.@FLOYDS_pipeline_extracted@FLOYDS_pipeline-master@src@floyds@_version.py@.PATH_END.py |
{
"filename": "_choropleth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/_choropleth.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Choropleth(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "choropleth"
_valid_props = {
"autocolorscale",
"coloraxis",
"colorbar",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@_choropleth.py@.PATH_END.py |
{
"filename": "test_conversion.py",
"repo_name": "kemasuda/jnkepler",
"repo_path": "jnkepler_extracted/jnkepler-main/tests/unittests/jaxttv/test_conversion.py",
"type": "Python"
} | #%%
import pytest
import glob
import pandas as pd
import numpy as np
from jnkepler.jaxttv import JaxTTV
from jnkepler.jaxttv.utils import params_to_elements, convert_elements, em_to_dict
from jnkepler.tests import read_testdata_tc
import importlib_resources
path = importlib_resources.files('jnkepler').joinpath('data')
... | kemasudaREPO_NAMEjnkeplerPATH_START.@jnkepler_extracted@jnkepler-main@tests@unittests@jaxttv@test_conversion.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "rhayes777/PyAutoFit",
"repo_path": "PyAutoFit_extracted/PyAutoFit-main/test_autofit/mapper/with_paths/__init__.py",
"type": "Python"
} | rhayes777REPO_NAMEPyAutoFitPATH_START.@PyAutoFit_extracted@PyAutoFit-main@test_autofit@mapper@with_paths@__init__.py@.PATH_END.py | |
{
"filename": "operator.py",
"repo_name": "pmelchior/scarlet",
"repo_path": "scarlet_extracted/scarlet-master/scarlet/operator.py",
"type": "Python"
} | from functools import partial
import numpy as np
from proxmin.operators import prox_unity_plus
from . import fft
from . import interpolation
def sort_by_radius(shape, center=None):
"""Sort indices distance from the center
Given a shape, calculate the distance of each
pixel from the center and return th... | pmelchiorREPO_NAMEscarletPATH_START.@scarlet_extracted@scarlet-master@scarlet@operator.py@.PATH_END.py |
{
"filename": "grid_interpolator.ipynb",
"repo_name": "timothydmorton/isochrones",
"repo_path": "isochrones_extracted/isochrones-master/docs/grid_interpolator.ipynb",
"type": "Jupyter Notebook"
} | # ModelGridInterpolator
In practice, interaction with the model grid and bolometric correction objects is easiest through a `ModelGridInterpolator` object, which brings the two together. This object is the replacement of the `Isochrone` object from previous generations of this package, though it has a slightly differ... | timothydmortonREPO_NAMEisochronesPATH_START.@isochrones_extracted@isochrones-master@docs@grid_interpolator.ipynb@.PATH_END.py |
{
"filename": "plugin.py",
"repo_name": "simonsobs/socs",
"repo_path": "socs_extracted/socs-main/socs/plugin.py",
"type": "Python"
} | package_name = 'socs'
agents = {
'ACUAgent': {'module': 'socs.agents.acu.agent', 'entry_point': 'main'},
'BlueforsAgent': {'module': 'socs.agents.bluefors.agent', 'entry_point': 'main'},
'CrateAgent': {'module': 'socs.agents.smurf_crate_monitor.agent', 'entry_point': 'main'},
'CryomechCPAAgent': {'modul... | simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@plugin.py@.PATH_END.py |
{
"filename": "make_draine_1mm.py",
"repo_name": "psheehan/pdspy",
"repo_path": "pdspy_extracted/pdspy-master/pdspy/dust/data/make_draine_1mm.py",
"type": "Python"
} | #!/usr/bin/env python3
from pdspy.dust import *
import numpy
water_ice = Dust()
water_ice.set_optical_constants_from_henn("optical_constants/water_ice.txt")
water_ice.set_density(0.92)
#1/3
graphite_parallel = Dust()
graphite_parallel.set_optical_constants_from_draine("optical_constants/graphite_parallel_0.01.txt")
... | psheehanREPO_NAMEpdspyPATH_START.@pdspy_extracted@pdspy-master@pdspy@dust@data@make_draine_1mm.py@.PATH_END.py |
{
"filename": "gridconfig.py",
"repo_name": "CobayaSampler/cobaya",
"repo_path": "cobaya_extracted/cobaya-master/cobaya/grid_tools/gridconfig.py",
"type": "Python"
} | """
.. module:: cobaya.grid_tools.gridconfig
:Synopsis: Grid creator (Cobaya version)
:Author: Antony Lewis and Jesus Torrado
(based on Antony Lewis' CosmoMC version of the same code)
"""
# Global
import os
import argparse
import importlib.util
from itertools import chain
from getdist.inifile import IniFile... | CobayaSamplerREPO_NAMEcobayaPATH_START.@cobaya_extracted@cobaya-master@cobaya@grid_tools@gridconfig.py@.PATH_END.py |
{
"filename": "ncm.py",
"repo_name": "NumCosmo/NumCosmo",
"repo_path": "NumCosmo_extracted/NumCosmo-master/numcosmo_py/ncm.py",
"type": "Python"
} | """Module for NumCosmoMath Python bindings."""
# The hack below is necessary to make the NumCosmoMath Python bindings work.
# This allows the use of our stubs and it also makes pylint and mypy happy.
import sys
import gi
gi.require_version("NumCosmoMath", "1.0")
# pylint:disable=wrong-import-position,unused-import,... | NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@numcosmo_py@ncm.py@.PATH_END.py |
{
"filename": "_iconsize.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="iconsize", parent_name="layout.mapbox.layer.symbol", **kwargs
):
super(IconsizeValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@mapbox@layer@symbol@_iconsize.py@.PATH_END.py |
{
"filename": "_include.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/yaxis/autorangeoptions/_include.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class IncludeValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self,
plotly_name="include",
parent_name="layout.scene.yaxis.autorangeoptions",
**kwargs,
):
super(IncludeValidator, self).__init__(
plotly_n... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@yaxis@autorangeoptions@_include.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax_plugins/cuda/__init__.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... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax_plugins@cuda@__init__.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sankey/link/line/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="sankey.link.line", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sankey@link@line@_color.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "astrom-tom/dfitspy",
"repo_path": "dfitspy_extracted/dfitspy-master/dfitspy/docs/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 ------------------------------------------------------------... | astrom-tomREPO_NAMEdfitspyPATH_START.@dfitspy_extracted@dfitspy-master@dfitspy@docs@docs@source@conf.py@.PATH_END.py |
{
"filename": "control-flow.md",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/control-flow.md",
"type": "Markdown"
} | ---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
---
+++ {"id": "rg4CpMZ8c3ri"}
(control-flow)=
# Control flow and logical operators with JIT
<... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@control-flow.md@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/unselected/marker/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="scattergl.unselected.marker", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@unselected@marker@_color.py@.PATH_END.py |
{
"filename": "detect.py",
"repo_name": "adiercke/DeepFilamentSegmentation",
"repo_path": "DeepFilamentSegmentation_extracted/DeepFilamentSegmentation-master/dfs/evaluation/detect.py",
"type": "Python"
} | import argparse
import glob
import os
import shutil
import numpy as np
import torch
from matplotlib import pyplot as plt
from torch.utils.data import DataLoader
from tqdm import tqdm
from dfs.data.data_set import EvaluationDataSet
parser = argparse.ArgumentParser()
parser.add_argument('--checkpoint_path', type=str, ... | adierckeREPO_NAMEDeepFilamentSegmentationPATH_START.@DeepFilamentSegmentation_extracted@DeepFilamentSegmentation-master@dfs@evaluation@detect.py@.PATH_END.py |
{
"filename": "plot_a_hst.py",
"repo_name": "arminrest/jhat",
"repo_path": "jhat_extracted/jhat-master/Docs/source/examples/plot_a_hst.py",
"type": "Python"
} | """
======
Hubble
======
Aligning HST images with JHAT.
"""
###############################################################
# An example HST Dataset is downloaded, and then a series of
# alignment methods are used. For more information on the
# key parameters used for alignment see
# :ref:`params:Useful Parameters`... | arminrestREPO_NAMEjhatPATH_START.@jhat_extracted@jhat-master@Docs@source@examples@plot_a_hst.py@.PATH_END.py |
{
"filename": "args.py",
"repo_name": "CosmoStat/shapepipe",
"repo_path": "shapepipe_extracted/shapepipe-master/shapepipe/pipeline/args.py",
"type": "Python"
} | """ARGUMENT HANDLING.
This module defines methods for handling the pipeline arguments.
:Author: Samuel Farrens <samuel.farrens@cea.fr>
"""
import argparse as ap
from shapepipe.info import __version__, shapepipe_logo
from shapepipe.modules import __module_list__
class cutomFormatter(
ap.ArgumentDefaultsHelpFo... | CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@shapepipe@pipeline@args.py@.PATH_END.py |
{
"filename": "02_paper_data.md",
"repo_name": "markusbonse/applefy",
"repo_path": "applefy_extracted/applefy-main/docs/source/04_apples_with_apples/02_paper_data.md",
"type": "Markdown"
} | # How to get the data
This short tutorial explains how to get the dataset and intermediate results
necessary to reproduce the results and plots of the
[Apples with Apples](../05_citation.rst) paper.
## Downloading the data from Zenodo
The data is publicly available at
[Zenodo](https://zenodo.org/record/7443481#.Y... | markusbonseREPO_NAMEapplefyPATH_START.@applefy_extracted@applefy-main@docs@source@04_apples_with_apples@02_paper_data.md@.PATH_END.py |
{
"filename": "geometry.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/utils/geometry.py",
"type": "Python"
} | import numpy as np
from glue.utils import unbroadcast
__all__ = ['points_inside_poly', 'polygon_line_intersections', 'floodfill', 'rotation_matrix_2d']
def rotation_matrix_2d(alpha):
"""
Return rotation matrix for angle alpha around origin.
Parameters
----------
alpha : float
Rotation a... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@utils@geometry.py@.PATH_END.py |
{
"filename": "dynamic_sampling_spin.py",
"repo_name": "HajimeKawahara/sot",
"repo_path": "sot_extracted/sot-master/src/sot/dymap/dynamic_sampling_spin.py",
"type": "Python"
} | #!/usr/bin/env python
import numpy as np
import healpy as hp
import pylab
import matplotlib.pyplot as plt
import time
import mocklc
import matplotlib
import sepmat
import gpkernel
import scipy
import emcee
import sys
import mvmap
Ns=2000
np.random.seed(53)
#set geometry
inc=45.0/180.0*np.pi
Thetaeq=np.pi
zeta=2... | HajimeKawaharaREPO_NAMEsotPATH_START.@sot_extracted@sot-master@src@sot@dymap@dynamic_sampling_spin.py@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="autocolorscale",
parent_name="scatterternary.marker",
**kwargs,
):
super(AutocolorscaleValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@_autocolorscale.py@.PATH_END.py |
{
"filename": "_minor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/yaxis/_minor.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Minor(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.yaxis"
_path_str = "layout.yaxis.minor"
_valid_props = {
"dtick",
"... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@yaxis@_minor.py@.PATH_END.py |
{
"filename": "_contourcarpet.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/_contourcarpet.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Contourcarpet(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "contourcarpet"
_valid_props = {
"a",
"a0",
"asrc",
"atype",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@_contourcarpet.py@.PATH_END.py |
{
"filename": "_ticklabeloverflow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_ticklabeloverflow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabeloverflow",
parent_name="scattercarpet.marker.colorbar",
**kwargs,
):
super(TicklabeloverflowValidator, self)... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_ticklabeloverflow.py@.PATH_END.py |
{
"filename": "batobservation.py",
"repo_name": "parsotat/batanalysis",
"repo_path": "batanalysis_extracted/batanalysis-main/batanalysis/batobservation.py",
"type": "Python"
} | """
This file contains the batobservation class which contains information pertaining to a given bat observation.
Tyler Parsotan Jan 24 2022
"""
from .batlib import datadir
from pathlib import Path
class BatObservation(object):
"""
A general Bat Observation object that holds information about the observatio... | parsotatREPO_NAMEbatanalysisPATH_START.@batanalysis_extracted@batanalysis-main@batanalysis@batobservation.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/hoverlabel/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._namelengthsrc import NamelengthsrcValidator
from ._namelength import NamelengthValidator
from ._font import FontValidator
from ._bordercolorsrc import BordercolorsrcValidator
from ._bordercolor import BordercolorValidator
from ._bgcolorsrc import ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "smooth_cal_inspect_2458061.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458061.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Calibration Smoothing Nightly Notebook
**Josh Dillon**, Last Revised 12/4/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_metr... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458061.ipynb@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/waterfall/increasing/marker/_line.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "waterfall.increasing.marker"
_path_str = "waterfall.increasing.marker.line"
_valid_props = {"c... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@waterfall@increasing@marker@_line.py@.PATH_END.py |
{
"filename": "_xaxis.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_xaxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="xaxis", parent_name="box", **kwargs):
super(XaxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
dflt=... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_xaxis.py@.PATH_END.py |
{
"filename": "TODO.md",
"repo_name": "MikeSWang/Harmonia",
"repo_path": "Harmonia_extracted/Harmonia-master/TODO.md",
"type": "Markdown"
} | # To-Do List
Currently only API documentation is available, but tutorials (integrated
notebooks) will be gradually added in the future. For now
[``application/``](../application/) offers some Python scripts that can
demonstrate the use of <span style="font-variant: small-caps">Harmonia</span>.
| MikeSWangREPO_NAMEHarmoniaPATH_START.@Harmonia_extracted@Harmonia-master@TODO.md@.PATH_END.py |
{
"filename": "target_extension.py",
"repo_name": "Fermipy/fermipy",
"repo_path": "fermipy_extracted/fermipy-master/fermipy/jobs/target_extension.py",
"type": "Python"
} | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Module with classes for target extension analysis
"""
from __future__ import absolute_import, division, print_function
import os
import sys
import numpy as np
from fermipy.utils import load_yaml, write_yaml, init_matplotlib_bac... | FermipyREPO_NAMEfermipyPATH_START.@fermipy_extracted@fermipy-master@fermipy@jobs@target_extension.py@.PATH_END.py |
{
"filename": "plot_weighted_samples.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/examples/svm/plot_weighted_samples.py",
"type": "Python"
} | """
=====================
SVM: Weighted samples
=====================
Plot decision function of a weighted dataset, where the size of points
is proportional to its weight.
The sample weighting rescales the C parameter, which means that the classifier
puts more emphasis on getting these points right. The effect might ... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@svm@plot_weighted_samples.py@.PATH_END.py |
{
"filename": "lightcone_coordinate_conversion.ipynb",
"repo_name": "sambit-giri/tools21cm",
"repo_path": "tools21cm_extracted/tools21cm-master/docs/examples/lightcone_coordinate_conversion.ipynb",
"type": "Jupyter Notebook"
} | # Light-cone coordinate conversion
```python
import numpy as np
import tools21cm as t2c
```
The epoch of reionization and cosmic dawn is simulated in comoving distances (physical coordinates) where as the 21-cm signal will be observed in observational coordinates ($\theta_x, \theta_y, \nu$).
In this tutorial, we wi... | sambit-giriREPO_NAMEtools21cmPATH_START.@tools21cm_extracted@tools21cm-master@docs@examples@lightcone_coordinate_conversion.ipynb@.PATH_END.py |
{
"filename": "_subplot.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolar/_subplot.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(self, plotly_name="subplot", parent_name="scatterpolar", **kwargs):
super(SubplotValidator, 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@scatterpolar@_subplot.py@.PATH_END.py |
{
"filename": "plotgen.py",
"repo_name": "andrewmbuchan4/PyllutedWD_Public",
"repo_path": "PyllutedWD_Public_extracted/PyllutedWD_Public-main/original_codebase/plotgen.py",
"type": "Python"
} | #IMPORTED CODES AND SETTINGS
import numpy as np
import corner
import matplotlib.pyplot as plt
import csv
import time
import warnings
import xlsxwriter
import json
from numba import jit
import os
import pymultinest
import xlrd
from pymultinest.solve import solve
from scipy.special import erfcinv
from scipy.special impor... | andrewmbuchan4REPO_NAMEPyllutedWD_PublicPATH_START.@PyllutedWD_Public_extracted@PyllutedWD_Public-main@original_codebase@plotgen.py@.PATH_END.py |
{
"filename": "AstroImage.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/image//AstroImage/AstroImage.md",
"type": "Markdown"
} | ;#autogen:ignore
Class Hierarchy: Base -> Component -> AstroImage
AstroImage is a container for images and images meta data, as well as basic functionality for image manipulation.
SHORT PARAGRAPH with primary capabilities/functionality.
DETAILED TEXT with full capabilities/functionality.
For additional help see man... | EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@image@@AstroImage@AstroImage.md@.PATH_END.py |
{
"filename": "_transforms_video.py",
"repo_name": "pytorch/vision",
"repo_path": "vision_extracted/vision-main/torchvision/transforms/_transforms_video.py",
"type": "Python"
} | #!/usr/bin/env python3
import numbers
import random
import warnings
from torchvision.transforms import RandomCrop, RandomResizedCrop
from . import _functional_video as F
__all__ = [
"RandomCropVideo",
"RandomResizedCropVideo",
"CenterCropVideo",
"NormalizeVideo",
"ToTensorVideo",
"RandomHor... | pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@transforms@_transforms_video.py@.PATH_END.py |
{
"filename": "karim2011.py",
"repo_name": "mirochaj/ares",
"repo_path": "ares_extracted/ares-main/input/litdata/karim2011.py",
"type": "Python"
} | """
Karim, A., et al. 2011, ApJ, 730, 61
http://arxiv.org/abs/1011.6370
For ssfr, values are corrected as seen in Behroozi et al. 2013 (http://arxiv.org/abs/1207.6105), Table 5.
"""
import numpy as np
info = \
{
'reference':'Karim, A., et al. 2011, ApJ, 730, 61',
'data': 'Behroozi, Table 5',
'imf': ('chabrier, ... | mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@input@litdata@karim2011.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/examples/eight_schools/README.md",
"type": "Markdown"
} | Analysis of the eight schools data (chapter 5 of [Gelman et al 2013]) using MCMC (NUTS) and SVI.
The starting model is the Stan model:
```
data {
int<lower=0> J; // number of schools
real y[J]; // estimated treatment effects
real<lower=0> sigma[J]; // s.e. of effect estimates
}
parameters {
real mu;
real<low... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@examples@eight_schools@README.md@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/unselected/marker/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="color",
parent_name="scattercarpet.unselected.marker",
**kwargs,
):
super(ColorValidator, self).__init__(
plotly_name=plot... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@unselected@marker@_color.py@.PATH_END.py |
{
"filename": "tex.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/tex.py",
"type": "Python"
} | """SCons.Tool.tex
Tool-specific initialization for TeX.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permiss... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@tex.py@.PATH_END.py |
{
"filename": "xrfi_h1c_run.py",
"repo_name": "HERA-Team/hera_qm",
"repo_path": "hera_qm_extracted/hera_qm-main/hera_qm/scripts/xrfi_h1c_run.py",
"type": "Python"
} | #!/usr/bin/env python
# Copyright (c) 2019 the HERA Project
# Licensed under the MIT License
import sys
from hera_qm import utils
from hera_qm import xrfi
def main():
ap = utils.get_metrics_ArgumentParser('xrfi_h1c_run')
args = ap.parse_args()
filename = args.filename
history = ' '.join(sys.argv)
... | HERA-TeamREPO_NAMEhera_qmPATH_START.@hera_qm_extracted@hera_qm-main@hera_qm@scripts@xrfi_h1c_run.py@.PATH_END.py |
{
"filename": "computeOccurrence_ntl-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline_dr25RadCut/.ipynb_checkpoints/computeOccurrence_ntl-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import requests
import pandas as pd
from astropy.io import fits
from cStringIO import StringIO
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import gamma
from scipy.optimize import minimize
from scipy.interpolate import RectBivariateSpline
import emcee
import corner
import scip... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline_dr25RadCut@.ipynb_checkpoints@computeOccurrence_ntl-checkpoint.ipynb@.PATH_END.py |
{
"filename": "rgs_test.py",
"repo_name": "mpeel/fastcc",
"repo_path": "fastcc_extracted/fastcc-master/rgs_test.py",
"type": "Python"
} | from fastcc import *
from fastcc_old import *
import numpy as np
import matplotlib.pyplot as plt
spectra = np.asarray([-2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0])
to_test = ['Q217', 'Q219', 'Q311', 'Q313', 'Q417','Q419','Q217p', 'Q219p', 'Q311p', 'Q313p', 'Q417p','Q419p']
for band in to_tes... | mpeelREPO_NAMEfastccPATH_START.@fastcc_extracted@fastcc-master@rgs_test.py@.PATH_END.py |
{
"filename": "bondi.py",
"repo_name": "aztekas-code/aztekas-main",
"repo_path": "aztekas-main_extracted/aztekas-main-master/SIMULATIONS/HD/Bondi/Analytic/bondi.py",
"type": "Python"
} | #######################################################
#
# Calculates numerical values for Bondi accretion model
# using parabolic Halley's method
#
# This program is executed as:
# ./bondi gamma rmin rmax N
# where:
# gamma is the polytropic index
# rmin is the minimum radius
# rmax is ... | aztekas-codeREPO_NAMEaztekas-mainPATH_START.@aztekas-main_extracted@aztekas-main-master@SIMULATIONS@HD@Bondi@Analytic@bondi.py@.PATH_END.py |
{
"filename": "run_msvc_wine.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/build/scripts/run_msvc_wine.py",
"type": "Python"
} | from __future__ import print_function
import sys
import os
import re
import subprocess
import signal
import time
import json
import argparse
import errno
# Explicitly enable local imports
# Don't forget to add imported scripts to inputs of the calling command!
sys.path.append(os.path.dirname(os.path.abspath(__file__))... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@build@scripts@run_msvc_wine.py@.PATH_END.py |
{
"filename": "constructor.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/calibration/constructor.py",
"type": "Python"
} | import numpy as np
from quartical.calibration.solver import solver_wrapper
from quartical.utils.dask import Blocker, get_block_id_arr
from collections import namedtuple
term_spec_tup = namedtuple("term_spec_tup", "name type shape pshape")
log_info_fields = ("SCAN_NUMBER", "FIELD_ID", "DATA_DESC_ID")
def construct_s... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@calibration@constructor.py@.PATH_END.py |
{
"filename": "typescript.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/parsers/language/typescript.py",
"type": "Python"
} | from typing import TYPE_CHECKING
from langchain_community.document_loaders.parsers.language.tree_sitter_segmenter import ( # noqa: E501
TreeSitterSegmenter,
)
if TYPE_CHECKING:
from tree_sitter import Language
CHUNK_QUERY = """
[
(function_declaration) @function
(class_declaration) @cla... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@parsers@language@typescript.py@.PATH_END.py |
{
"filename": "activex.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/Pythonwin/pywin/mfc/activex.py",
"type": "Python"
} | """Support for ActiveX control hosting in Pythonwin."""
import win32ui
import win32uiole
from . import window
class Control(window.Wnd):
"""An ActiveX control base class. A new class must be derived from both
this class and the Events class. See the demos for more details.
"""
def __init__(self):... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@Pythonwin@pywin@mfc@activex.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/scene/camera/center/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._z import ZValidator
from ._y import YValidator
from ._x import XValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XVali... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@scene@camera@center@__init__.py@.PATH_END.py |
{
"filename": "plot_plummer.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/examples/syllabus/plot_plummer.py",
"type": "Python"
} | """
Example AMUSE sciprt for generating a Plummer shere and plot the results.
"""
from matplotlib.pyplot import show, xlim, ylim, figure
from amuse.plot import scatter, xlabel, ylabel
from amuse.lab import new_plummer_model
def main(N=10):
figure(figsize=(5,5))
bodies = new_plummer_model(N)
scatter(bo... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@syllabus@plot_plummer.py@.PATH_END.py |
{
"filename": "cmdline_reference.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/r1/convert/cmdline_reference.md",
"type": "Markdown"
} | # Converter command line reference
This page is complete reference of command-line flags used by the TensorFlow
Lite Converter's command line tool.
## High-level flags
The following high level flags specify the details of the input and output
files. The flag `--output_file` is always required. Additionally, either
`... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@r1@convert@cmdline_reference.md@.PATH_END.py |
{
"filename": "laguerre.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/polynomial/laguerre.py",
"type": "Python"
} | """
Objects for dealing with Laguerre series.
This module provides a number of objects (mostly functions) useful for
dealing with Laguerre series, including a `Laguerre` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in th... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@polynomial@laguerre.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/bar/unselected/textfont/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._color import ColorValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._color.ColorValidator"]
)
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@unselected@textfont@__init__.py@.PATH_END.py |
{
"filename": "baidu_qianfan_endpoint.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/llms/baidu_qianfan_endpoint.ipynb",
"type": "Jupyter Notebook"
} | # Baidu Qianfan
Baidu AI Cloud Qianfan Platform is a one-stop large model development and service operation platform for enterprise developers. Qianfan not only provides including the model of Wenxin Yiyan (ERNIE-Bot) and the third-party open-source models, but also provides various AI development tools and the whole ... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@llms@baidu_qianfan_endpoint.ipynb@.PATH_END.py |
{
"filename": "gtest_filter_unittest.py",
"repo_name": "hpc4cmb/toast",
"repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googletest/test/gtest_filter_unittest.py",
"type": "Python"
} | #!/usr/bin/env python
#
# Copyright 2005 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googletest@test@gtest_filter_unittest.py@.PATH_END.py |
{
"filename": "deconv_psf.py",
"repo_name": "schlafly/crowdsource",
"repo_path": "crowdsource_extracted/crowdsource-master/crowdsource/deconv_psf.py",
"type": "Python"
} | import os
import pdb
import numpy
from skimage import restoration
from astropy.io import fits
import crowdsource.psf as psf
import os
if 'DECAM_DIR' not in os.environ:
decam_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),"decam_dir")
os.environ['DECAM_DIR'] = decam_dir
filt = 'ugrizY'
deconv = ... | schlaflyREPO_NAMEcrowdsourcePATH_START.@crowdsource_extracted@crowdsource-master@crowdsource@deconv_psf.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "desihub/desitarget",
"repo_path": "desitarget_extracted/desitarget-main/doc/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# desitarget documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 14 13:53:17 2015.
#
# 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.
#
... | desihubREPO_NAMEdesitargetPATH_START.@desitarget_extracted@desitarget-main@doc@conf.py@.PATH_END.py |
{
"filename": "readme.md",
"repo_name": "torna4o/source_jwst",
"repo_path": "source_jwst_extracted/source_jwst-main/simulated/readme.md",
"type": "Markdown"
} | This is the folder for the first part of the study on creating image denoising methods to find sources in JWST MIRI images better.
| torna4oREPO_NAMEsource_jwstPATH_START.@source_jwst_extracted@source_jwst-main@simulated@readme.md@.PATH_END.py |
{
"filename": "_parcats.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/template/data/_parcats.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ParcatsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="parcats", parent_name="layout.template.data", **kwargs
):
super(ParcatsValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@template@data@_parcats.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/api/_tf_keras/keras/legacy/saving/__init__.py",
"type": "Python"
} | """DO NOT EDIT.
This file was autogenerated. Do not edit it by hand,
since your modifications would be overwritten.
"""
from keras.src.legacy.saving.serialization import deserialize_keras_object
from keras.src.legacy.saving.serialization import serialize_keras_object
| fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@_tf_keras@keras@legacy@saving@__init__.py@.PATH_END.py |
{
"filename": "_utils.py",
"repo_name": "LoganAMorrison/Hazma",
"repo_path": "Hazma_extracted/Hazma-master/hazma/rh_neutrino/_utils.py",
"type": "Python"
} | from ._proto import Generation
def three_lepton_fs_generations(gen_n: Generation, unique: bool = False):
gen1 = gen_n
gen2, gen3 = {Generation.Fst, Generation.Snd, Generation.Trd}.difference({gen_n})
gens = [
(gen1, gen1, gen1),
(gen1, gen2, gen2),
(gen1, gen3, gen3),
]
if... | LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@rh_neutrino@_utils.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "SBU-COSMOLIKE/CAMB-Monodromic",
"repo_path": "CAMB-Monodromic_extracted/CAMB-Monodromic-main/docs/source/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# MyProj documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 18 20:57:49 2015.
#
# 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... | SBU-COSMOLIKEREPO_NAMECAMB-MonodromicPATH_START.@CAMB-Monodromic_extracted@CAMB-Monodromic-main@docs@source@conf.py@.PATH_END.py |
{
"filename": "test_io.py",
"repo_name": "desihub/desiutil",
"repo_path": "desiutil_extracted/desiutil-main/py/desiutil/test/test_io.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""Test desiutil.io.
"""
import unittest
import os
import stat
import sys
from tempfile import TemporaryDirectory
import numpy as np
from astropy.table import Table
from ..io import combine_dicts, decode_table, encode_table, yamlify... | desihubREPO_NAMEdesiutilPATH_START.@desiutil_extracted@desiutil-main@py@desiutil@test@test_io.py@.PATH_END.py |
{
"filename": "CHANGELOG.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/libs/flatbuffers/CHANGELOG.md",
"type": "Markdown"
} | # Flatbuffers Change Log
All major or breaking changes will be documented in this file, as well as any
new features that should be highlighted. Minor fixes or improvements are not
necessarily listed.
## [24.3.25] (March 25 2024)(https://github.com/google/flatbuffers/releases/tag/v24.3.25)
* Fixed license metadata pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@flatbuffers@CHANGELOG.md@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/ternary/caxis/title/font/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="family",
parent_name="layout.ternary.caxis.title.font",
**kwargs,
):
super(FamilyValidator, self).__init__(
plotly_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@ternary@caxis@title@font@_family.py@.PATH_END.py |
{
"filename": "_start.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/contours/x/_start.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StartValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="start", parent_name="surface.contours.x", **kwargs):
super(StartValidator, 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@surface@contours@x@_start.py@.PATH_END.py |
{
"filename": "forest.py",
"repo_name": "scikit-optimize/scikit-optimize",
"repo_path": "scikit-optimize_extracted/scikit-optimize-master/skopt/learning/forest.py",
"type": "Python"
} | import numpy as np
from sklearn.ensemble import RandomForestRegressor as _sk_RandomForestRegressor
from sklearn.ensemble import ExtraTreesRegressor as _sk_ExtraTreesRegressor
def _return_std(X, trees, predictions, min_variance):
"""
Returns `std(Y | X)`.
Can be calculated by E[Var(Y | Tree)] + Var(E[Y | ... | scikit-optimizeREPO_NAMEscikit-optimizePATH_START.@scikit-optimize_extracted@scikit-optimize-master@skopt@learning@forest.py@.PATH_END.py |
{
"filename": "utils.ipynb",
"repo_name": "smoh/kinesis",
"repo_path": "kinesis_extracted/kinesis-master/hyades/utils.ipynb",
"type": "Jupyter Notebook"
} | ```python
'''Project utility functions and variables'''
```
```python
# import numpy as np
# import astropy.units as u
# import astropy.coordinates as coord
```
```python
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
```
```python
def plot_cov_ellipse(
cov, xaxis=0, yaxis=1, ax=None, n... | smohREPO_NAMEkinesisPATH_START.@kinesis_extracted@kinesis-master@hyades@utils.ipynb@.PATH_END.py |
{
"filename": "sunf90.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/sunf90.py",
"type": "Python"
} | """SCons.Tool.sunf90
Tool-specific initialization for sunf90, the Sun Studio F90 compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@sunf90.py@.PATH_END.py |
{
"filename": "abscal_inspect_2458088.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458088.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_2458088.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py",
"type": "Python"
} | """Tree adapters let you convert from one tree structure to another
Example:
.. code-block:: python
from pip._vendor import html5lib
from pip._vendor.html5lib.treeadapters import genshi
doc = '<html><body>Hi!</body></html>'
treebuilder = html5lib.getTreeBuilder('etree')
parser = html5lib.HTMLParser(t... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@html5lib@treeadapters@__init__.py@.PATH_END.py |
{
"filename": "spfun_stats.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/special/spfun_stats.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.special` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = ['multigammaln'] # noqa: F822
def __dir__():
return __all__
def __getattr__(name)... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@spfun_stats.py@.PATH_END.py |
{
"filename": "flatdens.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/plotting/flatdens.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import fitsio
from astropy.table import join,Table
import healpy as hp
from LSS.imaging import densvar
outdir = '/global/cfs/cdirs/desi/survey/catalogs/main/LSS/daily/LSScats/plots/'
qt = 'COMP_TILE'
nside = 256
nest = True
zcol = 'Z_not4clus'... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@plotting@flatdens.py@.PATH_END.py |
{
"filename": "_scatterternary.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/template/data/_scatterternary.py",
"type": "Python"
} | from plotly.graph_objs import Scatterternary
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@template@data@_scatterternary.py@.PATH_END.py |
{
"filename": "axsite.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/com/win32comext/axscript/server/axsite.py",
"type": "Python"
} | import pythoncom
import winerror
from win32com.axscript import axscript
from win32com.server import util
from win32com.server.exception import COMException
class AXEngine:
def __init__(self, site, engine):
self.eScript = self.eParse = self.eSafety = None
if isinstance(engine, str):
eng... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@com@win32comext@axscript@server@axsite.py@.PATH_END.py |
{
"filename": "minimal.md",
"repo_name": "youngjookim/sdr",
"repo_path": "sdr_extracted/sdr-master/Code/packages/tapkee-master/examples/minimal/minimal.md",
"type": "Markdown"
} | In this example the simplest case of using the Tapkee library is considered. For
the sake of simplicity, the input data used in this example is a one dimensional range
of real values from 0.0 to 99.0 with step 1.0. Therefore, it actually does not reduce
the dimensionality but maps vectors using the provided distances.... | youngjookimREPO_NAMEsdrPATH_START.@sdr_extracted@sdr-master@Code@packages@tapkee-master@examples@minimal@minimal.md@.PATH_END.py |
{
"filename": "client.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/test/cf4/client.py",
"type": "Python"
} | from __future__ import print_function
import os
import argparse
import six
import txaio
import random
from twisted.internet import reactor
from twisted.internet.error import ReactorNotRunning
from twisted.internet.defer import inlineCallbacks, DeferredList
from autobahn.twisted.util import sleep
from autobahn.wamp.t... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@cf4@client.py@.PATH_END.py |
{
"filename": "Tutorial - Stats - Std.ipynb",
"repo_name": "NannyML/nannyml",
"repo_path": "nannyml_extracted/nannyml-main/docs/example_notebooks/Tutorial - Stats - Std.ipynb",
"type": "Jupyter Notebook"
} | ```python
import nannyml as nml
from IPython.display import display
reference_df, analysis_df, analysis_targets_df = nml.load_synthetic_car_loan_dataset()
display(reference_df.head())
```
<div>
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th ... | NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@docs@example_notebooks@Tutorial - Stats - Std.ipynb@.PATH_END.py |
{
"filename": "transformer_utils.py",
"repo_name": "ThomasHelfer/multimodal-supernovae",
"repo_path": "multimodal-supernovae_extracted/multimodal-supernovae-main/src/transformer_utils.py",
"type": "Python"
} | import math
import torch
import torch.nn as nn
from torch.nn import functional as F
class SelfAttention(nn.Module):
"""
Canonical implementation of multi-head self attention.
"""
def __init__(self, emb, heads=2):
"""
:param emb:
:param heads:
"""
super().__in... | ThomasHelferREPO_NAMEmultimodal-supernovaePATH_START.@multimodal-supernovae_extracted@multimodal-supernovae-main@src@transformer_utils.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/README.md",
"type": "Markdown"
} | # SavedModel importer FileCheck tests.
## Debugging tests
While debugging tests, the following commands are handy.
Run FileCheck test:
```
bazel run :foo.py.test
```
Run just the Python file and look at the output:
```
bazel run :foo
```
Generate saved model to inspect proto:
```
bazel run :foo -- --save_model_... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@compiler@mlir@tensorflow@tests@tf_saved_model@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/barpolar/unselected/marker/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._opacity import OpacityValidator
from ._color import ColorValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"]
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@barpolar@unselected@marker@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "HeloiseS/FUSS",
"repo_path": "FUSS_extracted/FUSS-master/FUSS/tests/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This packages contains affiliated package tests.
"""
| HeloiseSREPO_NAMEFUSSPATH_START.@FUSS_extracted@FUSS-master@FUSS@tests@__init__.py@.PATH_END.py |
{
"filename": "slack_directory.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/slack_directory.py",
"type": "Python"
} | import json
import zipfile
from pathlib import Path
from typing import Dict, Iterator, List, Optional, Union
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
class SlackDirectoryLoader(BaseLoader):
"""Load from a `Slack` directory dump."""
def _... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@slack_directory.py@.PATH_END.py |
{
"filename": "resources.py",
"repo_name": "astroufsc/chimera",
"repo_path": "chimera_extracted/chimera-master/src/chimera/core/resources.py",
"type": "Python"
} | # SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2024 Paulo Henrique Silva <ph.silva@gmail.com>
from chimera.core.location import Location
from chimera.core.exceptions import (
InvalidLocationException,
ObjectNotFoundException,
ChimeraException,
)
import time
import sys... | astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@resources.py@.PATH_END.py |
{
"filename": "_sd.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/box/_sd.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SdValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="sd", parent_name="box", **kwargs):
super(SdValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwar... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@box@_sd.py@.PATH_END.py |
{
"filename": "dipole.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/Profiles/dipole.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy as np
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
__all__ = ["Dipole", "DipoleUtil"]
class Dipole(LensProfileBase):
"""Class for dipole response of two massive bodies (experimental)"""
param_names = ["com_x", "com_y", "phi_dipole", "coupling... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@Profiles@dipole.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/examples/pissa_finetuning/README.md",
"type": "Markdown"
} | # PiSSA: Principal Singular values and Singular vectors Adaptation
## Introduction ([Paper](https://arxiv.org/abs/2404.02948), [code](https://github.com/GraphPKU/PiSSA))
PiSSA represents a matrix $W\in\mathbb{R}^{m\times n}$ within the model by the product of two trainable matrices $A \in \mathbb{R}^{m\times r}$ and $B... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@examples@pissa_finetuning@README.md@.PATH_END.py |
{
"filename": "fixHelpCompression.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/AutoDuck/fixHelpCompression.py",
"type": "Python"
} | # fixHelpCompression.py
# Add a compression option to the generated help project file.
import os
import sys
import win32api
fname = sys.argv[1]
try:
os.stat(fname)
except OSError:
sys.stderr.write("The project file '%s' was not found\n" % (fname))
sys.exit(1)
win32api.WriteProfileVal("options", "COMPRES... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@AutoDuck@fixHelpCompression.py@.PATH_END.py |
{
"filename": "radmc3dMolecule.py",
"repo_name": "dullemond/radmc3d-2.0",
"repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/opac/gas_lines/onezone_lte_line_trans/radmc3dMolecule.py",
"type": "Python"
} | #
# This is actually part of radmc3dPy/analyze.py, but here extracted as stand-alone.
# 2017.08.19
#
import numpy as np
class radmc3dMolecule(object):
"""
RADMC-3D molecule class
Based on the Leiden LAMDA database, but is in principle generic
NOTE: For now only the levels and lines are included, not the
... | dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@opac@gas_lines@onezone_lte_line_trans@radmc3dMolecule.py@.PATH_END.py |
{
"filename": "prepare_astrometric_epoch.py",
"repo_name": "dingswin/psrvlbireduce",
"repo_path": "psrvlbireduce_extracted/psrvlbireduce-master/datareduction/prepare_astrometric_epoch.py",
"type": "Python"
} | #!/usr/bin/env python
import os, sys, ftplib, glob
from astropy.time import Time
from datetime import datetime
def ftpget(url, directory, filename):
"""Return contents of a file on an ftp-ssl site"""
contents = []
ftps = ftplib.FTP_TLS(url)
# login and encrypt connection
ftps.login()
ftps.prot_... | dingswinREPO_NAMEpsrvlbireducePATH_START.@psrvlbireduce_extracted@psrvlbireduce-master@datareduction@prepare_astrometric_epoch.py@.PATH_END.py |
{
"filename": "Exoplanet_Spectra.ipynb",
"repo_name": "spacetelescope/jwebbinar_prep",
"repo_path": "jwebbinar_prep_extracted/jwebbinar_prep-main/mast_session/Exoplanet_Spectra/Exoplanet_Spectra.ipynb",
"type": "Jupyter Notebook"
} | # JWST SI Search for Exoplanet Spectra
## Introduction
This tutorial will illustrate how to use the MAST API to search for JWST science data by values of [FITS](https://fits.gsfc.nasa.gov/fits_standard.html) header keywords, and then retrieve all products for the corresponding observations.
Searching by SI Keyword va... | spacetelescopeREPO_NAMEjwebbinar_prepPATH_START.@jwebbinar_prep_extracted@jwebbinar_prep-main@mast_session@Exoplanet_Spectra@Exoplanet_Spectra.ipynb@.PATH_END.py |
{
"filename": "test_tags.py",
"repo_name": "GeminiDRSoftware/GHOSTDR",
"repo_path": "GHOSTDR_extracted/GHOSTDR-master/ghost_instruments/test/test_tags.py",
"type": "Python"
} | """
Perform a series of regression tests across GHOST-specific AstroData tags.
"""
import pytest
import astrodata
import ghost_instruments
import os
THIS_DIR = os.path.dirname(__file__)
from .lut_tags import fixture_data as tags_fixture_data
tags_fixture_data = {}
# ---
# REGRESSION TESTING
# ---
class FixtureIte... | GeminiDRSoftwareREPO_NAMEGHOSTDRPATH_START.@GHOSTDR_extracted@GHOSTDR-master@ghost_instruments@test@test_tags.py@.PATH_END.py |
{
"filename": "_tickwidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/densitymapbox/colorbar/_tickwidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs
):
super(TickwidthValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@densitymapbox@colorbar@_tickwidth.py@.PATH_END.py |
{
"filename": "tracker.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pyzmq/py3/zmq/sugar/tracker.py",
"type": "Python"
} | """Tracker for zero-copy messages with 0MQ."""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import time
from threading import Event
from typing import Set, Tuple, Union
from zmq.backend import Frame
from zmq.error import NotDone
class MessageTracker:
"""MessageTra... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pyzmq@py3@zmq@sugar@tracker.py@.PATH_END.py |
{
"filename": "exppow.py",
"repo_name": "guillochon/MOSFiT",
"repo_path": "MOSFiT_extracted/MOSFiT-master/mosfit/modules/engines/exppow.py",
"type": "Python"
} | """Definitions for the `ExpPow` class."""
from math import isnan
import numpy as np
from mosfit.modules.engines.engine import Engine
# Important: Only define one ``Module`` class per file.
class ExpPow(Engine):
"""A simple analytical engine."""
def process(self, **kwargs):
"""Process module."""
... | guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@mosfit@modules@engines@exppow.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.