metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "README.md",
"repo_name": "jlibermann/falco-matlab",
"repo_path": "falco-matlab_extracted/falco-matlab-master/lib_external/unwrap_phase/README.md",
"type": "Markdown"
} | ## Fast 2D phase unwrapping implementation in MATLAB
Fast unwrapping 2D phase image using the algorithm given in:
> M. A. Herraez, D. R. Burton, M. J. Lalor, and M. A. Gdeisat,
"Fast two-dimensional phase-unwrapping algorithm based on sorting by
reliability following a noncontinuous path... | jlibermannREPO_NAMEfalco-matlabPATH_START.@falco-matlab_extracted@falco-matlab-master@lib_external@unwrap_phase@README.md@.PATH_END.py |
{
"filename": "projection_kernel.py",
"repo_name": "EmmanuelSchaan/LaSSI",
"repo_path": "LaSSI_extracted/LaSSI-master/projection_kernel.py",
"type": "Python"
} | from headers import *
##################################################################################
class Projection(object):
def __init__(self, U, name='', nProc=1):
# copy U
self.U = U
self.name=name
self.nProc=nProc
#self.aMin
#self.aMax
# interpolate the projecti... | EmmanuelSchaanREPO_NAMELaSSIPATH_START.@LaSSI_extracted@LaSSI-master@projection_kernel.py@.PATH_END.py |
{
"filename": "test_reproject_from_healpix_moc.py",
"repo_name": "lpsinger/ligo.skymap",
"repo_path": "ligo.skymap_extracted/ligo.skymap-main/ligo/skymap/plot/tests/test_reproject_from_healpix_moc.py",
"type": "Python"
} | from astropy.io.fits import Header
from astropy.table import Table
from astropy_healpix import HEALPix
import numpy as np
from reproject import reproject_from_healpix
from ...moc import nest2uniq
from ..reproject_from_healpix_moc import reproject_from_healpix_moc
def test_reproject_from_healpix_moc():
header = H... | lpsingerREPO_NAMEligo.skymapPATH_START.@ligo.skymap_extracted@ligo.skymap-main@ligo@skymap@plot@tests@test_reproject_from_healpix_moc.py@.PATH_END.py |
{
"filename": "fft_test.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/tests/fft_test.py",
"type": "Python"
} | # Copyright 2019 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@fft_test.py@.PATH_END.py |
{
"filename": "_uid.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/_uid.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class UidValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="uid", parent_name="volume", **kwargs):
super(UidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=k... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@_uid.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "rlaugier/nifits",
"repo_path": "nifits_extracted/nifits-master/README.md",
"type": "Markdown"
} | # A standard to handle nulling interferometry data
## Breaking news:
Standards live and die by their community. In order to get in touch with our community, we have an *ongoing poll*. If you are interested in NIFITS, help us to build a strong, welcoming and prolific community by answering [this poll](https://forms.gl... | rlaugierREPO_NAMEnifitsPATH_START.@nifits_extracted@nifits-master@README.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "martinjameswhite/directsht",
"repo_path": "directsht_extracted/directsht-main/notebooks/README.md",
"type": "Markdown"
} | # Notebooks
This directory contains notebooks that illustrate how to use the code
and give some examples of typical calculations. It also contains
demonstrations that the code behaves as expected and comparisons
with other approaches.
In addition to the notebooks there are a few scripts that can be run.
These were d... | martinjameswhiteREPO_NAMEdirectshtPATH_START.@directsht_extracted@directsht-main@notebooks@README.md@.PATH_END.py |
{
"filename": "object-blurring.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/guides/object-blurring.md",
"type": "Markdown"
} | ---
comments: true
description: Learn how to use Ultralytics YOLO11 for real-time object blurring to enhance privacy and focus in your images and videos.
keywords: YOLO11, object blurring, real-time processing, privacy protection, image manipulation, video editing, Ultralytics
---
# Object Blurring using Ultralytics Y... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@guides@object-blurring.md@.PATH_END.py |
{
"filename": "models_pysr.py",
"repo_name": "astrockragh/Mangrove",
"repo_path": "Mangrove_extracted/Mangrove-main/dev/models_pysr.py",
"type": "Python"
} | import torch.nn.functional as F
from torch.nn import Linear, LayerNorm, LeakyReLU, Module, ReLU, Sequential, ModuleList
from torch_geometric.nn import SAGEConv, global_mean_pool, norm, global_max_pool, global_add_pool, MetaLayer
from torch_scatter import scatter_mean, scatter_sum, scatter_max, scatter_min, scatter_add
... | astrockraghREPO_NAMEMangrovePATH_START.@Mangrove_extracted@Mangrove-main@dev@models_pysr.py@.PATH_END.py |
{
"filename": "calculate_coefficients.py",
"repo_name": "pmaxted/pycheops",
"repo_path": "pycheops_extracted/pycheops-master/pycheops/calculate_coefficients.py",
"type": "Python"
} | #!/usr/bin/env python
import numpy as np
from scipy.interpolate import pchip_interpolate
from scipy.optimize import minimize
import argparse
import textwrap
from ellc import lc
def q1q2_to_h1h2(q1, q2):
return 1 - np.sqrt(q1) + q2*np.sqrt(q1), 1 - np.sqrt(q1)
def h1h2_to_ca(h1, h2):
return 1 - h1 + h2, np.lo... | pmaxtedREPO_NAMEpycheopsPATH_START.@pycheops_extracted@pycheops-master@pycheops@calculate_coefficients.py@.PATH_END.py |
{
"filename": "Johnston_2021_raw_to_yaml.py",
"repo_name": "NickSwainston/pulsar_spectra",
"repo_path": "pulsar_spectra_extracted/pulsar_spectra-main/pulsar_spectra/catalogue_papers/Johnston_2021_raw_to_yaml.py",
"type": "Python"
} | import json
with open("Johnston_2021_raw.txt", "r") as raw_file:
lines = raw_file.readlines()
print(lines)
pulsar_dict = {}
for row in lines[1:]:
row = row.split()
print(row)
pulsar = row[0].replace("−", "-")
flux = float(row[1])
flux_err = float(row[2])
pulsar_dict[pulsar] = {
... | NickSwainstonREPO_NAMEpulsar_spectraPATH_START.@pulsar_spectra_extracted@pulsar_spectra-main@pulsar_spectra@catalogue_papers@Johnston_2021_raw_to_yaml.py@.PATH_END.py |
{
"filename": "RedoPhot.py",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/py_progs/RedoPhot.py",
"type": "Python"
} | #!/usr/bin/env python
'''
Extend phot tables retrieved from Topbase to higher energies and produce a plot file which shows the extended x-section file
Command line usage (if any):
usage: RedoPhot.py [-h] [-outroot whatever] filename
Description:
where:
-h prints the the help information and then th... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@py_progs@RedoPhot.py@.PATH_END.py |
{
"filename": "lsqr.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/sparse/linalg/isolve/lsqr.py",
"type": "Python"
} | """Sparse Equations and Least Squares.
The original Fortran code was written by C. C. Paige and M. A. Saunders as
described in
C. C. Paige and M. A. Saunders, LSQR: An algorithm for sparse linear
equations and sparse least squares, TOMS 8(1), 43--71 (1982).
C. C. Paige and M. A. Saunders, Algorithm 583; LSQR: Sparse... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@sparse@linalg@isolve@lsqr.py@.PATH_END.py |
{
"filename": "oscillon.py",
"repo_name": "jtksai/PyCOOL",
"repo_path": "PyCOOL_extracted/PyCOOL-master/models/oscillon.py",
"type": "Python"
} | import numpy as np
"""
###############################################################################
# Define a scalar field model and a lattice
###############################################################################
"""
class Model:
"""Model class that defines the scalar field. Change these values
... | jtksaiREPO_NAMEPyCOOLPATH_START.@PyCOOL_extracted@PyCOOL-master@models@oscillon.py@.PATH_END.py |
{
"filename": "pooltest.py",
"repo_name": "dstndstn/tractor",
"repo_path": "tractor_extracted/tractor-main/utils/pooltest.py",
"type": "Python"
} | from __future__ import print_function
import multiprocessing as mp
import multiprocessing.queues
import multiprocessing.pool
import os
#
# In Python 2.7 (and 2.6):
#
# Pool has an _inqueue (_quick_put) and _outqueue (_quick_get)
# and _taskqueue
#
# map() etc add themselves to cache[jobid] = self
# and place work on t... | dstndstnREPO_NAMEtractorPATH_START.@tractor_extracted@tractor-main@utils@pooltest.py@.PATH_END.py |
{
"filename": "test_ptdatasets.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/data/datasets/tests/test_ptdatasets.py",
"type": "Python"
} | from ..burgers import Burgers1dTimeDataset
from ..darcy import DarcyDataset
from ..navier_stokes import NavierStokesDataset
from pathlib import Path
import os
import shutil
import pytest
test_data_dir = Path("./dataset_test")
@pytest.mark.parametrize('resolution', [16])
def test_DarcyDatasetDownload(resolution):
... | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@data@datasets@tests@test_ptdatasets.py@.PATH_END.py |
{
"filename": "stis_reduction-wasp-69b-paper.ipynb",
"repo_name": "natalieallen/stis_pipeline",
"repo_path": "stis_pipeline_extracted/stis_pipeline-main/stis_reduction-wasp-69b-paper.ipynb",
"type": "Jupyter Notebook"
} | ```python
from STIS_pipeline_functions import *
```
```python
# read in data and calibration files - the test directory I have has
# two different instruments so I just quickly sort those
data_files_430 = sorted(glob.glob("wasp-69/HST/G430L/*/*flt.fits"))
data_files_750 = sorted(glob.glob("wasp-69/HST/G750L/*/*flt.f... | natalieallenREPO_NAMEstis_pipelinePATH_START.@stis_pipeline_extracted@stis_pipeline-main@stis_reduction-wasp-69b-paper.ipynb@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "mwvgroup/pwv_kpno",
"repo_path": "pwv_kpno_extracted/pwv_kpno-master/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want t... | mwvgroupREPO_NAMEpwv_kpnoPATH_START.@pwv_kpno_extracted@pwv_kpno-master@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "sensor.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/galsim/config/sensor.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@galsim@config@sensor.py@.PATH_END.py |
{
"filename": "convolution.py",
"repo_name": "Herculens/herculens",
"repo_path": "herculens_extracted/herculens-main/herculens/LensImage/Numerics/convolution.py",
"type": "Python"
} | # Handles different convolution methods
#
# Copyright (c) 2021, herculens developers and contributors
# Copyright (c) 2018, Simon Birrer & lenstronomy contributors
# based on the ImSim.Numerics module from lenstronomy (version 1.9.3)
__author__ = 'sibirrer', 'austinpeel', 'aymgal'
import numpy as np
import jax.numpy... | HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@LensImage@Numerics@convolution.py@.PATH_END.py |
{
"filename": "decay_chain_thermal_alpha-checkpoint.ipynb",
"repo_name": "hotokezaka/HeatingRate",
"repo_path": "HeatingRate_extracted/HeatingRate-master/HeatingRate_alpha/.ipynb_checkpoints/decay_chain_thermal_alpha-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter
import pandas as pd
import seaborn as sns
from numpy import pi
from scipy import optimize
import bateman as bt
import thermalization as th
import heat_alpha as ht
import lightcurve as lc
c = 2.99792458e10
day = 864... | hotokezakaREPO_NAMEHeatingRatePATH_START.@HeatingRate_extracted@HeatingRate-master@HeatingRate_alpha@.ipynb_checkpoints@decay_chain_thermal_alpha-checkpoint.ipynb@.PATH_END.py |
{
"filename": "Readme.md",
"repo_name": "jw-echelle/QtYETI",
"repo_path": "QtYETI_extracted/QtYETI-main/Readme.md",
"type": "Markdown"
} | # Welcome to QtYETI - Yeti's Extra Terrestrial Investigations
QtYETI is a program meant to faciliate the data reduction of Echelle spectra with and without image slicers.
2022-2024 Jakob Wierzbowski <jw.echelle@outlook.com>
<a target="_blank" rel="noopener noreferrer" href="Resources/QtYetiProgram.png"><img align... | jw-echelleREPO_NAMEQtYETIPATH_START.@QtYETI_extracted@QtYETI-main@Readme.md@.PATH_END.py |
{
"filename": "prepare_data.py",
"repo_name": "Samreay/Barry",
"repo_path": "Barry_extracted/Barry-master/barry/data/beutler_2019_dr12_z061_pk/prepare_data.py",
"type": "Python"
} | import pickle
import pandas as pd
import numpy as np
import os
def getdf(loc):
skip = 34 if "post_recon" in loc else 31
df = pd.read_csv(
loc,
comment="#",
skiprows=skip,
delim_whitespace=True,
names=["k", "kmean", "pk0", "sigma_pk0", "pk1", "sigma_pk1", "pk2", "sigma_p... | SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@data@beutler_2019_dr12_z061_pk@prepare_data.py@.PATH_END.py |
{
"filename": "l1_solvers_common.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/base/l1_solvers_common.py",
"type": "Python"
} | """
Holds common functions for l1 solvers.
"""
import numpy as np
from statsmodels.tools.sm_exceptions import ConvergenceWarning
def qc_results(params, alpha, score, qc_tol, qc_verbose=False):
"""
Theory dictates that one of two conditions holds:
i) abs(score[i]) == alpha[i] and params[i] != 0
... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@base@l1_solvers_common.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergeo/line/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="scattergeo.line", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergeo@line@_color.py@.PATH_END.py |
{
"filename": "tight_bbox.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py2/matplotlib/tight_bbox.py",
"type": "Python"
} | """
This module is to support *bbox_inches* option in savefig command.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
def adjust_bbox(fig, bbox_inches, fixed_dpi=None):
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py2@matplotlib@tight_bbox.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "federicomarulli/CosmoBolognaLib",
"repo_path": "CosmoBolognaLib_extracted/CosmoBolognaLib-master/External/CAMB/setup.py",
"type": "Python"
} | #!/usr/bin/env python
import sys
import subprocess
import re
import os
import shutil
from typing import Any
from setuptools import setup
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop
from distutils.command.clean import clean
from distutils.core import Command
file_dir... | federicomarulliREPO_NAMECosmoBolognaLibPATH_START.@CosmoBolognaLib_extracted@CosmoBolognaLib-master@External@CAMB@setup.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "jobovy/stream-stream",
"repo_path": "stream-stream_extracted/stream-stream-main/README.md",
"type": "Markdown"
} | # stream-stream
This repository contains the code to do the analysis in [Bovy
(2015)](http://arxiv.org/abs/1512.00452) of the interaction between a
stellar stream and a disrupting dark-matter halo.
## AUTHOR
Jo Bovy - bovy at astro dot utoronto dot ca
## Requirements
* [galpy](https://github.com/jobovy/galpy)
* [N... | jobovyREPO_NAMEstream-streamPATH_START.@stream-stream_extracted@stream-stream-main@README.md@.PATH_END.py |
{
"filename": "demo_custom_jax_workflow.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/examples/demo_custom_jax_workflow.py",
"type": "Python"
} | # flake8: noqa
import os
# Set backend env to JAX
os.environ["KERAS_BACKEND"] = "jax"
import jax
import numpy as np
from keras import Model
from keras import backend
from keras import initializers
from keras import layers
from keras import ops
from keras import optimizers
class MyDense(layers.Layer):
def __ini... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@examples@demo_custom_jax_workflow.py@.PATH_END.py |
{
"filename": "generative_inpainting_ops.py",
"repo_name": "giuspugl/picasso",
"repo_path": "picasso_extracted/picasso-master/picasso/inpainters/generative_inpainting_ops.py",
"type": "Python"
} | #
#
# This module has been slightly modified and imported from
# https://github.com/JiahuiYu/generative_inpainting
#
#
# date: 2019-08-20
# author: Jiahui Yu
# python3.6
# Copyright (C) 2018
#
import logging
import cv2
import numpy as np
import tensorflow as tf
from tensorflow.contrib.framework.py... | giuspuglREPO_NAMEpicassoPATH_START.@picasso_extracted@picasso-master@picasso@inpainters@generative_inpainting_ops.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/mosviz/plugins/row_lock/__init__.py",
"type": "Python"
} | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@mosviz@plugins@row_lock@__init__.py@.PATH_END.py | |
{
"filename": "FORCAST-Grism_CustomExtraction-3-checkpoint.ipynb",
"repo_name": "SOFIAObservatory/Recipes",
"repo_path": "Recipes_extracted/Recipes-master/example_data/FORCAST/.ipynb_checkpoints/FORCAST-Grism_CustomExtraction-3-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | ## FORCAST Grism Spectra: Custom Spectral Extraction
-------------------
**Aim**: Extract grism data with a user-defined aperture. <br />
**Data**: Level 3 grism data of the Saturn Nebula (G111)<br />
**Tools**: astropy, DS9 <br />
**Instrument**: FORCAST<br />
**Documentation**: [FORCAST data handbook](https://www.sof... | SOFIAObservatoryREPO_NAMERecipesPATH_START.@Recipes_extracted@Recipes-master@example_data@FORCAST@.ipynb_checkpoints@FORCAST-Grism_CustomExtraction-3-checkpoint.ipynb@.PATH_END.py |
{
"filename": "_tickprefix.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickprefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="tickprefix",
parent_name="layout.coloraxis.colorbar",
**kwargs,
):
super(TickprefixValidator, self).__init__(
plotly... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@coloraxis@colorbar@_tickprefix.py@.PATH_END.py |
{
"filename": "Hermite1d-AstropyModel.ipynb",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/examples/Hermite1d-AstropyModel.ipynb",
"type": "Jupyter Notebook"
} | ## Hermite1d AstropyModel.
We construct a AstropyModel wrapping the Hermite1D model from Astropy
Demonstration:
1. Astropy Model
2. NestedSampler
```python
import numpy as numpy
import math
from astropy.modeling.polynomial import Hermite1D
from astropy.modeling import FittableModel
from BayesicFitting import Astr... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@examples@Hermite1d-AstropyModel.ipynb@.PATH_END.py |
{
"filename": "test_dtypes.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/frame/methods/test_dtypes.py",
"type": "Python"
} | from datetime import timedelta
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.core.dtypes.dtypes import DatetimeTZDtype
import pandas as pd
from pandas import (
DataFrame,
Series,
date_range,
)
import pandas._testing as tm
class TestDataFrameDataTypes:
d... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@frame@methods@test_dtypes.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "scikit-image/scikit-image",
"repo_path": "scikit-image_extracted/scikit-image-main/doc/source/conf.py",
"type": "Python"
} | # Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
from datetime import date
import inspect
import os
import sys
from warnings import filterwarnings
import plotly.io a... | scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@doc@source@conf.py@.PATH_END.py |
{
"filename": "test_logger.py",
"repo_name": "panoptes/POCS",
"repo_path": "POCS_extracted/POCS-main/tests/utils/test_logger.py",
"type": "Python"
} | import time
import pytest
from panoptes.pocs.utils.logger import get_logger
@pytest.fixture()
def profile():
return 'testing'
def test_base_logger(caplog, profile, tmp_path):
logger = get_logger(log_dir=str(tmp_path),
full_log_file=None)
logger.debug('Hello')
time.sleep(1) ... | panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@tests@utils@test_logger.py@.PATH_END.py |
{
"filename": "legendre.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py2/numpy/polynomial/legendre.py",
"type": "Python"
} | """
Legendre Series (:mod: `numpy.polynomial.legendre`)
===================================================
.. currentmodule:: numpy.polynomial.polynomial
This module provides a number of objects (mostly functions) useful for
dealing with Legendre series, including a `Legendre` class that
encapsulates the usual arith... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py2@numpy@polynomial@legendre.py@.PATH_END.py |
{
"filename": "buffer.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/gloo/buffer.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@gloo@buffer.py@.PATH_END.py |
{
"filename": "diaSources.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/common/schema/lasair_schema/diaSources.py",
"type": "Python"
} | schema = {
"name": "diaSources",
"fields": [
{
"name": "diaSourceId",
"type": "long"
},
{
"name": "visit",
"type": "long"
},
{
"name": "detector",
"type": "int"
},
{
"name": "diaObjectId",
"type": "long"
},
{
"name": "ssObject... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@common@schema@lasair_schema@diaSources.py@.PATH_END.py |
{
"filename": "reference.py",
"repo_name": "veusz/veusz",
"repo_path": "veusz_extracted/veusz-master/veusz/setting/reference.py",
"type": "Python"
} | # Copyright (C) 2009 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@setting@reference.py@.PATH_END.py |
{
"filename": "Table_1_paper_results.ipynb",
"repo_name": "mperezcarrasco/AnomalyALeRCE",
"repo_path": "AnomalyALeRCE_extracted/AnomalyALeRCE-main/presentation/notebooks/Table_1_paper_results.ipynb",
"type": "Jupyter Notebook"
} | ```python
import argparse
import os, glob
import json
import numpy as np
from sklearn.metrics import auc
```
# Table 1. Paper results
```python
%cd ..
```
/home/users/dmoreno2016/marti/AnomalyALeRCE
```python
root_experiments = './experiments'
for name_model in ['ae','ocsvm', 'deepsvdd', 'classvdd', 'if... | mperezcarrascoREPO_NAMEAnomalyALeRCEPATH_START.@AnomalyALeRCE_extracted@AnomalyALeRCE-main@presentation@notebooks@Table_1_paper_results.ipynb@.PATH_END.py |
{
"filename": "bayes_classifier.py",
"repo_name": "jmschrei/pomegranate",
"repo_path": "pomegranate_extracted/pomegranate-master/pomegranate/bayes_classifier.py",
"type": "Python"
} | # BayesClassifier.py
# Author: Jacob Schreiber <jmschreiber91@gmail.com>
import numpy
import torch
from ._utils import _cast_as_tensor
from ._utils import _cast_as_parameter
from ._utils import _update_parameter
from ._utils import _check_parameter
from ._utils import _reshape_weights
from ._bayes import BayesMixin
... | jmschreiREPO_NAMEpomegranatePATH_START.@pomegranate_extracted@pomegranate-master@pomegranate@bayes_classifier.py@.PATH_END.py |
{
"filename": "palettes.py",
"repo_name": "mwaskom/seaborn",
"repo_path": "seaborn_extracted/seaborn-master/seaborn/palettes.py",
"type": "Python"
} | import colorsys
from itertools import cycle
import numpy as np
import matplotlib as mpl
from .external import husl
from .utils import desaturate, get_color_cycle
from .colors import xkcd_rgb, crayons
from ._compat import get_colormap
__all__ = ["color_palette", "hls_palette", "husl_palette", "mpl_palette",
... | mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@seaborn@palettes.py@.PATH_END.py |
{
"filename": "_marker.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/waterfall/totals/_marker.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "waterfall.totals"
_path_str = "waterfall.totals.marker"
_valid_props = {"color", "line"}
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@waterfall@totals@_marker.py@.PATH_END.py |
{
"filename": "replace_parameter_names.py",
"repo_name": "rometsch/fargocpt",
"repo_path": "fargocpt_extracted/fargocpt-master/Tools/param_names/replace_parameter_names.py",
"type": "Python"
} | #!/usr/bin/env python3
import sys
import os
import argparse
import yaml
import copy
import re
old_to_new = {
'ALPHAVISCOSITY': {'newname': 'ViscousAlpha'},
'Adiabatic': {'newname': 'none', 'hint': 'EquationOfState: Ideal'},
'AlphaThreshold': {'newname': 'none'},
'CoolingRadiativeLocal': {'newname': 'none',
'hint... | rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@Tools@param_names@replace_parameter_names.py@.PATH_END.py |
{
"filename": "getcoldgas.py",
"repo_name": "timcarleton/Illustris_XMD",
"repo_path": "Illustris_XMD_extracted/Illustris_XMD-main/getcoldgas.py",
"type": "Python"
} | from astropy.io import fits, ascii
import glob
import numpy as np
import gettemp
import h5py
from scipy.optimize import minimize_scalar
import downloadcutout_snap
f=fits.open('alltnggal_withr_wmetals_wvmax.fits')
obj=np.loadtxt('sampleselection_sfr5_notide_nomass.txt',skiprows=1,delimiter=',')
tempcut=50
wg=np.where... | timcarletonREPO_NAMEIllustris_XMDPATH_START.@Illustris_XMD_extracted@Illustris_XMD-main@getcoldgas.py@.PATH_END.py |
{
"filename": "backend_bases.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/matplotlib/backend_bases.py",
"type": "Python"
} | """
Abstract base classes define the primitives that renderers and
graphics contexts must implement to serve as a matplotlib backend
:class:`RendererBase`
An abstract base class to handle drawing/rendering operations.
:class:`FigureCanvasBase`
The abstraction layer that separates the
:class:`matplotlib.fi... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@matplotlib@backend_bases.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/__init__.py",
"type": "Python"
} | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@__init__.py@.PATH_END.py | |
{
"filename": "fitargs.py",
"repo_name": "kbwestfall/NIRVANA",
"repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/data/fitargs.py",
"type": "Python"
} | #!/usr/bin/env python
from IPython import embed
import numpy as np
import matplotlib.pyplot as plt
import warnings
from astropy.stats import sigma_clip
try:
import pyfftw
except:
pyfftw = None
from ..models.geometry import projected_polar
from ..models.asymmetry import asymmetry
from ..models.axisym import... | kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@data@fitargs.py@.PATH_END.py |
{
"filename": "util.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/poutine/util.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
from typing import TYPE_CHECKING, List, Optional
from pyro import settings
if TYPE_CHECKING:
from pyro.distributions.distribution import Distribution
from pyro.poutine.runtime import Message
from pyro.poutine.trace_st... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@poutine@util.py@.PATH_END.py |
{
"filename": "TestLOFAR_J1329_p4729.py",
"repo_name": "saopicc/killMS",
"repo_path": "killMS_extracted/killMS-master/TestHarness/LongAcceptanceTests/TestLOFAR_J1329_p4729.py",
"type": "Python"
} | '''
DDFacet, a facet-based radio imaging package
Copyright (C) 2013-2016 Cyril Tasse, l'Observatoire de Paris,
SKA South Africa, Rhodes University
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; eit... | saopiccREPO_NAMEkillMSPATH_START.@killMS_extracted@killMS-master@TestHarness@LongAcceptanceTests@TestLOFAR_J1329_p4729.py@.PATH_END.py |
{
"filename": "index.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/models/convert/index.md",
"type": "Markdown"
} | # Model conversion overview
The machine learning (ML) models you use with TensorFlow Lite are originally
built and trained using TensorFlow core libraries and tools. Once you've built
a model with TensorFlow core, you can convert it to a smaller, more
efficient ML model format called a TensorFlow Lite model.
This sect... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@models@convert@index.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "mikekatz04/Eryn",
"repo_path": "Eryn_extracted/Eryn-main/eryn/backends/__init__.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from .backend import Backend
from .hdfbackend import HDFBackend, TempHDFBackend
__all__ = ["Backend", "HDFBackend", "TempHDFBackend", "get_test_backends"]
def get_test_backends():
backends = [Backend]
try:
import h5py # NOQA
except ImportError:
pass
else:
... | mikekatz04REPO_NAMEErynPATH_START.@Eryn_extracted@Eryn-main@eryn@backends@__init__.py@.PATH_END.py |
{
"filename": "triangulation.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/geometry/triangulation.py",
"type": "Python"
} | # -*- coding: utf8 -*-
from __future__ import division, print_function
import sys
from itertools import permutations
import numpy as np
from ..ext.ordereddict import OrderedDict
try:
# Try to use the C++ triangle library, faster than the
# pure Python version.
# The latest stable release only works with... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@geometry@triangulation.py@.PATH_END.py |
{
"filename": "export_sympy.py",
"repo_name": "MilesCranmer/PySR",
"repo_path": "PySR_extracted/PySR-master/pysr/export_sympy.py",
"type": "Python"
} | """Define utilities to export to sympy"""
from collections.abc import Callable
import sympy # type: ignore
from sympy import sympify
from sympy.codegen.cfunctions import log2, log10 # type: ignore
from .utils import ArrayLike
sympy_mappings = {
"div": lambda x, y: x / y,
"mult": lambda x, y: x * y,
"s... | MilesCranmerREPO_NAMEPySRPATH_START.@PySR_extracted@PySR-master@pysr@export_sympy.py@.PATH_END.py |
{
"filename": "noise_model.py",
"repo_name": "nanograv/PINT",
"repo_path": "PINT_extracted/PINT-master/src/pint/models/noise_model.py",
"type": "Python"
} | """Pulsar timing noise models."""
import copy
import warnings
import astropy.units as u
import numpy as np
from loguru import logger as log
from pint.models.parameter import floatParameter, maskParameter
from pint.models.timing_model import Component
class NoiseComponent(Component):
def __init__(
self... | nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@models@noise_model.py@.PATH_END.py |
{
"filename": "test_chaining_and_caching.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/indexing/multiindex/test_chaining_and_caching.py",
"type": "Python"
} | import numpy as np
from pandas._libs import index as libindex
from pandas import (
DataFrame,
MultiIndex,
RangeIndex,
Series,
)
import pandas._testing as tm
def test_detect_chained_assignment():
# Inplace ops, originally from:
# https://stackoverflow.com/questions/20508968/series-fillna-in-a... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexing@multiindex@test_chaining_and_caching.py@.PATH_END.py |
{
"filename": "spin-corner.py",
"repo_name": "multipass-black-holes/multipass",
"repo_path": "multipass_extracted/multipass-main/results/plots/spin-corner.py",
"type": "Python"
} | import sys
sys.path.append("..")
from analyse import *
samples_nospin = loadMC("../ppisn/long", "ppisn+trivial+trivial")
samples_spin = loadMC("../ppisn-spin/long", "ppisn+trivial+beta")
fig, axs = subplots(
7+4,
7+4,
gridspec_kw={"hspace": 0, "wspace": 0},
figsize=(1.5 * 7.84, 1.5 * 5.9),
# sha... | multipass-black-holesREPO_NAMEmultipassPATH_START.@multipass_extracted@multipass-main@results@plots@spin-corner.py@.PATH_END.py |
{
"filename": "layerwise_ptq_analysis.py",
"repo_name": "alibaba/TinyNeuralNetwork",
"repo_path": "TinyNeuralNetwork_extracted/TinyNeuralNetwork-main/examples/quantization/layerwise_ptq_analysis.py",
"type": "Python"
} | import argparse
import os
import torch
import torch.nn as nn
from tinynn.graph.tracer import model_tracer
from tinynn.util.cifar10 import get_dataloader, calibrate, validate
from tinynn.graph.quantization.quantizer import PostQuantizer
from tinynn.util.train_util import DLContext, get_device
CURRENT_PATH = os.path.a... | alibabaREPO_NAMETinyNeuralNetworkPATH_START.@TinyNeuralNetwork_extracted@TinyNeuralNetwork-main@examples@quantization@layerwise_ptq_analysis.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/tools/evaluation/tasks/coco_object_detection/README.md",
"type": "Markdown"
} | # Object Detection evaluation using the 2014 COCO minival dataset.
This binary evaluates the following parameters of TFLite models trained for the
**bounding box-based**
[COCO Object Detection](http://cocodataset.org/#detection-eval) task:
* Native pre-processing latency
* Inference latency
* mean Average Preci... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@tools@evaluation@tasks@coco_object_detection@README.md@.PATH_END.py |
{
"filename": "wedges.py",
"repo_name": "andreicuceu/vega",
"repo_path": "vega_extracted/vega-master/vega/plots/wedges.py",
"type": "Python"
} | import numpy as np
class Wedge:
"""
Computes a wedge for a 2D function
"""
def __init__(self, rp=(0., 200., 50),
rt=(0., 200., 50), r=(0., 200., 50),
mu=(0.95, 1.0), scaling=10, abs_mu=False):
"""Initialize computation of a wedge
Parameters
-... | andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@vega@plots@wedges.py@.PATH_END.py |
{
"filename": "_ihatexml.py",
"repo_name": "davidharvey1986/pyRRG",
"repo_path": "pyRRG_extracted/pyRRG-master/unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/html5lib/_ihatexml.py",
"type": "Python"
} | from __future__ import absolute_import, division, unicode_literals
import re
import warnings
from .constants import DataLossWarning
baseChar = """
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-... | davidharvey1986REPO_NAMEpyRRGPATH_START.@pyRRG_extracted@pyRRG-master@unittests@bugFixPyRRG@lib@python3.7@site-packages@pip@_vendor@html5lib@_ihatexml.py@.PATH_END.py |
{
"filename": "filetype.py",
"repo_name": "dstndstn/astrometry.net",
"repo_path": "astrometry.net_extracted/astrometry.net-main/util/filetype.py",
"type": "Python"
} | # This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
import os
import sys
from astrometry.util.shell import shell_escape
from astrometry.util.run_command import run_command
# DEBUG
import logging
def logverb(*msg):
if (sys.version_info > (3,0)):
log... | dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@util@filetype.py@.PATH_END.py |
{
"filename": "likelihoods.py",
"repo_name": "dylancromer/maszcal",
"repo_path": "maszcal_extracted/maszcal-main/maszcal/likelihoods.py",
"type": "Python"
} | def log_gaussian_shape(model, data, fisher):
diff = model - data
return -(diff@fisher@diff.T) / 2
| dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@maszcal@likelihoods.py@.PATH_END.py |
{
"filename": "CONTRIBUTING.md",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/CONTRIBUTING.md",
"type": "Markdown"
} | # Development
Please follow our established coding style including variable names, module imports, and function definitions.
The Pyro codebase follows the [PEP8 style guide](https://www.python.org/dev/peps/pep-0008/)
(which you can check with `make lint`) and follows
[`isort`](https://github.com/timothycrosley/isort) ... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@CONTRIBUTING.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "perwin/imfit",
"repo_path": "imfit_extracted/imfit-master/profile_data/README.md",
"type": "Markdown"
} | ## Profile_data Directory
This directory contains 1D surface-brightness profiles for use in regression tests
for profilefit.
This is *not* a standard part of Imfit.
(Data originally published in Trujillo et al. 2004.)
| perwinREPO_NAMEimfitPATH_START.@imfit_extracted@imfit-master@profile_data@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/colorbar/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._yref import YrefValidator
from ._ypad import YpadValidator
from ._yanchor import YanchorValidator
from ._y import YValidator
from ._xref import XrefValidator
from ._xpad import XpadValidator
fr... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@colorbar@__init__.py@.PATH_END.py |
{
"filename": "CRKSPH_mod_package.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/Hydro/AcousticWave/CRKSPH_mod_package.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# A mock physics package to mess around with the CRKSPH corrections.
#-------------------------------------------------------------------------------
from Spheral1d import *
class CRKSPH_mod_package(Physics):
def __init__(self):
... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Hydro@AcousticWave@CRKSPH_mod_package.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/stats/lombscargle/implementations/__init__.py",
"type": "Python"
} | """Various implementations of the Lomb-Scargle Periodogram"""
from .main import lombscargle, available_methods
from .chi2_impl import lombscargle_chi2
from .scipy_impl import lombscargle_scipy
from .slow_impl import lombscargle_slow
from .fast_impl import lombscargle_fast
from .fastchi2_impl import lombscargle_fastchi... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@stats@lombscargle@implementations@__init__.py@.PATH_END.py |
{
"filename": "PlotWidget.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/PlotWidget.py",
"type": "Python"
} | """
Demonstrates use of PlotWidget class. This is little more than a
GraphicsView with a PlotItem placed in its center.
"""
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtWidgets
app = pg.mkQApp()
mw = QtWidgets.QMainWindow()
mw.setWindowTitle('pyqtgraph example: PlotWidget')
mw.resize... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@PlotWidget.py@.PATH_END.py |
{
"filename": "TIR.ipynb",
"repo_name": "PyEllips/pyElli",
"repo_path": "pyElli_extracted/pyElli-master/examples/Total internal reflection/TIR.ipynb",
"type": "Jupyter Notebook"
} | # Example of Total Internal Reflection on the Glass / Air interface
Author: O. Castany, M.Müller
```python
import elli
import matplotlib.pyplot as plt
import numpy as np
```
## Structure definition
```python
# Refractive indices
n_glass = 1.5
n_air = 1.0
# Materials:
glass = elli.IsotropicMaterial(elli.ConstantR... | PyEllipsREPO_NAMEpyElliPATH_START.@pyElli_extracted@pyElli-master@examples@Total internal reflection@TIR.ipynb@.PATH_END.py |
{
"filename": "complex_correlation.py",
"repo_name": "LucaMalavolta/PyORBIT",
"repo_path": "PyORBIT_extracted/PyORBIT-main/pyorbit/models/complex_correlation.py",
"type": "Python"
} | from pyorbit.models.abstract_model import *
from numpy.polynomial import polynomial
from numpy.polynomial import Polynomial
from scipy.optimize import minimize
class ComplexCorrelation(AbstractModel):
default_common = 'complex_correlation'
def __init__(self, *args, **kwargs):
super().__init__(*args, ... | LucaMalavoltaREPO_NAMEPyORBITPATH_START.@PyORBIT_extracted@PyORBIT-main@pyorbit@models@complex_correlation.py@.PATH_END.py |
{
"filename": "_coloraxis.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/marker/line/_coloraxis.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self, plotly_name="coloraxis", parent_name="scattersmith.marker.line", **kwargs
):
super(ColoraxisValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@marker@line@_coloraxis.py@.PATH_END.py |
{
"filename": "parameter_redshift_and_mass_relations.py",
"repo_name": "dylancromer/maszcal",
"repo_path": "maszcal_extracted/maszcal-main/scripts/parameter_redshift_and_mass_relations.py",
"type": "Python"
} | import datetime
import time
import numpy as np
import pathos.pools as pp
import maszcal.data.sims
import maszcal.data.obs
import maszcal.lensing
import maszcal.likelihoods
import maszcal.fitutils
import maszcal.concentration
NUM_THREADS = 8
NFW_PARAM_MINS = np.array([0])
NFW_PARAM_MAXES = np.array([10])
BARYON_PARA... | dylancromerREPO_NAMEmaszcalPATH_START.@maszcal_extracted@maszcal-main@scripts@parameter_redshift_and_mass_relations.py@.PATH_END.py |
{
"filename": "asteroseismology-estimating-mass-and-radius.ipynb",
"repo_name": "lightkurve/lightkurve",
"repo_path": "lightkurve_extracted/lightkurve-main/docs/source/tutorials/3-science-examples/asteroseismology-estimating-mass-and-radius.ipynb",
"type": "Jupyter Notebook"
} | # How to estimate a star's mass and radius using asteroseismology
## Learning Goals
In this tutorial you will learn:
- What the periodogram of a star with solar-like oscillations looks like.
- How the oscillations can be characterized by two key metrics ($\nu_{\rm max}$ and $\Delta\nu$).
- How these metrics can be ... | lightkurveREPO_NAMElightkurvePATH_START.@lightkurve_extracted@lightkurve-main@docs@source@tutorials@3-science-examples@asteroseismology-estimating-mass-and-radius.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "cheerfuluser/tessreduce",
"repo_path": "tessreduce_extracted/tessreduce-master/tessreduce/__init__.py",
"type": "Python"
} | from .tessreduce import *
from .__version__ import __version__
| cheerfuluserREPO_NAMEtessreducePATH_START.@tessreduce_extracted@tessreduce-master@tessreduce@__init__.py@.PATH_END.py |
{
"filename": "resource_variables_toggle.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/resource_variables_toggle.py",
"type": "Python"
} | # Copyright 2023 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@resource_variables_toggle.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "umbramortem/nProFit",
"repo_path": "nProFit_extracted/nProFit-main/README.md",
"type": "Markdown"
} | # nProFit
Tool for analysis of surface brightness profiles
When using nProFit refer to Cuevas-Otahola et al. 2021
To install nProFit extract the compress file and run the install.sh
Create proper aliases following the directions in the user's manual
Perform your first run executing nProFit with the input file in the f... | umbramortemREPO_NAMEnProFitPATH_START.@nProFit_extracted@nProFit-main@README.md@.PATH_END.py |
{
"filename": "projection_kernel.py",
"repo_name": "EmmanuelSchaan/HaloGen",
"repo_path": "HaloGen_extracted/HaloGen-master/projection_kernel.py",
"type": "Python"
} | from headers import *
##################################################################################
class Projection(object):
def __init__(self, U, name="", nameLatex="", nProc=1):
# copy U
self.U = U
self.name = name
self.nameLatex = nameLatex
self.nProc = nProc
#self.aMin... | EmmanuelSchaanREPO_NAMEHaloGenPATH_START.@HaloGen_extracted@HaloGen-master@projection_kernel.py@.PATH_END.py |
{
"filename": "_cmax.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/line/_cmax.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CmaxValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="cmax", parent_name="scatter3d.line", **kwargs):
super(CmaxValidator, 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@scatter3d@line@_cmax.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "timstaley/chimenea",
"repo_path": "chimenea_extracted/chimenea-master/setup.py",
"type": "Python"
} | #!/usr/bin/env python
from setuptools import setup
requirements = ['drive-casa>=0.6.6',
'tkp>2.0,<3',
]
setup(
name="chimenea",
version="0.5.2",
packages=['chimenea'],
description="Automated image-synthesis of multi-epoch radio-telescope data.",
author="Tim Staley",
author_e... | timstaleyREPO_NAMEchimeneaPATH_START.@chimenea_extracted@chimenea-master@setup.py@.PATH_END.py |
{
"filename": "test_messages.py",
"repo_name": "PrefectHQ/prefect",
"repo_path": "prefect_extracted/prefect-main/src/integrations/prefect-slack/tests/test_messages.py",
"type": "Python"
} | from itertools import product
import pytest
from prefect_slack.messages import send_chat_message, send_incoming_webhook_message
from prefect import flow
CHANNELS = ["#random", "#general"]
TEXT = ["hello", "goodbye"]
ATTACHMENTS = [
None,
[
{
"text": "This is an attachment",
"i... | PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@integrations@prefect-slack@tests@test_messages.py@.PATH_END.py |
{
"filename": "fun_dims.py",
"repo_name": "hahnec/torchimize",
"repo_path": "torchimize_extracted/torchimize-master/torchimize/functions/fun_dims.py",
"type": "Python"
} | __author__ = "Christopher Hahne"
__email__ = "inbox@christopherhahne.de"
__license__ = """
Copyright (c) 2022 Christopher Hahne <inbox@christopherhahne.de>
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 S... | hahnecREPO_NAMEtorchimizePATH_START.@torchimize_extracted@torchimize-master@torchimize@functions@fun_dims.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "simonsobs/nemo",
"repo_path": "nemo_extracted/nemo-main/examples/TILe-C/README.md",
"type": "Markdown"
} | The [examples/TILe-C](https://github.com/simonsobs/nemo/tree/master/examples/TILe-C)
directory contains a config file (`y_f090beam.yml`) that can be
used to run Nemo on y-maps produced by
[TILe-C](https://github.com/ACTCollaboration/tile-c).
You will need access to the `release_v0.2.3` D56 y-maps maps and the
90 GHz be... | simonsobsREPO_NAMEnemoPATH_START.@nemo_extracted@nemo-main@examples@TILe-C@README.md@.PATH_END.py |
{
"filename": "Stairs_1999_raw_to_yaml.py",
"repo_name": "NickSwainston/pulsar_spectra",
"repo_path": "pulsar_spectra_extracted/pulsar_spectra-main/pulsar_spectra/catalogue_papers/Stairs_1999_raw_to_yaml.py",
"type": "Python"
} | import json
import psrqpy
import csv
query = psrqpy.QueryATNF(params=['PSRJ', 'NAME', 'PSRB', 'P0']).pandas
all_jnames = list(query['PSRJ'])
# was converted from image to csv using ABBYY FineReader
with open("Stairs_1999_raw.csv") as file:
tsv_file = csv.reader(file, delimiter=" ")
lines = []
for line in ... | NickSwainstonREPO_NAMEpulsar_spectraPATH_START.@pulsar_spectra_extracted@pulsar_spectra-main@pulsar_spectra@catalogue_papers@Stairs_1999_raw_to_yaml.py@.PATH_END.py |
{
"filename": "_special_matrices.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/linalg/_special_matrices.py",
"type": "Python"
} | import math
import warnings
import numpy as np
from numpy.lib.stride_tricks import as_strided
__all__ = ['tri', 'tril', 'triu', 'toeplitz', 'circulant', 'hankel',
'hadamard', 'leslie', 'kron', 'block_diag', 'companion',
'helmert', 'hilbert', 'invhilbert', 'pascal', 'invpascal', 'dft',
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@linalg@_special_matrices.py@.PATH_END.py |
{
"filename": "test_interpolation.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/ndimage/tests/test_interpolation.py",
"type": "Python"
} | import sys
import numpy
from numpy.testing import (assert_, assert_equal, assert_array_equal,
assert_array_almost_equal, assert_allclose,
suppress_warnings)
import pytest
from pytest import raises as assert_raises
import scipy.ndimage as ndimage
from . import type... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@ndimage@tests@test_interpolation.py@.PATH_END.py |
{
"filename": "Extract_beam.ipynb",
"repo_name": "ivastar/clear",
"repo_path": "clear_extracted/clear-master/notebooks/forward_modeling/Extract_beam.ipynb",
"type": "Jupyter Notebook"
} | # Forward modeling tutorial using mosaic images
## Extract BeamCutout
Here I will show you how to extract BeamCutouts. Saving these (fits) files before modeling will make entire process quicker. The BeamCutouts contain the orient information which is nessecary for better fitting models. Here's what Gabe says about thi... | ivastarREPO_NAMEclearPATH_START.@clear_extracted@clear-master@notebooks@forward_modeling@Extract_beam.ipynb@.PATH_END.py |
{
"filename": "test_saving.py",
"repo_name": "ytree-project/ytree",
"repo_path": "ytree_extracted/ytree-main/tests/test_saving.py",
"type": "Python"
} | """
tests for saving arbors and trees
"""
#-----------------------------------------------------------------------------
# Copyright (c) ytree development team. All rights reserved.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this so... | ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@tests@test_saving.py@.PATH_END.py |
{
"filename": "_choropleth.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/layout/template/data/_choropleth.py",
"type": "Python"
} | from plotly.graph_objs import Choropleth
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@layout@template@data@_choropleth.py@.PATH_END.py |
{
"filename": "_family.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/hoverlabel/font/_family.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="family", parent_name="ohlc.hoverlabel.font", **kwargs
):
super(FamilyValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@hoverlabel@font@_family.py@.PATH_END.py |
{
"filename": "density_pdf.py",
"repo_name": "florpi/sunbird",
"repo_path": "sunbird_extracted/sunbird-main/sunbird/summaries/density_pdf.py",
"type": "Python"
} | from pathlib import Path
from typing import Optional
from sunbird.summaries.base import BaseSummaryFolder
DEFAULT_PATH = Path(__file__).parent.parent.parent / "trained_models/best/"
DEFAULT_DATA_PATH = Path(__file__).parent.parent.parent / "data/"
class DensityPDF(BaseSummaryFolder):
def __init__(
self,
... | florpiREPO_NAMEsunbirdPATH_START.@sunbird_extracted@sunbird-main@sunbird@summaries@density_pdf.py@.PATH_END.py |
{
"filename": "query_auth.py",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasairapi/query_auth.py",
"type": "Python"
} | from django.contrib.auth.models import User
from rest_framework import authentication
from rest_framework import exceptions
from re import match
class QueryAuthentication(authentication.TokenAuthentication):
def authenticate(self, request):
token = request.query_params.get('token')
if not token:
... | lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasairapi@query_auth.py@.PATH_END.py |
{
"filename": "_token.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/stream/_token.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TokenValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="token", parent_name="funnel.stream", **kwargs):
super(TokenValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@stream@_token.py@.PATH_END.py |
{
"filename": "integrate.py",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/jax/scipy/integrate.py",
"type": "Python"
} | # Copyright 2023 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@scipy@integrate.py@.PATH_END.py |
{
"filename": "surfacespecs.py",
"repo_name": "alphaparrot/ExoPlaSim",
"repo_path": "ExoPlaSim_extracted/ExoPlaSim-master/exoplasim/surfacespecs.py",
"type": "Python"
} | import numpy as np
import glob
'''
Surface reflectance spectra for different surface types used in ExoPlaSim.
Included variables:
wvl : wavelength in microns
groundblend : mixed-surface ground reflectance
oceanblend : ocean reflectance (mix of pure water and seawater)
iceblend : mixed-grain snow/ice/... | alphaparrotREPO_NAMEExoPlaSimPATH_START.@ExoPlaSim_extracted@ExoPlaSim-master@exoplasim@surfacespecs.py@.PATH_END.py |
{
"filename": "test_constrainedlayout.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/tests/test_constrainedlayout.py",
"type": "Python"
} | import gc
import platform
import numpy as np
import pytest
import matplotlib as mpl
from matplotlib.testing.decorators import image_comparison
import matplotlib.pyplot as plt
import matplotlib.transforms as mtransforms
from matplotlib import gridspec, ticker
def example_plot(ax, fontsize=12, nodec=False):
ax.pl... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@tests@test_constrainedlayout.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "D-arioSpace/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/cadc/tests/__init__.py",
"type": "Python"
} | D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@cadc@tests@__init__.py@.PATH_END.py | |
{
"filename": "INTEGRATION.md",
"repo_name": "ucberkeleyseti/turbo_seti",
"repo_path": "turbo_seti_extracted/turbo_seti-master/INTEGRATION.md",
"type": "Markdown"
} | This document describes the changes from Travis CI to Github Actions.
### Travis CI Status
- Deprecated in favor of Github Actions.
### Github Actions Approach
#### On Commit or Pull-Request
Test and validate the integrity of each commit to any branch.
1. `python_tests.yml`: Run Python tests with coverage report.
2.... | ucberkeleysetiREPO_NAMEturbo_setiPATH_START.@turbo_seti_extracted@turbo_seti-master@INTEGRATION.md@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.