metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "python-installation-method-pip-install.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/installation/python-installation-method-pip-install.md",
"type": "Markdown"
} | # pip install
To install {{ product }} from pip:
1. Run the following command:
```no-highlight
pip install catboost
```
{% note info %}
[PyPI](https://pypi.org/) contains precompiled wheels for most commonly used platform configurations:
|Operating system|CPU architectures|GPU support usin... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@installation@python-installation-method-pip-install.md@.PATH_END.py |
{
"filename": "_tickcolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="tickcolor",
parent_name="scattercarpet.marker.colorbar",
**kwargs,
):
super(TickcolorValidator, self).__init__(
plotly... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@colorbar@_tickcolor.py@.PATH_END.py |
{
"filename": "clusterpyxt.py",
"repo_name": "bcalden/ClusterPyXT",
"repo_path": "ClusterPyXT_extracted/ClusterPyXT-master/clusterpyxt.py",
"type": "Python"
} | # version 1.414.0a
# Mar 14, 2022
import sys
import argparse
import pypeline_io as io
import cluster
from errors import ClusterPyError
import config
from PyQt5 import QtCore, QtGui, QtWidgets
from enum import IntEnum
import acb
from astropy.io import fits
import data_operations as do
from matplotlib.colors import LogN... | bcaldenREPO_NAMEClusterPyXTPATH_START.@ClusterPyXT_extracted@ClusterPyXT-master@clusterpyxt.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "larrybradley/lacosmic",
"repo_path": "lacosmic_extracted/lacosmic-main/lacosmic/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Package to remove cosmic rays from an astronomical image using the
L.A.Cosmic algorithm (van Dokkum 2001; PASP 113, 1420).
"""
try:
from .version import version as __version__
except ImportError:
__version__ = ''
| larrybradleyREPO_NAMElacosmicPATH_START.@lacosmic_extracted@lacosmic-main@lacosmic@__init__.py@.PATH_END.py |
{
"filename": "toolkit.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/agent_toolkits/sql/toolkit.py",
"type": "Python"
} | """Toolkit for interacting with an SQL database."""
from typing import List
from langchain_core.caches import BaseCache as BaseCache
from langchain_core.callbacks import Callbacks as Callbacks
from langchain_core.language_models import BaseLanguageModel
from langchain_core.tools import BaseTool
from langchain_core.to... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@agent_toolkits@sql@toolkit.py@.PATH_END.py |
{
"filename": "plotF_wH0Prior.py",
"repo_name": "FRBs/zdm",
"repo_path": "zdm_extracted/zdm-main/papers/F/Analysis/py/plotF_wH0Prior.py",
"type": "Python"
} | """
This is a script to produce limit plots for a cube.
The plots produced with priors on H0 are stored in folders prefixed with "wH0".
Plots generated with the synthetic CRACO cube are suffixed with "_forecast", while
plots generated with the real observation cube are suffixed with "_measured".
Plots showing PDFs wi... | FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@F@Analysis@py@plotF_wH0Prior.py@.PATH_END.py |
{
"filename": "plots.py",
"repo_name": "kevin218/POET",
"repo_path": "POET_extracted/POET-master/code/lib/plots.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
#SET PLOTTING FORMAT
ebfmt = ['bo', 'go', 'ro', 'co', 'mo', 'yo',
'bo', 'go', 'ro', 'co', 'mo', 'yo',
'bo', 'go', 'ro', 'co', 'mo', 'yo',
'bo', 'go', 'ro', 'co', 'mo', 'yo',
'bo', 'go', 'ro', 'co', ... | kevin218REPO_NAMEPOETPATH_START.@POET_extracted@POET-master@code@lib@plots.py@.PATH_END.py |
{
"filename": "_ticklen.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/colorbar/_ticklen.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklenValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="ticklen", parent_name="densitymapbox.colorbar", **kwargs
):
super(TicklenValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@colorbar@_ticklen.py@.PATH_END.py |
{
"filename": "hls.py",
"repo_name": "HiPERCAM/hipercam",
"repo_path": "hipercam_extracted/hipercam-master/hipercam/scripts/hls.py",
"type": "Python"
} | import os
import re
import requests
__all__ = [
"hls",
]
###################################################################
#
# hls -- 'ls'-like listing of runs available on the HiPERCAM server
#
###################################################################
def hls(args=None):
"""Gives an 'ls'-like l... | HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@scripts@hls.py@.PATH_END.py |
{
"filename": "chronoVehicle.md",
"repo_name": "projectchrono/chrono",
"repo_path": "chrono_extracted/chrono-main/doxygen/documentation/tutorials/vehicle/chronoVehicle.md",
"type": "Markdown"
} | Chrono VEHICLE module tutorials {#tutorial_table_of_content_chrono_vehicle}
===============================
The Chrono distribution contains several demos for modeling and simulating ground vehicle systems with the [VEHICLE module](@ref vehicle).
Chrono::Vehicle provides support for both wheeled and tracked vehicles,... | projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@doxygen@documentation@tutorials@vehicle@chronoVehicle.md@.PATH_END.py |
{
"filename": "mask_cells.py",
"repo_name": "SWIFTSIM/SOAP",
"repo_path": "SOAP_extracted/SOAP-master/mask_cells.py",
"type": "Python"
} | #!/bin/env python
from mpi4py import MPI
def mask_cells(comm, cellgrid, centre, radius, done):
"""
Flag all cells which need to be read in to ensure we have
all particles within the specified radii of the halo centres.
Parallelized over all MPI ranks in communicator comm.
"""
comm_size = com... | SWIFTSIMREPO_NAMESOAPPATH_START.@SOAP_extracted@SOAP-master@mask_cells.py@.PATH_END.py |
{
"filename": "_candlestick.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/figure_factory/_candlestick.py",
"type": "Python"
} | from plotly.figure_factory import utils
from plotly.figure_factory._ohlc import (
_DEFAULT_INCREASING_COLOR,
_DEFAULT_DECREASING_COLOR,
validate_ohlc,
)
from plotly.graph_objs import graph_objs
def make_increasing_candle(open, high, low, close, dates, **kwargs):
"""
Makes boxplot trace for increas... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@figure_factory@_candlestick.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/ohlc/hoverlabel/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@ohlc@hoverlabel@__init__.py@.PATH_END.py |
{
"filename": "plot_AZ_Avgs.py",
"repo_name": "geodynamics/Rayleigh",
"repo_path": "Rayleigh_extracted/Rayleigh-main/post_processing/plot_AZ_Avgs.py",
"type": "Python"
} | #
# Copyright (C) 2018 by the authors of the RAYLEIGH code.
#
# This file is part of RAYLEIGH.
#
# RAYLEIGH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any lat... | geodynamicsREPO_NAMERayleighPATH_START.@Rayleigh_extracted@Rayleigh-main@post_processing@plot_AZ_Avgs.py@.PATH_END.py |
{
"filename": "_tickcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/angularaxis/_tickcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="tickcolor", parent_name="layout.polar.angularaxis", **kwargs
):
super(TickcolorValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@angularaxis@_tickcolor.py@.PATH_END.py |
{
"filename": "Thermodynamics.py",
"repo_name": "danielkoll/PyRADS-shortwave",
"repo_path": "PyRADS-shortwave_extracted/PyRADS-shortwave-master/pyrads/Thermodynamics.py",
"type": "Python"
} | '''
Thermodynamic helper functions.
'''
from __future__ import division, print_function, absolute_import
import numpy as np
# Saturation vapor pressure from the Clausius-Clapeyron relation.
# --> assumes L is constant with temperature!
def get_satvps(T,T0,e0,Rv,Lv):
return e0*np.exp(-(Lv/Rv)*(1./T - 1./T0))
# -... | danielkollREPO_NAMEPyRADS-shortwavePATH_START.@PyRADS-shortwave_extracted@PyRADS-shortwave-master@pyrads@Thermodynamics.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "dgerosa/surrkick",
"repo_path": "surrkick_extracted/surrkick-master/setup.py",
"type": "Python"
} | #python setup.py sdist upload -r test
#python setup.py sdist upload
from setuptools import setup
# Extract version
def get_version():
with open('surrkick/surrkick.py') as f:
for line in f.readlines():
if "__version__" in line:
return line.split('"')[1]
def setup_package():
... | dgerosaREPO_NAMEsurrkickPATH_START.@surrkick_extracted@surrkick-master@setup.py@.PATH_END.py |
{
"filename": "trim_allwise_catalog.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/py/LSS/imaging/veto_masks/reference/trim_allwise_catalog.py",
"type": "Python"
} | # Based on AllWISE W1MPRO<13.3 catalog
# Select stars within 1.5 degree of a brick center
from __future__ import division, print_function
import sys, os, glob, time, warnings, gc
import numpy as np
# import matplotlib
# matplotlib.use("Agg")
# import matplotlib.pyplot as plt
from astropy.table import Table, vstack, hs... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@imaging@veto_masks@reference@trim_allwise_catalog.py@.PATH_END.py |
{
"filename": "state.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/src/amuse/support/state.py",
"type": "Python"
} | from amuse.support import exceptions
from amuse.support.options import OptionalAttributes
from amuse.support.options import option
from amuse.support.thirdparty.texttable import Texttable
import logging
class State(object):
def __init__(self, handler, name):
self.handler = handler
self.name = name... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@support@state.py@.PATH_END.py |
{
"filename": "_legendrank.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/_legendrank.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="legendrank", parent_name="waterfall", **kwargs):
super(LegendrankValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@_legendrank.py@.PATH_END.py |
{
"filename": "deflection_029.py",
"repo_name": "carronj/lenspyx",
"repo_path": "lenspyx_extracted/lenspyx-master/lenspyx/remapping/deflection_029.py",
"type": "Python"
} | from __future__ import annotations
import numpy as np
from lenspyx.utils_hp import Alm
from lenspyx import cachers
from lenspyx.remapping import deflection_028 as deflection_28
from ducc0.sht.experimental import adjoint_synthesis_general, synthesis_general
import ducc0
try:
from lenspyx.fortran.remapping import r... | carronjREPO_NAMElenspyxPATH_START.@lenspyx_extracted@lenspyx-master@lenspyx@remapping@deflection_029.py@.PATH_END.py |
{
"filename": "wire3d.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/mplot3d/wire3d.py",
"type": "Python"
} | """
=================
3D wireframe plot
=================
A very basic demonstration of a wireframe plot.
"""
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
# Grab some test data.
X, Y, Z = axes3d.get_test_data(0.05)
# Plot a basic ... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@mplot3d@wire3d.py@.PATH_END.py |
{
"filename": "set_and_get_params.py",
"repo_name": "ExeClim/Isca",
"repo_path": "Isca_extracted/Isca-master/src/extra/python/scripts/calculate_qflux/set_and_get_params.py",
"type": "Python"
} | import numpy as np
import pdb
import sys
sys.path.append('../')
import cell_area as carea
__author__='Stephen Thomson'
def model_params_set(input_dir,res=42, delta_t=900., radius=6376.0e3, day_length=86400., ocean_rho=1.035e3, ocean_cp=3989.24495292815, ml_depth=10., sigma_sb=5.6734e-8, pref=1000.,kappa=2./7., g=9.8,... | ExeClimREPO_NAMEIscaPATH_START.@Isca_extracted@Isca-master@src@extra@python@scripts@calculate_qflux@set_and_get_params.py@.PATH_END.py |
{
"filename": "pickleutil.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/ipykernel/py2/ipykernel/pickleutil.py",
"type": "Python"
} | # encoding: utf-8
"""Pickle related utilities. Perhaps this should be called 'can'."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import warnings
warnings.warn("ipykernel.pickleutil is deprecated. It has moved to ipyparallel.", DeprecationWarning)
import copy... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipykernel@py2@ipykernel@pickleutil.py@.PATH_END.py |
{
"filename": "test_umath_accuracy.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/_core/tests/test_umath_accuracy.py",
"type": "Python"
} | import numpy as np
import os
from os import path
import sys
import pytest
from ctypes import c_longlong, c_double, c_float, c_int, cast, pointer, POINTER
from numpy.testing import assert_array_max_ulp
from numpy.testing._private.utils import _glibc_older_than
from numpy._core._multiarray_umath import __cpu_features__
... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@_core@tests@test_umath_accuracy.py@.PATH_END.py |
{
"filename": "viewers.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/imviz/plugins/viewers.py",
"type": "Python"
} | import numpy as np
import astropy.units as u
from astropy.wcs.utils import pixel_to_pixel
from astropy.visualization import ImageNormalize, LinearStretch, PercentileInterval
from glue.core.link_helpers import LinkSame
from glue_jupyter.bqplot.image import BqplotImageView
from jdaviz.configs.imviz import wcs_utils
fro... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@imviz@plugins@viewers.py@.PATH_END.py |
{
"filename": "LICENSE.md",
"repo_name": "kyleaoman/martini",
"repo_path": "martini_extracted/martini-main/LICENSE.md",
"type": "Markdown"
} | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Pream... | kyleaomanREPO_NAMEmartiniPATH_START.@martini_extracted@martini-main@LICENSE.md@.PATH_END.py |
{
"filename": "operation_utils_test.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/src/ops/operation_utils_test.py",
"type": "Python"
} | from keras.src import backend
from keras.src import ops
from keras.src import testing
from keras.src.layers.core import input_layer
from keras.src.ops import operation_utils
class OperationUtilsTest(testing.TestCase):
def test_get_source_inputs(self):
x1 = backend.KerasTensor(shape=(2,))
x2 = back... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@ops@operation_utils_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/newshape/label/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... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@newshape@label@font@__init__.py@.PATH_END.py |
{
"filename": "test_cb_shutdown.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/test/functests/cbtests/test_cb_shutdown.py",
"type": "Python"
} | ###############################################################################
#
# Copyright (c) typedef int GmbH. Licensed under EUPLv1.2.
#
###############################################################################
from __future__ import print_function
from __future__ import absolute_import
import re
from fun... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@test@functests@cbtests@test_cb_shutdown.py@.PATH_END.py |
{
"filename": "test_sky_background.py",
"repo_name": "pyDANDIA/pyDANDIA",
"repo_path": "pyDANDIA_extracted/pyDANDIA-main/pyDANDIA/tests/test_sky_background.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 25 15:14:34 2017
@author: rstreet
"""
import os
import sys
cwd = os.getcwd()
sys.path.append(os.path.join(cwd,'../'))
import matplotlib.pyplot as plt
import numpy as np
import logs
import pipeline_setup
import metadata
import psf
import sky_background
import catalog_util... | pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@pyDANDIA@tests@test_sky_background.py@.PATH_END.py |
{
"filename": "test_streamlit_callback.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/callbacks/test_streamlit_callback.py",
"type": "Python"
} | """Integration tests for the StreamlitCallbackHandler module."""
import pytest
# Import the internal StreamlitCallbackHandler from its module - and not from
# the `langchain_community.callbacks.streamlit` package - so that we don't end up using
# Streamlit's externally-provided callback handler.
from langchain_commun... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@callbacks@test_streamlit_callback.py@.PATH_END.py |
{
"filename": "_x.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/carpet/_x.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="x", parent_name="carpet", **kwargs):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwar... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@carpet@_x.py@.PATH_END.py |
{
"filename": "surviving_mass.ipynb",
"repo_name": "changhoonhahn/provabgs",
"repo_path": "provabgs_extracted/provabgs-main/nb/tests/surviving_mass.ipynb",
"type": "Jupyter Notebook"
} | # test surviving mass implementation
```python
import numpy as np
from provabgs import util as UT
from provabgs import infer as Infer
from provabgs import models as Models
```
```python
from astropy.cosmology import Planck13
```
```python
# declare prior
prior = Infer.load_priors([
Infer.UniformPrior(7., 12.... | changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@nb@tests@surviving_mass.ipynb@.PATH_END.py |
{
"filename": "paper_settings.py",
"repo_name": "smsharma/mining-for-substructure-lens",
"repo_path": "mining-for-substructure-lens_extracted/mining-for-substructure-lens-master/notebooks/paper_settings.py",
"type": "Python"
} | import matplotlib
from matplotlib import pyplot as plt
from matplotlib import gridspec
import palettable
#CMAP1 = palettable.cartocolors.sequential.Teal_7.mpl_colormap
#CMAP2 = palettable.cartocolors.sequential.Teal_7.mpl_colormap
#COLORS = palettable.cartocolors.sequential.Teal_4_r.mpl_colors
TEXTWIDTH = 7.1014 # ... | smsharmaREPO_NAMEmining-for-substructure-lensPATH_START.@mining-for-substructure-lens_extracted@mining-for-substructure-lens-master@notebooks@paper_settings.py@.PATH_END.py |
{
"filename": "excTHCOMP.py",
"repo_name": "scotthgn/AGNvar",
"repo_path": "AGNvar_extracted/AGNvar-main/src/old_mods/excTHCOMP.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 7 17:46:09 2022
@author: wljw75
"""
"""
Module for excecuting THCOMP (Zdziarski et al. 2020) on some input spectrum.
Takes an input spectrum as two np arrays containing fluxes/luminosities and
energies. These are then loaded into pyXSPECs model ma... | scotthgnREPO_NAMEAGNvarPATH_START.@AGNvar_extracted@AGNvar-main@src@old_mods@excTHCOMP.py@.PATH_END.py |
{
"filename": "plot_age_posteriors.py",
"repo_name": "lgbouma/gyro-interp",
"repo_path": "gyro-interp_extracted/gyro-interp-main/drivers/plot_age_posteriors.py",
"type": "Python"
} | import os
import gyrointerp.plotting as gp
from gyrointerp.paths import RESULTSDIR
import numpy as np, pandas as pd
age_grid = np.linspace(0, 2600, 1000)
Teffs_Prots = [
(5800, np.arange(2, 12, 1.5)),
(5000, np.arange(4, 13.5, 1.5)),
(4200, np.arange(9, 18, 1.5)),
#(4000, np.arange(10, 12, 1.5)),
#... | lgboumaREPO_NAMEgyro-interpPATH_START.@gyro-interp_extracted@gyro-interp-main@drivers@plot_age_posteriors.py@.PATH_END.py |
{
"filename": "_anglesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/_anglesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="anglesrc", parent_name="scatter.marker", **kwargs):
super(AnglesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@_anglesrc.py@.PATH_END.py |
{
"filename": "EarlyDECosmology.py",
"repo_name": "igomezv/simplemc_tests",
"repo_path": "simplemc_tests_extracted/simplemc_tests-main/simplemc/models/EarlyDECosmology.py",
"type": "Python"
} | from simplemc.models.LCDMCosmology import LCDMCosmology
from simplemc.cosmo.paramDefs import w_par, Ode_par
class EarlyDECosmology(LCDMCosmology):
def __init__(self, varyw=True, varyOde=True, userd_DE=True):
"""
Early Dark Energy cosmology,
using Doran parameterization.
Parameters
... | igomezvREPO_NAMEsimplemc_testsPATH_START.@simplemc_tests_extracted@simplemc_tests-main@simplemc@models@EarlyDECosmology.py@.PATH_END.py |
{
"filename": "_colorbar.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/volume/_colorbar.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "volume"
_path_str = "volume.colorbar"
_valid_props = {
"bgcolor",
"borderc... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@volume@_colorbar.py@.PATH_END.py |
{
"filename": "quantity plots.md",
"repo_name": "Rnazx/Scaling-Relations",
"repo_path": "Scaling-Relations_extracted/Scaling-Relations-master/scaling_relation_plots/Model_3c/quantity plots.md",
"type": "Markdown"
} | <details>
<summary> Scale Height</summary>

</details>
<details>
<summary> Correlation Length </summary>

</details>
<details>
<summary> Turbulent Velocity </summary>

</details>
<details>
<summary>... | RnazxREPO_NAMEScaling-RelationsPATH_START.@Scaling-Relations_extracted@Scaling-Relations-master@scaling_relation_plots@Model_3c@quantity plots.md@.PATH_END.py |
{
"filename": "utils_numba_1D_32bit_no_proxy.py",
"repo_name": "fabiorigamonti/bang",
"repo_path": "bang_extracted/bang-main/tests/utils_numba_1D_32bit_no_proxy.py",
"type": "Python"
} | from numba import cuda,float64,float32,int16
import numpy as np
from math import isnan
from math import pi as M_PI
from math import acos,atan2,cos,sin,exp,log,log10,sqrt
'''Units are:
- M_sun/kpc^2 for surface densities
- km/s for velocities and dispersions
G = 4.299e-6
'''
#----------------... | fabiorigamontiREPO_NAMEbangPATH_START.@bang_extracted@bang-main@tests@utils_numba_1D_32bit_no_proxy.py@.PATH_END.py |
{
"filename": "convert_skyportal_lcs.py",
"repo_name": "nuclear-multimessenger-astronomy/nmma",
"repo_path": "nmma_extracted/nmma-main/tools/convert_skyportal_lcs.py",
"type": "Python"
} | #!/usr/bin/env python
from astropy.table import Table
import numpy as np
from astropy.time import Time
import pathlib
import argparse
BASE_DIR = pathlib.Path(__file__).parent.parent.absolute()
def convert_skyportal_lcs(filepath):
data_path = BASE_DIR / filepath
try:
data = Table.read(data_path, forma... | nuclear-multimessenger-astronomyREPO_NAMEnmmaPATH_START.@nmma_extracted@nmma-main@tools@convert_skyportal_lcs.py@.PATH_END.py |
{
"filename": "cent.py",
"repo_name": "alphapsa/PIPE",
"repo_path": "PIPE_extracted/PIPE-main/pipe/cent.py",
"type": "Python"
} | """
Created on Thu Mar 5 14:25:48 2020
@author: Alexis Brandeker, alexis@astro.su.se
A collection of methods to find the position of a PSF on the
detectior. Includes centre of flux and PSF fitting, also for
a simultaneous fit of the two components in unresolved binaries.
The more computation intensive PSF centerin... | alphapsaREPO_NAMEPIPEPATH_START.@PIPE_extracted@PIPE-main@pipe@cent.py@.PATH_END.py |
{
"filename": "amp_stats.py",
"repo_name": "HETDEX/hetdex_api",
"repo_path": "hetdex_api_extracted/hetdex_api-master/h5tools/amp_stats.py",
"type": "Python"
} | """
Initial Creation 2024-09-02
@author: Dustin Davis
Collection of code to support the determination of which amps, IFUs, shots are "bad"
Basic statistics with an amp+exposure as the functional unit with aggregation to the shot level.
"""
import tables
import os.path as op
import numpy as np
import glob
import... | HETDEXREPO_NAMEhetdex_apiPATH_START.@hetdex_api_extracted@hetdex_api-master@h5tools@amp_stats.py@.PATH_END.py |
{
"filename": "_textposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnelarea/_textposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="textposition", parent_name="funnelarea", **kwargs):
super(TextpositionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnelarea@_textposition.py@.PATH_END.py |
{
"filename": "tilenight_LRGsuccess.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/Sandbox/tilenight_LRGsuccess.py",
"type": "Python"
} | #right now, requires source /project/projectdirs/desi/software/desi_environment.sh master
from astropy.table import Table
import numpy as np
import os
import argparse
import fitsio
from desitarget.targetmask import zwarn_mask
parser = argparse.ArgumentParser()
parser.add_argument("--night", help="use this if you want ... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@Sandbox@tilenight_LRGsuccess.py@.PATH_END.py |
{
"filename": "run_simulation.py",
"repo_name": "lsstdesc/sn_pipe",
"repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/simulation/run_simulation.py",
"type": "Python"
} | from simuWrapper import SimuWrapper, MakeYaml
from optparse import OptionParser
from sn_tools.sn_process import Process
import numpy as np
import os
import yaml
parser = OptionParser()
parser.add_option("--dbName", type="str", default='descddf_v1.4_10yrs',
help="db name [%default]")
parser.add_optio... | lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@simulation@run_simulation.py@.PATH_END.py |
{
"filename": "noise.py",
"repo_name": "markusbonse/fours",
"repo_path": "fours_extracted/fours-main/fours/models/noise.py",
"type": "Python"
} | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from fours.utils.masks import construct_round_rfrr_template, construct_rfrr_mask
class FourSNoise(nn.Module):
def __init__(
self,
data_image_size,
psf_template,
lambda_reg,
... | markusbonseREPO_NAMEfoursPATH_START.@fours_extracted@fours-main@fours@models@noise.py@.PATH_END.py |
{
"filename": "_format.py",
"repo_name": "handley-lab/anesthetic",
"repo_path": "anesthetic_extracted/anesthetic-master/anesthetic/_format.py",
"type": "Python"
} | # flake8: noqa
from pandas.core.indexes.multi import sparsify_labels
from pandas.io.formats.format import (
DataFrameFormatter as DataFrameFormatter,
_make_fixed_width, is_numeric_dtype
)
from pandas import MultiIndex
class _DataFrameFormatter(DataFrameFormatter):
def _get_formatted_column_labels(self, f... | handley-labREPO_NAMEanestheticPATH_START.@anesthetic_extracted@anesthetic-master@anesthetic@_format.py@.PATH_END.py |
{
"filename": "missing_anywidget.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/missing_anywidget.py",
"type": "Python"
} | from .basedatatypes import BaseFigure
class FigureWidget(BaseFigure):
"""
FigureWidget stand-in for use when anywidget is not installed. The only purpose
of this class is to provide something to import as
`plotly.graph_objs.FigureWidget` when anywidget is not installed. This class
simply raises an... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@missing_anywidget.py@.PATH_END.py |
{
"filename": "line_lists.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/line_lists/line_lists.py",
"type": "Python"
} | import numpy as np
import os
import astropy.units as u
from astropy import constants as const
from astropy.table import QTable
from glue.core.message import (SubsetCreateMessage,
SubsetDeleteMessage,
SubsetUpdateMessage)
from glue_jupyter.common.toolbar_vu... | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@line_lists@line_lists.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "LCOGT/banzai",
"repo_path": "banzai_extracted/banzai-main/banzai/tests/utils.py",
"type": "Python"
} | import json
from datetime import datetime, timedelta
from types import ModuleType
import numpy as np
from astropy.io.fits import Header
from banzai import settings
from banzai.stages import Stage
from banzai.lco import LCOObservationFrame, LCOCalibrationFrame
from banzai.utils.image_utils import Section
from banzai.d... | LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@tests@utils.py@.PATH_END.py |
{
"filename": "augment.py",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/ultralytics/data/augment.py",
"type": "Python"
} | # Ultralytics YOLO 🚀, AGPL-3.0 license
import math
import random
from copy import deepcopy
from typing import Tuple, Union
import cv2
import numpy as np
import torch
from PIL import Image
from ultralytics.data.utils import polygons2masks, polygons2masks_overlap
from ultralytics.utils import LOGGER, colorstr
from ul... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@ultralytics@data@augment.py@.PATH_END.py |
{
"filename": "hyades-mock-dr2.ipynb",
"repo_name": "smoh/kinesis",
"repo_path": "kinesis_extracted/kinesis-master/notebooks/old/hyades-mock-dr2.ipynb",
"type": "Jupyter Notebook"
} | Test the general cluster model with mock Hyades data + DR2 errors.
```python
%matplotlib inline
import os
import pandas as pd
import numpy as np
from astropy.table import Table
import astropy.units as u
import astropy.coordinates as coords
# plotting
import matplotlib.pyplot as plt
from matplotlib import colors
impor... | smohREPO_NAMEkinesisPATH_START.@kinesis_extracted@kinesis-master@notebooks@old@hyades-mock-dr2.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/prefect/logging/__init__.py",
"type": "Python"
} | from .loggers import disable_run_logger, get_logger, get_run_logger, LogEavesdropper
__all__ = ["get_logger", "get_run_logger", "LogEavesdropper"]
| PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@logging@__init__.py@.PATH_END.py |
{
"filename": "plots_deconvolution.ipynb",
"repo_name": "CosmoStat/score",
"repo_path": "score_extracted/score-master/reproducible_research/paper_results/plots_deconvolution.ipynb",
"type": "Jupyter Notebook"
} | # Generating the Plots of the Deconvolution Results
In this notebook we reproduce the deconvolution results shown in figure 6 of the paper. We start by importing the required libraires, setting the plot parameters and loading the result data.
```python
#import libraries
import numpy as np
import matplotlib.pyplot as... | CosmoStatREPO_NAMEscorePATH_START.@score_extracted@score-master@reproducible_research@paper_results@plots_deconvolution.ipynb@.PATH_END.py |
{
"filename": "contributing.md",
"repo_name": "jfcrenshaw/pzflow",
"repo_path": "pzflow_extracted/pzflow-main/docs/contributing.md",
"type": "Markdown"
} | # Contributing to PZFlow
If you notice any bugs, have any questions, or would like to request a feature, please [submit an issue](https://github.com/jfcrenshaw/pzflow/issues).
To work on pzflow, after forking and cloning the repo:
1. Create a virtual environment with Python
E.g., with conda `conda create -n pzflow... | jfcrenshawREPO_NAMEpzflowPATH_START.@pzflow_extracted@pzflow-main@docs@contributing.md@.PATH_END.py |
{
"filename": "admin.py",
"repo_name": "mommermi/cloudynight",
"repo_path": "cloudynight_extracted/cloudynight-master/webapp/cloudynightserver/cam/admin.py",
"type": "Python"
} | """Licensed under a 3-clause BSD style license - see LICENSE.rst
This file is part of
cloudynight (c) Michael Mommert (mommermiscience@gmail.com), 2020
This file can be copied directly into your Django project.
"""
from django.contrib import admin
from .models import Labeled, Unlabeled, Subregion
admin.site.register... | mommermiREPO_NAMEcloudynightPATH_START.@cloudynight_extracted@cloudynight-master@webapp@cloudynightserver@cam@admin.py@.PATH_END.py |
{
"filename": "test_velocity.py",
"repo_name": "ConorMacBride/mcalf",
"repo_path": "mcalf_extracted/mcalf-main/src/mcalf/tests/visualisation/test_velocity.py",
"type": "Python"
} | import astropy.units as u
import numpy as np
import pytest
from mcalf.visualisation import plot_map
from ..helpers import figure_test
@pytest.fixture
def arr():
np.random.seed(1234)
a = np.random.rand(8, 6)
a[3, 3] = np.nan
a[5, 1] = np.nan
return (a * 16) - 8
@pytest.fixture
def mask(arr):
... | ConorMacBrideREPO_NAMEmcalfPATH_START.@mcalf_extracted@mcalf-main@src@mcalf@tests@visualisation@test_velocity.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "wmpg/WesternMeteorPyLib",
"repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/CMN/__init__.py",
"type": "Python"
} | wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@CMN@__init__.py@.PATH_END.py | |
{
"filename": "tpfrectangles.py",
"repo_name": "CPM-project/MCPM",
"repo_path": "MCPM_extracted/MCPM-master/source/MCPM/tpfrectangles.py",
"type": "Python"
} | import numpy as np
from os import path
import MCPM
class TpfRectangles(object):
"""
Keeps information on rectangles that are used in TPF files.
Note that there may be multple rectangles for a single TPF,
some rectangles are not full,
and some may have width or height of 1 pixel
"""
... | CPM-projectREPO_NAMEMCPMPATH_START.@MCPM_extracted@MCPM-master@source@MCPM@tpfrectangles.py@.PATH_END.py |
{
"filename": "_bingroup.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/_bingroup.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BingroupValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="bingroup", parent_name="histogram", **kwargs):
super(BingroupValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@_bingroup.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/layout/mapbox/layer/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="layout.mapbox.layer", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@layer@_color.py@.PATH_END.py |
{
"filename": "_ticks.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/ternary/baxis/_ticks.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticks", parent_name="layout.ternary.baxis", **kwargs
):
super(TicksValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@ternary@baxis@_ticks.py@.PATH_END.py |
{
"filename": "gen_qpdf_eta.py",
"repo_name": "HaowenZhang/TRINITY",
"repo_path": "TRINITY_extracted/TRINITY-main/src/python/gen_qpdf_eta.py",
"type": "Python"
} | import os
import sys
import subprocess
# This is the python wrapper of the C binary file, TRINITY/bin/gen_qpdf_eta,
# which generates quasar probability distribution function at an input redshift,
# on a grid of host galaxy mass and scaled SMBH accretion rate/luminosity.
if len(sys.argv) < 3:
print('Usage: %s z mass... | HaowenZhangREPO_NAMETRINITYPATH_START.@TRINITY_extracted@TRINITY-main@src@python@gen_qpdf_eta.py@.PATH_END.py |
{
"filename": "allskyf15.py",
"repo_name": "kapteyn-astro/kapteyn",
"repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/allskyf15.py",
"type": "Python"
} | from kapteyn import maputils
import numpy
from service import *
fignum = 15
fig = plt.figure(figsize=figsize)
frame = fig.add_axes(plotbox)
title = "Mercator's projection (MER). (Cal. fig.19)"
header = {'NAXIS' : 2, 'NAXIS1': 100, 'NAXIS2': 80,
'CTYPE1' : 'RA---MER',
'CRVAL1' : 0.0, 'CRPIX1' : 50... | kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@allskyf15.py@.PATH_END.py |
{
"filename": "test_curved_arc_const.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_LensModel/test_Profiles/test_curved_arc_const.py",
"type": "Python"
} | __author__ = "sibirrer"
import numpy as np
import numpy.testing as npt
import pytest
from lenstronomy.LensModel.Profiles.curved_arc_sis_mst import CurvedArcSISMST
from lenstronomy.LensModel.Profiles.curved_arc_const import (
CurvedArcConstMST,
CurvedArcConst,
)
from lenstronomy.Util import util
class TestCur... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_LensModel@test_Profiles@test_curved_arc_const.py@.PATH_END.py |
{
"filename": "openmvg.py",
"repo_name": "SISPO-developers/sispo",
"repo_path": "sispo_extracted/sispo-master/sispo/reconstruction/openmvg.py",
"type": "Python"
} | # SPDX-FileCopyrightText: 2021 Gabriel J. Schwarzkopf <sispo-devs@outlook.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Class to control openMVG behaviour."""
import logging
import shutil
from pathlib import Path
from . import utils
logger = logging.getLogger(__name__)
class OpenMVGControllerError(RuntimeE... | SISPO-developersREPO_NAMEsispoPATH_START.@sispo_extracted@sispo-master@sispo@reconstruction@openmvg.py@.PATH_END.py |
{
"filename": "_number.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/indicator/_number.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Number(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "indicator"
_path_str = "indicator.number"
_valid_props = {"font", "prefix", "suffix", "value... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@indicator@_number.py@.PATH_END.py |
{
"filename": "plotPhotonTransferCurve.py",
"repo_name": "lsst/cp_pipe",
"repo_path": "cp_pipe_extracted/cp_pipe-main/bin.src/plotPhotonTransferCurve.py",
"type": "Python"
} | #!/usr/bin/env python
#
# This file is part of cp_pipe.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program i... | lsstREPO_NAMEcp_pipePATH_START.@cp_pipe_extracted@cp_pipe-main@bin.src@plotPhotonTransferCurve.py@.PATH_END.py |
{
"filename": "any_lapack.py",
"repo_name": "benabed/clik",
"repo_path": "clik_extracted/clik-main/waf_tools/any_lapack.py",
"type": "Python"
} | #try to support many flavours of lapack
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import autoinstall_lib as atl
from waflib import Logs
import os.path as osp
from waflib import Logs
from waflib import Context
from waflib import Errors
import sys
impor... | benabedREPO_NAMEclikPATH_START.@clik_extracted@clik-main@waf_tools@any_lapack.py@.PATH_END.py |
{
"filename": "test_repar.py",
"repo_name": "steven-murray/mrpy",
"repo_path": "mrpy_extracted/mrpy-master/tests/test_repar.py",
"type": "Python"
} | import numpy as np
from mrpy.extra.likelihoods import SampleLike, CurveLike
import mrpy.extra.reparameterise as repar
## base data
logm = np.array([12])
dndm = np.array([1.0])
mmin = 10.0
hs = 14.0
a = -1.8
b = 0.7
mrp_po = SampleLike(logm,hs,a,b,log_mmin=mmin, lnA=1.0)
mrp_curve = CurveLike(logm,dndm, hs,a,b,lnA=1.... | steven-murrayREPO_NAMEmrpyPATH_START.@mrpy_extracted@mrpy-master@tests@test_repar.py@.PATH_END.py |
{
"filename": "linear_spline.py",
"repo_name": "axgoujon/convex_ridge_regularizers",
"repo_path": "convex_ridge_regularizers_extracted/convex_ridge_regularizers-main/models/linear_spline.py",
"type": "Python"
} | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from abc import ABC, abstractproperty, abstractmethod
from models.quadratic_spline import Quadratic_Spline_Func
def monotonic_clipping(cs):
"""Simple projection of the spline coefficients to obtain a monotonic linear splin... | axgoujonREPO_NAMEconvex_ridge_regularizersPATH_START.@convex_ridge_regularizers_extracted@convex_ridge_regularizers-main@models@linear_spline.py@.PATH_END.py |
{
"filename": "optimal_statistic.py",
"repo_name": "nanograv/enterprise_extensions",
"repo_path": "enterprise_extensions_extracted/enterprise_extensions-master/enterprise_extensions/frequentist/optimal_statistic.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
import warnings
import numpy as np
import scipy.linalg as sl
from enterprise.signals import gp_priors, signal_base, utils
from enterprise_extensions import model_orfs, models
# Define the output to be on a single line.
def warning_on_one_line(message, category, filename, lineno, file=None, ... | nanogravREPO_NAMEenterprise_extensionsPATH_START.@enterprise_extensions_extracted@enterprise_extensions-master@enterprise_extensions@frequentist@optimal_statistic.py@.PATH_END.py |
{
"filename": "_circle.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/mapbox/layer/_circle.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Circle(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer"
_path_str = "layout.mapbox.layer.circle"
_valid_props = {"radius"}
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@mapbox@layer@_circle.py@.PATH_END.py |
{
"filename": "establishing_the_correlation--step_3--looking_for_possible_systematics.py",
"repo_name": "DebduttaPaul/luminosity_function_of_lGRBs",
"repo_path": "luminosity_function_of_lGRBs_extracted/luminosity_function_of_lGRBs-master/establishing_the_correlation--step_3--looking_for_possible_systematics.py",
... | from __future__ import division
from astropy.io import ascii
from astropy.table import Table
from scipy.stats import pearsonr as R
from scipy.stats import spearmanr as S
from scipy.stats import kendalltau as T
from scipy.optimize import curve_fit
from scipy.integrate import quad
import debduttaS_functions as mf
import ... | DebduttaPaulREPO_NAMEluminosity_function_of_lGRBsPATH_START.@luminosity_function_of_lGRBs_extracted@luminosity_function_of_lGRBs-master@establishing_the_correlation--step_3--looking_for_possible_systematics.py@.PATH_END.py |
{
"filename": "eetq.py",
"repo_name": "huggingface/peft",
"repo_path": "peft_extracted/peft-main/src/peft/tuners/lora/eetq.py",
"type": "Python"
} | # Copyright 2024-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | huggingfaceREPO_NAMEpeftPATH_START.@peft_extracted@peft-main@src@peft@tuners@lora@eetq.py@.PATH_END.py |
{
"filename": "test_go_benchmark_functions.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/benchmarks/benchmarks/tests/test_go_benchmark_functions.py",
"type": "Python"
} | """
Unit tests for the global optimization benchmark functions
"""
import numpy as np
from .. import go_benchmark_functions as gbf
import inspect
class TestGoBenchmarkFunctions:
def setup_method(self):
bench_members = inspect.getmembers(gbf, inspect.isclass)
self.benchmark_functions = {it[0]:it[1... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@benchmarks@benchmarks@tests@test_go_benchmark_functions.py@.PATH_END.py |
{
"filename": "test_mser.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/modules/python/test/test_mser.py",
"type": "Python"
} | #!/usr/bin/env python
'''
MSER detector test
'''
# Python 2/3 compatibility
from __future__ import print_function
import numpy as np
import cv2 as cv
from tests_common import NewOpenCVTests
class mser_test(NewOpenCVTests):
def test_mser(self):
img = self.get_sample('cv/mser/puzzle.png', 0)
smal... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@python@test@test_mser.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "icrar/daliuge",
"repo_path": "daliuge_extracted/daliuge-master/daliuge-translator/dlg/dropmake/utils/__init__.py",
"type": "Python"
} | # ICRAR - International Centre for Radio Astronomy Research
# (c) UWA - The University of Western Australia, 2015
# Copyright by UWA (in the framework of the ICRAR)
# All rights reserved
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gen... | icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-translator@dlg@dropmake@utils@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/margin/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._t import TValidator
from ._r import RValidator
from ._pad import PadValidator
from ._l import LValidator
from ._b import BValidator
from ._autoexpand import AutoexpandValidator
else:
from _plotly_utils.importers import relative_import
__a... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@margin@__init__.py@.PATH_END.py |
{
"filename": "setup_package.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/xmatch/setup_package.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
def get_package_data():
paths = [os.path.join('data', '*.csv'),
]
return {'astroquery.xmatch.tests': paths}
| D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@xmatch@setup_package.py@.PATH_END.py |
{
"filename": "grf_regression.ipynb",
"repo_name": "mattcraigie/scattering-transform",
"repo_path": "scattering-transform_extracted/scattering-transform-master/scattering_transform/examples/grf_regression.ipynb",
"type": "Jupyter Notebook"
} | ### Gaussian Random Field Regression
In this notebook, we are going to use a Fourier space optimisable filter with the scattering transform for the task of image regression. The data will be a set of Gaussian Random Fields (GRFs) that have corresponding power spectra proportional to $k^{-n}$ where $n$ is the target pa... | mattcraigieREPO_NAMEscattering-transformPATH_START.@scattering-transform_extracted@scattering-transform-master@scattering_transform@examples@grf_regression.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._zorder import ZorderValidator
from ._ysrc import YsrcValidator
from ._yperiodalignment import YperiodalignmentValidator
from ._yperiod0 import Yperiod0Validator
from ._yperiod import YperiodValidator
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@waterfall@__init__.py@.PATH_END.py |
{
"filename": "test_plot_rms.py",
"repo_name": "pyDANDIA/pyDANDIA",
"repo_path": "pyDANDIA_extracted/pyDANDIA-main/pyDANDIA/tests/test_plot_rms.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
@author: rstreet
"""
from os import getcwd, path, remove
from pyDANDIA import automatic_pipeline
from pyDANDIA import logs
from pyDANDIA import plot_rms
import numpy as np
from pytest import approx
def generate_test_data():
nimages = 10
nstars = 5
base_mag = 17.0
sigma = 0.0... | pyDANDIAREPO_NAMEpyDANDIAPATH_START.@pyDANDIA_extracted@pyDANDIA-main@pyDANDIA@tests@test_plot_rms.py@.PATH_END.py |
{
"filename": "pywrap_saved_model_metrics_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/saved_model/pywrap_saved_model_metrics_test.py",
"type": "Python"
} | # Copyright 2021 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@saved_model@pywrap_saved_model_metrics_test.py@.PATH_END.py |
{
"filename": "sigmaclip.py",
"repo_name": "timstaley/chimenea",
"repo_path": "chimenea_extracted/chimenea-master/chimenea/sigmaclip.py",
"type": "Python"
} | """
functions for calculating statistical properties of images
"""
import numpy
def rms(data):
"""Returns the RMS of the data about the median.
Args:
data: a numpy array
"""
data -= numpy.median(data)
return numpy.sqrt(numpy.power(data, 2).sum() / len(data))
def clip(data, sigma=3):
""... | timstaleyREPO_NAMEchimeneaPATH_START.@chimenea_extracted@chimenea-master@chimenea@sigmaclip.py@.PATH_END.py |
{
"filename": "test_utils.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/tfr/python/test_utils.py",
"type": "Python"
} | # Copyright 2020 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@compiler@mlir@tfr@python@test_utils.py@.PATH_END.py |
{
"filename": "batch_nn_counts.ipynb",
"repo_name": "cae0027/Stellar-Blends",
"repo_path": "Stellar-Blends_extracted/Stellar-Blends-main/ce/muygps-hyperparameters/batch_nn_counts.ipynb",
"type": "Jupyter Notebook"
} | ```python
# from MuyGPyS import config
# config.update("muygpys_jax_enabled", False)
import numpy as np
import pandas as pd
import random
from tqdm import tqdm
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from MuyGPyS.examples.classify import do_classify
f... | cae0027REPO_NAMEStellar-BlendsPATH_START.@Stellar-Blends_extracted@Stellar-Blends-main@ce@muygps-hyperparameters@batch_nn_counts.ipynb@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/tickfont/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="weight", parent_name="parcoords.tickfont", **kwargs
):
super(WeightValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@tickfont@_weight.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/stream/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._token import TokenValidator
from ._maxpoints import MaxpointsValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValid... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@stream@__init__.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="scatter.hoverlabel.font", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "_sizesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/insidetextfont/_sizesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="sizesrc", parent_name="funnel.insidetextfont", **kwargs
):
super(SizesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@insidetextfont@_sizesrc.py@.PATH_END.py |
{
"filename": "OTFGetAtmCor.py",
"repo_name": "bill-cotton/Obit",
"repo_path": "Obit_extracted/Obit-master/ObitSystem/ObitSD/python/OTFGetAtmCor.py",
"type": "Python"
} | # $Id$
#-----------------------------------------------------------------------
# Copyright (C) 2004-2008
# Associated Universities, Inc. Washington DC, USA.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free So... | bill-cottonREPO_NAMEObitPATH_START.@Obit_extracted@Obit-master@ObitSystem@ObitSD@python@OTFGetAtmCor.py@.PATH_END.py |
{
"filename": "trail.py",
"repo_name": "AJMustill/moons",
"repo_path": "moons_extracted/moons-main/trail.py",
"type": "Python"
} | import numpy as np
class Trail:
def __init__(self,host='HOST',time=np.nan,parents=['PARENT1','PARENT2'],a=np.nan,e=np.nan,I=np.nan,Om=np.nan):
self.host = host
self.time = time
self.parents = parents
self.a = a
self.e = e
self.I = I
self.Om = Om | AJMustillREPO_NAMEmoonsPATH_START.@moons_extracted@moons-main@trail.py@.PATH_END.py |
{
"filename": "_tickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/marker/colorbar/_tickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickprefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickprefix", parent_name="bar.marker.colorbar", **kwargs
):
super(TickprefixValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@marker@colorbar@_tickprefix.py@.PATH_END.py |
{
"filename": "loader.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/PyYAML/py2/yaml/loader.py",
"type": "Python"
} |
__all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
from reader import *
from scanner import *
from parser import *
from composer import *
from constructor import *
from resolver import *
class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
def __init__(... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@PyYAML@py2@yaml@loader.py@.PATH_END.py |
{
"filename": "plot_0_contours.py",
"repo_name": "Samreay/ChainConsumer",
"repo_path": "ChainConsumer_extracted/ChainConsumer-master/docs/examples/plot_0_contours.py",
"type": "Python"
} | """
# Introduction to Contours
At the most basic, we take a contour as a pandas DataFrame and let ChainConsumer
handle the defaults and display.
"""
from chainconsumer import Chain, ChainConfig, ChainConsumer, PlotConfig, Truth, make_sample
# Here's what you might start with
df = make_sample(num_dimensions=2, seed=... | SamreayREPO_NAMEChainConsumerPATH_START.@ChainConsumer_extracted@ChainConsumer-master@docs@examples@plot_0_contours.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="scattergl.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.