metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "__init__.py",
"repo_name": "aewallin/allantools",
"repo_path": "allantools_extracted/allantools-master/tests/gps/__init__.py",
"type": "Python"
} | # for python import
| aewallinREPO_NAMEallantoolsPATH_START.@allantools_extracted@allantools-master@tests@gps@__init__.py@.PATH_END.py |
{
"filename": "rclone.py",
"repo_name": "mhardcastle/ddf-pipeline",
"repo_path": "ddf-pipeline_extracted/ddf-pipeline-master/utils/rclone.py",
"type": "Python"
} | # Basic rclone functionality thin wrapper which allows you to create an
# object and send multiple commands, capturing output where necessary.
from __future__ import print_function
import subprocess
import os
import tempfile
import glob
import json
def splitlines(s):
l=s.decode().split('\n')
if l[-1]=='':
... | mhardcastleREPO_NAMEddf-pipelinePATH_START.@ddf-pipeline_extracted@ddf-pipeline-master@utils@rclone.py@.PATH_END.py |
{
"filename": "_weightsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/hoverlabel/font/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="weightsrc", parent_name="scatter3d.hoverlabel.font", **kwargs
):
super(WeightsrcValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@hoverlabel@font@_weightsrc.py@.PATH_END.py |
{
"filename": "chains.ipynb",
"repo_name": "lucaborsato/trades",
"repo_path": "trades_extracted/trades-master/trades_example/python_examples/chains.ipynb",
"type": "Jupyter Notebook"
} | # TRADES CHAINS PLOTS
```python
import numpy as np
import os
import sys
```
```python
# change accordingly to you pytrades path
trades_path = os.path.abspath("/path/to/trades/")
pytrades_path = os.path.join(trades_path, "pytrades")
sys.path.append(pytrades_path)
import ancillary as anc
import constants as cst
impo... | lucaborsatoREPO_NAMEtradesPATH_START.@trades_extracted@trades-master@trades_example@python_examples@chains.ipynb@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/_plotly_utils/README.md",
"type": "Markdown"
} | This package is for utilities that are used during code generation
and at runtime. The reason for not placing these under the main plotly/
package is that this avoids the complications of importing the module
we're generating code into during code generation.
This module must be independent of (it must not import fro... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@_plotly_utils@README.md@.PATH_END.py |
{
"filename": "test_noise.py",
"repo_name": "aewallin/allantools",
"repo_path": "allantools_extracted/allantools-master/tests/functional_tests/test_noise.py",
"type": "Python"
} | #!/usr/bin/python
import sys
sys.path.append("..")
from allantools import noise
import numpy
import pytest
def test_noise():
N = 500
#rate = 1.0
w = noise.white(N)
b = noise.brown(N)
v = noise.violet(N)
p = noise.pink(N)
# check output length
assert len(w) == N
assert len(b... | aewallinREPO_NAMEallantoolsPATH_START.@allantools_extracted@allantools-master@tests@functional_tests@test_noise.py@.PATH_END.py |
{
"filename": "reordered_wcs.py",
"repo_name": "sunpy/ndcube",
"repo_path": "ndcube_extracted/ndcube-main/ndcube/wcs/wrappers/reordered_wcs.py",
"type": "Python"
} |
import numpy as np
from astropy.wcs.wcsapi.wrappers.base import BaseWCSWrapper
__all__ = ['ReorderedLowLevelWCS']
class ReorderedLowLevelWCS(BaseWCSWrapper):
"""
A wrapper for a low-level WCS object that has re-ordered
pixel and/or world axes.
Parameters
----------
wcs : `~astropy.wcs.wcs... | sunpyREPO_NAMEndcubePATH_START.@ndcube_extracted@ndcube-main@ndcube@wcs@wrappers@reordered_wcs.py@.PATH_END.py |
{
"filename": "counter_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/kernel_tests/counter_test.py",
"type": "Python"
} | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@data@kernel_tests@counter_test.py@.PATH_END.py |
{
"filename": "plotting_script.py",
"repo_name": "LucIJspeert/star_shadow",
"repo_path": "star_shadow_extracted/star_shadow-master/star_shadow/data/plotting_script.py",
"type": "Python"
} | """Script for making some of the plots in IJspeert et al. 2024"""
import os
import fnmatch
import numpy as np
import scipy as sp
import scipy.stats
import pandas as pd
import matplotlib.pyplot as plt
import star_shadow as sts
## SYNTHETIC TESTS
syn_dir = '~/data'
all_files = []
for root, dirs, files in os.walk(syn_di... | LucIJspeertREPO_NAMEstar_shadowPATH_START.@star_shadow_extracted@star_shadow-master@star_shadow@data@plotting_script.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "tardis-sn/tardis",
"repo_path": "tardis_extracted/tardis-main/tardis/tests/__init__.py",
"type": "Python"
} | tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@tests@__init__.py@.PATH_END.py | |
{
"filename": "utils.py",
"repo_name": "cosmodesi/pypower",
"repo_path": "pypower_extracted/pypower-main/pypower/utils.py",
"type": "Python"
} | """A few utilities."""
import os
import sys
import time
import logging
import traceback
from functools import lru_cache
import numpy as np
logger = logging.getLogger('Utils')
def is_sequence(item):
"""Whether input item is a tuple or list."""
return isinstance(item, (list, tuple))
def exception_handler(... | cosmodesiREPO_NAMEpypowerPATH_START.@pypower_extracted@pypower-main@pypower@utils.py@.PATH_END.py |
{
"filename": "IntegratingArbitraryODEs.ipynb",
"repo_name": "tigerchenlu98/rebound",
"repo_path": "rebound_extracted/rebound-main/ipython_examples/IntegratingArbitraryODEs.ipynb",
"type": "Jupyter Notebook"
} | # Integrating arbitrary ODEs
Although REBOUND is primarily an N-body integrator, it can also integrate arbitrary ordinary differential equations (ODEs). Even better: it can integrate arbitrary ODEs in parallel with an N-body simulation. This allows you to couple various physical effects such as spin and tides to orbit... | tigerchenlu98REPO_NAMEreboundPATH_START.@rebound_extracted@rebound-main@ipython_examples@IntegratingArbitraryODEs.ipynb@.PATH_END.py |
{
"filename": "apero_mk_model_nirps_ha.py",
"repo_name": "njcuk9999/apero-drs",
"repo_path": "apero-drs_extracted/apero-drs-main/apero/recipes/nirps_ha/apero_mk_model_nirps_ha.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
apero_mk_model_nirps_ha.py [obs dir] [files]
Takes the transmissions made in apero_mk_tellu and saves them as three
arrays that have the same shape as an e2ds (zero_residual, a dc offset of
residuals, a linear dependency with water absorption and a linear dependency
wi... | njcuk9999REPO_NAMEapero-drsPATH_START.@apero-drs_extracted@apero-drs-main@apero@recipes@nirps_ha@apero_mk_model_nirps_ha.py@.PATH_END.py |
{
"filename": "io.py",
"repo_name": "gammapy/gammapy",
"repo_path": "gammapy_extracted/gammapy-main/gammapy/irf/io.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import logging
from astropy.io import fits
from gammapy.data.hdu_index_table import HDUIndexTable
from gammapy.utils.fits import HDULocation
from gammapy.utils.scripts import make_path
__all__ = ["load_irf_dict_from_file"]
log = logging.getLogger(__name_... | gammapyREPO_NAMEgammapyPATH_START.@gammapy_extracted@gammapy-main@gammapy@irf@io.py@.PATH_END.py |
{
"filename": "builder.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/otlLib/builder.py",
"type": "Python"
} | from collections import namedtuple, OrderedDict
import os
from fontTools.misc.fixedTools import fixedToFloat
from fontTools.misc.roundTools import otRound
from fontTools import ttLib
from fontTools.ttLib.tables import otTables as ot
from fontTools.ttLib.tables.otBase import (
ValueRecord,
valueRecordFormatDict,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@otlLib@builder.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/legendgrouptitle/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="parcoords.legendgrouptitle.font",
**kwargs,
):
super(TextcaseValidator, self).__init__(
pl... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@legendgrouptitle@font@_textcase.py@.PATH_END.py |
{
"filename": "higher_order.py",
"repo_name": "ricardoclandim/NIRVANA",
"repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/models/higher_order.py",
"type": "Python"
} | import numpy as np
from .beam import smear, ConvolveFFTW
from ..data.util import unpack
from .geometry import projected_polar
def bisym_model(args, paramdict, plot=False, relative_pab=False):
'''
Evaluate a bisymmetric velocity field model for given parameters.
The model for this is a second order nonaxi... | ricardoclandimREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@models@higher_order.py@.PATH_END.py |
{
"filename": "check_PPF_approx.py",
"repo_name": "yacobozdalkiran/CLASS_mod",
"repo_path": "CLASS_mod_extracted/CLASS_mod-main/class_public-master/scripts/check_PPF_approx.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
#get_ipython().run_line_magic('matplotlib', 'inline')
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
# In[ ]:
k_out = [5e-5, 5e-4, 5e-3]
models = ['PPF1','PPF2','FLD1','FLD1S']
w0 = {'PPF1':-0.7,'PPF2':-1.15,'FLD1':-0.7... | yacobozdalkiranREPO_NAMECLASS_modPATH_START.@CLASS_mod_extracted@CLASS_mod-main@class_public-master@scripts@check_PPF_approx.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/kernels/shim/README.md",
"type": "Markdown"
} | This folder contains a convenience library called *tf-shim* over TF and TFLite
op kernel APIs.
## Summary
This library creates a shim over the custom op APIs of TF and TFLite so the
developer can write the custom op once with minimal binary or runtime overhead.
An example usage is an input preprocessing op kernel th... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@kernels@shim@README.md@.PATH_END.py |
{
"filename": "test_openai_tools.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/output_parsers/test_openai_tools.py",
"type": "Python"
} | from collections.abc import AsyncIterator, Iterator
from typing import Any
import pytest
from pydantic import BaseModel, Field
from langchain_core.messages import (
AIMessage,
AIMessageChunk,
BaseMessage,
ToolCallChunk,
)
from langchain_core.output_parsers.openai_tools import (
JsonOutputKeyToolsP... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@output_parsers@test_openai_tools.py@.PATH_END.py |
{
"filename": "_version.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/lib/_version.py",
"type": "Python"
} | """Utility to compare (NumPy) version strings.
The NumpyVersion class allows properly comparing numpy version strings.
The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.
"""
from __future__ import division, absolute_import, pri... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@lib@_version.py@.PATH_END.py |
{
"filename": "runner.py",
"repo_name": "NannyML/nannyml",
"repo_path": "nannyml_extracted/nannyml-main/nannyml/runner.py",
"type": "Python"
} | # Author: Niels Nuyttens <niels@nannyml.com>
#
# License: Apache Software License 2.0
"""Used as an access point to start using NannyML in its most simple form."""
import logging
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional, Tuple,... | NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@runner.py@.PATH_END.py |
{
"filename": "_matfuncs_inv_ssq.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/linalg/_matfuncs_inv_ssq.py",
"type": "Python"
} | """
Matrix functions that use Pade approximation with inverse scaling and squaring.
"""
import warnings
import numpy as np
from scipy.linalg._matfuncs_sqrtm import SqrtmError, _sqrtm_triu
from scipy.linalg._decomp_schur import schur, rsf2csf
from scipy.linalg._matfuncs import funm
from scipy.linalg import svdvals, s... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@_matfuncs_inv_ssq.py@.PATH_END.py |
{
"filename": "SlideSurfaces.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/FSISPH/SlideSurfaces.py",
"type": "Python"
} | from SpheralCompiledPackages import *
from spheralDimensions import spheralDimensions
dims = spheralDimensions()
# clean up the smooth w/ diffent normal calculations
#-------------------------------------------------------------------------------
# Convienent constructor for slide surfaces.
#-------------------------... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@FSISPH@SlideSurfaces.py@.PATH_END.py |
{
"filename": "Readme.md",
"repo_name": "lukaswenzl/Magnification_bias_estimation_in_galaxy_surveys",
"repo_path": "Magnification_bias_estimation_in_galaxy_surveys_extracted/Magnification_bias_estimation_in_galaxy_surveys-main/Readme.md",
"type": "Markdown"
} | ## Magnification bias estimation
In this repository, you can find our code to estimate magnification bias for a galaxy sample with a complex photometric selection for the example of SDSS BOSS. The code provided is for the example of CMASS (see Magnification_bias_estimate_example_CMASS.ipynb) and also works for the LOW... | lukaswenzlREPO_NAMEMagnification_bias_estimation_in_galaxy_surveysPATH_START.@Magnification_bias_estimation_in_galaxy_surveys_extracted@Magnification_bias_estimation_in_galaxy_surveys-main@Readme.md@.PATH_END.py |
{
"filename": "_namelength.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/hoverlabel/_namelength.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="namelength", parent_name="scatter.hoverlabel", **kwargs
):
super(NamelengthValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@hoverlabel@_namelength.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/tests/alembic/migrations/__init__.py",
"type": "Python"
} | simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@tests@alembic@migrations@__init__.py@.PATH_END.py | |
{
"filename": "test_waypoint.py",
"repo_name": "dsavransky/EXOSIMS",
"repo_path": "EXOSIMS_extracted/EXOSIMS-master/tests/util/test_waypoint.py",
"type": "Python"
} | import unittest
import numpy as np
import sys, os.path
import astropy.units as u
import inspect
import EXOSIMS.util.waypoint as wp
"""
waypoint.py module unit tests
Sonny Rappaport, June 2021 (in format of code for test_deltaMag)
General strategy: I put in arbitrary inputs and ensure that the dictionary
generated ha... | dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@tests@util@test_waypoint.py@.PATH_END.py |
{
"filename": "install_headers.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/_distutils/command/install_headers.py",
"type": "Python"
} | """distutils.command.install_headers
Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""
from ..core import Command
# XXX force is never used
class install_headers(Command):
description = "install C/C++ header files"
user_options = [
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@_distutils@command@install_headers.py@.PATH_END.py |
{
"filename": "hitran_downloader.py",
"repo_name": "spexod/iSLAT",
"repo_path": "iSLAT_extracted/iSLAT-master/iSLAT/COMPONENTS/hitran_downloader.py",
"type": "Python"
} | import os
import datetime
from COMPONENTS.Hitran_data import get_Hitran_data
from COMPONENTS.partition_function_writer import write_partition_function
from COMPONENTS.line_data_writer import write_line_data
def download_hitran_data(mols, basem, isot):
#mols = ["H2", "HD", "H2O", "H218O", "CO2", "13CO2", "CO", "13C... | spexodREPO_NAMEiSLATPATH_START.@iSLAT_extracted@iSLAT-master@iSLAT@COMPONENTS@hitran_downloader.py@.PATH_END.py |
{
"filename": "demo_calculate_formation_efficiency_per_solar_mass_evolved-checkpoint.ipynb",
"repo_name": "FloorBroekgaarden/Double-Compact-Object-Mergers",
"repo_path": "Double-Compact-Object-Mergers_extracted/Double-Compact-Object-Mergers-main/demo_read_hdf5_file/.ipynb_checkpoints/demo_calculate_formation_effi... | ```python
# from __future__ import division # un comment if you use python 2 !
import numpy as np
import matplotlib.pyplot as plt
import h5py as h5
import time
import sys
import copy
#Quick fudge to make import from ../Scripts work
sys.path.append('../Scripts')
import gc
# import ClassCosmicIntegrator as CI #Giv... | LONG_NAME_28.py |
{
"filename": "simulate_burst.py",
"repo_name": "CHIMEFRB/fitburst",
"repo_path": "fitburst_extracted/fitburst-main/fitburst/pipelines/simulate_burst.py",
"type": "Python"
} | #! /bin/env/python
import matplotlib
matplotlib.rcParams["font.family"] = "times"
matplotlib.rcParams["font.size"] = 15
matplotlib.rcParams["xtick.labelsize"] = 12
matplotlib.rcParams["ytick.labelsize"] = 12
from copy import deepcopy
import matplotlib.pyplot as plt
import fitburst as fb
import numpy as np
import sy... | CHIMEFRBREPO_NAMEfitburstPATH_START.@fitburst_extracted@fitburst-main@fitburst@pipelines@simulate_burst.py@.PATH_END.py |
{
"filename": "_tickformatstops.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self,
plotly_name="tickformatstops",
parent_name="histogram2dcontour.colorbar",
**kwargs,
):
super(TickformatstopsValidator, self).__in... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@colorbar@_tickformatstops.py@.PATH_END.py |
{
"filename": "convolutions.ipynb",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/docs/notebooks/convolutions.ipynb",
"type": "Jupyter Notebook"
} | # Generalized convolutions in JAX
<!--* freshness: { reviewed: '2024-04-08' } *-->
[](https://colab.research.google.com/github/jax-ml/jax/blob/main/docs/notebooks/convolutions.ipynb) [:
"""Placeholder"""
if __name__ == '__main__':
import xmlrunner
runner = xmlrunner.XMLTestRunner(output='test-reports')
unittest.main(testRunner=runner)
| lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@services@test_make_watchlist_files.py@.PATH_END.py |
{
"filename": "plot_slow_sequence_residual.py",
"repo_name": "lgbouma/gyro-interp",
"repo_path": "gyro-interp_extracted/gyro-interp-main/drivers/plot_slow_sequence_residual.py",
"type": "Python"
} | import os
import gyrointerp.plotting as gp
from gyrointerp.paths import RESULTSDIR
PLOTDIR = os.path.join(RESULTSDIR, 'slow_sequence_residual')
if not os.path.exists(PLOTDIR):
os.mkdir(PLOTDIR)
outdir = PLOTDIR
#
# many clusters, overplotted
#
gp.plot_slow_sequence_residual(
outdir, ages=[10, 50, 120, 200, 30... | lgboumaREPO_NAMEgyro-interpPATH_START.@gyro-interp_extracted@gyro-interp-main@drivers@plot_slow_sequence_residual.py@.PATH_END.py |
{
"filename": "plot_pca_vs_fa_model_selection.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/examples/decomposition/plot_pca_vs_fa_model_selection.py",
"type": "Python"
} | """
===============================================================
Model selection with Probabilistic PCA and Factor Analysis (FA)
===============================================================
Probabilistic PCA and Factor Analysis are probabilistic models.
The consequence is that the likelihood of new data can be u... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@decomposition@plot_pca_vs_fa_model_selection.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "ExObsSim/ExoRad2-public",
"repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/tests/conf.py",
"type": "Python"
} | skip_plot = True
| ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@tests@conf.py@.PATH_END.py |
{
"filename": "PhysicalConstants.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/PYB11/Material/PhysicalConstants.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# PhysicalConstants
#-------------------------------------------------------------------------------
from PYB11Generator import *
class PhysicalConstants:
"""
Choose the physical units for a given Spheral run.
This is done by constru... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Material@PhysicalConstants.py@.PATH_END.py |
{
"filename": "OleFileIO_PL.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/olefile/py2/OleFileIO_PL.py",
"type": "Python"
} | #!/usr/local/bin/python
# -*- coding: latin-1 -*-
"""
olefile (formerly OleFileIO_PL)
Module to read/write Microsoft OLE2 files (also called Structured Storage or
Microsoft Compound Document File Format), such as Microsoft Office 97-2003
documents, Image Composer and FlashPix files, Outlook messages, ...
This version ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@olefile@py2@OleFileIO_PL.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/funnelarea/_legendgrouptitle.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Legendgrouptitle(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "funnelarea"
_path_str = "funnelarea.legendgrouptitle"
_valid_props = {"font", "tex... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@funnelarea@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "_width.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/_width.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="width", parent_name="bar", **kwargs):
super(WidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@_width.py@.PATH_END.py |
{
"filename": "tree_filtering.py",
"repo_name": "CarolineHaigh/mtobjects",
"repo_path": "mtobjects_extracted/mtobjects-master/mtolib/tree_filtering.py",
"type": "Python"
} | """Filter a maxtree."""
import ctypes as ct
import numpy as np
import mtolib.significance_tests as mt_sig
from mtolib import _ctype_classes as mt_class
from mtolib.utils import time_function
# Get access to the compiled C maxtree library
# Defaults to float version
mto_lib = ct.CDLL('mtolib/lib/mt_objects.so')
def... | CarolineHaighREPO_NAMEmtobjectsPATH_START.@mtobjects_extracted@mtobjects-master@mtolib@tree_filtering.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/image/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "image.hoverlabel"
_path_str = "image.hoverlabel.font"
_valid_props = {
"color",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@image@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "rnn_generator.py",
"repo_name": "trivnguyen/florah",
"repo_path": "florah_extracted/florah-main/src/florah/models/rnn_model/rnn_generator.py",
"type": "Python"
} |
from typing import Optional, Tuple
import numpy as np
import torch
import torch.nn.functional as F
from torch import Tensor
from .. import base_modules, flows, transforms
from . import grud
class DataModule(base_modules.BaseFlowModule):
"""
DataModule for Recurrent-MAF model
"""
arch_type = "Recurr... | trivnguyenREPO_NAMEflorahPATH_START.@florah_extracted@florah-main@src@florah@models@rnn_model@rnn_generator.py@.PATH_END.py |
{
"filename": "broadening.py",
"repo_name": "exosports/BART",
"repo_path": "BART_extracted/BART-master/scripts/broadening.py",
"type": "Python"
} | import sys, os
import numpy as np
import scipy.constants as sc
import ConfigParser
scriptsdir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(scriptsdir + "/../code")
import makeatm as ma
def get_widths(cfile):
"""
Calculate the max and min Lorentz and Doppler broadening HWHM for
the given configu... | exosportsREPO_NAMEBARTPATH_START.@BART_extracted@BART-master@scripts@broadening.py@.PATH_END.py |
{
"filename": "triton.py",
"repo_name": "ultralytics/yolov5",
"repo_path": "yolov5_extracted/yolov5-master/utils/triton.py",
"type": "Python"
} | # Ultralytics YOLOv5 🚀, AGPL-3.0 license
"""Utils to interact with the Triton Inference Server."""
import typing
from urllib.parse import urlparse
import torch
class TritonRemoteModel:
"""
A wrapper over a model served by the Triton Inference Server.
It can be configured to communicate over GRPC or HT... | ultralyticsREPO_NAMEyolov5PATH_START.@yolov5_extracted@yolov5-master@utils@triton.py@.PATH_END.py |
{
"filename": "CARMATerm.py",
"repo_name": "ywx649999311/EzTao",
"repo_path": "EzTao_extracted/EzTao-master/src/eztao/carma/CARMATerm.py",
"type": "Python"
} | """
A collection of GP kernels that express the autovariance structure of CARMA models using
celerite.
"""
import numpy as np
from celerite import terms
from numba import njit, float64, complex128
import warnings
__all__ = ["acf", "DRW_term", "DHO_term", "CARMA_term"]
@njit(complex128[:](complex128[:]))
def _comput... | ywx649999311REPO_NAMEEzTaoPATH_START.@EzTao_extracted@EzTao-master@src@eztao@carma@CARMATerm.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/contour/textfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="style", parent_name="contour.textfont", **kwargs):
super(StyleValidator, 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@contour@textfont@_style.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "ZwickyTransientFacility/ztf_sim",
"repo_path": "ztf_sim_extracted/ztf_sim-master/ztf_sim/__init__.py",
"type": "Python"
} | from .constants import *
from .Fields import *
from .ObsLogger import *
from .ObservingProgram import *
from .Scheduler import *
from .SkyBrightness import *
from .TelescopeStateMachine import *
from .cadence import *
from .configuration import *
from .field_selection_functions import *
from .magnitudes import *
from .... | ZwickyTransientFacilityREPO_NAMEztf_simPATH_START.@ztf_sim_extracted@ztf_sim-master@ztf_sim@__init__.py@.PATH_END.py |
{
"filename": "colorlog.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/pep517/colorlog.py",
"type": "Python"
} | """Nicer log formatting with colours.
Code copied from Tornado, Apache licensed.
"""
# Copyright 2012 Facebook
#
# 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/licen... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@pep517@colorlog.py@.PATH_END.py |
{
"filename": "gaussfitter2.py",
"repo_name": "saopicc/DDFacet",
"repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/ToolsDir/gaussfitter2.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# gaussfitter.py
# created by Adam Ginsburg (adam.ginsburg@colorado.edu or keflavich@gmail.com) 3/17/08)
#
#% $Id$
#
#
# Copyright (C) 2002-2011
# The MeqTree Foundation &
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This progr... | saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@ToolsDir@gaussfitter2.py@.PATH_END.py |
{
"filename": "filter_test.py",
"repo_name": "vaexio/vaex",
"repo_path": "vaex_extracted/vaex-master/tests/filter_test.py",
"type": "Python"
} | import numpy as np
import vaex
import pyarrow as pa
def test_set_active_range_and_trim(df_factory):
df = df_factory(x=np.arange(8))
df = df[(df.x % 2) == 0] # even numbers
assert len(df) == 4
df.set_active_range(2, 6) # these are unfiltered
assert df._cached_filtered_length == 2
assert df._s... | vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@tests@filter_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "NannyML/nannyml",
"repo_path": "nannyml_extracted/nannyml-main/nannyml/drift/univariate/__init__.py",
"type": "Python"
} | # Author: Niels Nuyttens <niels@nannyml.com>
#
# License: Apache Software License 2.0
"""Univariate drift detection methods, considering a single column at a time.
Some methods are applicable exclusively to continuous or categorical columns, others are applicable to both.
This package currently holds an impleme... | NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@drift@univariate@__init__.py@.PATH_END.py |
{
"filename": "_visible.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/slider/currentvalue/_visible.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="visible", parent_name="layout.slider.currentvalue", **kwargs
):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@slider@currentvalue@_visible.py@.PATH_END.py |
{
"filename": "test_ext_fourier_components.py",
"repo_name": "quatrope/feets",
"repo_path": "feets_extracted/feets-master/tests/extractors/test_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@tests@extractors@test_ext_fourier_components.py@.PATH_END.py |
{
"filename": "test_outputs.py",
"repo_name": "rennehan/yt-swift",
"repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/exodus_ii/tests/test_outputs.py",
"type": "Python"
} | from numpy.testing import assert_array_equal, assert_equal
from yt.testing import requires_file
from yt.utilities.answer_testing.framework import (
GenericArrayTest,
data_dir_load,
requires_ds,
)
out = "ExodusII/out.e"
@requires_file(out)
def test_out():
ds = data_dir_load(out)
field_list = [
... | rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@exodus_ii@tests@test_outputs.py@.PATH_END.py |
{
"filename": "GP.py",
"repo_name": "markfortune/luas",
"repo_path": "luas_extracted/luas-main/src/luas/GP.py",
"type": "Python"
} | import numpy as np
import matplotlib.pyplot as plt
from copy import deepcopy
from functools import partial
import jax
from jax import jit
import jax.numpy as jnp
from jax.flatten_util import ravel_pytree
from .jax_convenience_fns import (
array_to_pytree_2D,
pytree_to_array_2D,
order_list,
large_hessian... | markfortuneREPO_NAMEluasPATH_START.@luas_extracted@luas-main@src@luas@GP.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pynucastro/pynucastro",
"repo_path": "pynucastro_extracted/pynucastro-main/pynucastro/nucdata/AtomicMassEvaluation/README.md",
"type": "Markdown"
} | # Atomic Mass Evaluation / Nubase
The Nubase / 2020 Atomic Mass Evaluations data were downloaded from:
https://www-nds.iaea.org/amdc/
The Atomic Mass Evaluation 2020 is published as Chinese Phys. C 45 (2021) 030002, 030003
The Nubase evaluation is published as Chinese Physics C 45 (2021) 030001
## Scripts
* `extr... | pynucastroREPO_NAMEpynucastroPATH_START.@pynucastro_extracted@pynucastro-main@pynucastro@nucdata@AtomicMassEvaluation@README.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "hmuellergoe/mrbeam",
"repo_path": "mrbeam_extracted/mrbeam-main/README.md",
"type": "Markdown"
} | # mrbeam
This is the second release of the MrBeam software tool.
Caution! This is alpha quality software, do expect bugs and sparse documentation!
MrBeam is a software written for VLBI imaging, in particular sparse mm-VLBI data.
The main features of this release of MrBeam are as follows:
-> a general VLBI interfa... | hmuellergoeREPO_NAMEmrbeamPATH_START.@mrbeam_extracted@mrbeam-main@README.md@.PATH_END.py |
{
"filename": "tool.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/merriam_webster/tool.py",
"type": "Python"
} | """Tool for the Merriam-Webster API."""
from typing import Optional
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.tools import BaseTool
from langchain_community.utilities.merriam_webster import MerriamWebsterAPIWrapper
class MerriamWebsterQueryRun(BaseTool): # type: ignore[ove... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@merriam_webster@tool.py@.PATH_END.py |
{
"filename": "bendgratings.py",
"repo_name": "chandra-marx/marxs",
"repo_path": "marxs_extracted/marxs-main/marxs/design/bendgratings.py",
"type": "Python"
} | # Licensed under GPL version 3 - see LICENSE.rst
'''This module contains functions to modify gratings.
After flat simple gratings have been placed on a Rowland-torus, they can be
changed to more complicated geometries or set-ups. For example, placing just
the center of the grating on the Rowland-torus, can leave the e... | chandra-marxREPO_NAMEmarxsPATH_START.@marxs_extracted@marxs-main@marxs@design@bendgratings.py@.PATH_END.py |
{
"filename": "garbage.py",
"repo_name": "h5py/h5py",
"repo_path": "h5py_extracted/h5py-master/other/garbage.py",
"type": "Python"
} | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
"""
Demonstrates garbage messages printed to std... | h5pyREPO_NAMEh5pyPATH_START.@h5py_extracted@h5py-master@other@garbage.py@.PATH_END.py |
{
"filename": "numpyctypes.py",
"repo_name": "IvS-KULeuven/IvSPythonRepository",
"repo_path": "IvSPythonRepository_extracted/IvSPythonRepository-master/aux/numpyctypes.py",
"type": "Python"
} | """
Module to convert a numpy array to a ctypes struct.
This struct can then be passed to a native C library.
Author: Joris De Ridder
"""
import numpy as np
import ctypes as C
ctypesDict = {'d' : C.c_double,
'b' : C.c_char,
'h' : C.c_short,
'i' : C.c_int,
'l'... | IvS-KULeuvenREPO_NAMEIvSPythonRepositoryPATH_START.@IvSPythonRepository_extracted@IvSPythonRepository-master@aux@numpyctypes.py@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/choroplethmap/marker/_line.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "choroplethmap.marker"
_path_str = "choroplethmap.marker.line"
_valid_props = {"color", "colors... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@choroplethmap@marker@_line.py@.PATH_END.py |
{
"filename": "test_ccompiler_opt_conf.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/distutils/tests/test_ccompiler_opt_conf.py",
"type": "Python"
} | import unittest
from os import sys, path
is_standalone = __name__ == '__main__' and __package__ is None
if is_standalone:
sys.path.append(path.abspath(path.join(path.dirname(__file__), "..")))
from ccompiler_opt import CCompilerOpt
else:
from numpy.distutils.ccompiler_opt import CCompilerOpt
arch_compiler... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@distutils@tests@test_ccompiler_opt_conf.py@.PATH_END.py |
{
"filename": "test_psf_measure.py",
"repo_name": "quatrope/ProperImage",
"repo_path": "ProperImage_extracted/ProperImage-master/drafts/test_psf_measure.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# test_recoverstats.py
#
# Copyright 2016 Bruno S <bruno.sanchez.63@gmail.com>
#
import os
import shlex
import subprocess
import sys
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import stats
import sep
from astropy.convolution import convolve
f... | quatropeREPO_NAMEProperImagePATH_START.@ProperImage_extracted@ProperImage-master@drafts@test_psf_measure.py@.PATH_END.py |
{
"filename": "star_parameters.py",
"repo_name": "LucaMalavolta/PyORBIT",
"repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/common/star_parameters.py",
"type": "Python"
} | from pyorbit.subroutines.common import *
from pyorbit.common.abstract_common import *
from pyorbit.keywords_definitions import *
class CommonStarParameters(AbstractCommon):
''' This class must be used by each planet in the system
model_name is the way the planet is identified
'''
model_class = ... | LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@common@star_parameters.py@.PATH_END.py |
{
"filename": "iso_ames.py",
"repo_name": "tomasstolker/species",
"repo_path": "species_extracted/species-main/species/data/isochrone_data/iso_ames.py",
"type": "Python"
} | from pathlib import Path
import h5py
import pooch
from typeguard import typechecked
from species.data.isochrone_data.iso_manual import add_manual
@typechecked
def add_ames(database: h5py._hl.files.File, input_path: str) -> None:
"""
Function for adding the AMES-Cond and AMES-Dusty
isochrone data to the... | tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@species@data@isochrone_data@iso_ames.py@.PATH_END.py |
{
"filename": "wavelets.py",
"repo_name": "PynPoint/PynPoint",
"repo_path": "PynPoint_extracted/PynPoint-main/pynpoint/util/wavelets.py",
"type": "Python"
} | """
Wrapper utils for the wavelet functions for the mlpy cwt implementation (see continous.py)
"""
import numpy as np
from numba import jit
from typeguard import typechecked
from scipy.special import gamma, hermite
from scipy.signal import medfilt
from statsmodels.robust import mad
from pynpoint.util.continuous impo... | PynPointREPO_NAMEPynPointPATH_START.@PynPoint_extracted@PynPoint-main@pynpoint@util@wavelets.py@.PATH_END.py |
{
"filename": "unsupervised_base.py",
"repo_name": "mavrix93/LightCurvesClassifier",
"repo_path": "LightCurvesClassifier_extracted/LightCurvesClassifier-master/lcc/stars_processing/utilities/unsupervised_base.py",
"type": "Python"
} | from matplotlib import pyplot as plt
import numpy as np
from lcc.stars_processing.utilities.base_decider import BaseDecider
from lcc.entities.exceptions import QueryInputError
class UnsupervisedBase(BaseDecider):
'''
classdocs
'''
def __init__(self, classifier, params, threshold=0.5, **kwargs):
... | mavrix93REPO_NAMELightCurvesClassifierPATH_START.@LightCurvesClassifier_extracted@LightCurvesClassifier-master@lcc@stars_processing@utilities@unsupervised_base.py@.PATH_END.py |
{
"filename": "CODE_OF_CONDUCT.md",
"repo_name": "PetroFit/petrofit",
"repo_path": "petrofit_extracted/petrofit-main/CODE_OF_CONDUCT.md",
"type": "Markdown"
} | # Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of... | PetroFitREPO_NAMEpetrofitPATH_START.@petrofit_extracted@petrofit-main@CODE_OF_CONDUCT.md@.PATH_END.py |
{
"filename": "MspImagePlugin.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/PIL/MspImagePlugin.py",
"type": "Python"
} | #
# The Python Imaging Library.
#
# MSP file handling
#
# This is the format used by the Paint program in Windows 1 and 2.
#
# History:
# 95-09-05 fl Created
# 97-01-03 fl Read/write MSP images
# 17-02-21 es Fixed RLE interpretation
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fr... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@PIL@MspImagePlugin.py@.PATH_END.py |
{
"filename": "_namelengthsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="namelengthsrc", parent_name="mesh3d.hoverlabel", **kwargs
):
super(NamelengthsrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@hoverlabel@_namelengthsrc.py@.PATH_END.py |
{
"filename": "_optional_dependencies.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/utils/_optional_dependencies.py",
"type": "Python"
} | # Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
def check_matplotlib_support(caller_name):
"""Raise ImportError with detailed error message if mpl is not installed.
Plot utilities like any of the Display's plotting functions should lazily import
matplotlib and call this hel... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@utils@_optional_dependencies.py@.PATH_END.py |
{
"filename": "imagenet10.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/datasets/classify/imagenet10.md",
"type": "Markdown"
} | ---
comments: true
description: Discover ImageNet10 a compact version of ImageNet for rapid model testing and CI checks. Perfect for quick evaluations in computer vision tasks.
keywords: ImageNet10, ImageNet, Ultralytics, CI tests, sanity checks, training pipelines, computer vision, deep learning, dataset
---
# ImageN... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@datasets@classify@imagenet10.md@.PATH_END.py |
{
"filename": "plotlib.py",
"repo_name": "catketchup/lens_rot_bias",
"repo_path": "lens_rot_bias_extracted/lens_rot_bias-main/plotlib.py",
"type": "Python"
} | import matplotlib as mpl
from cycler import cycler
# common style for all plots
mpl.rcParams['figure.dpi'] = 180
mpl.rcParams['font.size'] = 12
mpl.rcParams['xtick.labelsize'] = 12
mpl.rcParams['ytick.labelsize'] = 12
mpl.rcParams['text.usetex'] = False
mpl.rcParams['xtick.direction'] = 'in'
mpl.rcParams['ytick.di... | catketchupREPO_NAMElens_rot_biasPATH_START.@lens_rot_bias_extracted@lens_rot_bias-main@plotlib.py@.PATH_END.py |
{
"filename": "mosfit.ipynb",
"repo_name": "guillochon/MOSFiT",
"repo_path": "MOSFiT_extracted/MOSFiT-master/jupyter/mosfit.ipynb",
"type": "Jupyter Notebook"
} | ## <span style="color:red">Important: Before running this notebook, make sure the mosfit, corner, matplotlib, and seaborn libraries are installed in your Python environment (install them with conda or pip).</span>
### Load the data from `walkers.json`, the main output file produced by the last MOSFiT run.
```python
... | guillochonREPO_NAMEMOSFiTPATH_START.@MOSFiT_extracted@MOSFiT-master@jupyter@mosfit.ipynb@.PATH_END.py |
{
"filename": "_opacity.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/_opacity.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class OpacityValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="opacity", parent_name="scatter.marker", **kwargs):
super(OpacityValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@_opacity.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "florpi/sunbird",
"repo_path": "sunbird_extracted/sunbird-main/sunbird/emulators/loss/__init__.py",
"type": "Python"
} | from .gaussian import MultivariateGaussianNLLLoss, GaussianNLoglike, get_cholesky_decomposition_covariance
from .weighted import WeightedL1Loss, WeightedMSELoss
| florpiREPO_NAMEsunbirdPATH_START.@sunbird_extracted@sunbird-main@sunbird@emulators@loss@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/tools/test/__init__.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@tools@test@__init__.py@.PATH_END.py |
{
"filename": "_showexponent.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/colorbar/_showexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showexponent", parent_name="mesh3d.colorbar", **kwargs
):
super(ShowexponentValidator, self).__init__(
plotly_name=plotly_name,
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@colorbar@_showexponent.py@.PATH_END.py |
{
"filename": "FLAG_casa_backup_flag_table.py",
"repo_name": "IanHeywood/oxkat",
"repo_path": "oxkat_extracted/oxkat-master/oxkat/FLAG_casa_backup_flag_table.py",
"type": "Python"
} | # ian.heywood@physics.ox.ac.uk
#
# set versionname=... on command line call to CASA
# can also specify csv mslist=...,... otherwise project_info.p will be
# used and the operation will proceed on all available target Measurement Sets.
#
# versionname must be supplied
#
import os
import sys
execfile('oxkat/casa_read... | IanHeywoodREPO_NAMEoxkatPATH_START.@oxkat_extracted@oxkat-master@oxkat@FLAG_casa_backup_flag_table.py@.PATH_END.py |
{
"filename": "inset_locator.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/inset_locator.py",
"type": "Python"
} | """
A collection of functions and objects for creating or placing inset axes.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib import docstring
import six
from matplotlib.offsetbox import AnchoredOffsetbox
from matplotlib.patches import Pa... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@mpl_toolkits@axes_grid1@inset_locator.py@.PATH_END.py |
{
"filename": "test_basic.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/fft/tests/test_basic.py",
"type": "Python"
} | import queue
import threading
import multiprocessing
import numpy as np
import pytest
from numpy.random import random
from numpy.testing import assert_array_almost_equal, assert_allclose
from pytest import raises as assert_raises
import scipy.fft as fft
from scipy.conftest import array_api_compatible
from scipy._lib._a... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@fft@tests@test_basic.py@.PATH_END.py |
{
"filename": "numpycompat.py",
"repo_name": "astropy/astropy",
"repo_path": "astropy_extracted/astropy-main/astropy/utils/compat/numpycompat.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This is a collection of monkey patches and workarounds for bugs in
earlier versions of Numpy.
"""
import numpy as np
from astropy.utils import minversion
__all__ = [
"COPY_IF_NEEDED",
"NUMPY_LT_1_24",
"NUMPY_LT_1_25",
"NUMPY_LT_1_26"... | astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@utils@compat@numpycompat.py@.PATH_END.py |
{
"filename": "copy.py",
"repo_name": "ashleychontos/pySYD",
"repo_path": "pySYD_extracted/pySYD-master/dev/dev/copy.py",
"type": "Python"
} | # DEVELOPMENT BRANCH ---> SOURCE PACKAGE
print('\n\n COPYING FROM DEVELOPMENT BRANCH ---> SOURCE PACKAGE \n\n')
from pysyd import utils
cont = utils._ask_yesno('continue? ')
if cont:
import os
scripts = ['cli','models','pipeline','plots','target','utils']
rows, rows_cli = 18, 32
_ROOT, _ = os.path.sp... | ashleychontosREPO_NAMEpySYDPATH_START.@pySYD_extracted@pySYD-master@dev@dev@copy.py@.PATH_END.py |
{
"filename": "extract_mgcls_dino_representation.py",
"repo_name": "SKA-INAF/sclassifier",
"repo_path": "sclassifier_extracted/sclassifier-master/macros/extract_mgcls_dino_representation.py",
"type": "Python"
} | import sys
# - IMPORT LUSTUFKA MODULES
sys.path.insert(1, '/home/riggi/Software/Sources/mgcls_dino')
import utils
import vision_transformer as vits
#################################
import os
import argparse
import json
import warnings
import numpy as np
## ASTRO ####
from astropy.io import fits
from astropy.io.fit... | SKA-INAFREPO_NAMEsclassifierPATH_START.@sclassifier_extracted@sclassifier-master@macros@extract_mgcls_dino_representation.py@.PATH_END.py |
{
"filename": "most.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/ipac/irsa/most.py",
"type": "Python"
} | import io
import re
import tarfile
import warnings
from bs4 import BeautifulSoup
from astropy.io import votable, fits
from astropy.table import Table
from astroquery.query import BaseQuery
from astroquery.utils import class_or_instance
from astroquery.exceptions import InvalidQueryError, NoResultsWarning
from . imp... | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@ipac@irsa@most.py@.PATH_END.py |
{
"filename": "sparse_csgraph.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/benchmarks/benchmarks/sparse_csgraph.py",
"type": "Python"
} | """benchmarks for the scipy.sparse.csgraph module"""
import numpy as np
import scipy.sparse
from .common import Benchmark, safe_import
with safe_import():
from scipy.sparse.csgraph import laplacian
class Laplacian(Benchmark):
params = [
[30, 300, 900],
['dense', 'coo', 'csc', 'csr', 'dia'],
... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@benchmarks@benchmarks@sparse_csgraph.py@.PATH_END.py |
{
"filename": "test_encode_basestring_ascii.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/simplejson/py2/simplejson/tests/test_encode_basestring_ascii.py",
"type": "Python"
} | from unittest import TestCase
import simplejson.encoder
from simplejson.compat import b
CASES = [
(u'/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'),
(u'\u0123\u4567\... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@simplejson@py2@simplejson@tests@test_encode_basestring_ascii.py@.PATH_END.py |
{
"filename": "_height.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/annotation/_height.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HeightValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="height", parent_name="layout.annotation", **kwargs):
super(HeightValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@annotation@_height.py@.PATH_END.py |
{
"filename": "config.py",
"repo_name": "mlujnie/simple",
"repo_path": "simple_extracted/simple-main/simple/config.py",
"type": "Python"
} | class Config():
"""
Configuration class to find the installation directory of lognormal_galaxies.
Parameters
----------
lognormal_galaxies_path: str
Installation directory of lognormal_galaxies.
"""
def __init__(self):
self.lognormal_galaxies_path = '/u/majaln/intensit... | mlujnieREPO_NAMEsimplePATH_START.@simple_extracted@simple-main@simple@config.py@.PATH_END.py |
{
"filename": "price_mcewen.py",
"repo_name": "astro-informatics/s2fft",
"repo_path": "s2fft_extracted/s2fft-main/s2fft/recursions/price_mcewen.py",
"type": "Python"
} | import warnings
from functools import partial
from typing import List
import jax.lax as lax
import jax.numpy as jnp
import numpy as np
from jax import jit
from s2fft.sampling import s2_samples as samples
warnings.filterwarnings("ignore")
def generate_precomputes(
L: int,
spin: int = 0,
sampling: str = ... | astro-informaticsREPO_NAMEs2fftPATH_START.@s2fft_extracted@s2fft-main@s2fft@recursions@price_mcewen.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "radiocosmology/driftscan",
"repo_path": "driftscan_extracted/driftscan-master/drift/__init__.py",
"type": "Python"
} | """Modelling for transit radio telescopes.
The existing code is mostly focussed on interferometers but can also be used
for multi-beam transit telescopes.
Submodules
==========
.. autosummary::
:toctree: _autosummary
core
pipeline
scripts
telescope
util
"""
from importlib.metadata import Pa... | radiocosmologyREPO_NAMEdriftscanPATH_START.@driftscan_extracted@driftscan-master@drift@__init__.py@.PATH_END.py |
{
"filename": "test_miri_lrs_slit_spec3.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/regtest/test_miri_lrs_slit_spec3.py",
"type": "Python"
} | """ Test of the spec3 pipeline using MIRI LRS fixed-slit exposures.
This takes an association and generates the level 3 products."""
import pytest
import numpy as np
from gwcs import wcstools
import asdf
from astropy.io.fits.diff import FITSDiff
from jwst.stpipe import Step
from jwst import datamodels
@pytest.f... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@regtest@test_miri_lrs_slit_spec3.py@.PATH_END.py |
{
"filename": "rhoqso_test.py",
"repo_name": "gkulkarni/QLF",
"repo_path": "QLF_extracted/QLF-master/rhoqso_test.py",
"type": "Python"
} | import numpy as np
import matplotlib as mpl
mpl.use('Agg')
mpl.rcParams['text.usetex'] = True
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.serif'] = 'cm'
mpl.rcParams['font.size'] = '22'
import matplotlib.pyplot as plt
from numpy.polynomial import Chebyshev as T
p_log10phiStar = [-7.73388053, 1.06477161... | gkulkarniREPO_NAMEQLFPATH_START.@QLF_extracted@QLF-master@rhoqso_test.py@.PATH_END.py |
{
"filename": "_legendgrouptitle.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/histogram2dcontour/_legendgrouptitle.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Legendgrouptitle(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram2dcontour"
_path_str = "histogram2dcontour.legendgrouptitle"
_valid_props... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@histogram2dcontour@_legendgrouptitle.py@.PATH_END.py |
{
"filename": "covariance_run_EFIGI-like_with_lensing.py",
"repo_name": "DrexelLenser/Lenser",
"repo_path": "Lenser_extracted/Lenser-master/examples/covariance/covariance_run_EFIGI-like_with_lensing.py",
"type": "Python"
} | from covariance import Covariance
import numpy as np
from scipy.special import gamma
"""Covariance run 4: EFIGI-like with lensing fields"""
# Generate non-fit parameters.
# .. These values should be motivated to reflect actual data
# .. Postage stamp size
Nx = 255
Ny = 255
# .. Standard galaxy size (in pixels)
a = 1... | DrexelLenserREPO_NAMELenserPATH_START.@Lenser_extracted@Lenser-master@examples@covariance@covariance_run_EFIGI-like_with_lensing.py@.PATH_END.py |
{
"filename": "test_enable_iterative_imputer.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/experimental/tests/test_enable_iterative_imputer.py",
"type": "Python"
} | """Tests for making sure experimental imports work as expected."""
import textwrap
import pytest
from sklearn.utils._testing import assert_run_python_script_without_output
from sklearn.utils.fixes import _IS_WASM
@pytest.mark.xfail(_IS_WASM, reason="cannot start subprocess")
def test_imports_strategies():
# Ma... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@experimental@tests@test_enable_iterative_imputer.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.