metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "detectors.md",
"repo_name": "LouisDesdoigts/dLux",
"repo_path": "dLux_extracted/dLux-main/docs/API/core/detectors.md",
"type": "Markdown"
} | # Detectors
???+ info "LayeredDetector"
::: dLux.detectors.LayeredDetector
| LouisDesdoigtsREPO_NAMEdLuxPATH_START.@dLux_extracted@dLux-main@docs@API@core@detectors.md@.PATH_END.py |
{
"filename": "abscal_inspect_2458115.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/abscal_inspect/abscal_inspect_2458115.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Absolute Calibration Nightly Notebook
**Josh Dillon**, Last Revised 9/23/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal, abscal, utils
from hera_cal.smooth_cal import build_time_blacklist
from hera_qm.metrics_io import load_metri... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@abscal_inspect@abscal_inspect_2458115.ipynb@.PATH_END.py |
{
"filename": "simulate_sed.py",
"repo_name": "asmuzsoy/bayesn-VI-paper",
"repo_path": "bayesn-VI-paper_extracted/bayesn-VI-paper-main/simulate_sed.py",
"type": "Python"
} | import numpy as np
from timeit import default_timer
from bayesn_model import SEDmodel
model = SEDmodel(load_model='T21_model')
N = 100
start = default_timer()
lc, params = model.simulate_light_curve(np.arange(-8, 40, 4), N, ['g_PS1', 'r_PS1', 'i_PS1', 'z_PS1'],
z=np.random.unifo... | asmuzsoyREPO_NAMEbayesn-VI-paperPATH_START.@bayesn-VI-paper_extracted@bayesn-VI-paper-main@simulate_sed.py@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "nanograv/PINT",
"repo_path": "PINT_extracted/PINT-master/src/pint/utils.py",
"type": "Python"
} | """Miscellaneous potentially-helpful functions.
Warning
-------
Functions:
- :func:`~pint.derived_quantities.a1sini`
- :func:`~pint.derived_quantities.companion_mass`
- :func:`~pint.derived_quantities.gamma`
- :func:`~pint.derived_quantities.mass_funct`
- :func:`~pint.derived_quantities.mass_funct2`
- :func:`~pint.de... | nanogravREPO_NAMEPINTPATH_START.@PINT_extracted@PINT-master@src@pint@utils.py@.PATH_END.py |
{
"filename": "trackzone.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/guides/trackzone.md",
"type": "Markdown"
} | ---
comments: true
description: Discover how TrackZone leverages Ultralytics YOLO11 to precisely track objects within specific zones, enabling real-time insights for crowd analysis, surveillance, and targeted monitoring.
keywords: TrackZone, object tracking, YOLO11, Ultralytics, real-time object detection, AI, deep lea... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@guides@trackzone.md@.PATH_END.py |
{
"filename": "modified_blackbody.py",
"repo_name": "aconley/mbb_emcee",
"repo_path": "mbb_emcee_extracted/mbb_emcee-master/mbb_emcee/modified_blackbody.py",
"type": "Python"
} | import math
import numpy
import scipy.optimize
from scipy.special import lambertw
from .utility import isiterable
import fnu
"""Modified blackbody and blackbody SEDs"""
__all__ = ["modified_blackbody", "blackbody"]
# Some constants
c = 299792458e6 # in microns
h = 6.6260693e-34 # J/s
k = 1.3806505e-23 # J/K
um_... | aconleyREPO_NAMEmbb_emceePATH_START.@mbb_emcee_extracted@mbb_emcee-master@mbb_emcee@modified_blackbody.py@.PATH_END.py |
{
"filename": "mac_arabic.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/encodings/mac_arabic.py",
"type": "Python"
} | """ Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@encodings@mac_arabic.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/textfont/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self, plotly_name="lineposition", parent_name="heatmap.textfont", **kwargs
):
super(LinepositionValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@heatmap@textfont@_lineposition.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/marker/colorbar/tickfont/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="barpolar.marker.colorbar.tickfont",
**kwargs,
):
super(TextcaseValidator, self).__init__(
... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@marker@colorbar@tickfont@_textcase.py@.PATH_END.py |
{
"filename": "local.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/py/py2/py/_path/local.py",
"type": "Python"
} | """
local path implementation.
"""
from __future__ import with_statement
from contextlib import contextmanager
import sys, os, atexit, io, uuid
import py
from py._path import common
from py._path.common import iswin32, fspath
from stat import S_ISLNK, S_ISDIR, S_ISREG
from os.path import abspath, normpath, isabs, exi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@py@py2@py@_path@local.py@.PATH_END.py |
{
"filename": "DEMNodeLists.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/NodeList/DEMNodeLists.py",
"type": "Python"
} | from SpheralCompiledPackages import *
from spheralDimensions import spheralDimensions
dims = spheralDimensions()
#-------------------------------------------------------------------------------
# The generic SolidNodeList defintion.
#-------------------------------------------------------------------------------
def ... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@NodeList@DEMNodeLists.py@.PATH_END.py |
{
"filename": "_tickformatstop.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickformatstop(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "parcats.line.colorbar"
_path_str = "parcats.line.colorbar.tickformatstop"
_valid_pro... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@parcats@line@colorbar@_tickformatstop.py@.PATH_END.py |
{
"filename": "py39.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/compat/py39.py",
"type": "Python"
} | import sys
# Explicitly use the ``"locale"`` encoding in versions that support it,
# otherwise just rely on the implicit handling of ``encoding=None``.
# Since all platforms that support ``EncodingWarning`` also support
# ``encoding="locale"``, this can be used to suppress the warning.
# However, please try to use UTF... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@compat@py39.py@.PATH_END.py |
{
"filename": "_xcalendar.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/_xcalendar.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(self, plotly_name="xcalendar", parent_name="heatmap", **kwargs):
super(XcalendarValidator, 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@heatmap@_xcalendar.py@.PATH_END.py |
{
"filename": "copy_injection_recovery.py",
"repo_name": "ThibeauWouters/TurboPE-BNS",
"repo_path": "TurboPE-BNS_extracted/TurboPE-BNS-main/injections/outdir_NRTv2/injection_79/copy_injection_recovery.py",
"type": "Python"
} | """
Idea: try different learning rate schemes to try and fix the injections
"""
import psutil
p = psutil.Process()
p.cpu_affinity([0])
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "3"
os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.10"
import numpy as np
import argparse
# Regular imports
import argparse
import cop... | ThibeauWoutersREPO_NAMETurboPE-BNSPATH_START.@TurboPE-BNS_extracted@TurboPE-BNS-main@injections@outdir_NRTv2@injection_79@copy_injection_recovery.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/colorbar/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="volume.colorbar", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@colorbar@_thickness.py@.PATH_END.py |
{
"filename": "_fill.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/caps/z/_fill.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FillValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="fill", parent_name="isosurface.caps.z", **kwargs):
super(FillValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@caps@z@_fill.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contourcarpet/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@contourcarpet@colorbar@__init__.py@.PATH_END.py |
{
"filename": "denoising_generalisation_no_thresh.ipynb",
"repo_name": "utsav-akhaury/understanding-unets",
"repo_path": "understanding-unets_extracted/understanding-unets-master/experiments/denoising_tests/denoising_generalisation_no_thresh.ipynb",
"type": "Jupyter Notebook"
} | ```python
%cd ../..
```
/volatile/home/Zaccharie/workspace/understanding-unets
```python
# this just to make sure we are using only on CPU
import os
os.environ["CUDA_VISIBLE_DEVICES"]="-1"
```
```python
%load_ext autoreload
%autoreload 2
import copy
import time
import numpy as np
import pandas as pd
from tqd... | utsav-akhauryREPO_NAMEunderstanding-unetsPATH_START.@understanding-unets_extracted@understanding-unets-master@experiments@denoising_tests@denoising_generalisation_no_thresh.ipynb@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/specviz",
"repo_path": "specviz_extracted/specviz-master/specviz/__init__.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
try:
from specviz.version import version as __version__
except Exception:
# package is not installed
__version__ = "unknown"
__all__ = ['__version__']
print('specviz is no longer supported, please use jdaviz. '
'If you must use legacy ... | spacetelescopeREPO_NAMEspecvizPATH_START.@specviz_extracted@specviz-master@specviz@__init__.py@.PATH_END.py |
{
"filename": "custom_init.py",
"repo_name": "rometsch/fargocpt",
"repo_path": "fargocpt_extracted/fargocpt-master/test/self_gravity_azi/custom_init.py",
"type": "Python"
} | from dataclasses import dataclass
import numpy as np
from types import SimpleNamespace
import argparse
@dataclass
class FargoCPTField:
outputdir: str
snapshotid: str
name: str
def __post_init__(self):
self.filename = f"{self.outputdir}/snapshots/{self.snapshotid}/{self.name}.dat"
self... | rometschREPO_NAMEfargocptPATH_START.@fargocpt_extracted@fargocpt-master@test@self_gravity_azi@custom_init.py@.PATH_END.py |
{
"filename": "np_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/numpy_ops/tests/np_test.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@numpy_ops@tests@np_test.py@.PATH_END.py |
{
"filename": "meilisearch.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/vectorstores/meilisearch.py",
"type": "Python"
} | from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Meilisearch
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@vectorstores@meilisearch.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "pymc-devs/pymc",
"repo_path": "pymc_extracted/pymc-main/tests/__init__.py",
"type": "Python"
} | # Copyright 2024 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | pymc-devsREPO_NAMEpymcPATH_START.@pymc_extracted@pymc-main@tests@__init__.py@.PATH_END.py |
{
"filename": "reduce_utils.py",
"repo_name": "GeminiDRSoftware/DRAGONS",
"repo_path": "DRAGONS_extracted/DRAGONS-master/recipe_system/utils/reduce_utils.py",
"type": "Python"
} | #
# reduce_utils.py
# ------------------------------------------------------------------------------
# Utility function library for reduce and the Reduce class.
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
import as... | GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@recipe_system@utils@reduce_utils.py@.PATH_END.py |
{
"filename": "test_calibration_stacker.py",
"repo_name": "LCOGT/banzai",
"repo_path": "banzai_extracted/banzai-main/banzai/tests/test_calibration_stacker.py",
"type": "Python"
} | from banzai.lco import LCOCalibrationFrame
from banzai.data import CCDData
from banzai.context import Context
from banzai.calibrations import CalibrationStacker
from banzai.dbs import Instrument
import numpy as np
from astropy.io import fits
import pytest
nx, ny = 102, 105
header = {'DATASEC': f'[1:{nx},1:{ny}]', 'DET... | LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@tests@test_calibration_stacker.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "rasg-affiliates/healvis",
"repo_path": "healvis_extracted/healvis-master/README.md",
"type": "Markdown"
} | # healvis

[](https://codecov.io/gh/rasg-affiliates/healvis)
Radio interferometric visibility simulator based on HEALpix maps.
**Note** This is a... | rasg-affiliatesREPO_NAMEhealvisPATH_START.@healvis_extracted@healvis-master@README.md@.PATH_END.py |
{
"filename": "copy_reg.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/copy_reg.py",
"type": "Python"
} | /usr/lib64/python2.7/copy_reg.py | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@copy_reg.py@.PATH_END.py |
{
"filename": "debug.md",
"repo_name": "lgrcia/prose",
"repo_path": "prose_extracted/prose-main/docs/md/debug.md",
"type": "Markdown"
} | # Debugging
Finding why a specific error is thrown when running a [Sequence](prose.Sequence) can be challenging. Here are a few steps to debug a [Sequence](prose.Sequence).
## 1. Find from which block the error comes from
The error might be on the [Sequence](prose.Sequence) `_run` function, but scrolling up will rev... | lgrciaREPO_NAMEprosePATH_START.@prose_extracted@prose-main@docs@md@debug.md@.PATH_END.py |
{
"filename": "thermo.ipynb",
"repo_name": "misharash/class_public",
"repo_path": "class_public_extracted/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... | misharashREPO_NAMEclass_publicPATH_START.@class_public_extracted@class_public-master@notebooks@thermo.ipynb@.PATH_END.py |
{
"filename": "config.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py2/setuptools/config.py",
"type": "Python"
} | from __future__ import absolute_import, unicode_literals
import io
import os
import sys
import warnings
import functools
from collections import defaultdict
from functools import partial
from functools import wraps
from importlib import import_module
from distutils.errors import DistutilsOptionError, DistutilsFileErr... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py2@setuptools@config.py@.PATH_END.py |
{
"filename": "test_examples.py",
"repo_name": "ytree-project/ytree",
"repo_path": "ytree_extracted/ytree-main/tests/test_examples.py",
"type": "Python"
} | """
tests for example scripts
"""
#-----------------------------------------------------------------------------
# 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@tests@test_examples.py@.PATH_END.py |
{
"filename": "_lineposition.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choropleth/colorbar/title/font/_lineposition.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator):
def __init__(
self,
plotly_name="lineposition",
parent_name="choropleth.colorbar.title.font",
**kwargs,
):
super(LinepositionValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choropleth@colorbar@title@font@_lineposition.py@.PATH_END.py |
{
"filename": "tuto3_fit_with_likelihood.ipynb",
"repo_name": "mamartinod/grip",
"repo_path": "grip_extracted/grip-main/tutorials/tuto3_fit_with_likelihood.ipynb",
"type": "Jupyter Notebook"
} | # Tuto\#3 Fit the histograms with a likelihood
In this tutorial, we are going to fit the histograms to get self-calibrated null depth.
**Important: the self-calibration is as good as the model**.
Once again, we load the data, get the histograms, prepare the model then we perform the fit.
## Load data and get the his... | mamartinodREPO_NAMEgripPATH_START.@grip_extracted@grip-main@tutorials@tuto3_fit_with_likelihood.ipynb@.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/choropleth/hoverlabel/_font.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "choropleth.hoverlabel"
_path_str = "choropleth.hoverlabel.font"
_valid_props = {
"colo... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@choropleth@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "postgres_indexing.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/util/+db/doc/postgres_indexing.md",
"type": "Markdown"
} | # Postgres Indexing
Updated: 02/2022
## IDENTITY COLUMN (Auto-Increment)
After experiments and performance tests, we concluded to use integer
as IDENTITY, which is the faster and easiest way to generate primary key for
tables.
The syntax to define such field
pk BIGINT GENERATED ALWAYS AS IDENTITY
### Examp... | EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@util@+db@doc@postgres_indexing.md@.PATH_END.py |
{
"filename": "two_d_plotters.py",
"repo_name": "lsst/rubin_sim",
"repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/plots/two_d_plotters.py",
"type": "Python"
} | __all__ = ("TwoDMap", "VisitPairsHist")
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import colors
from .perceptual_rainbow import make_pr_cmap
from .plot_handler import BasePlotter
perceptual_rainbow = make_pr_cmap()
class TwoDMap(BasePlotter):
def __init__(self):
self.plot_type ... | lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@plots@two_d_plotters.py@.PATH_END.py |
{
"filename": "_ticklabeloverflow.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/surface/colorbar/_ticklabeloverflow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticklabeloverflow", parent_name="surface.colorbar", **kwargs
):
super(TicklabeloverflowValidator, self).__init__(
plotly_name=plo... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@surface@colorbar@_ticklabeloverflow.py@.PATH_END.py |
{
"filename": "rv_end_to_end.py",
"repo_name": "sblunt/orbitize",
"repo_path": "orbitize_extracted/orbitize-main/tests/end-to-end-tests/rv_end_to_end.py",
"type": "Python"
} | from orbitize import read_input, system, priors, sampler, results, kepler
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import os
"""
Simulates RV data from multiple instruments and relative astroemtric data
from a single instrument, then runs an orbit-fit and recovers the input
parameters... | sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@tests@end-to-end-tests@rv_end_to_end.py@.PATH_END.py |
{
"filename": "LICENSE.md",
"repo_name": "brunzema/truncated-mvn-sampler",
"repo_path": "truncated-mvn-sampler_extracted/truncated-mvn-sampler-main/LICENSE.md",
"type": "Markdown"
} | MIT License
Copyright (c) 2021 Paul Brunzema
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 limitation the rights
to use, copy, modify, merge, publish, dis... | brunzemaREPO_NAMEtruncated-mvn-samplerPATH_START.@truncated-mvn-sampler_extracted@truncated-mvn-sampler-main@LICENSE.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/experimental/colocated_python/__init__.py",
"type": "Python"
} | # Copyright 2024 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@jax@experimental@colocated_python@__init__.py@.PATH_END.py |
{
"filename": "bondi.py",
"repo_name": "AFD-Illinois/ebhlight",
"repo_path": "ebhlight_extracted/ebhlight-master/test/bondi.py",
"type": "Python"
} | ################################################################################
# #
# BONDI INFLOW #
# ... | AFD-IllinoisREPO_NAMEebhlightPATH_START.@ebhlight_extracted@ebhlight-master@test@bondi.py@.PATH_END.py |
{
"filename": "gbsix_test.py",
"repo_name": "HERA-Team/aipy",
"repo_path": "aipy_extracted/aipy-main/tests/catalog_tests/gbsix_test.py",
"type": "Python"
} | from __future__ import print_function, division, absolute_import
import unittest, aipy._src.gbsix as h, aipy as a, numpy as n
class TestGBSixCatalog(unittest.TestCase):
def setUp(self):
self.cat = h.GBSixCatalog()
self.cat.fromfile(h.GBSIXFILE)
def test_spotcheck(self):
for srcname in ... | HERA-TeamREPO_NAMEaipyPATH_START.@aipy_extracted@aipy-main@tests@catalog_tests@gbsix_test.py@.PATH_END.py |
{
"filename": "plot_model.ipynb",
"repo_name": "dmlc/xgboost",
"repo_path": "xgboost_extracted/xgboost-master/demo/CLI/distributed-training/plot_model.ipynb",
"type": "Jupyter Notebook"
} | # XGBoost Model Analysis
This notebook can be used to load and analysis model learnt from all xgboost bindings, including distributed training.
```python
import sys
import os
%matplotlib inline
```
## Please change the ```pkg_path``` and ```model_file``` to be correct path
```python
pkg_path = '../../python-pac... | dmlcREPO_NAMExgboostPATH_START.@xgboost_extracted@xgboost-master@demo@CLI@distributed-training@plot_model.ipynb@.PATH_END.py |
{
"filename": "smooth_cal_inspect_2458154.ipynb",
"repo_name": "HERA-Team/H1C_IDR3_Notebooks",
"repo_path": "H1C_IDR3_Notebooks-main/smooth_cal_inspect/smooth_cal_inspect_2458154.ipynb",
"type": "Jupyter Notebook"
} | # Stage 2 Calibration Smoothing Nightly Notebook
**Josh Dillon**, Last Revised 12/4/20
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from hera_cal import io, redcal, apply_cal, abscal, utils
from hera_cal.smooth_cal import build_time_blacklist
from hera_qm.metrics_io import load_metr... | HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@smooth_cal_inspect@smooth_cal_inspect_2458154.ipynb@.PATH_END.py |
{
"filename": "test_digamma.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/special/tests/test_digamma.py",
"type": "Python"
} | import numpy as np
from numpy import pi, log, sqrt
from numpy.testing import assert_, assert_equal
from scipy.special._testutils import FuncData
import scipy.special as sc
# Euler-Mascheroni constant
euler = 0.57721566490153286
def test_consistency():
# Make sure the implementation of digamma for real arguments... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@tests@test_digamma.py@.PATH_END.py |
{
"filename": "_familysrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/hoverlabel/font/_familysrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="familysrc", parent_name="image.hoverlabel.font", **kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@hoverlabel@font@_familysrc.py@.PATH_END.py |
{
"filename": "ReflectingBoundaryInst.cc.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/src/Boundary/ReflectingBoundaryInst.cc.py",
"type": "Python"
} | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "Boundary/ReflectingBoundary.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
template class Reflect... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Boundary@ReflectingBoundaryInst.cc.py@.PATH_END.py |
{
"filename": "_width.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatter/line/_width.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="width", parent_name="scatter.line", **kwargs):
super(WidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatter@line@_width.py@.PATH_END.py |
{
"filename": "index.md",
"repo_name": "youngjookim/sdr",
"repo_path": "sdr_extracted/sdr-master/SITE/themes/hugo-theme-console/exampleSite/content/photos/chicago-us/index.md",
"type": "Markdown"
} | +++
image = "chicago-us.jpg"
date = "2020-01-21"
title = "Chicago, US"
type = "gallery"
+++
[Chicago](https://en.wikipedia.org/w/index.php?title=Chicago&oldid=953376675), officially the City of Chicago, is the most populous city in the U.S. state of Illinois, and the third-most-populous city in the United States. With... | youngjookimREPO_NAMEsdrPATH_START.@sdr_extracted@sdr-master@SITE@themes@hugo-theme-console@exampleSite@content@photos@chicago-us@index.md@.PATH_END.py |
{
"filename": "bhm_rm.py",
"repo_name": "sdss/target_selection",
"repo_path": "target_selection_extracted/target_selection-main/python/target_selection/cartons/bhm_rm.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: Tom Dwelly
# @Date: 2020-03-31
# @Filename: bhm_rm.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
# derived from guide.py
# isort: skip_file
import peewee
from peewee import JOIN
from peewee import fn
from target_selection.cart... | sdssREPO_NAMEtarget_selectionPATH_START.@target_selection_extracted@target_selection-main@python@target_selection@cartons@bhm_rm.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/schema/nodes/__init__.py",
"type": "Python"
} | __all__ = [
'PromptNode',
'RunNode',
'StdoutNode',
'TraceCallNode',
'TraceNode',
]
from .prompt_node import PromptNode
from .run_node import RunNode
from .stdout_node import StdoutNode
from .trace_call_node import TraceCallNode
from .trace_node import TraceNode
| simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@schema@nodes@__init__.py@.PATH_END.py |
{
"filename": "_ticklabelstep.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/mesh3d/colorbar/_ticklabelstep.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="ticklabelstep", parent_name="mesh3d.colorbar", **kwargs
):
super(TicklabelstepValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@mesh3d@colorbar@_ticklabelstep.py@.PATH_END.py |
{
"filename": "data_generator.py",
"repo_name": "SKA-INAF/sclassifier",
"repo_path": "sclassifier_extracted/sclassifier-master/sclassifier/data_generator.py",
"type": "Python"
} | #!/usr/bin/env python
from __future__ import print_function
##################################################
### MODULE IMPORT
##################################################
## STANDARD MODULES
import os
import sys
import subprocess
import string
import time
import signal
from threading import Thread
i... | SKA-INAFREPO_NAMEsclassifierPATH_START.@sclassifier_extracted@sclassifier-master@sclassifier@data_generator.py@.PATH_END.py |
{
"filename": "sim.py",
"repo_name": "zpenoyre/CausticFrog",
"repo_path": "CausticFrog_extracted/CausticFrog-master/causticTools/sim.py",
"type": "Python"
} | #runs the cython simulation (jury is out on whether this need be it's own file...)
import Cython
import pyximport
pyximport.install()
from . import cythonSim
#this allows line profiler (via ipython magic %lprun) to profile cython functions
from Cython.Compiler.Options import get_directive_defaults
get_directive_defau... | zpenoyreREPO_NAMECausticFrogPATH_START.@CausticFrog_extracted@CausticFrog-master@causticTools@sim.py@.PATH_END.py |
{
"filename": "build_ext.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/_distutils/command/build_ext.py",
"type": "Python"
} | """distutils.command.build_ext
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""
import contextlib
import os
import re
import sys
from distutils._log import log
from site import USER_BASE
from .._modified impor... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@_distutils@command@build_ext.py@.PATH_END.py |
{
"filename": "_shapesrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/fillpattern/_shapesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="shapesrc", parent_name="scatter.fillpattern", **kwargs
):
super(ShapesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter@fillpattern@_shapesrc.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/sankey/hoverlabel/font/_shadow.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="shadow", parent_name="sankey.hoverlabel.font", **kwargs
):
super(ShadowValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@sankey@hoverlabel@font@_shadow.py@.PATH_END.py |
{
"filename": "_trifinder.py",
"repo_name": "matplotlib/matplotlib",
"repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/tri/_trifinder.py",
"type": "Python"
} | import numpy as np
from matplotlib import _api
from matplotlib.tri import Triangulation
class TriFinder:
"""
Abstract base class for classes used to find the triangles of a
Triangulation in which (x, y) points lie.
Rather than instantiate an object of a class derived from TriFinder, it is
usuall... | matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@tri@_trifinder.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "samarth-kashyap/hmi-clean-ls",
"repo_path": "hmi-clean-ls_extracted/hmi-clean-ls-master/README.md",
"type": "Markdown"
} | ## Cleaning large-scale features from HMI Dopplergrams
This package lets you remove the following features from the
Dopplergram images of the Helioseismic Magnetic Imager (HMI).
1. Effect of satellite velocity
2. Gravitational redshift
3. Large-scale features (differential rotation, meridional circulation, limb-shift)... | samarth-kashyapREPO_NAMEhmi-clean-lsPATH_START.@hmi-clean-ls_extracted@hmi-clean-ls-master@README.md@.PATH_END.py |
{
"filename": "_xpad.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class XpadValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="xpad", parent_name="scatterpolargl.marker.colorbar", **kwargs
):
super(XpadValidator, self).__init__(
plotly_name=plotly_name,
parent_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolargl@marker@colorbar@_xpad.py@.PATH_END.py |
{
"filename": "test_baseten.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/llms/test_baseten.py",
"type": "Python"
} | """Test Baseten API wrapper."""
import os
from langchain_community.llms.baseten import Baseten
# This test requires valid BASETEN_MODEL_ID and BASETEN_API_KEY environment variables
def test_baseten_call() -> None:
"""Test valid call to Baseten."""
llm = Baseten(model=os.environ["BASETEN_MODEL_ID"]) # type... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@llms@test_baseten.py@.PATH_END.py |
{
"filename": "vectors.py",
"repo_name": "hannorein/REBOUND",
"repo_path": "REBOUND_extracted/REBOUND-main/rebound/vectors.py",
"type": "Python"
} | from ctypes import Structure, c_double
class Vec6d(Structure):
_fields_ = [("x", c_double),
("y", c_double),
("z", c_double),
("vx", c_double),
("vy", c_double),
("vz", c_double)]
class Vec3dBasic(Structure):
"""
Internal use ... | hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@rebound@vectors.py@.PATH_END.py |
{
"filename": "ImageDataLoader.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/searcher/ImageDataLoader.md",
"type": "Markdown"
} | page_type: reference
description: DataLoader class for Image Searcher Task.
<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.searcher... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@api_docs@python@tflite_model_maker@searcher@ImageDataLoader.md@.PATH_END.py |
{
"filename": "test_editor_load.py",
"repo_name": "matplotlib/viscm",
"repo_path": "viscm_extracted/viscm-main/test/test_editor_load.py",
"type": "Python"
} | import json
import numpy as np
import pytest
from viscm.gui import Colormap, viscm_editor
def approxeq(x, y, *, err=0.0001):
return abs(y - x) < err
@pytest.mark.parametrize(
"colormap_file",
[
"viscm/examples/sample_linear.jscm",
"viscm/examples/sample_diverging.jscm",
"viscm/... | matplotlibREPO_NAMEviscmPATH_START.@viscm_extracted@viscm-main@test@test_editor_load.py@.PATH_END.py |
{
"filename": "_font.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/pointcloud/hoverlabel/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="font", parent_name="pointcloud.hoverlabel", **kwargs
):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pa... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@pointcloud@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "triangle.py",
"repo_name": "GabrielaCR/AGNfitter",
"repo_path": "AGNfitter_extracted/AGNfitter-master/functions/triangle.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals
__all__ = ["corner", "hist2d", "error_ellipse"]
__version__ = "0.0.6"
__author__ = "Dan Foreman-Mackey (danfm@nyu.edu)"
__copyright__ = "Copyright 2013 Daniel Foreman-Mackey"
__contributors__ = [
... | GabrielaCRREPO_NAMEAGNfitterPATH_START.@AGNfitter_extracted@AGNfitter-master@functions@triangle.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "StingraySoftware/stingray",
"repo_path": "stingray_extracted/stingray-main/stingray/simulator/tests/__init__.py",
"type": "Python"
} | import warnings
warnings.filterwarnings(
action="ignore", message=r".*RuntimeWarning: (under|over)flow encountered in .*"
)
import warnings
warnings.filterwarnings(
action="ignore", message=r".*RuntimeWarning: divide by zero encountered in .*"
)
| StingraySoftwareREPO_NAMEstingrayPATH_START.@stingray_extracted@stingray-main@stingray@simulator@tests@__init__.py@.PATH_END.py |
{
"filename": "_locationssrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergeo/_locationssrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="locationssrc", parent_name="scattergeo", **kwargs):
super(LocationssrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_n... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergeo@_locationssrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/datasets/tests/data/openml/id_2/__init__.py",
"type": "Python"
} | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@datasets@tests@data@openml@id_2@__init__.py@.PATH_END.py | |
{
"filename": "Units.ipynb",
"repo_name": "TeamLEGWORK/LEGWORK",
"repo_path": "LEGWORK_extracted/LEGWORK-main/docs/notebooks/Units.ipynb",
"type": "Jupyter Notebook"
} | # Understanding units in LEGWORK
```python
import legwork.source as source
import astropy.units as u
import numpy as np
```
## What units can I use?
We follow the [Standard Units](https://docs.astropy.org/en/stable/units/standard_units.html) defined in Astropy. This means that
- **lengths** are defined in terms o... | TeamLEGWORKREPO_NAMELEGWORKPATH_START.@LEGWORK_extracted@LEGWORK-main@docs@notebooks@Units.ipynb@.PATH_END.py |
{
"filename": "_size.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/colorbar/tickfont/_size.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="densitymap.colorbar.tickfont", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@colorbar@tickfont@_size.py@.PATH_END.py |
{
"filename": "_dtick.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_dtick.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="dtick", parent_name="scattersmith.marker.colorbar", **kwargs
):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@marker@colorbar@_dtick.py@.PATH_END.py |
{
"filename": "_weightsrc.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/image/hoverlabel/font/_weightsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="weightsrc", parent_name="image.hoverlabel.font", **kwargs
):
super(WeightsrcValidator, self).__init__(
plotly_name=plotly_name,
pare... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@image@hoverlabel@font@_weightsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "keras-team/keras",
"repo_path": "keras_extracted/keras-master/keras/api/mixed_precision/__init__.py",
"type": "Python"
} | """DO NOT EDIT.
This file was autogenerated. Do not edit it by hand,
since your modifications would be overwritten.
"""
from keras.src.dtype_policies.dtype_policy import DTypePolicy
from keras.src.dtype_policies.dtype_policy import DTypePolicy as Policy
from keras.src.dtype_policies.dtype_policy import dtype_policy
f... | keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@api@mixed_precision@__init__.py@.PATH_END.py |
{
"filename": "MoveEngine.py",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/MoveEngine.py",
"type": "Python"
} | import numpy as numpy
import math
from . import Tools
from .Formatter import formatter as fmt
from .OrderEngine import OrderEngine
__author__ = "Do Kester"
__year__ = 2023
__license__ = "GPL3"
__version__ = "3.2.0"
__url__ = "https://www.bayesicfitting.nl"
__status__ = "Alpha"
# * This file is part of the BayesicFi... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@MoveEngine.py@.PATH_END.py |
{
"filename": "_backoff.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/line/_backoff.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BackoffValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="backoff", parent_name="scattercarpet.line", **kwargs
):
super(BackoffValidator, self).__init__(
plotly_name=plotly_name,
parent_nam... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@line@_backoff.py@.PATH_END.py |
{
"filename": "process_pointings.py",
"repo_name": "JonahDW/Bayesian-dipole",
"repo_path": "Bayesian-dipole_extracted/Bayesian-dipole-main/process_pointings.py",
"type": "Python"
} | import os
import sys
import json
from pathlib import Path
import numpy as np
from copy import deepcopy
import cycler
import healpy as hp
from healpy.newvisufunc import projview
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
from scipy.optimize import curve_fit
from scipy.st... | JonahDWREPO_NAMEBayesian-dipolePATH_START.@Bayesian-dipole_extracted@Bayesian-dipole-main@process_pointings.py@.PATH_END.py |
{
"filename": "viewbox.py",
"repo_name": "macrocosme/shwirl",
"repo_path": "shwirl_extracted/shwirl-master/shwirl/extern/vispy/scene/widgets/viewbox.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .widget import Widget
from ..subscene import SubScene
from ..cameras import make_camera, BaseCamera
from ...ext.six i... | macrocosmeREPO_NAMEshwirlPATH_START.@shwirl_extracted@shwirl-master@shwirl@extern@vispy@scene@widgets@viewbox.py@.PATH_END.py |
{
"filename": "_showscale.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/marker/_showscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showscale", parent_name="treemap.marker", **kwargs):
super(ShowscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_na... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@marker@_showscale.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/restricted/boost/conversion/README.md",
"type": "Markdown"
} | # [Boost.Conversion](https://boost.org/libs/conversion)
Boost.Conversion is one of the [Boost C++ Libraries](https://github.com/boostorg). This library improves program safety and clarity by performing otherwise messy conversions.
### Test results
@ | Build | Tests coverage | More info
--------... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@restricted@boost@conversion@README.md@.PATH_END.py |
{
"filename": "rotations2d.py",
"repo_name": "astropy/halotools",
"repo_path": "halotools_extracted/halotools-master/halotools/utils/rotations2d.py",
"type": "Python"
} | r"""
A set of vector rotation utilites for manipulating 2-dimensional vectors
"""
from __future__ import division, print_function, absolute_import, unicode_literals
import numpy as np
from .vector_utilities import (
elementwise_dot,
elementwise_norm,
normalized_vectors,
angles_between_list_of_vectors,
... | astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@utils@rotations2d.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "Anirbancosmo/limpy",
"repo_path": "limpy_extracted/limpy-master/README.md",
"type": "Markdown"
} | <img src="images/Limpy_logo.jpg" alt="logo" height="250"/>
# LIMpy
_A python package for multi-line intensity mapping_
### Description
LIMpy package is useful to model and alayze multi line intensity maps of CII (158 $\mu m$), OIII (88 $\mu m$), and CO (1-0) to CO (13-12) transitions.
This code can be used for follow... | AnirbancosmoREPO_NAMElimpyPATH_START.@limpy_extracted@limpy-master@README.md@.PATH_END.py |
{
"filename": "test_disco_conv.py",
"repo_name": "neuraloperator/neuraloperator",
"repo_path": "neuraloperator_extracted/neuraloperator-main/neuralop/layers/tests/test_disco_conv.py",
"type": "Python"
} | import pytest
import torch
from torch import nn
from torch.testing import assert_close
from ..discrete_continuous_convolution import (DiscreteContinuousConv2d,
DiscreteContinuousConvTranspose2d,
EquidistantDiscreteContinuou... | neuraloperatorREPO_NAMEneuraloperatorPATH_START.@neuraloperator_extracted@neuraloperator-main@neuralop@layers@tests@test_disco_conv.py@.PATH_END.py |
{
"filename": "ragged_gather_op_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/ragged/ragged_gather_op_test.py",
"type": "Python"
} | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@ragged@ragged_gather_op_test.py@.PATH_END.py |
{
"filename": "_marker.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/treemap/_marker.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "treemap"
_path_str = "treemap.marker"
_valid_props = {
"autocolorscale",
"ca... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@treemap@_marker.py@.PATH_END.py |
{
"filename": "convert.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/data/util/convert.py",
"type": "Python"
} | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@data@util@convert.py@.PATH_END.py |
{
"filename": "_values.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/xaxis/rangebreak/_values.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(
self, plotly_name="values", parent_name="layout.xaxis.rangebreak", **kwargs
):
super(ValuesValidator, self).__init__(
plotly_name=plotly_name,
paren... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@xaxis@rangebreak@_values.py@.PATH_END.py |
{
"filename": "_shadowsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/hoverlabel/font/_shadowsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="shadowsrc",
parent_name="scatterpolar.hoverlabel.font",
**kwargs,
):
super(ShadowsrcValidator, self).__init__(
plotly_na... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@hoverlabel@font@_shadowsrc.py@.PATH_END.py |
{
"filename": "_templateitemname.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="templateitemname",
parent_name="treemap.marker.colorbar.tickformatstop",
**kwargs,
):
super(TemplateitemnameValidator, sel... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@marker@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py |
{
"filename": "test1.py",
"repo_name": "teuben/QAC",
"repo_path": "QAC_extracted/QAC-master/test/test1.py",
"type": "Python"
} | #
# it is assumed you have done execfile('ngvla.py')
#
# This test takes about 800 MB of disk space, and needs about 2 GB memory
#
# 667.692u 20.628s 9:45.15 117.6% 0+0k 1121096+3180192io 335pf+0w niter=0
# 2073.348u 37.540s 30:59.81 113.4% 0+0k 2335376+3269568io 887pf+0w niter=[0,1000,2000]
pdir ... | teubenREPO_NAMEQACPATH_START.@QAC_extracted@QAC-master@test@test1.py@.PATH_END.py |
{
"filename": "Dedner-divB.py",
"repo_name": "LLNL/spheral",
"repo_path": "spheral_extracted/spheral-main/tests/functional/MHD/Dedner-divB/Dedner-divB.py",
"type": "Python"
} | #-------------------------------------------------------------------------------
# The evolution of a uniform, magnetized conducting fluid.
#-------------------------------------------------------------------------------
from math import *
from Spheral import *
from SpheralTestUtilities import *
from SpheralVisitDump i... | LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@MHD@Dedner-divB@Dedner-divB.py@.PATH_END.py |
{
"filename": "test_history.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/schema/runnable/test_history.py",
"type": "Python"
} | from langchain.schema.runnable.history import __all__
EXPECTED_ALL = [
"RunnableWithMessageHistory",
"GetSessionHistoryCallable",
"MessagesOrDictWithMessages",
]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@schema@runnable@test_history.py@.PATH_END.py |
{
"filename": "test_acq_peakd_both.py",
"repo_name": "spacetelescope/calcos",
"repo_path": "calcos_extracted/calcos-master/tests/test_acq_peakd_both.py",
"type": "Python"
} | """Tests for COS/BOTH ACQ/PEAKD."""
import pytest
import calcos
from helpers import BaseCOS
# TODO: Mark this as slow when there are faster tests added for CI tests
# so that this only runs in nightly tests.
@pytest.mark.slow
class TestBOTHACQPEAKD(BaseCOS):
detector = 'fuv'
def test_both_acq_peakd(s... | spacetelescopeREPO_NAMEcalcosPATH_START.@calcos_extracted@calcos-master@tests@test_acq_peakd_both.py@.PATH_END.py |
{
"filename": "fft.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/scipy/fft.py",
"type": "Python"
} | # Copyright 2021 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@jax@_src@scipy@fft.py@.PATH_END.py |
{
"filename": "feature_request.md",
"repo_name": "kyleaoman/martini",
"repo_path": "martini_extracted/martini-main/.github/ISSUE_TEMPLATE/feature_request.md",
"type": "Markdown"
} | ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**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 con... | kyleaomanREPO_NAMEmartiniPATH_START.@martini_extracted@martini-main@.github@ISSUE_TEMPLATE@feature_request.md@.PATH_END.py |
{
"filename": "core.py",
"repo_name": "adrn/gala",
"repo_path": "gala_extracted/gala-main/gala/dynamics/mockstream/core.py",
"type": "Python"
} | # Third-party
import astropy.units as u
import numpy as np
# Project
from ...io import quantity_to_hdf5, quantity_from_hdf5
from .. import PhaseSpacePosition
__all__ = ['MockStream']
class MockStream(PhaseSpacePosition):
@u.quantity_input(release_time=u.Myr)
def __init__(self, pos, vel=None, frame=None,
... | adrnREPO_NAMEgalaPATH_START.@gala_extracted@gala-main@gala@dynamics@mockstream@core.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/error_x/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._width import WidthValidator
from ._visible import VisibleValidator
from ._valueminus import ValueminusValidator
from ._value import ValueValidator
from ._type import TypeValidator
from ._tracerefmi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@error_x@__init__.py@.PATH_END.py |
{
"filename": "groups.py",
"repo_name": "spacetelescope/PyFITS",
"repo_path": "PyFITS_extracted/PyFITS-master/pyfits/hdu/groups.py",
"type": "Python"
} | import sys
import numpy as np
from ..column import Column, ColDefs, FITS2NUMPY
from ..fitsrec import FITS_rec, FITS_record
from ..util import lazyproperty, _is_int, _is_pseudo_unsigned, _unsigned_zero
from .base import DTYPE2BITPIX
from .image import PrimaryHDU
from .table import _TableLikeHDU
class Group(FITS_recor... | spacetelescopeREPO_NAMEPyFITSPATH_START.@PyFITS_extracted@PyFITS-master@pyfits@hdu@groups.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/README.md",
"type": "Markdown"
} | # NRPy+, SENRv2, and the NRPy+ Jupyter Tutorial
[](https://github.com/zachetienne/nrpytutorial/actions/workflows/github-actions-ubuntu20.yml)
[![CI: Ubuntu 22.04](https://github.com/zachetienne/nrpytu... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@README.md@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.