metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "index.md",
"repo_name": "jiffyclub/palettable",
"repo_path": "palettable_extracted/palettable-master/docs/index.md",
"type": "Markdown"
} | ---
title: Palettable
layout: home
content: []
tagline:
Color palettes for Python
---
Palettable (formerly brewer2mpl) is a library of color palettes for Python.
It's written in pure Python with no dependencies,
but it can supply color maps for [matplotlib](http://matplotlib.org/).
You can use Palettable to custom... | jiffyclubREPO_NAMEpalettablePATH_START.@palettable_extracted@palettable-master@docs@index.md@.PATH_END.py |
{
"filename": "about.md",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/docs/about.md",
"type": "Markdown"
} | (about-the-project)=
# About the project
The JAX project is led by the JAX core team. We develop in the open,
and welcome open-source contributions from across the community. We
frequently see contributions from [Google
DeepMind](https://deepmind.google/), Alphabet more broadly,
[NVIDIA](https://docs.nvidia.com/deepl... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@about.md@.PATH_END.py |
{
"filename": "bulkstamp.py",
"repo_name": "mhammond/pywin32",
"repo_path": "pywin32_extracted/pywin32-main/win32/scripts/VersionStamp/bulkstamp.py",
"type": "Python"
} | #
# bulkstamp.py:
# Stamp versions on all files that can be found in a given tree.
#
# USAGE: python bulkstamp.py <version> <root directory> <descriptions>
#
# Example: python bulkstamp.py 103 ..\win32\Build\ desc.txt
#
# <version> corresponds to the build number. It will be concatenated with
# the major and minor v... | mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@win32@scripts@VersionStamp@bulkstamp.py@.PATH_END.py |
{
"filename": "shell.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/shell.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
pygments.lexers.shell
~~~~~~~~~~~~~~~~~~~~~
Lexers for various shells.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, \
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@shell.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/zaxis/title/font/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="variant",
parent_name="layout.scene.zaxis.title.font",
**kwargs,
):
super(VariantValidator, self).__init__(
plotly_... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@zaxis@title@font@_variant.py@.PATH_END.py |
{
"filename": "_textcase.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/colorbar/title/font/_textcase.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="textcase",
parent_name="scatter.marker.colorbar.title.font",
**kwargs,
):
super(TextcaseValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@colorbar@title@font@_textcase.py@.PATH_END.py |
{
"filename": "doc_gen_1d.md",
"repo_name": "threeML/astromodels",
"repo_path": "astromodels_extracted/astromodels-master/scripts/doc_gen_1d.md",
"type": "Markdown"
} | ---
jupyter:
jupytext:
formats: ipynb,md
text_representation:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.11.2
kernelspec:
display_name: Python 3
language: python
name: python3
---
# func_title
```python nbsphinx="hidden" tags=[]
%%cap... | threeMLREPO_NAMEastromodelsPATH_START.@astromodels_extracted@astromodels-master@scripts@doc_gen_1d.md@.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_81/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_81@copy_injection_recovery.py@.PATH_END.py |
{
"filename": "Tutorial-SEOBNR_Constant_Coefficients.ipynb",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/in_progress-SEOBNR/Tutorial-SEOBNR_Constant_Coefficients.ipynb",
"type": "Jupyter Notebook"
} | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-59152712-8');
</script>
# The Spinning Effective One-Body Constant Coefficients
##... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@in_progress-SEOBNR@Tutorial-SEOBNR_Constant_Coefficients.ipynb@.PATH_END.py |
{
"filename": "using_ipython.ipynb",
"repo_name": "Jashcraf/poke",
"repo_path": "poke_extracted/poke-main/docs/_build/html/notebooks/using_ipython.ipynb",
"type": "Jupyter Notebook"
} | # Using Jupyter Notebooks & Raytracer Specifics
_written by Jaren Ashcraft_
Talking to raytracers via their API's is not without its headaches. Jupyter Notebooks were not supported by Poke for some time because running the `trace_raysets` method would crash the Jupyter kernel.
In this tutorial we cover how to run Pok... | JashcrafREPO_NAMEpokePATH_START.@poke_extracted@poke-main@docs@_build@html@notebooks@using_ipython.ipynb@.PATH_END.py |
{
"filename": "Star_disk.py",
"repo_name": "bretonr/Icarus",
"repo_path": "Icarus_extracted/Icarus-master/Icarus/Core/Star_disk.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE
from __future__ import print_function, division
__all__ = ["Star_disk"]
from ..Utils.import_modules import *
from .. import Utils
from .Star import Star
######################## class Star_disk ########################
class Star_disk(Star):
""" Star_d... | bretonrREPO_NAMEIcarusPATH_START.@Icarus_extracted@Icarus-master@Icarus@Core@Star_disk.py@.PATH_END.py |
{
"filename": "test_hookcaller.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/pluggy/py3/tests/test_hookcaller.py",
"type": "Python"
} | from typing import Callable
from typing import List
from typing import Sequence
from typing import TypeVar
import pytest
from pluggy import HookimplMarker
from pluggy import HookspecMarker
from pluggy import PluginManager
from pluggy import PluginValidationError
from pluggy._hooks import _HookCaller
from pluggy._hook... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@pluggy@py3@tests@test_hookcaller.py@.PATH_END.py |
{
"filename": "yolov8.md",
"repo_name": "ultralytics/ultralytics",
"repo_path": "ultralytics_extracted/ultralytics-main/docs/en/models/yolov8.md",
"type": "Markdown"
} | ---
comments: true
description: Discover YOLOv8, the latest advancement in real-time object detection, optimizing performance with an array of pre-trained models for diverse tasks.
keywords: YOLOv8, real-time object detection, YOLO series, Ultralytics, computer vision, advanced object detection, AI, machine learning, d... | ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@models@yolov8.md@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "exo-cesm/CESM2.1.3",
"repo_path": "CESM2.1.3_extracted/CESM2.1.3-main/O2_Earth_analogues/cases/10pc_PAL_O2_CH4_em0.1/README.md",
"type": "Markdown"
} | # 10% PAL CH4 em0.1 case setup instructions
## Warning - a seperate CESM build is required to run this case
This case is a pertubation from the 10% PAL case. Instead of a fixed CH</sub>4</sub> mixing ratio, a fixed flux roughly equal to the present day flux of 50 Tg/yr of CH</sub>4</sub> was specified at the lower bo... | exo-cesmREPO_NAMECESM2.1.3PATH_START.@CESM2.1.3_extracted@CESM2.1.3-main@O2_Earth_analogues@cases@10pc_PAL_O2_CH4_em0.1@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "sbi-dev/sbi",
"repo_path": "sbi_extracted/sbi-main/sbi/samplers/score/__init__.py",
"type": "Python"
} | from sbi.samplers.score.correctors import Corrector, get_corrector
from sbi.samplers.score.predictors import Predictor, get_predictor
from sbi.samplers.score.score import Diffuser
| sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@samplers@score@__init__.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "gammapy/enrico",
"repo_path": "enrico_extracted/enrico-master/enrico/__init__.py",
"type": "Python"
} | gammapyREPO_NAMEenricoPATH_START.@enrico_extracted@enrico-master@enrico@__init__.py@.PATH_END.py | |
{
"filename": "_legendgroup.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/densitymapbox/_legendgroup.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="legendgroup", parent_name="densitymapbox", **kwargs
):
super(LegendgroupValidator, self).__init__(
plotly_name=plotly_name,
par... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@densitymapbox@_legendgroup.py@.PATH_END.py |
{
"filename": "main.py",
"repo_name": "cdslaborg/paramonte",
"repo_path": "paramonte_extracted/paramonte-main/example/fortran/pm_distNorm/getNormLogPDF/main.py",
"type": "Python"
} | #!/usr/bin/env python
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import glob
import sys
linewidth = 2
fontsize = 17
marker ={ "CK" : "-"
, "IK" : "."
, "RK" : "-"
}
xlab = { "CK" : "X ( real/imaginary components )"
, "IK" : "X ( integer-valued )"
,... | cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@example@fortran@pm_distNorm@getNormLogPDF@main.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "statsmodels/statsmodels",
"repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/tsa/statespace/tests/results/frbny_nowcast/Nowcasting/README.md",
"type": "Markdown"
} | The code in this folder is based on the Federal Reserve Bank of New York code
found at https://github.com/FRBNY-TimeSeriesAnalysis/Nowcasting, which was
downloaded as of commit 19f365cab8269e3aac3faa11ad091d6e913c5c43. Only the
files from that repository which were required for generating the test results
are included ... | statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@tsa@statespace@tests@results@frbny_nowcast@Nowcasting@README.md@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/openai_dalle_image_generation/__init__.py",
"type": "Python"
} | """Tool to generate an image using DALLE OpenAI V1 SDK."""
from langchain_community.tools.openai_dalle_image_generation.tool import (
OpenAIDALLEImageGenerationTool,
)
__all__ = ["OpenAIDALLEImageGenerationTool"]
| langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@openai_dalle_image_generation@__init__.py@.PATH_END.py |
{
"filename": "comparison_plots.py",
"repo_name": "NannyML/nannyml",
"repo_path": "nannyml_extracted/nannyml-main/tests/plots/comparison_plots.py",
"type": "Python"
} | # Author: Niels Nuyttens <niels@nannyml.com>
#
# License: Apache Software License 2.0
"""Test comparison plots."""
import pytest
from pytest_lazyfixture import lazy_fixture
from nannyml.chunk import Chunker, SizeBasedChunker
from nannyml.datasets import load_synthetic_binary_classification_dataset
from nannyml.dr... | NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@tests@plots@comparison_plots.py@.PATH_END.py |
{
"filename": "discretization_test.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/layers/preprocessing/discretization_test.py",
"type": "Python"
} | import os
import numpy as np
import pytest
from absl.testing import parameterized
from tensorflow import data as tf_data
from keras.src import backend
from keras.src import layers
from keras.src import models
from keras.src import testing
from keras.src.saving import saving_api
from keras.src.testing.test_utils impor... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@preprocessing@discretization_test.py@.PATH_END.py |
{
"filename": "_bgcolor.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name="bgcolor",
parent_name="histogram2dcontour.hoverlabel",
**kwargs,
):
super(BgcolorValidator, self).__init__(
plotly_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram2dcontour@hoverlabel@_bgcolor.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/densitymapbox/__init__.py",
"type": "Python"
} | import sys
if sys.version_info < (3, 7):
from ._colorbar import ColorBar
from ._hoverlabel import Hoverlabel
from ._stream import Stream
from . import colorbar
from . import hoverlabel
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@densitymapbox@__init__.py@.PATH_END.py |
{
"filename": "SpectralDecomposer.py",
"repo_name": "jdhenshaw/scousepy",
"repo_path": "scousepy_extracted/scousepy-master/scousepy/SpectralDecomposer.py",
"type": "Python"
} | # Licensed under an MIT open source license - see LICENSE
import numpy as np
from .colors import *
import time
from astropy import log
import warnings
import matplotlib.pyplot as plt
class Decomposer(object):
"""
A class containing various methods for decomposing individual spectra
Parameters
-------... | jdhenshawREPO_NAMEscousepyPATH_START.@scousepy_extracted@scousepy-master@scousepy@SpectralDecomposer.py@.PATH_END.py |
{
"filename": "jb08_analysis.ipynb",
"repo_name": "esa/thermonets",
"repo_path": "thermonets_extracted/thermonets-main/notebooks/jb08_analysis.ipynb",
"type": "Jupyter Notebook"
} | ```python
import sys
sys.path.append("../")
import thermonets as tn
import datetime
import numpy as np
import matplotlib.pyplot as plt
import pyatmos
import cartopy.crs as ccrs
from tqdm import tqdm
```
The EOP file 'finals2000A.all' in /Users/dario.izzo/src/iers/ is already the latest.
The Leap Second file ... | esaREPO_NAMEthermonetsPATH_START.@thermonets_extracted@thermonets-main@notebooks@jb08_analysis.ipynb@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/schema/callbacks/tracers/base.py",
"type": "Python"
} | from langchain_core.tracers.base import BaseTracer, TracerException
__all__ = ["TracerException", "BaseTracer"]
| langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@schema@callbacks@tracers@base.py@.PATH_END.py |
{
"filename": "sweet_cat.py",
"repo_name": "sczesla/PyAstronomy",
"repo_path": "PyAstronomy_extracted/PyAstronomy-master/src/pyasl/resBased/sweet_cat.py",
"type": "Python"
} | from __future__ import print_function, division
from PyAstronomy.pyaC import pyaPermanent as pp
from PyAstronomy.pyaC import pyaErrors as PE
import os
import gzip
from PyAstronomy.pyasl import _ic
import ssl
class SWEETCat(pp.PyAUpdateCycle):
"""
Access the SWEET-Cat catalog.
The SWEET-Cat catalog provid... | sczeslaREPO_NAMEPyAstronomyPATH_START.@PyAstronomy_extracted@PyAstronomy-master@src@pyasl@resBased@sweet_cat.py@.PATH_END.py |
{
"filename": "trainer.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/backend/jax/trainer.py",
"type": "Python"
} | import collections
import itertools
import jax
import numpy as np
from keras.src import backend
from keras.src import callbacks as callbacks_module
from keras.src import optimizers as optimizers_module
from keras.src import tree
from keras.src.backend import distribution_lib as jax_distribution_lib
from keras.src.dis... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@jax@trainer.py@.PATH_END.py |
{
"filename": "Tutorial-GRHD_Equations-Cartesian-c-code.ipynb",
"repo_name": "zachetienne/nrpytutorial",
"repo_path": "nrpytutorial_extracted/nrpytutorial-master/Tutorial-GRHD_Equations-Cartesian-c-code.ipynb",
"type": "Jupyter Notebook"
} | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-59152712-8');
</script>
# C code generation of GRHD Equations
## Authors: Phil Cha... | zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@Tutorial-GRHD_Equations-Cartesian-c-code.ipynb@.PATH_END.py |
{
"filename": "cm_redis_corr.py",
"repo_name": "HERA-Team/hera_mc",
"repo_path": "hera_mc_extracted/hera_mc-main/hera_mc/cm_redis_corr.py",
"type": "Python"
} | # -*- mode: python; coding: utf-8 -*-
# Copyright 2018 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""Methods for handling locating correlator and various system aspects."""
import json
import time
import warnings
import redis
from . import cm_sysutils, correlator, mc
REDIS_CMINFO_HASH = "cmi... | HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@hera_mc@cm_redis_corr.py@.PATH_END.py |
{
"filename": "tfsa-2022-016.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-016.md",
"type": "Markdown"
} | ## TFSA-2022-016: Undefined behavior in `SparseTensorSliceDataset`
### CVE Number
CVE-2022-21736
### Impact
The [implementation of `SparseTensorSliceDataset`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/data/sparse_tensor_slice_dataset_op.cc#L227-L292... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-016.md@.PATH_END.py |
{
"filename": "run_gPhoton.py",
"repo_name": "rbuehler/vasca",
"repo_path": "vasca_extracted/vasca-main/vasca/examples/run_gPhoton.py",
"type": "Python"
} | #!/usr/bin/env python
# coding: utf-8
import gPhoton
import numpy as np
import os
from astropy import units as uu
from vasca.region import Region
from astropy.table import Table
from vasca.resource_manager import ResourceManager
region_name = "ALL_10-800" # "TDS" # "WD" #"MDIS_10-800" # _ELAISN1
t_binning = 5 # Bin... | rbuehlerREPO_NAMEvascaPATH_START.@vasca_extracted@vasca-main@vasca@examples@run_gPhoton.py@.PATH_END.py |
{
"filename": "plotbandpass3.py",
"repo_name": "nicokurtovic/SIMIO",
"repo_path": "SIMIO_extracted/SIMIO-main/codes/analysis_scripts/plotbandpass3.py",
"type": "Python"
} | #########################################################################
#
# plotbandpass3.py
#
# This is meant to be a generic task to display CASA bandpass solutions
# with options to overlay them in various combinations. It is meant to
# work the 'new' (casa 3.4) calibration tables, and (unlike plotbandpass
#... | nicokurtovicREPO_NAMESIMIOPATH_START.@SIMIO_extracted@SIMIO-main@codes@analysis_scripts@plotbandpass3.py@.PATH_END.py |
{
"filename": "version.py",
"repo_name": "CosmicFish/CosmicFish",
"repo_path": "CosmicFish_extracted/CosmicFish-master/bundled/doxygen/src/version.py",
"type": "Python"
} | #
# script to read the version information from `../configure`
# relevant lines are starting with:
# `doxygen_version_major`
# `doxygen_version_minor`
# `doxygen_version_revision`
# `doxygen_version_mmn`
# the collected information is written to: `../VERSION` and `../src/version.cpp`
#
import sys
import os
#
... | CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@bundled@doxygen@src@version.py@.PATH_END.py |
{
"filename": "gigachat.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chat_models/gigachat.py",
"type": "Python"
} | from __future__ import annotations
import logging
from typing import (
TYPE_CHECKING,
Any,
AsyncIterator,
Dict,
Iterator,
List,
Mapping,
Optional,
Type,
)
from langchain_core._api.deprecation import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForLLMRun... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chat_models@gigachat.py@.PATH_END.py |
{
"filename": "plot_stats.py",
"repo_name": "spacetelescope/hst_cosmic_rays",
"repo_path": "hst_cosmic_rays_extracted/hst_cosmic_rays-master/pipeline/utils/plot_stats.py",
"type": "Python"
} | #!/usr/bin/env python
from collections import defaultdict
from itertools import chain
from astropy.time import Time
from astropy.visualization import ImageNormalize, LinearStretch, \
LogStretch, ZScaleInterval, SqrtStretch
import dask.array as da
import costools
from collections import Iterable
import h5py
import ... | spacetelescopeREPO_NAMEhst_cosmic_raysPATH_START.@hst_cosmic_rays_extracted@hst_cosmic_rays-master@pipeline@utils@plot_stats.py@.PATH_END.py |
{
"filename": "set_scale_and_bias__desc.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-python/set_scale_and_bias__desc.md",
"type": "Markdown"
} |
Set the scale and bias.
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-python@set_scale_and_bias__desc.md@.PATH_END.py |
{
"filename": "local_fields.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/fields/local_fields.py",
"type": "Python"
} | from collections.abc import Callable
from functools import partial
from typing import Any, TypeVar
from yt.funcs import is_sequence
from yt.utilities.logger import ytLogger as mylog
from .field_info_container import FieldInfoContainer
from .field_plugin_registry import register_field_plugin
# workaround mypy not bei... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@fields@local_fields.py@.PATH_END.py |
{
"filename": "shadow.py",
"repo_name": "einsteinpy/einsteinpy",
"repo_path": "einsteinpy_extracted/einsteinpy-main/src/einsteinpy/plotting/rays/shadow.py",
"type": "Python"
} | import numpy as np
from matplotlib import pyplot as plt
class ShadowPlotter:
"""
Class for plotting and visualising shadows
"""
def __init__(self, shadow, is_line_plot=True):
"""
Constructor for plotter.
Parameters
----------
shadow : ~einsteinpy.rays.Shadow
... | einsteinpyREPO_NAMEeinsteinpyPATH_START.@einsteinpy_extracted@einsteinpy-main@src@einsteinpy@plotting@rays@shadow.py@.PATH_END.py |
{
"filename": "_textsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choropleth/_textsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="textsrc", parent_name="choropleth", **kwargs):
super(TextsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choropleth@_textsrc.py@.PATH_END.py |
{
"filename": "_closesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/candlestick/_closesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="closesrc", parent_name="candlestick", **kwargs):
super(ClosesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@candlestick@_closesrc.py@.PATH_END.py |
{
"filename": "base.py",
"repo_name": "lwa-project/lsl",
"repo_path": "lsl_extracted/lsl-main/lsl/reader/base.py",
"type": "Python"
} | """
Python module that contains the base FrameHeader, FramePayload, and Frame
classes for all of the LSL readers.
.. versionadded:: 2.0.0
"""
import copy
import pytz
import numpy as np
from functools import total_ordering
from textwrap import fill as tw_fill
from datetime import datetime, timedelta
from astropy.tim... | lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@lsl@reader@base.py@.PATH_END.py |
{
"filename": "GLGradientLegendItem.py",
"repo_name": "3fon3fonov/exostriker",
"repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/pyqtgraph/opengl/items/GLGradientLegendItem.py",
"type": "Python"
} | from ... import functions as fn
from ...colormap import ColorMap
from ...Qt import QtCore, QtGui
from ..GLGraphicsItem import GLGraphicsItem
__all__ = ['GLGradientLegendItem']
class GLGradientLegendItem(GLGraphicsItem):
"""
Displays legend colorbar on the screen.
"""
def __init__(self, parentItem=Non... | 3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@pyqtgraph@opengl@items@GLGradientLegendItem.py@.PATH_END.py |
{
"filename": "pgm.py",
"repo_name": "jmeyers314/linmix",
"repo_path": "linmix_extracted/linmix-master/docs/pgm/pgm.py",
"type": "Python"
} | from matplotlib import rc
rc("font", family="serif", size=10)
rc("text", usetex=True)
import daft
figshape = (6.5, 4)
figorigin = (-1.5, -0.5)
pgm = daft.PGM(figshape, figorigin)
pgm.add_node(daft.Node("y", r"y", 1, 0, observed=True))
pgm.add_node(daft.Node("x", r"x", 2, 0, observed=True))
pgm.add_node(daft.Node("et... | jmeyers314REPO_NAMElinmixPATH_START.@linmix_extracted@linmix-master@docs@pgm@pgm.py@.PATH_END.py |
{
"filename": "magnitudes.py",
"repo_name": "HETDEX/elixer",
"repo_path": "elixer_extracted/elixer-main/elixer/cosmolopy/magnitudes.py",
"type": "Python"
} | """Conversions between fluxes, luminosities and AB magnitudes.
"""
import math
import numpy
import cosmolopy.distance as cd
import cosmolopy.constants as cc
"""AB Magnitude zero point."""
MAB0 = -2.5 * numpy.log10(3631.e-23)
def nu_lambda(coordinate):
"""Convert between frequency and wavelength, nu to lambda or
... | HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@cosmolopy@magnitudes.py@.PATH_END.py |
{
"filename": "label--short-desc-evaluation.md",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/label--short-desc-evaluation.md",
"type": "Markdown"
} |
The target variables (in other words, the objects' label values) for the evaluation dataset.
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@label--short-desc-evaluation.md@.PATH_END.py |
{
"filename": "image_grad_test_base.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/image_grad_test_base.py",
"type": "Python"
} | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@image_grad_test_base.py@.PATH_END.py |
{
"filename": "example_client.py",
"repo_name": "xraypy/xraylarch",
"repo_path": "xraylarch_extracted/xraylarch-master/examples/rpc/example_client.py",
"type": "Python"
} | #!/usr/bin/env python
from six.moves.xmlrpc_client import ServerProxy
import time
import json
from larch.utils.jsonutils import decode4js
s = ServerProxy('http://127.0.0.1:4966')
print('Avaialable Methods from XML-RPC server: ', s.system.listMethods())
s.larch('m = 222.3')
s.larch('g = group(x=linspace(0, 10, 11))')... | xraypyREPO_NAMExraylarchPATH_START.@xraylarch_extracted@xraylarch-master@examples@rpc@example_client.py@.PATH_END.py |
{
"filename": "data_factory.py",
"repo_name": "glue-viz/glue",
"repo_path": "glue_extracted/glue-main/glue/plugins/dendro_viewer/data_factory.py",
"type": "Python"
} | """
Load files created by the astrodendro package.
astrodendro must be installed in order to use this loader
"""
import numpy as np
from astrodendro import Dendrogram
from glue.core.data_factories.hdf5 import is_hdf5
from glue.core.data_factories.fits import is_fits
from glue.core.data_factories.helpers import data_... | glue-vizREPO_NAMEgluePATH_START.@glue_extracted@glue-main@glue@plugins@dendro_viewer@data_factory.py@.PATH_END.py |
{
"filename": "mosaic.py",
"repo_name": "vterron/lemon",
"repo_path": "lemon_extracted/lemon-master/mosaic.py",
"type": "Python"
} | #! /usr/bin/env python2
# Copyright (c) 2012 Victor Terron. All rights reserved.
# Institute of Astrophysics of Andalusia, IAA-CSIC
#
# This file is part of LEMON.
#
# LEMON is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Softwar... | vterronREPO_NAMElemonPATH_START.@lemon_extracted@lemon-master@mosaic.py@.PATH_END.py |
{
"filename": "uws_jdl.py",
"repo_name": "ParisAstronomicalDataCentre/OPUS",
"repo_path": "OPUS_extracted/OPUS-master/uws_server/uws_jdl.py",
"type": "Python"
} | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016 by Mathieu Servillat
# Licensed under MIT (https://github.com/mservillat/uws-server/blob/master/LICENSE)
"""
Interfaces between UWS server and job description
"""
import collections
import inspect
import copy
import json
import yaml
import lxml.etree a... | ParisAstronomicalDataCentreREPO_NAMEOPUSPATH_START.@OPUS_extracted@OPUS-master@uws_server@uws_jdl.py@.PATH_END.py |
{
"filename": "_showtickprefix.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/polar/radialaxis/_showtickprefix.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showtickprefix",
parent_name="layout.polar.radialaxis",
**kwargs
):
super(ShowtickprefixValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@polar@radialaxis@_showtickprefix.py@.PATH_END.py |
{
"filename": "plot_label_propagation_digits_active_learning.py",
"repo_name": "scikit-learn/scikit-learn",
"repo_path": "scikit-learn_extracted/scikit-learn-main/examples/semi_supervised/plot_label_propagation_digits_active_learning.py",
"type": "Python"
} | """
========================================
Label Propagation digits active learning
========================================
Demonstrates an active learning technique to learn handwritten digits
using label propagation.
We start by training a label propagation model with only 10 labeled points,
then we select the t... | scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@semi_supervised@plot_label_propagation_digits_active_learning.py@.PATH_END.py |
{
"filename": "wiserf.py",
"repo_name": "ChrisBeaumont/brut",
"repo_path": "brut_extracted/brut-master/bubbly/wiserf.py",
"type": "Python"
} | import os
import PyWiseRF
import cloud
import numpy as np
if cloud.running_on_cloud():
os.environ['WISERF_ROOT'] = '/home/picloud/WiseRF-1.5.9-linux-x86_64-rc2'
def test():
x = np.random.random((5, 5))
y = np.array([1, 1, 1, 0, 0])
clf = WiseRF().fit(x, y)
return clf
class WiseRF(PyWiseRF.WiseR... | ChrisBeaumontREPO_NAMEbrutPATH_START.@brut_extracted@brut-master@bubbly@wiserf.py@.PATH_END.py |
{
"filename": "enforcement_filters.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/chains/pebblo_retrieval/enforcement_filters.py",
"type": "Python"
} | """
Identity & Semantic Enforcement filters for PebbloRetrievalQA chain:
This module contains methods for applying Identity and Semantic Enforcement filters
in the PebbloRetrievalQA chain.
These filters are used to control the retrieval of documents based on authorization and
semantic context.
The Identity Enforcement... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@chains@pebblo_retrieval@enforcement_filters.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "danielrd6/ifscube",
"repo_path": "ifscube_extracted/ifscube-master/README.md",
"type": "Markdown"
} | # ifscube
A set of python scripts and functions to analyse and process integral
field spectroscopy data cubes.
Author: Daniel Ruschel Dutra
Website: https://github.com/danielrd6/ifscube/
## Acknowleding IFSCube
If you use IFSCube in your research, and feel that it has contributed
significantly to your work, please... | danielrd6REPO_NAMEifscubePATH_START.@ifscube_extracted@ifscube-master@README.md@.PATH_END.py |
{
"filename": "Image.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/Image.py",
"type": "Python"
} | #
# The Python Imaging Library.
# $Id$
#
# the Image class wrapper
#
# partial release history:
# 1995-09-09 fl Created
# 1996-03-11 fl PIL release 0.0 (proof of concept)
# 1996-04-30 fl PIL release 0.1b1
# 1999-07-28 fl PIL release 1.0 final
# 2000-06-07 fl PIL release 1.1
# 2000-10-20 fl PIL release 1.1.1... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@Image.py@.PATH_END.py |
{
"filename": "igimf_epoch_89.py",
"repo_name": "juzikong/photGalIMF",
"repo_path": "photGalIMF_extracted/photGalIMF-main/simulation_results_from_galaxy_evol/example/igimf_epoch_89.py",
"type": "Python"
} | # File to define a custom IMF
# The return value represents the chosen IMF value for the input mass
def custom_imf(mass, time): # there is no time dependence for IGIMF
if mass < 0.08:
return 0
elif mass < 0.101:
return -881912095498.0004 * mass + 126349388048.4443
elif mass < 0.10201:
... | juzikongREPO_NAMEphotGalIMFPATH_START.@photGalIMF_extracted@photGalIMF-main@simulation_results_from_galaxy_evol@example@igimf_epoch_89.py@.PATH_END.py |
{
"filename": "CODE_OF_CONDUCT.md",
"repo_name": "heal-research/operon",
"repo_path": "operon_extracted/operon-main/CODE_OF_CONDUCT.md",
"type": "Markdown"
} | # Code of Conduct
* You will be judged by your contributions first, and your sense of humor
second.
* Nobody owes you anything.
| heal-researchREPO_NAMEoperonPATH_START.@operon_extracted@operon-main@CODE_OF_CONDUCT.md@.PATH_END.py |
{
"filename": "test_buffer.py",
"repo_name": "mpi4py/mpi4py",
"repo_path": "mpi4py_extracted/mpi4py-master/test/test_buffer.py",
"type": "Python"
} | from mpi4py import MPI
import mpiunittest as unittest
try:
import array
except ImportError:
array = None
class TestBuffer(unittest.TestCase):
def testNewEmpty(self):
buffer = MPI.buffer
buf = buffer()
self.assertEqual(buf.address, 0)
self.assertIsNone(buf.obj)
self... | mpi4pyREPO_NAMEmpi4pyPATH_START.@mpi4py_extracted@mpi4py-master@test@test_buffer.py@.PATH_END.py |
{
"filename": "_tickformatstopdefaults.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self,
plotly_name="tickformatstopdefaults",
parent_name="scattermapbox.marker.colorbar",
**kwargs
):
super(TickformatstopdefaultsVali... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@_tickformatstopdefaults.py@.PATH_END.py |
{
"filename": "meanvar.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/features/meanvar.py",
"type": "Python"
} | import numpy as np
from ._base import BaseSingleBandFeature
class MeanVariance(BaseSingleBandFeature):
def _eval_single_band(self, t, m, sigma=None):
return np.std(m, ddof=1) / np.mean(m)
@property
def size_single_band(self):
return 1
__all__ = ("MeanVariance",)
| light-curveREPO_NAMElight-curve-pythonPATH_START.@light-curve-python_extracted@light-curve-python-master@light-curve@light_curve@light_curve_py@features@meanvar.py@.PATH_END.py |
{
"filename": "elements.py",
"repo_name": "astropy/pyvo",
"repo_path": "pyvo_extracted/pyvo-main/pyvo/utils/xml/elements.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from inspect import getmembers
from functools import partial
import warnings
from astropy.utils.xml import iterparser
from astropy.io.votable.exceptions import warn_or_raise
from pyvo.utils.xml.exceptions import UnknownElementWarning
__all__ = [
"xm... | astropyREPO_NAMEpyvoPATH_START.@pyvo_extracted@pyvo-main@pyvo@utils@xml@elements.py@.PATH_END.py |
{
"filename": "telluric.py",
"repo_name": "finagle29/dbsp_drp",
"repo_path": "dbsp_drp_extracted/dbsp_drp-main/dbsp_drp/telluric.py",
"type": "Python"
} | """
Telluric correction for P200 DBSP.
"""
import os
from typing import List
from pypeit.par import pypeitpar
from pypeit.core import telluric
from pypeit.spectrographs.util import load_spectrograph
def telluric_correct(coadd: str, output_path: str, spectrograph: str,
user_config_lines: List[str], debug: bool... | finagle29REPO_NAMEdbsp_drpPATH_START.@dbsp_drp_extracted@dbsp_drp-main@dbsp_drp@telluric.py@.PATH_END.py |
{
"filename": "debuglog.py",
"repo_name": "j0r1/GRALE2",
"repo_path": "GRALE2_extracted/GRALE2-master/pygrale/grale/debuglog.py",
"type": "Python"
} | #!/usr/bin/env python
import os
import sys
import time
# Set up a function called 'debugLog', which is enabled or disabled depending on
# the existence of the environment variable DEBUGLOG_VERBOSE
if os.environ.get("DEBUGLOG_VERBOSE") is not None:
def debugLog(s):
lines = s.splitlines()
t = time.t... | j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@pygrale@grale@debuglog.py@.PATH_END.py |
{
"filename": "evolve.py",
"repo_name": "grackle-project/grackle",
"repo_path": "grackle_extracted/grackle-main/src/python/pygrackle/utilities/evolve.py",
"type": "Python"
} | ########################################################################
#
# Functions for evolving a fluid container using Grackle
#
#
# Copyright (c) 2016, Grackle Development Team.
#
# Distributed under the terms of the Enzo Public Licence.
#
# The full license is in the file LICENSE, distributed with this
# softwar... | grackle-projectREPO_NAMEgracklePATH_START.@grackle_extracted@grackle-main@src@python@pygrackle@utilities@evolve.py@.PATH_END.py |
{
"filename": "make_picca_deltas_from_transmission.py",
"repo_name": "igmhub/LyaCoLoRe",
"repo_path": "LyaCoLoRe_extracted/LyaCoLoRe-master/scripts/make_picca_deltas_from_transmission.py",
"type": "Python"
} | import os
import scipy as sp
import sys
import fitsio
import glob
import healpy
import scipy.interpolate as interpolate
import iminuit
from multiprocessing import Pool
import multiprocessing
import time
import argparse
from picca.data import delta
from lyacolore import utils
lya = utils.lya_rest
####################... | igmhubREPO_NAMELyaCoLoRePATH_START.@LyaCoLoRe_extracted@LyaCoLoRe-master@scripts@make_picca_deltas_from_transmission.py@.PATH_END.py |
{
"filename": "conf.py",
"repo_name": "rpoleski/MulensModel",
"repo_path": "MulensModel_extracted/MulensModel-master/docs/source/conf.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
#
# MulensModel documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 23 15:22:44 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@docs@source@conf.py@.PATH_END.py |
{
"filename": "model_prompt.py",
"repo_name": "simonsobs/nextline-rdb",
"repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/alembic/models/rev_f3edea6dbde2/model_prompt.py",
"type": "Python"
} | from datetime import datetime
from typing import TYPE_CHECKING
from sqlalchemy import ForeignKey, UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column, relationship
from .base import Model
if TYPE_CHECKING:
from .model_run import Run
from .model_trace import Trace
from .model_trace_call impo... | simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@alembic@models@rev_f3edea6dbde2@model_prompt.py@.PATH_END.py |
{
"filename": "postgres_extensions.md",
"repo_name": "EranOfek/AstroPack",
"repo_path": "AstroPack_extracted/AstroPack-main/matlab/util/+db/doc/postgres_extensions.md",
"type": "Markdown"
} | # Postgres Extensions
### Introduction to PostgreSQL Extensions
https://www.educba.com/postgresql-extensions/
### More
https://www.postgresql.org/download/products/6-postgresql-extensions/
### Top 5 PostgreSQL Extensions
https://www.timescale.com/blog/top-5-postgresql-extensions/
1. TimescaleDB
2. PostGIS
... | EranOfekREPO_NAMEAstroPackPATH_START.@AstroPack_extracted@AstroPack-main@matlab@util@+db@doc@postgres_extensions.md@.PATH_END.py |
{
"filename": "prior.py",
"repo_name": "ACCarnall/bagpipes",
"repo_path": "bagpipes_extracted/bagpipes-master/bagpipes/fitting/prior.py",
"type": "Python"
} | from __future__ import print_function, division, absolute_import
import numpy as np
from scipy.special import erf, erfinv
from scipy.stats import beta, t
def dirichlet(r, alpha):
""" This function samples from a Dirichlet distribution based on N-1
independent random variables (r) in the range (0, 1). The me... | ACCarnallREPO_NAMEbagpipesPATH_START.@bagpipes_extracted@bagpipes-master@bagpipes@fitting@prior.py@.PATH_END.py |
{
"filename": "test_infrastructure.py",
"repo_name": "spacetelescope/jwst",
"repo_path": "jwst_extracted/jwst-main/jwst/tests/test_infrastructure.py",
"type": "Python"
} | from pathlib import Path
import importlib
from pkgutil import iter_modules
import os
import pytest
from ci_watson.artifactory_helpers import get_bigdata_root
from jwst.regtest.regtestdata import (
_data_glob_local,
_data_glob_url
)
from jwst.tests.helpers import word_precision_check
def test_word_precision... | spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@tests@test_infrastructure.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "AmpelAstro/Ampel-contrib-sample",
"repo_path": "Ampel-contrib-sample_extracted/Ampel-contrib-sample-master/README.md",
"type": "Markdown"
} | # AMPEL
Ampel is a modular software framework designed for the analysis of streamed data. AMPEL operates in four different tiers:
- T0 filters alerts from a stream
- T1 looks for new transient data to add from outside the stream
- T2 calculates/derives further properties based on the collected information
- T3 trigge... | AmpelAstroREPO_NAMEAmpel-contrib-samplePATH_START.@Ampel-contrib-sample_extracted@Ampel-contrib-sample-master@README.md@.PATH_END.py |
{
"filename": "profiler.py",
"repo_name": "jax-ml/jax",
"repo_path": "jax_extracted/jax-main/jax/_src/profiler.py",
"type": "Python"
} | # Copyright 2020 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@profiler.py@.PATH_END.py |
{
"filename": "config_sliders.py",
"repo_name": "hruedisser/3DCOREweb",
"repo_path": "3DCOREweb_extracted/3DCOREweb-main/src/coreweb/dashcore/assets/config_sliders.py",
"type": "Python"
} | from dash import dcc, register_page, html
import dash_mantine_components as dmc
import dash_bootstrap_components as dbc
from dash_iconify import DashIconify
'''
Configuration for the sliders
'''
############################################################
# Geometrical Models
modelslidervars = [{'var_name': 'Longitu... | hruedisserREPO_NAME3DCOREwebPATH_START.@3DCOREweb_extracted@3DCOREweb-main@src@coreweb@dashcore@assets@config_sliders.py@.PATH_END.py |
{
"filename": "_thickness.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/histogram/error_y/_thickness.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="thickness", parent_name="histogram.error_y", **kwargs
):
super(ThicknessValidator, self).__init__(
plotly_name=plotly_name,
paren... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram@error_y@_thickness.py@.PATH_END.py |
{
"filename": "perl.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/perl.py",
"type": "Python"
} | """
pygments.lexers.perl
~~~~~~~~~~~~~~~~~~~~
Lexers for Perl, Raku and related languages.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@perl.py@.PATH_END.py |
{
"filename": "scalars.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/typing/tests/data/pass/scalars.py",
"type": "Python"
} | import datetime as dt
import pytest
import numpy as np
b = np.bool()
b_ = np.bool_()
u8 = np.uint64()
i8 = np.int64()
f8 = np.float64()
c16 = np.complex128()
U = np.str_()
S = np.bytes_()
# Construction
class D:
def __index__(self) -> int:
return 0
class C:
def __complex__(self) -> complex:
... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@typing@tests@data@pass@scalars.py@.PATH_END.py |
{
"filename": "evaluate_clusters.py",
"repo_name": "MGJvanGroeningen/gaia_oc_amd",
"repo_path": "gaia_oc_amd_extracted/gaia_oc_amd-main/gaia_oc_amd/evaluate_clusters.py",
"type": "Python"
} | import os
import argparse
import matplotlib
import pandas as pd
from gaia_oc_amd.io import load_cluster, load_sets, cluster_list
from gaia_oc_amd.data_preparation.cluster import Cluster
from gaia_oc_amd.candidate_evaluation.membership_probability import calculate_candidate_probs
from gaia_oc_amd.candidate_evaluation... | MGJvanGroeningenREPO_NAMEgaia_oc_amdPATH_START.@gaia_oc_amd_extracted@gaia_oc_amd-main@gaia_oc_amd@evaluate_clusters.py@.PATH_END.py |
{
"filename": "runtime-tkinter.py",
"repo_name": "gwastro/pycbc",
"repo_path": "pycbc_extracted/pycbc-master/tools/static/runtime-tkinter.py",
"type": "Python"
} | import os, sys
d = os.path.join(sys._MEIPASS, 'tcl')
if not os.path.exists(d):
os.makedirs(d)
d = os.path.join(sys._MEIPASS, 'tk')
if not os.path.exists(d):
os.makedirs(d)
| gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@tools@static@runtime-tkinter.py@.PATH_END.py |
{
"filename": "m4fit.py",
"repo_name": "webbjj/m2mcluster",
"repo_path": "m2mcluster_extracted/m2mcluster-main/examples/m4/m4fit.py",
"type": "Python"
} | """
The below script is an example of how to use m2mcluster to fit an M2M model to obserations of a Galactic
globuar cluster's density profile (m4_sig_inner_prof.dat, m4_sig_outer_prof.dat) and
kinematic properties (m4_pm_prof.dat, m4_rv_prof.dat). In this example, the M2M model is fit against
M4's inner and outer surf... | webbjjREPO_NAMEm2mclusterPATH_START.@m2mcluster_extracted@m2mcluster-main@examples@m4@m4fit.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/table/hoverlabel/_font.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="table.hoverlabel", **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@table@hoverlabel@_font.py@.PATH_END.py |
{
"filename": "ploadparticles.py",
"repo_name": "AndrewSellek/PLUTO_PRIZMO",
"repo_path": "PLUTO_PRIZMO_extracted/PLUTO_PRIZMO-main/Tools/pyPLUTO/pyPLUTO/ploadparticles.py",
"type": "Python"
} | #!/usr/bin/python3
from __future__ import division
import os
import sys
import numpy as np
class ploadparticles(object):
def __init__(self, ns, w_dir=None, datatype=None, ptype=None, chnum=None):
"""
Loads the Particle datafile.
**Inputs**:
ns -- Step Number of the data file\n
w_dir -- path to the direc... | AndrewSellekREPO_NAMEPLUTO_PRIZMOPATH_START.@PLUTO_PRIZMO_extracted@PLUTO_PRIZMO-main@Tools@pyPLUTO@pyPLUTO@ploadparticles.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "DarkQuestCosmology/dark_emulator_public",
"repo_path": "dark_emulator_public_extracted/dark_emulator_public-main/dark_emulator/darkemu/__init__.py",
"type": "Python"
} | from .de_interface import base_class
| DarkQuestCosmologyREPO_NAMEdark_emulator_publicPATH_START.@dark_emulator_public_extracted@dark_emulator_public-main@dark_emulator@darkemu@__init__.py@.PATH_END.py |
{
"filename": "testFilesFilter.py",
"repo_name": "terryyin/lizard",
"repo_path": "lizard_extracted/lizard-master/test/testFilesFilter.py",
"type": "Python"
} | import unittest
import platform
from mock import patch
from lizard import get_all_source_files
import os
def which_system():
return platform.system()
class TestFilesFilter(unittest.TestCase):
@patch.object(os, "walk")
def test_no_matching(self, mock_os_walk):
mock_os_walk.return_value = []
... | terryyinREPO_NAMElizardPATH_START.@lizard_extracted@lizard-master@test@testFilesFilter.py@.PATH_END.py |
{
"filename": "installation.md",
"repo_name": "google/jax",
"repo_path": "jax_extracted/jax-main/docs/installation.md",
"type": "Markdown"
} | (installation)=
# Installation
<!--* freshness: { reviewed: '2024-06-18' } *-->
Using JAX requires installing two packages: `jax`, which is pure Python and
cross-platform, and `jaxlib` which contains compiled binaries, and requires
different builds for different operating systems and accelerators.
**Summary:** For m... | googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@installation.md@.PATH_END.py |
{
"filename": "validation.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/scikit-learn/py2/sklearn/utils/validation.py",
"type": "Python"
} | """Utilities for input validation"""
# Authors: Olivier Grisel
# Gael Varoquaux
# Andreas Mueller
# Lars Buitinck
# Alexandre Gramfort
# Nicolas Tresegnie
# License: BSD 3 clause
import warnings
import numbers
import numpy as np
import scipy.sparse as sp
from ..externals... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scikit-learn@py2@sklearn@utils@validation.py@.PATH_END.py |
{
"filename": "SampleTrajectoryPositions.py",
"repo_name": "wmpg/WesternMeteorPyLib",
"repo_path": "WesternMeteorPyLib_extracted/WesternMeteorPyLib-master/wmpl/Utils/SampleTrajectoryPositions.py",
"type": "Python"
} | """ Given the trajectory, beginning and ending height of sampling and the step, this code will sample the
trajectory and produce time, height, geo and ECI coordinates for every sample.
This is used as a step in dark flight modelling.
"""
from __future__ import print_function, division, absolute_import
impor... | wmpgREPO_NAMEWesternMeteorPyLibPATH_START.@WesternMeteorPyLib_extracted@WesternMeteorPyLib-master@wmpl@Utils@SampleTrajectoryPositions.py@.PATH_END.py |
{
"filename": "PhosimCmpt.py",
"repo_name": "lsst-ts/ts_phosim",
"repo_path": "ts_phosim_extracted/ts_phosim-main/python/lsst/ts/phosim/PhosimCmpt.py",
"type": "Python"
} | # This file is part of ts_phosim.
#
# Developed for the LSST Telescope and Site Systems.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: y... | lsst-tsREPO_NAMEts_phosimPATH_START.@ts_phosim_extracted@ts_phosim-main@python@lsst@ts@phosim@PhosimCmpt.py@.PATH_END.py |
{
"filename": "SECURITY.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/SECURITY.md",
"type": "Markdown"
} | # Using TensorFlow Securely
This document discusses the TensorFlow security model. It describes the security
risks to consider when using models, checkpoints or input data for training or
serving. We also provide guidelines on what constitutes a vulnerability in
TensorFlow and how to report them.
This document applie... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@SECURITY.md@.PATH_END.py |
{
"filename": "__main__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/Pillow/py3/PIL/__main__.py",
"type": "Python"
} | from __future__ import annotations
from .features import pilinfo
def main():
pilinfo()
if __name__ == '__main__':
main()
| catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pillow@py3@PIL@__main__.py@.PATH_END.py |
{
"filename": "interpol.py",
"repo_name": "sibirrer/lenstronomy",
"repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/Profiles/interpol.py",
"type": "Python"
} | __author__ = "sibirrer"
import scipy.interpolate
import numpy as np
import lenstronomy.Util.util as util
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
__all__ = ["Interpol", "InterpolScaled"]
class Interpol(LensProfileBase):
"""Class which uses an interpolation of a lens model and its... | sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@Profiles@interpol.py@.PATH_END.py |
{
"filename": "tests.py",
"repo_name": "ejhigson/perfectns",
"repo_path": "perfectns_extracted/perfectns-master/tests/tests.py",
"type": "Python"
} | #!/usr/bin/env python
"""
Test the perfectns package installation.
"""
import os
import shutil
import unittest
import warnings
import numpy as np
import numpy.testing
import matplotlib
import nestcheck.ns_run_utils
import perfectns.settings
import perfectns.estimators as e
import perfectns.cached_gaussian_prior
import... | ejhigsonREPO_NAMEperfectnsPATH_START.@perfectns_extracted@perfectns-master@tests@tests.py@.PATH_END.py |
{
"filename": "json.py",
"repo_name": "gwpy/gwpy",
"repo_path": "gwpy_extracted/gwpy-main/gwpy/segments/io/json.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2017-2020)
#
# This file is part of GWpy.
#
# GWpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | gwpyREPO_NAMEgwpyPATH_START.@gwpy_extracted@gwpy-main@gwpy@segments@io@json.py@.PATH_END.py |
{
"filename": "_weight.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/legend/title/font/_weight.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class WeightValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="weight", parent_name="layout.legend.title.font", **kwargs
):
super(WeightValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@legend@title@font@_weight.py@.PATH_END.py |
{
"filename": "fit_dist_to_samples.py",
"repo_name": "asmuzsoy/bayesn-VI-paper",
"repo_path": "bayesn-VI-paper_extracted/bayesn-VI-paper-main/fit_dist_to_samples.py",
"type": "Python"
} | import numpy as np
import numpyro
from numpyro.infer import MCMC, NUTS, init_to_median, init_to_sample, init_to_value, Predictive
import numpyro.distributions as dist
from numpyro.optim import Adam, ClippedAdam
from numpyro.infer import SVI, Trace_ELBO, TraceGraph_ELBO
from numpyro.infer.autoguide import AutoDelta, Aut... | asmuzsoyREPO_NAMEbayesn-VI-paperPATH_START.@bayesn-VI-paper_extracted@bayesn-VI-paper-main@fit_dist_to_samples.py@.PATH_END.py |
{
"filename": "_textfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/_textfont.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="textfont", parent_name="scattergl", **kwargs):
super(TextfontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@_textfont.py@.PATH_END.py |
{
"filename": "adaptation.py",
"repo_name": "pyro-ppl/pyro",
"repo_path": "pyro_extracted/pyro-master/pyro/infer/mcmc/adaptation.py",
"type": "Python"
} | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import math
from collections import namedtuple
import torch
import pyro
from pyro.ops.arrowhead import (
SymmArrowhead,
sqrt,
triu_gram,
triu_inverse,
triu_matvecmul,
)
from pyro.ops.dual_averaging import Dual... | pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@infer@mcmc@adaptation.py@.PATH_END.py |
{
"filename": "clarifai.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/clarifai.py",
"type": "Python"
} | from __future__ import annotations
import logging
import os
import traceback
import uuid
from concurrent.futures import ThreadPoolExecutor
from typing import Any, Iterable, List, Optional, Tuple
import requests
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langcha... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@clarifai.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.