metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "clf_redmapper.py",
"repo_name": "LSSTDESC/descqa",
"repo_path": "descqa_extracted/descqa-master/descqa/clf_redmapper.py",
"type": "Python"
} | import os
import pickle
import numpy as np
import treecorr
from .kcorrect_wrapper import kcorrect
from .base import BaseValidationTest, TestResult
from .plotting import plt
import matplotlib.ticker as tck
import warnings
__all__ = ["ConditionalLuminosityFunction_redmapper"]
def cluster_Lcount(lumbins, limmag):
... | LSSTDESCREPO_NAMEdescqaPATH_START.@descqa_extracted@descqa-master@descqa@clf_redmapper.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "jobovy/galpy",
"repo_path": "galpy_extracted/galpy-main/galpy/potential/__init__.py",
"type": "Python"
} | from . import (
AdiabaticContractionWrapperPotential,
AnyAxisymmetricRazorThinDiskPotential,
AnySphericalPotential,
BurkertPotential,
ChandrasekharDynamicalFrictionForce,
CorotatingRotationWrapperPotential,
CosmphiDiskPotential,
DehnenBarPotential,
DehnenSmoothWrapperPotential,
D... | jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@potential@__init__.py@.PATH_END.py |
{
"filename": "config.py",
"repo_name": "alphalyncis/doppler-imaging-maxentropy",
"repo_path": "doppler-imaging-maxentropy_extracted/doppler-imaging-maxentropy-main/src/config.py",
"type": "Python"
} | import numpy as np
import paths
##############################################################################
#################### Constants ##########################################
##############################################################################
npixs = {"IGRINS": 1848, "CRIRES": 1024}
nks = {... | alphalyncisREPO_NAMEdoppler-imaging-maxentropyPATH_START.@doppler-imaging-maxentropy_extracted@doppler-imaging-maxentropy-main@src@config.py@.PATH_END.py |
{
"filename": "components.py",
"repo_name": "b-thorne/PySM_public",
"repo_path": "PySM_public_extracted/PySM_public-master/pysm/components.py",
"type": "Python"
} | """
.. module:: components
:platform: Unix
:synopsis: module containing definitions of component objects in pysm.
.. moduleauthor: Ben Thorne <ben.thorne@physics.ox.ac.uk>
"""
from __future__ import absolute_import, print_function
import numpy as np
import healpy as hp
import os, sys, time
import scipy.constant... | b-thorneREPO_NAMEPySM_publicPATH_START.@PySM_public_extracted@PySM_public-master@pysm@components.py@.PATH_END.py |
{
"filename": "incomplete-GCs from Bianchini et al. 2019.ipynb",
"repo_name": "smoh/kinesis",
"repo_path": "kinesis_extracted/kinesis-master/notebooks/other/incomplete-GCs from Bianchini et al. 2019.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import numpy as np
import gapipes as gp
```
```python
import astropy.coordinates as coord
```
```python
ngc104 = coord.SkyCoord.from_name('NGC 104')
```
```python
pm = [7.26, -1.25] # [pmra, pmdec], mas/yr
```
```... | smohREPO_NAMEkinesisPATH_START.@kinesis_extracted@kinesis-master@notebooks@other@incomplete-GCs from Bianchini et al. 2019.ipynb@.PATH_END.py |
{
"filename": "module_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/module/module_test.py",
"type": "Python"
} | # Copyright 2019 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@module@module_test.py@.PATH_END.py |
{
"filename": "README_simple.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/contourpy/README_simple.md",
"type": "Markdown"
} | <img alt="ContourPy" src="https://raw.githubusercontent.com/contourpy/contourpy/main/docs/_static/contourpy_logo_horiz.svg" height="90">
ContourPy is a Python library for calculating contours of 2D quadrilateral grids. It is written in C++11 and wrapped using pybind11.
It contains the 2005 and 2014 algorithms used i... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@contourpy@README_simple.md@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="scattermapbox.hoverlabel.font",
**kwargs,
):
super(FamilysrcValidator, self).__init__(
plotly_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "auto_view.py",
"repo_name": "HERA-Team/hera_qm",
"repo_path": "hera_qm_extracted/hera_qm-main/hera_qm/scripts/auto_view.py",
"type": "Python"
} | #! /usr/bin/env python
# Copyright (c) 2019 the HERA Project
# Licensed under the MIT License
import os
import argparse
import numpy as np
import re
import matplotlib as mpl
import redis as redis_lib
from hera_mc import mc, sys_handling
from astropy import time
import pyuvdata.utils as uvutils
import aipy.miriad as ap... | HERA-TeamREPO_NAMEhera_qmPATH_START.@hera_qm_extracted@hera_qm-main@hera_qm@scripts@auto_view.py@.PATH_END.py |
{
"filename": "Fischer_2020.ipynb",
"repo_name": "SNEWS2/snewpy",
"repo_path": "snewpy_extracted/snewpy-main/doc/nb/ccsn/Fischer_2020.ipynb",
"type": "Jupyter Notebook"
} | # Fischer 2020 Model
CCSN neutrino model from Tobias Fischer
The citation is: *Neutrino signal from proto-neutron star evolution: Effects of opacities from charged-current-neutrino interactions and inverse neutron decay*, Fischer, Tobias ; Guo, Gang ; Dzhioev, Alan A. ; Martínez-Pinedo, Gabriel ; Wu, Meng-Ru ; Lohs, ... | SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@doc@nb@ccsn@Fischer_2020.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/click/py3/click/__init__.py",
"type": "Python"
} | """
Click is a simple Python module inspired by the stdlib optparse to make
writing command line scripts fun. Unlike other modules, it's based
around a simple API that does not come with too much magic and is
composable.
"""
from .core import Argument as Argument
from .core import BaseCommand as BaseCommand
from .core ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@click@py3@click@__init__.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "matvii/ADAM",
"repo_path": "ADAM_extracted/ADAM-master/Utils/python/utils.py",
"type": "Python"
} | import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
import matplotlib.tri as tri
import numpy as np
def Read_Shape(shapefile):
f=open(shapefile,'r')
s=f.readline()
nvert=int(s.split()[0])
nfac=int(s.split()[1])
vlist=np.zeros((nvert,3))
tlist=np.zeros((nfac,3),dtype=np.int)... | matviiREPO_NAMEADAMPATH_START.@ADAM_extracted@ADAM-master@Utils@python@utils.py@.PATH_END.py |
{
"filename": "_tickformatstops.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/marker/colorbar/_tickformatstops.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self,
plotly_name="tickformatstops",
parent_name="scatter.marker.colorbar",
**kwargs,
):
super(TickformatstopsValidator, self).__init__... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@marker@colorbar@_tickformatstops.py@.PATH_END.py |
{
"filename": "ndgriddata.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/interpolate/ndgriddata.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.interpolate` namespace for importing the functions
# included below.
from scipy._lib.deprecation import _sub_module_deprecation
__all__ = [ # noqa: F822
'CloughTocher2DInterpolator',
'LinearNDInterpolator',
'Ne... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@interpolate@ndgriddata.py@.PATH_END.py |
{
"filename": "camera_calibration_show_extrinsics.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/samples/python/camera_calibration_show_extrinsics.py",
"type": "Python"
} | #!/usr/bin/env python
'''
Plot camera calibration extrinsics.
usage:
camera_calibration_show_extrinsics.py [--calibration <input path>] [--cam_width] [--cam_height] [--scale_focal] [--patternCentric ]
default values:
--calibration : left_intrinsics.yml
--cam_width : 0.064/2
--cam_height :... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@python@camera_calibration_show_extrinsics.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "mcataneo/mochi_class_public",
"repo_path": "mochi_class_public_extracted/mochi_class_public-main/external/RealSpaceInterface/static/fonts/open-iconic/README.md",
"type": "Markdown"
} | [Open Iconic v1.1.1](http://useiconic.com/open)
===========
### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
## Wh... | mcataneoREPO_NAMEmochi_class_publicPATH_START.@mochi_class_public_extracted@mochi_class_public-main@external@RealSpaceInterface@static@fonts@open-iconic@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "grand-mother/grand",
"repo_path": "grand_extracted/grand-main/grand/simu/shower/__init__.py",
"type": "Python"
} | """
Classes to handle external Air shower simulators: ZHAires and Coreas
"""
from .coreas import CoreasShower
from grand.simu.shower.gen_shower import ShowerEvent
from .zhaires import ZhairesShower
from .pdg import ParticleCode
__all__ = ["CoreasShower", "ShowerEvent", "ZhairesShower", "ParticleCode"]
| grand-motherREPO_NAMEgrandPATH_START.@grand_extracted@grand-main@grand@simu@shower@__init__.py@.PATH_END.py |
{
"filename": "camera_path.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/visualization/volume_rendering/camera_path.py",
"type": "Python"
} | import random
import numpy as np
from yt.visualization.volume_rendering.create_spline import create_spline
class Keyframes:
def __init__(
self,
x,
y,
z=None,
north_vectors=None,
up_vectors=None,
times=None,
niter=50000,
init_temp=10.0,
... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@visualization@volume_rendering@camera_path.py@.PATH_END.py |
{
"filename": "pdf.py",
"repo_name": "rat-pac/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/pdf.py",
"type": "Python"
} | """SCons.Tool.pdf
Common PDF Builder definition for various other Tool modules that use it.
Add an explicit action to run epstopdf to convert .eps files to .pdf
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any per... | rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@pdf.py@.PATH_END.py |
{
"filename": "_style.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="ohlc.hoverlabel.font", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@hoverlabel@font@_style.py@.PATH_END.py |
{
"filename": "DataGeneration.py",
"repo_name": "PoulinV/AxiCLASS",
"repo_path": "AxiCLASS_extracted/AxiCLASS-master/external/RealSpaceInterface/Calc2D/DataGeneration.py",
"type": "Python"
} | import logging
import numpy as np
import cv2
from Calc2D.rFourier import realFourier, realInverseFourier
def GenerateGaussianData(sigma, size, points, A=1):
xr = np.linspace(-size / 2.0, size / 2.0, points)
yr = np.linspace(-size / 2.0, size / 2.0, points)
step = xr[1] - xr[0]
x, y = np.meshgrid(
... | PoulinVREPO_NAMEAxiCLASSPATH_START.@AxiCLASS_extracted@AxiCLASS-master@external@RealSpaceInterface@Calc2D@DataGeneration.py@.PATH_END.py |
{
"filename": "run_batch_fourth.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/devel/external/AEGIS/run_batch_fourth.py",
"type": "Python"
} | # Copyright (c) 2012-2023 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... | GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@external@AEGIS@run_batch_fourth.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._zsrc import ZsrcValidator
from ._zmin import ZminValidator
from ._zmid import ZmidValidator
from ._zmax import ZmaxValidator
from ._zauto import ZautoValidator
from ._z import ZValidator
from ._visible import VisibleValidator
from ._unsele... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@__init__.py@.PATH_END.py |
{
"filename": "driver_lensing_kernel_nulling.py",
"repo_name": "EmmanuelSchaan/LaSSI",
"repo_path": "LaSSI_extracted/LaSSI-master/driver_lensing_kernel_nulling.py",
"type": "Python"
} | import universe
reload(universe)
from universe import *
import projection_kernel
reload(projection_kernel)
from projection_kernel import *
##################################################################################
u = UnivPlanck15()
##########################################################################... | EmmanuelSchaanREPO_NAMELaSSIPATH_START.@LaSSI_extracted@LaSSI-master@driver_lensing_kernel_nulling.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "maserlib/ExPRES",
"repo_path": "ExPRES_extracted/ExPRES-master/README.md",
"type": "Markdown"
} | # Exoplanetary and Planetary Radio Emission Simulator (ExPRES) V1.3.0
<a href="http://ascl.net/1902.009"><img src="https://img.shields.io/badge/ascl-1902.009-blue.svg?colorB=262255" alt="ascl:1902.009" /></a>
[](https://doi.org/10.5281/zenodo.4280546)
[![D... | maserlibREPO_NAMEExPRESPATH_START.@ExPRES_extracted@ExPRES-master@README.md@.PATH_END.py |
{
"filename": "dustmap.py",
"repo_name": "fraserevans/speedystar",
"repo_path": "speedystar_extracted/speedystar-main/speedystar/utils/dustmap.py",
"type": "Python"
} | from scipy import interpolate
import numpy
import healpy
import h5py
np = numpy
_DEGTORAD = numpy.pi/180.
class DustMap:
'''
Loads a dustmap in the h5 format like the ones in mwdust [doi:10.3847/0004-637X/818/2/130]
Methods
-------
query_dust
Returns the dust e... | fraserevansREPO_NAMEspeedystarPATH_START.@speedystar_extracted@speedystar-main@speedystar@utils@dustmap.py@.PATH_END.py |
{
"filename": "_text.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/title/_text.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="text", parent_name="indicator.title", **kwargs):
super(TextValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@title@_text.py@.PATH_END.py |
{
"filename": "mkl_fft.py",
"repo_name": "ajeldorado/falco-python",
"repo_path": "falco-python_extracted/falco-python-master/falco/mkl_fft.py",
"type": "Python"
} | """
Wrapper for the MKL FFT routines. This implements very fast FFT on Intel
processors, much faster than the stock fftpack routines in numpy/scipy.
"""
from __future__ import division, print_function
import numpy as np
import ctypes as _ctypes
import os
from dftidefs import *
def load_libmkl():
r"""Loads the ... | ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@mkl_fft.py@.PATH_END.py |
{
"filename": "_legendrank.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/_legendrank.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="legendrank", parent_name="barpolar", **kwargs):
super(LegendrankValidator, 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@barpolar@_legendrank.py@.PATH_END.py |
{
"filename": "_outlinewidth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name="outlinewidth",
parent_name="scatterpolargl.marker.colorbar",
**kwargs,
):
super(OutlinewidthValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@colorbar@_outlinewidth.py@.PATH_END.py |
{
"filename": "_tickformatstop.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickformatstop(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.angularaxis"
_path_str = "layout.polar.angularaxis.tickformatstop"
_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@polar@angularaxis@_tickformatstop.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "PetroFit/petrofit",
"repo_path": "petrofit_extracted/petrofit-main/petrofit/modeling/__init__.py",
"type": "Python"
} | from .fitting import *
from .models import *
| PetroFitREPO_NAMEpetrofitPATH_START.@petrofit_extracted@petrofit-main@petrofit@modeling@__init__.py@.PATH_END.py |
{
"filename": "FastLensSim.py",
"repo_name": "tcollett/LensPop",
"repo_path": "LensPop_extracted/LensPop-master/FastLensSim.py",
"type": "Python"
} | import indexTricks as iT
import numpy
from pylens import *
from imageSim import profiles,convolve,SBModels
import distances as D
import cPickle
import indexTricks as iT
import numpy,pylab
from imageSim import profiles,convolve,models
import pylab as plt
from Surveys import Survey
from StochasticObserving import SO
from... | tcollettREPO_NAMELensPopPATH_START.@LensPop_extracted@LensPop-master@FastLensSim.py@.PATH_END.py |
{
"filename": "MG_estimator.ipynb",
"repo_name": "dlanzieri/WL_Implicit-Inference",
"repo_path": "WL_Implicit-Inference_extracted/WL_Implicit-Inference-main/notebook/MG_estimator.ipynb",
"type": "Jupyter Notebook"
} | ```python
from jax.lib import xla_bridge
print(xla_bridge.get_backend().platform)
```
gpu
```python
%load_ext autoreload
%autoreload 2
%pylab inline
from functools import partial
from tqdm import tqdm
import pickle
from pathlib import Path
import tensorboard
import numpy as np
import jax
import jax.numpy as j... | dlanzieriREPO_NAMEWL_Implicit-InferencePATH_START.@WL_Implicit-Inference_extracted@WL_Implicit-Inference-main@notebook@MG_estimator.ipynb@.PATH_END.py |
{
"filename": "widgettree.py",
"repo_name": "veusz/veusz",
"repo_path": "veusz_extracted/veusz-master/veusz/windows/widgettree.py",
"type": "Python"
} | # Copyright (C) 2010 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | veuszREPO_NAMEveuszPATH_START.@veusz_extracted@veusz-master@veusz@windows@widgettree.py@.PATH_END.py |
{
"filename": "test_dtype.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/core/tests/test_dtype.py",
"type": "Python"
} | from __future__ import division, absolute_import, print_function
import pickle
import sys
import operator
import numpy as np
from numpy.core.test_rational import rational
from numpy.testing import (
run_module_suite, assert_, assert_equal, assert_raises,
dec
)
def assert_dtype_equal(a, b):
assert_equal(a... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@core@tests@test_dtype.py@.PATH_END.py |
{
"filename": "slurp_craco_cubes.py",
"repo_name": "FRBs/zdm",
"repo_path": "zdm_extracted/zdm-main/papers/F/Analysis/Real/py/slurp_craco_cubes.py",
"type": "Python"
} | """
Script to intake the `.csv` files from the CRACO runs and convert them to a single `.npz` file.
The only argument in running the file corresponds to a hard-coded location of the `.csv` files and the cube `.json` file.
"""
from zdm import analyze_cube
def main(pargs):
if pargs.run == "Emax":
# Emax... | FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@F@Analysis@Real@py@slurp_craco_cubes.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/sunburst/legendgrouptitle/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "sunburst.legendgrouptitle"
_path_str = "sunburst.legendgrouptitle.font"
_valid_props = {
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@sunburst@legendgrouptitle@_font.py@.PATH_END.py |
{
"filename": "compute_num_completeness_mproc_insol.py",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/completenessContours/compute_num_completeness_mproc_insol.py",
"type": "Python"
} | import os
import argparse
import gzip
import numpy as np
import pandas as pd
from astropy.io import fits
import compute_num_completeness_w_ve_insol as kp
def read_stellar_table(filename):
kic = pd.read_csv(filename)
print("length of kic IDs: " + str(len(kic.kepid)))
print("length of unique kic IDs: " + str... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@completenessContours@compute_num_completeness_mproc_insol.py@.PATH_END.py |
{
"filename": "Known Error Conditions-checkpoint.ipynb",
"repo_name": "ProfessorBrunner/rc3-pipeline",
"repo_path": "rc3-pipeline_extracted/rc3-pipeline-master/Documentation/.ipynb_checkpoints/Known Error Conditions-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | # Known Error Conditions
As a good programming practice, we included a series of exception handling and error prevention mechanisms throughout our pipeline. However, the actual running of our pipeline on a survey still results in occasional errors. To indicate a non-successful operation of our pipeline for a particula... | ProfessorBrunnerREPO_NAMErc3-pipelinePATH_START.@rc3-pipeline_extracted@rc3-pipeline-master@Documentation@.ipynb_checkpoints@Known Error Conditions-checkpoint.ipynb@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/util/+tools/+array/+mex/README.md",
"type": "Markdown"
} | # MEX Optimizations
## countVal
The MEX optimizations includes these files:
- countVal.m - MATLAB gateway function that calls the different MEX versions,
according to data type, etc.
In order to allow maximum optimizations for varios data types,
we compile separate MEX function for each type.
- mex_countVal_inclu... | EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@util@+tools@+array@+mex@README.md@.PATH_END.py |
{
"filename": "tfsa-2021-114.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2021-114.md",
"type": "Markdown"
} | ## TFSA-2021-114: Integer division by 0 in sparse reshaping
### CVE Number
CVE-2021-37640
### Impact
The implementation of `tf.raw_ops.SparseReshape` can be made to trigger an
integral division by 0 exception:
```python
import tensorflow as tf
tf.raw_ops.SparseReshape(
input_indices = np.ones((1,3)),
input_shap... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2021-114.md@.PATH_END.py |
{
"filename": "test_losses.py",
"repo_name": "ML4GW/amplfi",
"repo_path": "amplfi_extracted/amplfi-main/tests/train/test_losses.py",
"type": "Python"
} | import torch
from amplfi.train.losses import VICRegLoss
def test_vicreg():
batch_1 = -5 * torch.randn(1000000, 2)
batch_2 = 5 * torch.randn(1000000, 2)
vicreg = VICRegLoss(
lambda_param=1, mu_param=1, nu_param=1, max_std=1, eps=1e-4
)
loss, (inv_loss, var_loss, cov_loss) = vicreg(batch_... | ML4GWREPO_NAMEamplfiPATH_START.@amplfi_extracted@amplfi-main@tests@train@test_losses.py@.PATH_END.py |
{
"filename": "test_newton.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/tests/ops/test_newton.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import itertools
import logging
import pytest
import torch
from torch.autograd import grad
from pyro.ops.newton import newton_step
from tests.common import assert_equal
logger = logging.getLogger(__name__)
def random_inside_un... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tests@ops@test_newton.py@.PATH_END.py |
{
"filename": "velocity.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/gammapy/astro/population/velocity.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Pulsar velocity distribution models."""
import numpy as np
from astropy.modeling import Fittable1DModel, Parameter
from astropy.units import Quantity
__all__ = [
"FaucherKaspi2006VelocityBimodal",
"FaucherKaspi2006VelocityMaxwellian",
"Pacz... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@astro@population@velocity.py@.PATH_END.py |
{
"filename": "test_HMLE.py",
"repo_name": "gaia-unlimited/gaiaunlimited",
"repo_path": "gaiaunlimited_extracted/gaiaunlimited-main/tests/test_HMLE.py",
"type": "Python"
} | def test_import_hmle():
try:
from gaiaunlimited import subsample
subsampleSF_HMLE = subsample.SubsampleSelectionFunctionHMLE()
success = True
except:
success = False
assert success
| gaia-unlimitedREPO_NAMEgaiaunlimitedPATH_START.@gaiaunlimited_extracted@gaiaunlimited-main@tests@test_HMLE.py@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/image/hoverlabel/font/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="image.hoverlabel.font", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@image@hoverlabel@font@_colorsrc.py@.PATH_END.py |
{
"filename": "explore_calibrators.py",
"repo_name": "ucberkeleyseti/blimpy",
"repo_path": "blimpy_extracted/blimpy-master/blimpy/calib_utils/explore_calibrators.py",
"type": "Python"
} | from astropy.io import ascii
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
data = ascii.read('calibrators.txt')
def func_powerlaw(x,alph,c):
"""
Power-law function
"""
return c*x**alph
def get_freqs(MHz=False):
"""
Return frequency array in calibrato... | ucberkeleysetiREPO_NAMEblimpyPATH_START.@blimpy_extracted@blimpy-master@blimpy@calib_utils@explore_calibrators.py@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/violin/hoverlabel/font/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="violin.hoverlabel.font", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@violin@hoverlabel@font@_size.py@.PATH_END.py |
{
"filename": "RunSimulation.py",
"repo_name": "nu-radio/NuRadioMC",
"repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioMC/examples/07_RNO_G_simulation/RunSimulation.py",
"type": "Python"
} | from __future__ import absolute_import, division, print_function
import argparse
import NuRadioReco.modules.trigger.highLowThreshold
import NuRadioReco.modules.channelBandPassFilter
import NuRadioReco.modules.RNO_G.hardwareResponseIncorporator
from NuRadioReco.utilities import units
from NuRadioMC.simulation import sim... | nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioMC@examples@07_RNO_G_simulation@RunSimulation.py@.PATH_END.py |
{
"filename": "run_visu_cadence.py",
"repo_name": "lsstdesc/sn_pipe",
"repo_path": "sn_pipe_extracted/sn_pipe-master/run_scripts/visu_cadence/run_visu_cadence.py",
"type": "Python"
} | from sn_tools.sn_visu import CadenceMovie, SnapNight
from optparse import OptionParser
import matplotlib.pyplot as plt
import numpy as np
parser = OptionParser()
parser.add_option("--dbName", type="str", default='alt_sched',
help="db name [%default]")
parser.add_option("--dbDir", type="str", default... | lsstdescREPO_NAMEsn_pipePATH_START.@sn_pipe_extracted@sn_pipe-master@run_scripts@visu_cadence@run_visu_cadence.py@.PATH_END.py |
{
"filename": "atmospheres.py",
"repo_name": "marblestation/iSpec",
"repo_path": "iSpec_extracted/iSpec-master/ispec/atmospheres.py",
"type": "Python"
} | #
# This file is part of iSpec.
# Copyright Sergi Blanco-Cuaresma - http://www.blancocuaresma.com/s/
#
# iSpec is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | marblestationREPO_NAMEiSpecPATH_START.@iSpec_extracted@iSpec-master@ispec@atmospheres.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/gauge/bar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="indicator.gauge.bar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@gauge@bar@_thickness.py@.PATH_END.py |
{
"filename": "analyze.py",
"repo_name": "natashabatalha/picaso",
"repo_path": "picaso_extracted/picaso-master/picaso/analyze.py",
"type": "Python"
} | import numpy as np
import pandas as pd
import xarray as xr
import scipy as sp
from scipy.interpolate import griddata
cKDTree = sp.spatial.cKDTree
optimize = sp.optimize
import json
import matplotlib.pyplot as plt
import os
from astropy.convolution import convolve, Box1DKernel, Gaussian1DKernel
import astropy.units as ... | natashabatalhaREPO_NAMEpicasoPATH_START.@picaso_extracted@picaso-master@picaso@analyze.py@.PATH_END.py |
{
"filename": "ext_fourier_components.py",
"repo_name": "quatrope/feets",
"repo_path": "feets_extracted/feets-master/feets/extractors/ext_fourier_components.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2017 Juan Cabral
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including withou... | quatropeREPO_NAMEfeetsPATH_START.@feets_extracted@feets-master@feets@extractors@ext_fourier_components.py@.PATH_END.py |
{
"filename": "veusz_windows_build_installer.py",
"repo_name": "veusz/veusz",
"repo_path": "veusz_extracted/veusz-master/support/veusz_windows_build_installer.py",
"type": "Python"
} | # automate building the binary installer on windows
import shutil
import os.path
import os
import subprocess
import glob
root = r'c:\build\veusz'
nsisexe = r'c:\Program Files (x86)\NSIS\makensis.exe'
verpatch = r'c:\build\verpatch\verpatch.exe'
def call(args):
print(' '.join(args))
subprocess.check_call(args... | veuszREPO_NAMEveuszPATH_START.@veusz_extracted@veusz-master@support@veusz_windows_build_installer.py@.PATH_END.py |
{
"filename": "_xsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/_xsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="scatter3d", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@_xsrc.py@.PATH_END.py |
{
"filename": "ckdtree.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/spatial/ckdtree.py",
"type": "Python"
} | # This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.spatial` namespace for importing the functions
# included below.
import warnings
from . import _ckdtree
__all__ = [ # noqa: F822
'cKDTree',
'cKDTreeNode',
'coo_entries',
'operator',
'ordered_pairs',
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@spatial@ckdtree.py@.PATH_END.py |
{
"filename": "_outsidetextfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/_outsidetextfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="outsidetextfont", parent_name="waterfall", **kwargs
):
super(OutsidetextfontValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@_outsidetextfont.py@.PATH_END.py |
{
"filename": "complete_example.py",
"repo_name": "franpoz/SHERLOCK",
"repo_path": "SHERLOCK_extracted/SHERLOCK-master/examples/programmatical/complete_example.py",
"type": "Python"
} | from contextlib import contextmanager
from timeit import default_timer
from sherlockpipe.search.sherlock import Sherlock
from lcbuilder.objectinfo.InputObjectInfo import InputObjectInfo
from lcbuilder.objectinfo.MissionInputObjectInfo import MissionInputObjectInfo
from lcbuilder.objectinfo.MissionObjectInfo import Miss... | franpozREPO_NAMESHERLOCKPATH_START.@SHERLOCK_extracted@SHERLOCK-master@examples@programmatical@complete_example.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram2d/colorbar/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showtickprefix", parent_name="histogram2d.colorbar", **kwargs
):
super(ShowtickprefixValidator, self).__init__(
plotly_name=plotly_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2d@colorbar@_showtickprefix.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "v-morello/riptide",
"repo_path": "riptide_extracted/riptide-master/README.md",
"type": "Markdown"
} | [](https://arxiv.org/abs/2004.03701)   [:
data_dir = os.path.join(os.path.dirname(__file__), 'data')
return os.path.join(data_dir, filename)
... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@solarsystem@neodys@tests@test_neodys.py@.PATH_END.py |
{
"filename": "lock.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/cffi/py3/cffi/lock.py",
"type": "Python"
} | import sys
if sys.version_info < (3,):
try:
from thread import allocate_lock
except ImportError:
from dummy_thread import allocate_lock
else:
try:
from _thread import allocate_lock
except ImportError:
from _dummy_thread import allocate_lock
##import sys
##l1 = allocate... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@cffi@py3@cffi@lock.py@.PATH_END.py |
{
"filename": "plot_omegak_improvement.py",
"repo_name": "philbull/RadioFisher",
"repo_path": "RadioFisher_extracted/RadioFisher-master/plotting/plot_omegak_improvement.py",
"type": "Python"
} | #!/usr/bin/python
"""
Plot improvement in Omega_K, gamma, or FOM as a function of z (Fig. 14),
(Fig. 15), (Fig. 18).
"""
import numpy as np
import pylab as P
from rfwrapper import rf
import matplotlib.patches
import matplotlib.cm
import matplotlib.ticker
import os
from radiofisher import euclid
cosmo = rf.experiments... | philbullREPO_NAMERadioFisherPATH_START.@RadioFisher_extracted@RadioFisher-master@plotting@plot_omegak_improvement.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "backyardworlds/wiseview",
"repo_path": "wiseview_extracted/wiseview-master/wv/__init__.py",
"type": "Python"
} | backyardworldsREPO_NAMEwiseviewPATH_START.@wiseview_extracted@wiseview-master@wv@__init__.py@.PATH_END.py | |
{
"filename": "_align.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/hoverlabel/_align.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="align", parent_name="barpolar.hoverlabel", **kwargs
):
super(AlignValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@hoverlabel@_align.py@.PATH_END.py |
{
"filename": "datacontainer.py",
"repo_name": "HERA-Team/hera_cal",
"repo_path": "hera_cal_extracted/hera_cal-main/hera_cal/datacontainer.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright 2019 the HERA Project
# Licensed under the MIT License
from __future__ import annotations
import numpy as np
from collections import OrderedDict as odict
import copy
import warnings
from functools import cache
from typing import Sequence
from .utils import conj_pol, comply_pol, mak... | HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@hera_cal@datacontainer.py@.PATH_END.py |
{
"filename": "eccen_calc_orderl7.py",
"repo_name": "jrenaud90/TidalPy",
"repo_path": "TidalPy_extracted/TidalPy-main/TidalPy/tides/modes/mode_calc_helper/eccen_calc_orderl7.py",
"type": "Python"
} | from typing import Dict, TYPE_CHECKING
from TidalPy.utilities.performance import njit
from ...eccentricity_funcs import orderl2, orderl3, orderl4, orderl5, orderl6, orderl7
if TYPE_CHECKING:
from TidalPy.utilities.types import FloatArray
from ...eccentricity_funcs import EccenOutput
@njit(cacheable=True)
... | jrenaud90REPO_NAMETidalPyPATH_START.@TidalPy_extracted@TidalPy-main@TidalPy@tides@modes@mode_calc_helper@eccen_calc_orderl7.py@.PATH_END.py |
{
"filename": "fits.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/units/format/fits.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handles the "FITS" unit format.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
import numpy as np
from astropy.units.errors import UnitScaleError
from astropy.utils import classproperty
from . import Base, core, utils
fro... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@units@format@fits.py@.PATH_END.py |
{
"filename": "_tracerefminus.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter3d/error_z/_tracerefminus.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="tracerefminus", parent_name="scatter3d.error_z", **kwargs
):
super(TracerefminusValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter3d@error_z@_tracerefminus.py@.PATH_END.py |
{
"filename": "example_file.ipynb",
"repo_name": "SophieMLV/axionHMcode",
"repo_path": "axionHMcode_extracted/axionHMcode-master/example_file.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import time
import matplotlib
from matplotlib import pyplot as plt
import os
import sys
sys.path.append('axionCAMB_and_lin_PS/')
sys.path.append('cosmology/')
sys.path.append('axion_functions/')
sys.path.append('halo_model/')
from axionCAMB_and_lin_PS import axionCAMB_wrapper
from axionC... | SophieMLVREPO_NAMEaxionHMcodePATH_START.@axionHMcode_extracted@axionHMcode-master@example_file.ipynb@.PATH_END.py |
{
"filename": "_ticklabeloverflow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/marker/colorbar/_ticklabeloverflow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabeloverflow",
parent_name="histogram.marker.colorbar",
**kwargs,
):
super(TicklabeloverflowValidator, self).__i... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@marker@colorbar@_ticklabeloverflow.py@.PATH_END.py |
{
"filename": "FreeExpansion-2d.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/Hydro/FreeExpansion/FreeExpansion-2d.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# 2D Free expansion of gas into a vacuum.
# We follow the expansion of a circular or tophat like configuration.
#-------------------------------------------------------------------------------
from math import *
from Spheral2d import *
fro... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Hydro@FreeExpansion@FreeExpansion-2d.py@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "loostrum/darc",
"repo_path": "darc_extracted/darc-master/darc/base.py",
"type": "Python"
} | #!/usr/bin/env python3
#
# DARC base class
import os
import socket
import multiprocessing as mp
import yaml
from queue import Empty
from darc.logger import get_logger
from darc.definitions import CONFIG_FILE, MASTER, WORKERS
class DARCBase(mp.Process):
"""
DARC Base class
Provides common methods to ser... | loostrumREPO_NAMEdarcPATH_START.@darc_extracted@darc-master@darc@base.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/__init__.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import pyro.poutine as poutine
from pyro.infer.inspect import render_model
from pyro.logger import log
from pyro.poutine import condition, do, markov
from pyro.primitives import (
barrier,
clear_param_store,
determinist... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/treatment/tests/__init__.py",
"type": "Python"
} | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@treatment@tests@__init__.py@.PATH_END.py | |
{
"filename": "fibercollisions.py",
"repo_name": "bccp/nbodykit",
"repo_path": "nbodykit_extracted/nbodykit-master/nbodykit/algorithms/fibercollisions.py",
"type": "Python"
} | from nbodykit import CurrentMPIComm
from nbodykit.source.catalog import ArrayCatalog
from nbodykit.transform import SkyToUnitSphere
import numpy
import logging
class FiberCollisions(object):
"""
Run an angular FOF algorithm to determine fiber collision
groups from an input catalog, and then assign fibers ... | bccpREPO_NAMEnbodykitPATH_START.@nbodykit_extracted@nbodykit-master@nbodykit@algorithms@fibercollisions.py@.PATH_END.py |
{
"filename": "eyeball_orbit.py",
"repo_name": "rodluger/planetplanet",
"repo_path": "planetplanet_extracted/planetplanet-master/scripts/eyeball_orbit.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
eyeball_orbit.py |github|
-------------------------
Visualize an "eyeball" planet's orbit with and without hot spot offsets.
See :py:mod:`planetplanet.photo.eyeball`.
.. plot::
:align: center
from scripts import eyeball_orbit
eyeball_orbit._tes... | rodlugerREPO_NAMEplanetplanetPATH_START.@planetplanet_extracted@planetplanet-master@scripts@eyeball_orbit.py@.PATH_END.py |
{
"filename": "a370glafic.ipynb",
"repo_name": "j0r1/GRALE2",
"repo_path": "GRALE2_extracted/GRALE2-master/pygrale/doc/source/_static/a370glafic.ipynb",
"type": "Jupyter Notebook"
} | ```python
%matplotlib inline
```
```python
from grale.all_nb import *
from astropy.io import fits
from astropy import wcs
renderers.setDefaultMassRenderer(None)
```
Set 'threads' as default renderer for lensplane and mass density
Set default angular unit in plotting to arcsec
Set feedback style to 'note... | j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@doc@source@_static@a370glafic.ipynb@.PATH_END.py |
{
"filename": "Example8.py",
"repo_name": "abhisrkckl/GWecc",
"repo_path": "GWecc_extracted/GWecc-master/examples/Example8.py",
"type": "Python"
} | """ENTERPRISE interface example usage
"""
import numpy as np
from enterprise_GWecc import GWecc, eccentric_cw_delay
from enterprise.pulsar import Pulsar
import matplotlib.pyplot as plt
year = 365.25 * 24 * 3600
day = 24 * 3600
parsec = 102927125.0
MSun = 4.92703806e-6
ns = 1e-9
def hms_to_rad(hh, mm, ss):
sgn =... | abhisrkcklREPO_NAMEGWeccPATH_START.@GWecc_extracted@GWecc-master@examples@Example8.py@.PATH_END.py |
{
"filename": "correlateTBN.py",
"repo_name": "lwa-project/lsl",
"repo_path": "lsl_extracted/lsl-main/scripts/correlateTBN.py",
"type": "Python"
} | #!/usr/bin/env python3
"""
Example script that reads in TBN data and runs a cross-correlation on it.
The results are saved in the FITS IDI format.
"""
import os
import sys
import time
import numpy as np
import argparse
from lsl.reader.ldp import LWADataFile, TBNFile
from lsl.common import stations, metabundle
from... | lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@scripts@correlateTBN.py@.PATH_END.py |
{
"filename": "Tutorial-Start_to_Finish-Finite_Difference_Playground.ipynb",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/Tutorial-Start_to_Finish-Finite_Difference_Playground.ipynb",
"type": "Jupyter Notebook"
} | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-59152712-8');
</script>
# Finite-Difference Playground: Using NRPy+-Generated C Cod... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Tutorial-Start_to_Finish-Finite_Difference_Playground.ipynb@.PATH_END.py |
{
"filename": "Mesh.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/Mesh/Mesh.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# Mesh class
#-------------------------------------------------------------------------------
from PYB11Generator import *
@PYB11template("Dimension")
class Mesh:
"""Mesh -- the generic mesh class we construct around meshless nodes.
1... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Mesh@Mesh.py@.PATH_END.py |
{
"filename": "test_update.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_update.py",
"type": "Python"
} | import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas import (
CategoricalDtype,
DataFrame,
NaT,
Series,
Timestamp,
)
import pandas._testing as tm
class TestUpdate:
def test_update(self):
s = Series([1.5, np.nan, 3.0, 4.0, np.nan])
s2 = Series... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_update.py@.PATH_END.py |
{
"filename": "test_fit_perobj.py",
"repo_name": "steven-murray/mrpy",
"repo_path": "mrpy_extracted/mrpy-master/tests/test_fit_perobj.py",
"type": "Python"
} | import numpy as np
from mrpy.base.stats import TGGD
from mrpy.fitting.fit_sample import SimFit
np.random.seed(42)
def test_s0():
np.random.seed(42)
N = int(3e5)
t = TGGD(scale=1e14,a=-1.8,b=1.0,xmin=1e12)
A = N/t._pdf_norm()
r = t.rvs(N)
FitObj = SimFit(r, lnA_bounds=(np.log(A) - 5, np.log(A... | steven-murrayREPO_NAMEmrpyPATH_START.@mrpy_extracted@mrpy-master@tests@test_fit_perobj.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/scattergl/legendgrouptitle/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._text import TextValidator
from ._font import FontValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._text.TextVal... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@legendgrouptitle@__init__.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "dmlc/xgboost",
"repo_path": "xgboost_extracted/xgboost-master/jvm-packages/README.md",
"type": "Markdown"
} | # XGBoost4J: Distributed XGBoost for Scala/Java
[](https://buildkite.com/xgboost/xgboost-ci)
[](https://xgboost.readthed... | dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@jvm-packages@README.md@.PATH_END.py |
{
"filename": "lib_operations.py",
"repo_name": "darafferty/losito",
"repo_path": "losito_extracted/losito-master/losito/lib_operations.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Libraries for operations
"""
import os, multiprocessing, sys
from .lib_io import logger
class Scheduler():
def __init__(self, qsub = None, maxThreads = None, max_processors = None, log_dir = 'logs', dry = False):
"""
qsub: if true call a shell script which call... | daraffertyREPO_NAMElositoPATH_START.@losito_extracted@losito-master@losito@lib_operations.py@.PATH_END.py |
{
"filename": "_title.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattermapbox.marker.colorbar"
_path_str = "scattermapbox.marker.colorbar.title"
_valid_props... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scattermapbox@marker@colorbar@_title.py@.PATH_END.py |
{
"filename": "_scattermapbox.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/_scattermapbox.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs):
super(ScattermapboxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@_scattermapbox.py@.PATH_END.py |
{
"filename": "quantized_ops_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/quantized_ops_test.py",
"type": "Python"
} | # Copyright 2015 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@ops@quantized_ops_test.py@.PATH_END.py |
{
"filename": "ragged_matmul_op_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/ragged_matmul_op_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@ops@ragged@ragged_matmul_op_test.py@.PATH_END.py |
{
"filename": "_enabled.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name="enabled",
parent_name="scatterternary.marker.colorbar.tickformatstop",
**kwargs,
):
super(EnabledValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterternary@marker@colorbar@tickformatstop@_enabled.py@.PATH_END.py |
{
"filename": "html.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/prompt-toolkit/py3/prompt_toolkit/formatted_text/html.py",
"type": "Python"
} | from __future__ import annotations
import xml.dom.minidom as minidom
from string import Formatter
from typing import Any
from .base import FormattedText, StyleAndTextTuples
__all__ = ["HTML"]
class HTML:
"""
HTML formatted text.
Take something HTML-like, for use as a formatted string.
::
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@prompt-toolkit@py3@prompt_toolkit@formatted_text@html.py@.PATH_END.py |
{
"filename": "amrplot.py",
"repo_name": "amrvac/amrvac",
"repo_path": "amrvac_extracted/amrvac-master/tools/python/amrvac_pytools/vtkfiles/amrplot.py",
"type": "Python"
} | """2D plotting routines for vtu AMR data"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from scipy.interpolate import griddata
from scipy.interpolate import interp1d
import sys, time
from matplotlib.ticker import MaxNLocator
from scipy import ndimage
import copy
from scipy imp... | amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@tools@python@amrvac_pytools@vtkfiles@amrplot.py@.PATH_END.py |
{
"filename": "_countrywidth.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/geo/_countrywidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CountrywidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="countrywidth", parent_name="layout.geo", **kwargs):
super(CountrywidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@geo@_countrywidth.py@.PATH_END.py |
{
"filename": "checkpoint_utils.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/training/checkpoint_utils.py",
"type": "Python"
} | # Copyright 2016 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@training@checkpoint_utils.py@.PATH_END.py |
{
"filename": "python_state.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/trackable/python_state.py",
"type": "Python"
} | """Utilities for including Python state in TensorFlow checkpoints."""
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@trackable@python_state.py@.PATH_END.py |
{
"filename": "reading_functions.py",
"repo_name": "creaneroDIAS/beamModelTester",
"repo_path": "beamModelTester_extracted/beamModelTester-master/comparison_module/reading_functions.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 15 12:47:37 2018
@author: Oisin Creaner
"""
import h5py
import pandas as pd
import numpy as np
from utility_functions import plottable
from utility_functions import get_source_separator
from graphing_functions import identify_plots
import sys
def read_dreambeam_csv(... | creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@comparison_module@reading_functions.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.