metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "README.md",
"repo_name": "GBTAmmoniaSurvey/GAS",
"repo_path": "GAS_extracted/GAS-master/releases/README.md",
"type": "Markdown"
} | Release Making Instructions
===========================
To create a data release, run the appropriate script, e.g.:
python DR1.py
It will install the released version of GAS (and appropriate required other
packages) then run the gridding scripts.
Building a new release
----------------------
Checklist for cre... | GBTAmmoniaSurveyREPO_NAMEGASPATH_START.@GAS_extracted@GAS-master@releases@README.md@.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/scene/yaxis/_tickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickprefixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="tickprefix", parent_name="layout.scene.yaxis", **kwargs
):
super(TickprefixValidator, self).__init__(
plotly_name=plotly_name,
p... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@scene@yaxis@_tickprefix.py@.PATH_END.py |
{
"filename": "checksource.py",
"repo_name": "lucatelli/morphen",
"repo_path": "morphen_extracted/morphen-main/analysis_scripts/checksource.py",
"type": "Python"
} | # Script to image and assess the properties of long baseline calibrators.
# Runs in CASA 4.5.0
# Expects to find the *.split.cal measurement set and the .fluxscale file.
# Unless you want to limit spws (i.e. exclude very narrow ones for
# speed) nothing should need to be changed.
# If the analysis fails (usually only ... | lucatelliREPO_NAMEmorphenPATH_START.@morphen_extracted@morphen-main@analysis_scripts@checksource.py@.PATH_END.py |
{
"filename": "_shadow.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/mesh3d/legendgrouptitle/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="mesh3d.legendgrouptitle.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@mesh3d@legendgrouptitle@font@_shadow.py@.PATH_END.py |
{
"filename": "map_circular_ed.ipynb",
"repo_name": "HITS-AIN/PINK",
"repo_path": "PINK_extracted/PINK-master/jupyter/devel/map_circular_ed.ipynb",
"type": "Jupyter Notebook"
} | ```python
import numpy as np
import matplotlib.pyplot as plt
dim = 16
shape = (dim, dim)
half_dim = dim / 2
data = np.zeros(shape)
for y in range(shape[0]):
delta = (2 * half_dim * (y+0.5) - (y+0.5)**2)**0.5
for x in range(round(half_dim - delta), round(half_dim + delta)):
data[y,x] = 1
fig, ax = p... | HITS-AINREPO_NAMEPINKPATH_START.@PINK_extracted@PINK-master@jupyter@devel@map_circular_ed.ipynb@.PATH_END.py |
{
"filename": "ex_gam_new.py",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/sandbox/nonparametric/tests/ex_gam_new.py",
"type": "Python"
} | """Example for GAM with Poisson Model and PolynomialSmoother
This example was written as a test case.
The data generating process is chosen so the parameters are well identified
and estimated.
Created on Fri Nov 04 13:45:43 2011
Author: Josef Perktold
"""
from statsmodels.compat.python import lrange
import time
imp... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@sandbox@nonparametric@tests@ex_gam_new.py@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/cone/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="autocolorscale", parent_name="cone", **kwargs):
super(AutocolorscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@cone@_autocolorscale.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/histogram/marker/colorbar/title/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram.marker.colorbar.title"
_path_str = "histogram.marker.colorbar.title.font"
_valid_pro... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@histogram@marker@colorbar@title@_font.py@.PATH_END.py |
{
"filename": "tracer_spectra.py",
"repo_name": "abaleato/CARDiAC",
"repo_path": "CARDiAC_extracted/CARDiAC-master/src/cardiac/tracer_spectra.py",
"type": "Python"
} | import numpy as np
import camb
from camb import model
from astropy.cosmology import Planck18
from scipy.interpolate import interp1d
try:
# A lot of this is copied from Nick Kokron's anzu repository
import pyccl as ccl
from anzu.emu_funcs import LPTEmulator
from velocileptors.LPT.cleft_fftw import CLEFT
... | abaleatoREPO_NAMECARDiACPATH_START.@CARDiAC_extracted@CARDiAC-master@src@cardiac@tracer_spectra.py@.PATH_END.py |
{
"filename": "drive_ConeRot_AS209.py",
"repo_name": "simoncasassus/ConeRot",
"repo_path": "ConeRot_extracted/ConeRot-master/scripts/drive_ConeRot_AS209.py",
"type": "Python"
} | import sys
import numpy as np
import re
from copy import copy, deepcopy
import os
from optparse import OptionParser
HOME = os.environ.get('HOME')
include_path = '/home/simon/common/python/include/'
#include_path=HOME+'/common/python/conemaps-git/'
sys.path.append(include_path)
import ConeRot.MasterDConeMaps as MasterD... | simoncasassusREPO_NAMEConeRotPATH_START.@ConeRot_extracted@ConeRot-master@scripts@drive_ConeRot_AS209.py@.PATH_END.py |
{
"filename": "compute_3pcf_correction_function.py",
"repo_name": "oliverphilcox/RascalC",
"repo_path": "RascalC_extracted/RascalC-master/python/compute_3pcf_correction_function.py",
"type": "Python"
} | ### Function to fit a model to the 3PCF survey correction function, defined as the ratio between model and true RR pair counts for a single survey. This fits a piecewise polynomial model to the data.
## NB: Input RRR counts should be normalized by summed cubed random weights here.
## NB: Assume mu is in [-1,1] limit h... | oliverphilcoxREPO_NAMERascalCPATH_START.@RascalC_extracted@RascalC-master@python@compute_3pcf_correction_function.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/slider/currentvalue/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.slider.currentvalue"
_path_str = "layout.slider.currentvalue.font"
_valid_props = {
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@slider@currentvalue@_font.py@.PATH_END.py |
{
"filename": "numba_interface.py",
"repo_name": "tardis-sn/tardis",
"repo_path": "tardis_extracted/tardis-main/tardis/montecarlo/montecarlo_numba/numba_interface.py",
"type": "Python"
} | from enum import IntEnum
from numba import float64, int64, boolean
from numba.experimental import jitclass
import numpy as np
from astropy import units as u
from tardis import constants as const
from tardis.montecarlo import (
montecarlo_configuration as montecarlo_configuration,
)
C_SPEED_OF_LIGHT = const.c.t... | tardis-snREPO_NAMEtardisPATH_START.@tardis_extracted@tardis-main@tardis@montecarlo@montecarlo_numba@numba_interface.py@.PATH_END.py |
{
"filename": "_tickformatstopdefaults.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="tickformatstopdefaults",
parent_name="parcoords.line.colorbar",
**kwargs,
):
super(TickformatstopdefaultsValidator... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcoords@line@colorbar@_tickformatstopdefaults.py@.PATH_END.py |
{
"filename": "_scattercarpet.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/_scattercarpet.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Scattercarpet(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "scattercarpet"
_valid_props = {
"a",
"asrc",
"b",
"bsrc",
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@_scattercarpet.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/funnel/outsidetextfont/_style.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="style", parent_name="funnel.outsidetextfont", **kwargs
):
super(StyleValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@outsidetextfont@_style.py@.PATH_END.py |
{
"filename": "_columns.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/grid/_columns.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColumnsValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="columns", parent_name="layout.grid", **kwargs):
super(ColumnsValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@grid@_columns.py@.PATH_END.py |
{
"filename": "_xpad.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/colorbar/_xpad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="xpad", parent_name="funnel.marker.colorbar", **kwargs
):
super(XpadValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@marker@colorbar@_xpad.py@.PATH_END.py |
{
"filename": "conv1d_transpose_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/nn_ops/conv1d_transpose_test.py",
"type": "Python"
} | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@nn_ops@conv1d_transpose_test.py@.PATH_END.py |
{
"filename": "expint_f64_test.py",
"repo_name": "HajimeKawahara/exojax",
"repo_path": "exojax_extracted/exojax-master/tests/unittests/spec/xs/f64/expint_f64_test.py",
"type": "Python"
} | import numpy as np
from scipy.special import expn
from exojax.spec import rtransfer as rt
import jax.numpy as jnp
import pytest
from jax import config #
config.update("jax_enable_x64", True)
def test_comparison_expint():
x=np.logspace(-4,1.9,1000)
dif=2.0*expn(... | HajimeKawaharaREPO_NAMEexojaxPATH_START.@exojax_extracted@exojax-master@tests@unittests@spec@xs@f64@expint_f64_test.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/colorbar/tickfont/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="isosurface.colorbar.tickfont",
**kwargs,
):
super(TextcaseValidator, self).__init__(
plotl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@colorbar@tickfont@_textcase.py@.PATH_END.py |
{
"filename": "_customdata.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/_customdata.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="customdata", parent_name="choroplethmap", **kwargs):
super(CustomdataValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@_customdata.py@.PATH_END.py |
{
"filename": "_dtickrange.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(
self,
plotly_name="dtickrange",
parent_name="scatterpolar.marker.colorbar.tickformatstop",
**kwargs
):
super(DtickrangeValidator, self).__init__... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@marker@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py |
{
"filename": "Frame_Run_Plot.py",
"repo_name": "francescoa97outlook/pyExoRaMa",
"repo_path": "pyExoRaMa_extracted/pyExoRaMa-main/GUI_Plot/Frame_Run_Plot.py",
"type": "Python"
} | import math
import time
import tkinter as tk
import pandas as pd
from tkinter import messagebox as msgbox
import matplotlib.colors as colors
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import numpy as np
from matplotlib import pyplot as plt
from GUI_Plot import MassRadiusDB
def pureFunction(type_... | francescoa97outlookREPO_NAMEpyExoRaMaPATH_START.@pyExoRaMa_extracted@pyExoRaMa-main@GUI_Plot@Frame_Run_Plot.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "Jammy2211/PyAutoLens",
"repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/fit/positions/source/__init__.py",
"type": "Python"
} | Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@fit@positions@source@__init__.py@.PATH_END.py | |
{
"filename": "table2.py",
"repo_name": "JiaxiWu1018/Unsupervised-TRGB",
"repo_path": "Unsupervised-TRGB_extracted/Unsupervised-TRGB-main/plots/table2.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 25 18:31:41 2022
@author: michaelwu
"""
import numpy as np
import pandas as pd
import math
import matplotlib.pyplot as plt
def count_field(det):
field, gal = [], []
for i in range(len(det)):
if det['field'][i] not in field:
... | JiaxiWu1018REPO_NAMEUnsupervised-TRGBPATH_START.@Unsupervised-TRGB_extracted@Unsupervised-TRGB-main@plots@table2.py@.PATH_END.py |
{
"filename": "test_file_image.py",
"repo_name": "h5py/h5py",
"repo_path": "h5py_extracted/h5py-master/h5py/tests/test_file_image.py",
"type": "Python"
} | import h5py
from h5py import h5f, h5p
from .common import ut, TestCase
class TestFileImage(TestCase):
def test_load_from_image(self):
from binascii import a2b_base64
from zlib import decompress
compressed_image = 'eJzr9HBx4+WS4mIAAQ4OBhYGAQZk8B8KKjhQ+TD5BCjNCKU7oPQKJpg4I1hOAiouCDUfXV1IkKs... | h5pyREPO_NAMEh5pyPATH_START.@h5py_extracted@h5py-master@h5py@tests@test_file_image.py@.PATH_END.py |
{
"filename": "test_keras_savedmodel_exporter.py",
"repo_name": "ML4GW/hermes",
"repo_path": "hermes_extracted/hermes-main/tests/quiver/exporters/test_keras_savedmodel_exporter.py",
"type": "Python"
} | import pytest
from hermes.quiver import Model, Platform
from hermes.quiver.exporters import KerasSavedModel
@pytest.mark.tensorflow
def test_keras_savedmodel_exporter(temp_local_repo, keras_model):
scope = keras_model.name.split("_")[0]
input_name = f"{scope}_dense_input"
output_name = f"{scope}_dense/M... | ML4GWREPO_NAMEhermesPATH_START.@hermes_extracted@hermes-main@tests@quiver@exporters@test_keras_savedmodel_exporter.py@.PATH_END.py |
{
"filename": "chromatic_aberrations.py",
"repo_name": "mtalapinto/moes",
"repo_path": "carmenes/chromatic_aberrations.py",
"type": "Python"
} | import numpy as np
import utils
import json
import pandas as pd
import os
from optics import parameters
from optics import vis_spectrometer
from optics import env_data
import matplotlib.pyplot as plt
import matplotlib
import dynesty
import dyplot
import corner
import pickle
import math
import warnings
# matplotlib.use(... | mtalapintoREPO_NAMEmoesPATH_START.@carmenes@chromatic_aberrations.py@.PATH_END.py |
{
"filename": "obs_file.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/document_loaders/obs_file.py",
"type": "Python"
} | # coding:utf-8
import os
import tempfile
from typing import Any, List, Optional
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document_loaders.unstructured import UnstructuredFileLoader
class OBSFileLoader(BaseLoader):
""... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@document_loaders@obs_file.py@.PATH_END.py |
{
"filename": "_colorscale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/bar/marker/_colorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(self, plotly_name="colorscale", parent_name="bar.marker", **kwargs):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@bar@marker@_colorscale.py@.PATH_END.py |
{
"filename": "_tickwidth.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/yaxis/_tickwidth.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="tickwidth", parent_name="layout.yaxis", **kwargs):
super(TickwidthValidator, 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@layout@yaxis@_tickwidth.py@.PATH_END.py |
{
"filename": "_showexponent.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contour/colorbar/_showexponent.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="showexponent", parent_name="contour.colorbar", **kwargs
):
super(ShowexponentValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contour@colorbar@_showexponent.py@.PATH_END.py |
{
"filename": "Sig.py",
"repo_name": "duvall3/rat-pac",
"repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Sig.py",
"type": "Python"
} | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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
# without limitati... | duvall3REPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Sig.py@.PATH_END.py |
{
"filename": "dataclass_field.py",
"repo_name": "light-curve/light-curve-python",
"repo_path": "light-curve-python_extracted/light-curve-python-master/light-curve/light_curve/light_curve_py/dataclass_field.py",
"type": "Python"
} | import sys
if sys.version_info >= (3, 10):
from dataclasses import field as dataclass_field
else:
from dataclasses import field as _field
def dataclass_field(*, kw_only, **kwargs):
return _field(**kwargs)
__all__ = ["dataclass_field"]
| light-curveREPO_NAMElight-curve-pythonPATH_START.@light-curve-python_extracted@light-curve-python-master@light-curve@light_curve@light_curve_py@dataclass_field.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "takafumi291/ESSENCE",
"repo_path": "ESSENCE_extracted/ESSENCE-main/README.md",
"type": "Markdown"
} | ## ESSENCE: functions for evaluating spatially correlated noise in the interferometric images.
**ESSENCE** is a Python package for evaluating the statistical significance of image analysis and signal detection under correlated noise in interferometric images (e.g., ALMA, NOEMA), namely, Evaluating Statistical Signific... | takafumi291REPO_NAMEESSENCEPATH_START.@ESSENCE_extracted@ESSENCE-main@README.md@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/textfont/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="size", parent_name="waterfall.textfont", **kwargs):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@textfont@_size.py@.PATH_END.py |
{
"filename": "test_stacksubsample.py",
"repo_name": "PynPoint/PynPoint",
"repo_path": "PynPoint_extracted/PynPoint-main/tests/test_processing/test_stacksubsample.py",
"type": "Python"
} | import os
import pytest
import numpy as np
from pynpoint.core.pypeline import Pypeline
from pynpoint.readwrite.fitsreading import FitsReadingModule
from pynpoint.processing.stacksubset import StackAndSubsetModule, StackCubesModule, \
DerotateAndStackModule, CombineTagsModul... | PynPointREPO_NAMEPynPointPATH_START.@PynPoint_extracted@PynPoint-main@tests@test_processing@test_stacksubsample.py@.PATH_END.py |
{
"filename": "thermo.ipynb",
"repo_name": "miguelzuma/hi_class_public",
"repo_path": "hi_class_public_extracted/hi_class_public-master/notebooks/thermo.ipynb",
"type": "Jupyter Notebook"
} | ```python
# import necessary modules
# uncomment to get plots displayed in notebook
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
from scipy.optimize import fsolve
from scipy.interpolate import interp1d
import math
```
```python
# esthetic definitions... | miguelzumaREPO_NAMEhi_class_publicPATH_START.@hi_class_public_extracted@hi_class_public-master@notebooks@thermo.ipynb@.PATH_END.py |
{
"filename": "fli.py",
"repo_name": "panoptes/POCS",
"repo_path": "POCS_extracted/POCS-main/src/panoptes/pocs/camera/fli.py",
"type": "Python"
} | from contextlib import suppress
import numpy as np
from astropy import units as u
from panoptes.pocs.camera.sdk import AbstractSDKCamera
from panoptes.pocs.camera.libfli import FLIDriver
from panoptes.pocs.camera import libfliconstants as c
from panoptes.utils.images import fits as fits_utils
from panoptes.utils imp... | panoptesREPO_NAMEPOCSPATH_START.@POCS_extracted@POCS-main@src@panoptes@pocs@camera@fli.py@.PATH_END.py |
{
"filename": "_hovertemplate.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/_hovertemplate.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="hovertemplate", parent_name="waterfall", **kwargs):
super(HovertemplateValidator, self).__init__(
plotly_name=plotly_name,
parent_name=par... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@waterfall@_hovertemplate.py@.PATH_END.py |
{
"filename": "eep.py",
"repo_name": "POSYDON-code/POSYDON",
"repo_path": "POSYDON_extracted/POSYDON-main/posydon/interpolation/eep.py",
"type": "Python"
} | """Module for converting a MESA history file to an EEP track.
Reference: Dotter, Aaron (2016), AJSS, 222, 1.
"""
__authors__ = [
"Aaron Dotter <aaron.dotter@gmail.com>",
"Konstantinos Kovlakas <Konstantinos.Kovlakas@unige.ch>",
]
import numpy as np
from scipy.interpolate import pchip
# suggested lists of ... | POSYDON-codeREPO_NAMEPOSYDONPATH_START.@POSYDON_extracted@POSYDON-main@posydon@interpolation@eep.py@.PATH_END.py |
{
"filename": "test_xml.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/document_loaders/test_xml.py",
"type": "Python"
} | import os
from pathlib import Path
from langchain_community.document_loaders import UnstructuredXMLLoader
EXAMPLE_DIRECTORY = file_path = Path(__file__).parent.parent / "examples"
def test_unstructured_xml_loader() -> None:
"""Test unstructured loader."""
file_path = os.path.join(EXAMPLE_DIRECTORY, "factboo... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@document_loaders@test_xml.py@.PATH_END.py |
{
"filename": "test_multiples.py",
"repo_name": "amusecode/amuse",
"repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/codes_tests/test_multiples.py",
"type": "Python"
} | from amuse.test.amusetest import TestWithMPI
import tempfile
import numpy
from amuse.community.hermite.interface import Hermite
from amuse.community.kepler.interface import Kepler
from amuse.community.smalln.interface import SmallN
from amuse.units import nbody_system
from amuse.units import units
from amuse.units i... | amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@codes_tests@test_multiples.py@.PATH_END.py |
{
"filename": "makePlanetInput_ntl-checkpoint.ipynb",
"repo_name": "stevepur/DR25-occurrence-public",
"repo_path": "DR25-occurrence-public_extracted/DR25-occurrence-public-main/GKbaseline/.ipynb_checkpoints/makePlanetInput_ntl-checkpoint.ipynb",
"type": "Jupyter Notebook"
} | This notebook prepares a planet candidate catalog for the stellar population in the specified input stellar catalog. It computes the reliability, corrected planet radius and includes useful planet properties such as robovetter score. It outputs two catalogs, one that contains only PCs and one that contains all KOIs.
... | stevepurREPO_NAMEDR25-occurrence-publicPATH_START.@DR25-occurrence-public_extracted@DR25-occurrence-public-main@GKbaseline@.ipynb_checkpoints@makePlanetInput_ntl-checkpoint.ipynb@.PATH_END.py |
{
"filename": "core.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/matplotlib/py3/matplotlib/style/core.py",
"type": "Python"
} | """
Core functions and attributes for the matplotlib style library:
``use``
Select style sheet to override the current matplotlib settings.
``context``
Context manager to use a style sheet temporarily.
``available``
List available style sheets.
``library``
A dictionary of style names and matplotlib set... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@matplotlib@py3@matplotlib@style@core.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/pip/vendor/__init__.py",
"type": "Python"
} | """
pip.vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.
Files inside of pip.vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from __future__ import absolute_import
| waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@pip@vendor@__init__.py@.PATH_END.py |
{
"filename": "setup.py",
"repo_name": "marblestation/iSpec",
"repo_path": "iSpec_extracted/iSpec-master/synthesizer/setup.py",
"type": "Python"
} | # python setup.py build_ext --inplace
import os
import sys
import numpy
from distutils.core import setup
from distutils.extension import Extension
from distutils.sysconfig import get_config_vars
from Cython.Distutils import build_ext
from Cython.Build import cythonize
#os.environ['CC'] = 'gcc'
#get_config_vars()['OPT... | marblestationREPO_NAMEiSpecPATH_START.@iSpec_extracted@iSpec-master@synthesizer@setup.py@.PATH_END.py |
{
"filename": "plot_tf_log.py",
"repo_name": "tijmen/cosmosage",
"repo_path": "cosmosage_extracted/cosmosage-main/plot_tf_log.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Helper functions for monitoring the progress of a training loop.
"""
import argparse
import matplotlib.pyplot as plt
import numpy as np
import scipy
from tensorboard.backend.event_processing import event_accumulator
import os
import glob
from scipy.stats import linregre... | tijmenREPO_NAMEcosmosagePATH_START.@cosmosage_extracted@cosmosage-main@plot_tf_log.py@.PATH_END.py |
{
"filename": "_ipynb_static.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/app/backends/_ipynb_static.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
vispy backend for the IPython notebook (static approach).
We aim to have:
* ipynb_static - export visualization to a static notebook
* ipynb_vnc - vnc-approach: render in... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@app@backends@_ipynb_static.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/libs/sqlite3/README.md",
"type": "Markdown"
} | <h1 align="center">SQLite Source Repository</h1>
This repository contains the complete source code for the
[SQLite database engine](https://sqlite.org/). Some test scripts
are also included. However, many other test scripts
and most of the documentation are managed separately.
## Version Control
SQLite sources are... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@libs@sqlite3@README.md@.PATH_END.py |
{
"filename": "fake_nudot.py",
"repo_name": "mattpitkin/tempo2",
"repo_path": "tempo2_extracted/tempo2-master/python/toasim/bin/fake_nudot.py",
"type": "Python"
} | #!/usr/bin/env python
import toasim
import numpy as np
from scipy.interpolate import interp1d
import sys
import argparse
parser = argparse.ArgumentParser("Fake nudot variations")
parser.add_argument("--alt-nudot-factor", default=0.1, type=float)
parser.add_argument("--alt-time-N", nargs=2, type=float, help="Timescale... | mattpitkinREPO_NAMEtempo2PATH_START.@tempo2_extracted@tempo2-master@python@toasim@bin@fake_nudot.py@.PATH_END.py |
{
"filename": "dotnet.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/dotnet.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
pygments.lexers.dotnet
~~~~~~~~~~~~~~~~~~~~~~
Lexers for .net languages.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, ... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@dotnet.py@.PATH_END.py |
{
"filename": "weighted_means.py",
"repo_name": "mbejger/polgraw-allsky",
"repo_path": "polgraw-allsky_extracted/polgraw-allsky-master/followup/src/Auxiliary_scripts/weighted_means.py",
"type": "Python"
} | import numpy as np
import sys
data = np.genfromtxt(sys.argv[1],usecols=np.arange(0,6))
N = int(sys.argv[2])
lf = int(sys.argv[3])
ref = int(sys.argv[4])
shiftedf=np.zeros(lf)
start_frame = int(sys.argv[5])
lf2=lf
m=0
k=start_frame
data2={}
for i in range(0, lf):
if data[i,0] == -1000 and data[i,1] == -1000 and data[i... | mbejgerREPO_NAMEpolgraw-allskyPATH_START.@polgraw-allsky_extracted@polgraw-allsky-master@followup@src@Auxiliary_scripts@weighted_means.py@.PATH_END.py |
{
"filename": "table_colvald.md",
"repo_name": "jbroll/starbase",
"repo_path": "starbase_extracted/starbase-master/docs/table_colvald.md",
"type": "Markdown"
} |
### table_colvald - get the value from the column.
SYNOPSIS
--------
```
#include <../tablelib/table.h>
double table_colvald(TableRow r, int c);
```
PARAMETERS
----------
* `"TableRow` r" - pointer to the table row.
* `"int` c" - The column number to get the value for.
DESCRIPTION
-----------
return ... | jbrollREPO_NAMEstarbasePATH_START.@starbase_extracted@starbase-master@docs@table_colvald.md@.PATH_END.py |
{
"filename": "_side.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmapbox/colorbar/title/_side.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="side",
parent_name="choroplethmapbox.colorbar.title",
**kwargs,
):
super(SideValidator, self).__init__(
plotly_name=pl... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmapbox@colorbar@title@_side.py@.PATH_END.py |
{
"filename": "schema.py",
"repo_name": "astropy/astroquery",
"repo_path": "astroquery_extracted/astroquery-main/astroquery/utils/schema.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
__version__ = '0.2.0'
class SchemaError(Exception):
"""Error during Schema validation."""
def __init__(self, autos, errors):
self.autos = autos if type(autos) is list else [autos]
self.errors = errors if type(errors) is list els... | astropyREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@utils@schema.py@.PATH_END.py |
{
"filename": "_bgcolorsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/splom/hoverlabel/_bgcolorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="splom.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@hoverlabel@_bgcolorsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterternary/unselected/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._textfont import TextfontValidator
from ._marker import MarkerValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValid... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterternary@unselected@__init__.py@.PATH_END.py |
{
"filename": "pp.py",
"repo_name": "QEF/q-e",
"repo_path": "q-e_extracted/q-e-master/EPW/bin/pp.py",
"type": "Python"
} | #!/usr/bin/env python3
#
# Post-processing script from of PH data in format used by EPW
# 14/07/2015 - Creation of the script - Samuel Ponce
# 14/03/2018 - Automatically reads the number of q-points - Michael Waters
# 14/03/2018 - Detect if SOC is included in the calculation - Samuel Ponce
# 05/06/2019 - Removed SOC fo... | QEFREPO_NAMEq-ePATH_START.@q-e_extracted@q-e-master@EPW@bin@pp.py@.PATH_END.py |
{
"filename": "_visible.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/area/_visible.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="visible", parent_name="area", **kwargs):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@area@_visible.py@.PATH_END.py |
{
"filename": "_xanchor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/colorbar/_xanchor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="xanchor", parent_name="heatmapgl.colorbar", **kwargs
):
super(XanchorValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@colorbar@_xanchor.py@.PATH_END.py |
{
"filename": "weight_init.py",
"repo_name": "MIC-DKFZ/dynamic-network-architectures",
"repo_path": "dynamic-network-architectures_extracted/dynamic-network-architectures-main/dynamic_network_architectures/initialization/weight_init.py",
"type": "Python"
} | from torch import nn
from dynamic_network_architectures.building_blocks.residual import BasicBlockD, BottleneckD
class InitWeights_He(object):
def __init__(self, neg_slope: float = 1e-2):
self.neg_slope = neg_slope
def __call__(self, module):
if isinstance(module, nn.Conv3d) or isinstance(mo... | MIC-DKFZREPO_NAMEdynamic-network-architecturesPATH_START.@dynamic-network-architectures_extracted@dynamic-network-architectures-main@dynamic_network_architectures@initialization@weight_init.py@.PATH_END.py |
{
"filename": "chat_templates.py",
"repo_name": "OpenAccess-AI-Collective/axolotl",
"repo_path": "axolotl_extracted/axolotl-main/src/axolotl/utils/chat_templates.py",
"type": "Python"
} | """
This module provides functionality for selecting chat templates based on user choices.
These templates are used for formatting messages in a conversation.
"""
import logging
from typing import TYPE_CHECKING, Any, Dict, Optional
if TYPE_CHECKING:
from transformers import PreTrainedTokenizerBase
LOG = logging.g... | OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@utils@chat_templates.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/sparse/linalg/dsolve/tests/__init__.py",
"type": "Python"
} | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@sparse@linalg@dsolve@tests@__init__.py@.PATH_END.py | |
{
"filename": "create_lightcone_21cmfast_rerun.py",
"repo_name": "micbia/serenet",
"repo_path": "serenet_extracted/serenet-main/utils_data/create_lightcone_21cmfast_rerun.py",
"type": "Python"
} | import numpy as np, os, sys, tarfile
import tools21cm as t2c, py21cmfast as p2c
from datetime import datetime
from glob import glob
from sklearn.decomposition import PCA as sciPCA
import sys
sys.path.insert(0,'../')
from utils.other_utils import get_dir_size
path_input = sys.argv[1]
path_input += '/' if path_input... | micbiaREPO_NAMEserenetPATH_START.@serenet_extracted@serenet-main@utils_data@create_lightcone_21cmfast_rerun.py@.PATH_END.py |
{
"filename": "shapes.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/cairosvg_ES/shapes.py",
"type": "Python"
} | """
Shapes drawers.
"""
from math import pi
from .helpers import normalize, point, point_angle, size
def circle(surface, node):
"""Draw a circle ``node`` on ``surface``."""
r = size(surface, node.get('r'))
if not r:
return
cx = size(surface, node.get('cx'), 'x')
cy = size(surface, node.... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@cairosvg_ES@shapes.py@.PATH_END.py |
{
"filename": "test_downloader.py",
"repo_name": "PlasmaPy/PlasmaPy",
"repo_path": "PlasmaPy_extracted/PlasmaPy-main/tests/utils/data/test_downloader.py",
"type": "Python"
} | import os
import warnings
from pathlib import Path
import numpy as np
import pytest
from plasmapy.utils.data.downloader import _API_CONNECTION_ESTABLISHED, Downloader
check_database_connection = pytest.mark.skipif(
not _API_CONNECTION_ESTABLISHED, reason="failed to connect to data repository"
)
def in_ci() -> ... | PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@tests@utils@data@test_downloader.py@.PATH_END.py |
{
"filename": "ViewBoxFeatures.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/examples/ViewBoxFeatures.py",
"type": "Python"
} | """
ViewBox is the general-purpose graphical container that allows the user to
zoom / pan to inspect any area of a 2D coordinate system.
This example demonstrates many of the features ViewBox provides.
"""
import numpy as np
import pyqtgraph as pg
x = np.arange(1000, dtype=float)
y = np.random.normal(size=1000)
y... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@examples@ViewBoxFeatures.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/examples/mixed_hmm/README.md",
"type": "Markdown"
} | # Hierarchical mixed-effect hidden Markov models
Note: This is a cleaned-up version of the seal experiments in [Bingham et al 2019] that is a simplified variant of some of the analysis in the [momentuHMM harbour seal example](https://github.com/bmcclintock/momentuHMM/blob/master/vignettes/harbourSealExample.R) [McClin... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@examples@mixed_hmm@README.md@.PATH_END.py |
{
"filename": "test_construct.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/sparse/tests/test_construct.py",
"type": "Python"
} | """test sparse matrix construction functions"""
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy import array, matrix
from numpy.testing import (assert_equal, assert_,
assert_array_equal, assert_array_almost_equal_nulp)
import pytest
from pytest import raises as a... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@sparse@tests@test_construct.py@.PATH_END.py |
{
"filename": "test_fringe.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/fringe/tests/test_fringe.py",
"type": "Python"
} | """
Unit tests for fringe correction
"""
import pytest
import numpy as np
import numpy.random as rn
from stdatamodels.jwst.datamodels import IFUImageModel, FringeModel
from jwst.fringe import fringe
FRINGE_CONSTANT = 2. # correction will be input data divided by this factor
def test_data_correction(setup_input... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@fringe@tests@test_fringe.py@.PATH_END.py |
{
"filename": "_templateitemname.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="templateitemname",
parent_name="layout.polar.radialaxis.tickformatstop",
**kwargs,
):
super(TemplateitemnameValidator, sel... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@polar@radialaxis@tickformatstop@_templateitemname.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/carpet/baxis/title/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="carpet.baxis.title", **kwargs):
super(FontValidator, 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@carpet@baxis@title@_font.py@.PATH_END.py |
{
"filename": "_selectedpoints.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/_selectedpoints.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="selectedpoints", parent_name="choropleth", **kwargs
):
super(SelectedpointsValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@_selectedpoints.py@.PATH_END.py |
{
"filename": "inplace_ops_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/array_ops/inplace_ops_test.py",
"type": "Python"
} | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@array_ops@inplace_ops_test.py@.PATH_END.py |
{
"filename": "powerspectrum.py",
"repo_name": "radiocosmology/draco",
"repo_path": "draco_extracted/draco-master/draco/analysis/powerspectrum.py",
"type": "Python"
} | """Power spectrum estimation code."""
import numpy as np
from caput import config
from ..core import containers, task
class QuadraticPSEstimation(task.SingleTask):
"""Estimate a power spectrum from a set of KLModes.
Attributes
----------
psname : str
Name of power spectrum to use. Must be p... | radiocosmologyREPO_NAMEdracoPATH_START.@draco_extracted@draco-master@draco@analysis@powerspectrum.py@.PATH_END.py |
{
"filename": "customblock.ipynb",
"repo_name": "lgrcia/prose",
"repo_path": "prose_extracted/prose-main/docs/ipynb/customblock.ipynb",
"type": "Jupyter Notebook"
} | # Custom block
Here is a more detailed example on how to create a custom block by subclassing the [Block](prose.Block) class (and make it user and community-friendly). The purpose of the [Block](prose.Block) we will create is to correct for [image vignetting](https://en.wikipedia.org/wiki/Vignetting)
## Dataset
We f... | lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@docs@ipynb@customblock.ipynb@.PATH_END.py |
{
"filename": "pol_triangle.py",
"repo_name": "cmbant/CosmoMC",
"repo_path": "CosmoMC_extracted/CosmoMC-master/batch3/outputs/pol_triangle.py",
"type": "Python"
} |
import planckStyle as s
g = s.getSubplotPlotter()
params = ['theta', 'omegabh2', 'omegach2', 'logA', 'ns', 'tau']
for camspec in [True, False]:
for par in ['']:
g.newPlot()
dataroots = [s.defdata_root + '_EE_lowE', s.defdata_root + '_TE_lowE', s.defdata_root + '_TT_lowl_lowE', s.defdata_root + '... | cmbantREPO_NAMECosmoMCPATH_START.@CosmoMC_extracted@CosmoMC-master@batch3@outputs@pol_triangle.py@.PATH_END.py |
{
"filename": "usd.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/usd.py",
"type": "Python"
} | """
pygments.lexers.usd
~~~~~~~~~~~~~~~~~~~
The module that parses Pixar's Universal Scene Description file format.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups
from pygments.lexer im... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@usd.py@.PATH_END.py |
{
"filename": "simple.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/importlib/simple.py",
"type": "Python"
} | """
Compatibility shim for .resources.simple as found on Python 3.10.
Consumers that can rely on Python 3.11 should use the other
module directly.
"""
from .resources.simple import (
SimpleReader, ResourceHandle, ResourceContainer, TraversableReader,
)
__all__ = [
'SimpleReader', 'ResourceHandle', 'ResourceC... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@importlib@simple.py@.PATH_END.py |
{
"filename": "gaussian.py",
"repo_name": "herjy/SLIT",
"repo_path": "SLIT_extracted/SLIT-master/Tests/gaussian.py",
"type": "Python"
} | import numpy as np
import scipy.misc as spm
import matplotlib.pyplot as plt
import matplotlib.cm as cm
def gaussian(n1,n2,x0,y0,A,e1,e2,alpha):
#img = gaussian(n1,n2,x0,y0,A,e1,e2,alpha)
#produces a gaussian profile image
#INPUTS:
# n1,n2: size of the output image
# x0,y0: centroid of the gaus... | herjyREPO_NAMESLITPATH_START.@SLIT_extracted@SLIT-master@Tests@gaussian.py@.PATH_END.py |
{
"filename": "test_savitzky_golay.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/signal/tests/test_savitzky_golay.py",
"type": "Python"
} | import pytest
import numpy as np
from numpy.testing import (assert_equal,
assert_array_equal,
)
from scipy._lib._array_api import (
assert_almost_equal, assert_array_almost_equal, xp_assert_close
)
from scipy.ndimage import convolve1d # type: ignore[attr-defined]
from scipy.signal i... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@signal@tests@test_savitzky_golay.py@.PATH_END.py |
{
"filename": "_bordercolor.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/hoverlabel/_bordercolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="bordercolor", parent_name="ohlc.hoverlabel", **kwargs
):
super(BordercolorValidator, self).__init__(
plotly_name=plotly_name,
pa... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@ohlc@hoverlabel@_bordercolor.py@.PATH_END.py |
{
"filename": "myscale_vector_sql.ipynb",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/cookbook/myscale_vector_sql.ipynb",
"type": "Jupyter Notebook"
} | # Vector SQL Retriever with MyScale
>[MyScale](https://docs.myscale.com/en/) is an integrated vector database. You can access your database in SQL and also from here, LangChain. MyScale can make a use of [various data types and functions for filters](https://blog.myscale.com/2023/06/06/why-integrated-database-solution... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@cookbook@myscale_vector_sql.ipynb@.PATH_END.py |
{
"filename": "node_link.py",
"repo_name": "ytree-project/ytree",
"repo_path": "ytree_extracted/ytree-main/ytree/data_structures/node_link.py",
"type": "Python"
} | """
NodeLink class
"""
#-----------------------------------------------------------------------------
# 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 software.
#----------... | ytree-projectREPO_NAMEytreePATH_START.@ytree_extracted@ytree-main@ytree@data_structures@node_link.py@.PATH_END.py |
{
"filename": "SNOwGLoBES_usage.ipynb",
"repo_name": "SNEWS2/snewpy",
"repo_path": "snewpy_extracted/snewpy-main/doc/nb/SNOwGLoBES_usage.ipynb",
"type": "Jupyter Notebook"
} | # `snewpy.snowglobes` Usage Example
This notebook demonstrates how to use SNEWPY with SNOwGLoBES.
To start, make sure you have SNOwGLoBES installed and have downloaded one of the models that are part of SNEWPY. Adjust the directory paths in the following cell.
```python
from astropy import units as u
import matplot... | SNEWS2REPO_NAMEsnewpyPATH_START.@snewpy_extracted@snewpy-main@doc@nb@SNOwGLoBES_usage.ipynb@.PATH_END.py |
{
"filename": "populations.py",
"repo_name": "ArisTr/PyRaTE",
"repo_path": "PyRaTE_extracted/PyRaTE-master/PyRaTE/populations.py",
"type": "Python"
} | #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
# NAME: #
# #
# populations.py #
# ... | ArisTrREPO_NAMEPyRaTEPATH_START.@PyRaTE_extracted@PyRaTE-master@PyRaTE@populations.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/BSSN/__init__.py",
"type": "Python"
} | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@BSSN@__init__.py@.PATH_END.py | |
{
"filename": "README.md",
"repo_name": "lsst-uk/lasair-lsst",
"repo_path": "lasair-lsst_extracted/lasair-lsst-main/tests/unit/pipeline/sherlock/README.md",
"type": "Markdown"
} | ### Unit tests for Sherlock wrapper
`test_sherlock_wrapper.py`
Multiple tests grouped into categories: consumer, producer, classifier.
It uses the following auxiliary files and directories:
* example_ingested.json
| lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@tests@unit@pipeline@sherlock@README.md@.PATH_END.py |
{
"filename": "_ticklen.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/marker/colorbar/_ticklen.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklenValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="ticklen", parent_name="scatter3d.marker.colorbar", **kwargs
):
super(TicklenValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@marker@colorbar@_ticklen.py@.PATH_END.py |
{
"filename": "radial_profile_styles.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/doc/source/cookbook/radial_profile_styles.py",
"type": "Python"
} | import matplotlib.pyplot as plt
import yt
ds = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150")
# Get a sphere object
sp = ds.sphere(ds.domain_center, (500.0, "kpc"))
# Bin up the data from the sphere into a radial profile
rp = yt.create_profile(
sp,
"radius",
[("gas", "density"), ("gas", "tem... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@doc@source@cookbook@radial_profile_styles.py@.PATH_END.py |
{
"filename": "polygon.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/geometry/polygon.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@geometry@polygon.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "solo-spice/sospice",
"repo_path": "sospice_extracted/sospice-main/sospice/catalog/tests/__init__.py",
"type": "Python"
} | solo-spiceREPO_NAMEsospicePATH_START.@sospice_extracted@sospice-main@sospice@catalog@tests@__init__.py@.PATH_END.py | |
{
"filename": "NOE.py",
"repo_name": "msm550/DMATIS",
"repo_path": "DMATIS_extracted/DMATIS-master/NOE.py",
"type": "Python"
} | import pandas as pd
import numpy as np
import multiprocessing as mp
def mT(A):
return (A * m_p)
def reduced(m1, m2):
return (m1 * m2 / (m1 + m2))
def r(mH, A):
return (4 * A * m_p * mH / (A * m_p + mH) ** 2)
def F(eR, A):
if eR == 0:
return (1)
else:
qF = np.sqrt(2 * mT(A) * ... | msm550REPO_NAMEDMATISPATH_START.@DMATIS_extracted@DMATIS-master@NOE.py@.PATH_END.py |
{
"filename": "getpota_input_Y3.py",
"repo_name": "desihub/LSS",
"repo_path": "LSS_extracted/LSS-main/scripts/mock_tools/getpota_input_Y3.py",
"type": "Python"
} | '''
Find all potential assignment and counts tiles for some input (must have data model needed for fiberassign) and some set of tiles
Use the following environment
source /global/common/software/desi/desi_environment.sh main
'''
import numpy as np
import os
from astropy.table import Table, join, vstack
import argparse... | desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@mock_tools@getpota_input_Y3.py@.PATH_END.py |
{
"filename": "_tickvals.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/xaxis/_tickvals.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="tickvals", parent_name="layout.xaxis", **kwargs):
super(TickvalsValidator, 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@layout@xaxis@_tickvals.py@.PATH_END.py |
{
"filename": "image_classifier.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/image_classifier.md",
"type": "Markdown"
} | page_type: reference
description: APIs to train an image classification model.
<link rel="stylesheet" href="/site-assets/css/style.css">
<!-- DO NOT EDIT! Automatically generated file. -->
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tflite_model_maker.image... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_model_maker@image_classifier.md@.PATH_END.py |
{
"filename": "scs_.py",
"repo_name": "stephane-caron/qpsolvers",
"repo_path": "qpsolvers_extracted/qpsolvers-main/qpsolvers/solvers/scs_.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright 2016-2022 Stéphane Caron and the qpsolvers contributors
"""Solver interface for `SCS <https://www.cvxgrp.org/scs/>`__.
SCS (Splitting Conic Solver) is a numerical optimization package for solving
large-scale conve... | stephane-caronREPO_NAMEqpsolversPATH_START.@qpsolvers_extracted@qpsolvers-main@qpsolvers@solvers@scs_.py@.PATH_END.py |
{
"filename": "wcs.py",
"repo_name": "SAMI-Galaxy-Survey/sami",
"repo_path": "sami_extracted/sami-master/general/wcs.py",
"type": "Python"
} | """
Functions for measuring and recording WCS information.
In particular, wcs_position_coords is supposed to determine the WCS for
a file based on cross-correlating a collapsed image from the datacube with
an external photometric image. However, this was never shown to work
properly (the results were clustering around... | SAMI-Galaxy-SurveyREPO_NAMEsamiPATH_START.@sami_extracted@sami-master@general@wcs.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.