metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "tfsa-2022-161.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2022-161.md", "type": "Markdown" }
## TFSA-2022-161: `CHECK` fail via inputs in `SdcaOptimizer` ### CVE Number CVE-2022-41899 ### Impact Inputs `dense_features` or `example_state_data` not of rank 2 will trigger a `CHECK` fail in [`SdcaOptimizer`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/sdca_internal.cc). ```pytho...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2022-161.md@.PATH_END.py
{ "filename": "gameragm_4D.py", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/kamodo_ccmc/readers/gameragm_4D.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Wed Jan 4 15:37:59 2023 @author: rringuet,lrastaet """ from numpy import vectorize from datetime import datetime, timezone model_varnames = {'Bx': ['B_x', 'X-component of magnetic field', 0, 'SM', 'car', ['time', 'X', 'Y', 'Z'], 'nT'], ...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@kamodo_ccmc@readers@gameragm_4D.py@.PATH_END.py
{ "filename": "osnt090.py", "repo_name": "juanep97/iop4", "repo_path": "iop4_extracted/iop4-main/iop4lib/telescopes/osnt090.py", "type": "Python" }
# iop4lib config import iop4lib.config iop4conf = iop4lib.Config(config_db=False) # django imports from abc import ABCMeta, abstractmethod # other imports import os import re import ftplib from pathlib import Path import astropy.io.fits as fits import astropy.units as u from astropy.coordinates import Angle, SkyCoord...
juanep97REPO_NAMEiop4PATH_START.@iop4_extracted@iop4-main@iop4lib@telescopes@osnt090.py@.PATH_END.py
{ "filename": "2022_10_19_155810_af52717cf201_track_retries_restarts.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/sqlite/2022_10_19_155810_af52717cf201_track_retries_restarts.py", "type": "Python" }
"""Add retry and restart metadata Revision ID: af52717cf201 Revises: ad4b1b4d1e9d Create Date: 2022-10-19 15:58:10.016251 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "af52717cf201" down_revision = "3ced59d8806b" branch_labels = None depends_on = None def ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@sqlite@2022_10_19_155810_af52717cf201_track_retries_restarts.py@.PATH_END.py
{ "filename": "_prefixsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/cells/_prefixsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="prefixsrc", parent_name="table.cells", **kwargs): super(PrefixsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@cells@_prefixsrc.py@.PATH_END.py
{ "filename": "paths.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/config/paths.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions to determine where configuration and data/cache files used by Astropy should be placed. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern impor...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@config@paths.py@.PATH_END.py
{ "filename": "graphics_regression_ceres_residuals.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/docs/source/plots/graphics_regression_ceres_residuals.py", "type": "Python" }
''' Using a model built from the the state crime dataset, make a CERES plot with the rate of Poverty as the focus variable. ''' import matplotlib.pyplot as plt import statsmodels.api as sm import statsmodels.formula.api as smf from statsmodels.graphics.regressionplots import plot_ceres_residuals crime_data = ...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@docs@source@plots@graphics_regression_ceres_residuals.py@.PATH_END.py
{ "filename": "FlythroughCommandLine.ipynb", "repo_name": "nasa/Kamodo", "repo_path": "Kamodo_extracted/Kamodo-master/docs/notebooks/FlythroughCommandLine.ipynb", "type": "Jupyter Notebook" }
# Performing a Flythrough from the Command Line This notebook tutorial shows how to perform a flythrough from the command line in a variety of methods. The main difference between the notebook and the command line syntaxes is that all of the arguments and default values must be specified in the call from the command li...
nasaREPO_NAMEKamodoPATH_START.@Kamodo_extracted@Kamodo-master@docs@notebooks@FlythroughCommandLine.ipynb@.PATH_END.py
{ "filename": "meta.py", "repo_name": "kbwestfall/NIRVANA", "repo_path": "NIRVANA_extracted/NIRVANA-master/nirvana/data/meta.py", "type": "Python" }
""" Provides a class to house and manipulate galaxy global parameters/metadata. .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import warnings from IPython import embed import numpy as np import astropy.units from astropy.io import fits from astropy.cosm...
kbwestfallREPO_NAMENIRVANAPATH_START.@NIRVANA_extracted@NIRVANA-master@nirvana@data@meta.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/experimental/examples/unity/TensorFlowLitePlugin/README.md", "type": "Markdown" }
# TF Lite Experimental Unity Plugin This directory contains an experimental sample Unity (2017) Plugin, based on the experimental TF Lite C API. The sample demonstrates running inference within Unity by way of a C# `Interpreter` wrapper. Note that the native TF Lite plugin(s) *must* be built before using the Unity Pl...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@experimental@examples@unity@TensorFlowLitePlugin@README.md@.PATH_END.py
{ "filename": "_kde.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/stats/_kde.py", "type": "Python" }
#------------------------------------------------------------------------------- # # Define classes for (uni/multi)-variate kernel density estimation. # # Currently, only Gaussian kernels are implemented. # # Written by: Robert Kern # # Date: 2004-08-09 # # Modified: 2005-02-10 by Robert Kern. # Contr...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@stats@_kde.py@.PATH_END.py
{ "filename": "DEMO-checkpoint.ipynb", "repo_name": "lsst-uk/sky-estimation-WP3.7", "repo_path": "sky-estimation-WP3.7_extracted/sky-estimation-WP3.7-master/makeDwarfs/.ipynb_checkpoints/DEMO-checkpoint.ipynb", "type": "Jupyter Notebook" }
# Instructions Implementation of this code is deliberately simple. As long as you have the lsst.MAG and lsst.MASS tables (available on this page) in the code directory, just create an array representing log(M/Msun), create an instance of a Dwarfs() class object using that array as input, then create a tuple of coordi...
lsst-ukREPO_NAMEsky-estimation-WP3.7PATH_START.@sky-estimation-WP3.7_extracted@sky-estimation-WP3.7-master@makeDwarfs@.ipynb_checkpoints@DEMO-checkpoint.ipynb@.PATH_END.py
{ "filename": "keywords.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jedi/py2/jedi/api/keywords.py", "type": "Python" }
import pydoc from jedi.evaluate.utils import ignored from jedi.evaluate.filters import AbstractNameDefinition try: from pydoc_data import topics as pydoc_topics except ImportError: # Python 2 try: import pydoc_topics except ImportError: # This is for Python 3 embeddable version, which ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jedi@py2@jedi@api@keywords.py@.PATH_END.py
{ "filename": "_hoverlabel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/_hoverlabel.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="funnelarea", **kwargs): super(HoverlabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@_hoverlabel.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/python/radmc3dPy/setup.py", "type": "Python" }
#!/usr/bin/env python try: from numpy.distutils.core import setup, Extension ext = Extension(name = 'radmc3dPy._bhmie', sources = ['radmc3dPy/bhmie.f90']) except: msg = "numpy.distutils.core could not be imported. It is required to build the fast, fortran version of the mie scattering...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@python@radmc3dPy@setup.py@.PATH_END.py
{ "filename": "test_stereo_combination.py", "repo_name": "cta-observatory/ctapipe", "repo_path": "ctapipe_extracted/ctapipe-main/src/ctapipe/reco/tests/test_stereo_combination.py", "type": "Python" }
import astropy.units as u import numpy as np import pytest from astropy.table import Table from numpy.testing import assert_allclose, assert_array_equal from ctapipe.containers import ( ArrayEventContainer, HillasParametersContainer, ImageParametersContainer, ParticleClassificationContainer, Recons...
cta-observatoryREPO_NAMEctapipePATH_START.@ctapipe_extracted@ctapipe-main@src@ctapipe@reco@tests@test_stereo_combination.py@.PATH_END.py
{ "filename": "_xpad.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/marker/colorbar/_xpad.py", "type": "Python" }
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattersmith.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@marker@colorbar@_xpad.py@.PATH_END.py
{ "filename": "serialization_lib_test.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/saving/serialization_lib_test.py", "type": "Python" }
"""Tests for serialization_lib.""" import json import numpy as np import pytest import keras from keras.src import ops from keras.src import testing from keras.src.saving import serialization_lib def custom_fn(x): return x**2 class CustomLayer(keras.layers.Layer): def __init__(self, factor): supe...
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@saving@serialization_lib_test.py@.PATH_END.py
{ "filename": "optional_input_test.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_optional_input/optional_input_test.py", "type": "Python" }
#!/usr/bin/python # Copyright 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_optional_input@optional_input_test.py@.PATH_END.py
{ "filename": "plotkappa.py", "repo_name": "tomasoshea/chameleon", "repo_path": "chameleon_extracted/chameleon-main/plotkappa.py", "type": "Python" }
# Tom O'Shea 2023 # plot Debye screening scale from numpy import loadtxt from matplotlib import pyplot as plt import numpy as np plt.style.use("style.txt") # import plot style # setup plot fig2 = plt.figure(1) # display is 1920 x 1080 (16:9) #ax2 = fig2.add_axes((.15,.15,.8,.8)) ax2 = fig2.subplots() ax2.set(xlim=...
tomasosheaREPO_NAMEchameleonPATH_START.@chameleon_extracted@chameleon-main@plotkappa.py@.PATH_END.py
{ "filename": "gravsphere_initialise_Sextans.py", "repo_name": "justinread/gravsphere", "repo_path": "gravsphere_extracted/gravsphere-master/gravsphere_initialise_Sextans.py", "type": "Python" }
import numpy as np from constants import * from functions import * #This file contains all the code options and choices for #running a given model. Throughout, -1 means auto-calculate. #Data files and output base filename: whichgal = 'Sextans' infile = output_base+whichgal+'/'+whichgal outdirbase = output_base+whi...
justinreadREPO_NAMEgravspherePATH_START.@gravsphere_extracted@gravsphere-master@gravsphere_initialise_Sextans.py@.PATH_END.py
{ "filename": "section_2.ipynb", "repo_name": "NathanSandford/Chem-I-Calc", "repo_path": "Chem-I-Calc_extracted/Chem-I-Calc-master/notebooks/Sandford_2020/section_2.ipynb", "type": "Jupyter Notebook" }
<h1>Table of Contents<span class="tocSkip"></span></h1> <div class="toc"><ul class="toc-item"><li><span><a href="#Sandford+-2020,-Section-2:--Information-Content-of-Spectra" data-toc-modified-id="Sandford+-2020,-Section-2:--Information-Content-of-Spectra-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Sandford+ 2020,...
NathanSandfordREPO_NAMEChem-I-CalcPATH_START.@Chem-I-Calc_extracted@Chem-I-Calc-master@notebooks@Sandford_2020@section_2.ipynb@.PATH_END.py
{ "filename": "nebulagraph.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/graph_qa/nebulagraph.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.chains.graph_qa.nebulagraph import NebulaGraphQAChain # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling o...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@graph_qa@nebulagraph.py@.PATH_END.py
{ "filename": "_textfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/layout/map/layer/symbol/_textfont.py", "type": "Python" }
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Textfont(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.map.layer.symbol" _path_str = "layout.map.layer.symbol.textfont" _valid_props = ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@layout@map@layer@symbol@_textfont.py@.PATH_END.py
{ "filename": "test_tools.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/period/test_tools.py", "type": "Python" }
import numpy as np import pytest from pandas import ( Period, PeriodIndex, period_range, ) import pandas._testing as tm class TestPeriodRepresentation: """ Wish to match NumPy units """ @pytest.mark.parametrize( "freq, base_date", [ ("W-THU", "1970-01-01"), ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@period@test_tools.py@.PATH_END.py
{ "filename": "test_imports.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/tests/unit_tests/schema/test_imports.py", "type": "Python" }
from langchain.schema import __all__ EXPECTED_ALL = [ "BaseCache", "BaseMemory", "BaseStore", "AgentFinish", "AgentAction", "Document", "BaseChatMessageHistory", "BaseDocumentTransformer", "BaseMessage", "ChatMessage", "FunctionMessage", "HumanMessage", "AIMessage", ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@tests@unit_tests@schema@test_imports.py@.PATH_END.py
{ "filename": "Finder.ipynb", "repo_name": "FRBs/FRB", "repo_path": "FRB_extracted/FRB-main/docs/nb/Finder.ipynb", "type": "Jupyter Notebook" }
# Finder Chart Example -- v3 DES DECaL log and cutout options ```python # imports import numpy as np from matplotlib import pyplot as plt from importlib import reload from astropy.coordinates import SkyCoord from astropy import units from astropy.wcs import WCS from astropy.io import fits from frb.surve...
FRBsREPO_NAMEFRBPATH_START.@FRB_extracted@FRB-main@docs@nb@Finder.ipynb@.PATH_END.py
{ "filename": "update_meas_summary.py", "repo_name": "astro-datalab/nsc", "repo_path": "nsc_extracted/nsc-master/python/nsc/update_meas_summary.py", "type": "Python" }
#!/usr/bin/env python # Get number of missing OBJECTIDs from nsc_instcal_combine_update_meas.py logs for each exposures import os import sys import numpy as np import time from dlnpyutils import utils as dln, db from astropy.table import Table from astropy.io import fits import sqlite3 import socket from argparse imp...
astro-datalabREPO_NAMEnscPATH_START.@nsc_extracted@nsc-master@python@nsc@update_meas_summary.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/template/data/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._bar import Bar from ._barpolar import Barpolar from ._box import Box from ._candlestick import Candlestick from ._carpet import Carpet from ._choropleth import Choropleth from ._choroplethmap i...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@template@data@__init__.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/table/cells/line/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.cells.line", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@table@cells@line@_colorsrc.py@.PATH_END.py
{ "filename": "rad_minimal_new.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/examples/textbook/rad_minimal_new.py", "type": "Python" }
import numpy from amuse.lab import * from amuse.ic.gasplummer import new_plummer_gas_model from amuse.ext.spherical_model \ import new_uniform_spherical_particle_distribution from matplotlib import pyplot from prepare_figure import single_frame, figure_frame from distinct_colours import get_distinct def binned_me...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@examples@textbook@rad_minimal_new.py@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sankey.node.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "GenerateDEMfromSPHGenerator.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/NodeGenerators/GenerateDEMfromSPHGenerator.py", "type": "Python" }
from math import * from NodeGeneratorBase import * from Spheral import Vector1d, Vector2d, Vector3d, SymTensor1d, SymTensor2d, SymTensor3d from SpheralTestUtilities import fuzzyEqual #------------------------------------------------------------------------------- # Wrapper Generator for DEM based on SPH generators #...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@NodeGenerators@GenerateDEMfromSPHGenerator.py@.PATH_END.py
{ "filename": "libszoom.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/falco/proper/libszoom.py", "type": "Python" }
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, 'libszoom.cpython-36m-x86_64-linux-gnu.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@falco@proper@libszoom.py@.PATH_END.py
{ "filename": "_outlinecolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/contour/colorbar/_outlinecolor.py", "type": "Python" }
import _plotly_utils.basevalidators class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="contour.colorbar", **kwargs ): super(OutlinecolorValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@contour@colorbar@_outlinecolor.py@.PATH_END.py
{ "filename": "interpolative.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/linalg/interpolative.py", "type": "Python" }
# ****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@interpolative.py@.PATH_END.py
{ "filename": "example.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/src/python/examples/example.py", "type": "Python" }
# Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of con...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@src@python@examples@example.py@.PATH_END.py
{ "filename": "parasail.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/parasail.py", "type": "Python" }
""" pygments.lexers.parasail ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for ParaSail. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include from pygments.token import Text, Comment, Operator, Ke...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@parasail.py@.PATH_END.py
{ "filename": "_title.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/funnel/marker/colorbar/_title.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel.marker.colorbar" _path_str = "funnel.marker.colorbar.title" _valid_props = {"font", "s...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@funnel@marker@colorbar@_title.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NextGenCMB/lensitbiases", "repo_path": "lensitbiases_extracted/lensitbiases-main/lensitbiases/tests/__init__.py", "type": "Python" }
from . import *
NextGenCMBREPO_NAMElensitbiasesPATH_START.@lensitbiases_extracted@lensitbiases-main@lensitbiases@tests@__init__.py@.PATH_END.py
{ "filename": "test_fitting_kernels_are_frozen.py", "repo_name": "ArgonneCPAC/diffstar", "repo_path": "diffstar_extracted/diffstar-main/diffstar/fitting_helpers/tests/test_fitting_kernels_are_frozen.py", "type": "Python" }
"""Unit tests enforcing that the behavior of Diffstar on the default params is frozen. """ import os import numpy as np from diffmah.defaults import DEFAULT_MAH_PARAMS, MAH_K from diffmah.individual_halo_assembly import _calc_halo_history from jax import numpy as jnp from ...defaults import DEFAULT_U_MS_PARAMS, DEFAU...
ArgonneCPACREPO_NAMEdiffstarPATH_START.@diffstar_extracted@diffstar-main@diffstar@fitting_helpers@tests@test_fitting_kernels_are_frozen.py@.PATH_END.py
{ "filename": "checkpoint_view.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/checkpoint/checkpoint_view.py", "type": "Python" }
"""Manages a Checkpoint View.""" # 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...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@checkpoint@checkpoint_view.py@.PATH_END.py
{ "filename": "utilities.py", "repo_name": "benrendle/AIMS", "repo_path": "AIMS_extracted/AIMS-master/AIMS-Py35/utilities.py", "type": "Python" }
#!/usr/bin/env python # coding: utf-8 # $Id: utilities.py # Author: Daniel R. Reese <daniel.reese@obspm.fr> # Copyright (C) Daniel R. Reese and contributors # Copyright license: GNU GPL v3.0 # # AIMS is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
benrendleREPO_NAMEAIMSPATH_START.@AIMS_extracted@AIMS-master@AIMS-Py35@utilities.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "ExObsSim/ExoRad2-public", "repo_path": "ExoRad2-public_extracted/ExoRad2-public-master/exorad/models/optics/__init__.py", "type": "Python" }
ExObsSimREPO_NAMEExoRad2-publicPATH_START.@ExoRad2-public_extracted@ExoRad2-public-master@exorad@models@optics@__init__.py@.PATH_END.py
{ "filename": "problem_setup.py", "repo_name": "dullemond/radmc3d-2.0", "repo_path": "radmc3d-2.0_extracted/radmc3d-2.0-master/examples/run_ppdisk_simple_2/problem_setup.py", "type": "Python" }
# # Import NumPy for array handling # import numpy as np # # Some natural constants # au = 1.49598e13 # Astronomical Unit [cm] pc = 3.08572e18 # Parsec [cm] ms = 1.98892e33 # Solar mass [g] ts = 5.78e3 # Solar temperature [K] ls = 3.8525e33 # Solar...
dullemondREPO_NAMEradmc3d-2.0PATH_START.@radmc3d-2.0_extracted@radmc3d-2.0-master@examples@run_ppdisk_simple_2@problem_setup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/parcoords/line/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._showscale import ShowscaleValidator from ._reversescale import ReversescaleValidator from ._colorsrc import ColorsrcValidator from ._colorscale import ColorscaleValidator from ._colorbar import ColorbarValidator from ._coloraxis import ColoraxisVa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@parcoords@line@__init__.py@.PATH_END.py
{ "filename": "fitters.py", "repo_name": "JohannesBuchner/BXA", "repo_path": "BXA_extracted/BXA-master/bxa/sherpa/background/fitters.py", "type": "Python" }
from __future__ import print_function """ Lets try something simpler. Background model has stages SingleFitter goes through stages and fits each with chi^2, then cstat MultiFitter fits first one with SingleFitter, then goes through all the others by setting the parameter values to those of the previous id and then fi...
JohannesBuchnerREPO_NAMEBXAPATH_START.@BXA_extracted@BXA-master@bxa@sherpa@background@fitters.py@.PATH_END.py
{ "filename": "X-rays.py", "repo_name": "cweniger/swordfish", "repo_path": "swordfish_extracted/swordfish-master/Examples/X-rays.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import swordfish as sf import scipy.sparse.linalg as la import pylab as plt import harpix as hp import scipy.sparse as sp import healpy from operator import mul def halo(): """A single-halo & single-Ebin example. Scenario: 3.5 keV line and Pers...
cwenigerREPO_NAMEswordfishPATH_START.@swordfish_extracted@swordfish-master@Examples@X-rays.py@.PATH_END.py
{ "filename": "redcal_inspect_2458149.ipynb", "repo_name": "HERA-Team/H1C_IDR3_Notebooks", "repo_path": "H1C_IDR3_Notebooks-main/redcal_inspect/redcal_inspect_2458149.ipynb", "type": "Jupyter Notebook" }
# Stage 2 Redundant Calibration Nightly Notebook **Josh Dillon**, Last Revised 7/30/20 ```python import numpy as np import matplotlib.pyplot as plt import matplotlib from hera_cal import io, redcal, apply_cal from hera_qm.metrics_io import load_metric_file import glob import os from copy import deepcopy import inspe...
HERA-TeamREPO_NAMEH1C_IDR3_NotebooksPATH_START.@H1C_IDR3_Notebooks-main@redcal_inspect@redcal_inspect_2458149.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/nannyml/io/db/__init__.py", "type": "Python" }
# Author: Niels Nuyttens <niels@nannyml.com> # # # License: Apache Software License 2.0 """This package implements writing Results to a database. The result objects are converted into a more time-series like format using a `Mapper`. Every calculator and estimator has a corresponding table where the results will...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@nannyml@io@db@__init__.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/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="barpolar.marker.colorbar.title.font", **kwargs, ): super(TextcaseValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@title@font@_textcase.py@.PATH_END.py
{ "filename": "PolySineAmpModel.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/PolySineAmpModel.py", "type": "Python" }
import numpy as numpy import math from . import Tools from .Tools import setAttribute as setatt from .LinearModel import LinearModel from .PolynomialModel import PolynomialModel __author__ = "Do Kester" __year__ = 2020 __license__ = "GPL3" __version__ = "2.5.3" __url__ = "https://www.bayesicfitting.nl" __status__ = "P...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@PolySineAmpModel.py@.PATH_END.py
{ "filename": "HOD_library.py", "repo_name": "franciscovillaescusa/Pylians", "repo_path": "Pylians_extracted/Pylians-master/library/HOD_library.py", "type": "Python" }
import numpy as np import readsnap import readsubf import sys import time import random ############################################################################### #this function returns an array containing the positions of the galaxies (kpc/h) #in the catalogue according to the fiducial density, M1 and alpha #CDM...
franciscovillaescusaREPO_NAMEPyliansPATH_START.@Pylians_extracted@Pylians-master@library@HOD_library.py@.PATH_END.py
{ "filename": "test_beam_model.py", "repo_name": "rasg-affiliates/healvis", "repo_path": "healvis_extracted/healvis-master/healvis/tests/test_beam_model.py", "type": "Python" }
# -*- mode: python; coding: utf-8 -* # Copyright (c) 2019 Radio Astronomy Software Group # Licensed under the 3-clause BSD License import numpy as np from astropy_healpix import healpy as hp import os import copy from astropy.cosmology import WMAP9 from pyuvdata import UVBeam from healvis import beam_model from healv...
rasg-affiliatesREPO_NAMEhealvisPATH_START.@healvis_extracted@healvis-master@healvis@tests@test_beam_model.py@.PATH_END.py
{ "filename": "panco.py", "repo_name": "fkeruzore/panco2", "repo_path": "panco2_extracted/panco2-main/panco2/old/panco.py", "type": "Python" }
#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt import astropy.units as u from astropy.io import fits from astropy.wcs import WCS from astropy.nddata import Cutout2D from astropy.coordinates import SkyCoord import emcee from iminuit import Minuit import sys import os import shutil import json ...
fkeruzoreREPO_NAMEpanco2PATH_START.@panco2_extracted@panco2-main@panco2@old@panco.py@.PATH_END.py
{ "filename": "demo_IRR_assets.py", "repo_name": "projectchrono/chrono", "repo_path": "chrono_extracted/chrono-main/src/demos/python/irrlicht/demo_IRR_assets.py", "type": "Python" }
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
projectchronoREPO_NAMEchronoPATH_START.@chrono_extracted@chrono-main@src@demos@python@irrlicht@demo_IRR_assets.py@.PATH_END.py
{ "filename": "MWATilemodel2hpm.py", "repo_name": "dannyjacobs/ECHO", "repo_path": "ECHO_extracted/ECHO-master/scripts/old/MWATilemodel2hpm.py", "type": "Python" }
from mwapy.pb import primary_beam import optparse,sys import healpy as hp import numpy as np def dB(x): #for converting power to dB return 10*np.log10(x) def dB20(x): #for converting V/m to dB return 20*np.log10(x) o = optparse.OptionParser() o.set_description('read in the latest mwa beam model and o...
dannyjacobsREPO_NAMEECHOPATH_START.@ECHO_extracted@ECHO-master@scripts@old@MWATilemodel2hpm.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/histogram2dcontour/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plo...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@histogram2dcontour@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "BaseModel.py", "repo_name": "dokester/BayesicFitting", "repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/BaseModel.py", "type": "Python" }
import numpy as numpy from astropy import units import re import warnings from . import Tools from .Tools import setAttribute as setatt from .Prior import Prior from .UniformPrior import UniformPrior __author__ = "Do Kester" __year__ = 2024 __license__ = "GPL3" __version__ = "3.2.1" __url__ = "https://www.bayesicfitt...
dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@BaseModel.py@.PATH_END.py
{ "filename": "computeCRKSPHIntegralInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/CRKSPH/computeCRKSPHIntegralInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "CRKSPH/computeCRKSPHIntegral.cc" namespace Spheral { template std::pair<Dim<...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@CRKSPH@computeCRKSPHIntegralInst.cc.py@.PATH_END.py
{ "filename": "synthetic_spectrum_example.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/examples/synthetic_spectrum_example.py", "type": "Python" }
import numpy as np import itertools import pyspeckit import scipy.stats import pylab as pl pl.close('all') pl.figure(1).clf() xaxis = np.linspace(-50.,150.,100) sigma = 10. center = 50. synth_data = np.exp(-(xaxis-center)**2/(sigma**2 * 2.)) # Add noise stddev = 0.1 noise = np.random.randn(xaxis.size)*stddev error =...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@examples@synthetic_spectrum_example.py@.PATH_END.py
{ "filename": "mytests.py", "repo_name": "GRTLCollaboration/engrenage", "repo_path": "engrenage_extracted/engrenage-main/source/mytests.py", "type": "Python" }
# mytests.py # File providing test data for the tests - these are solutions where the curvature quantities are known # so provide a test that everything is working ok import numpy as np from source.grid import Grid from source.uservariables import * from source.tensoralgebra import * # This routine gives us somet...
GRTLCollaborationREPO_NAMEengrenagePATH_START.@engrenage_extracted@engrenage-main@source@mytests.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "rychallener/ThERESA", "repo_path": "ThERESA_extracted/ThERESA-master/doc/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
rychallenerREPO_NAMEThERESAPATH_START.@ThERESA_extracted@ThERESA-master@doc@conf.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/layout/smith/realaxis/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._visible import VisibleValidator from ._tickwidth import TickwidthValidator from ._tickvalssrc import TickvalssrcValidator from ._tickvals import TickvalsValidator from ._ticksuffix import TicksuffixVal...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@smith@realaxis@__init__.py@.PATH_END.py
{ "filename": "_idssrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/contourcarpet/_idssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="contourcarpet", **kwargs): super(IdssrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@contourcarpet@_idssrc.py@.PATH_END.py
{ "filename": "analysis.py", "repo_name": "PynPoint/PynPoint", "repo_path": "PynPoint_extracted/PynPoint-main/pynpoint/util/analysis.py", "type": "Python" }
""" Functions for point source analysis. """ import math from typing import Optional, Tuple import numpy as np from typeguard import typechecked from scipy.stats import t from scipy.ndimage import gaussian_filter from skimage.feature import hessian_matrix from photutils.aperture import aperture_photometry, Circular...
PynPointREPO_NAMEPynPointPATH_START.@PynPoint_extracted@PynPoint-main@pynpoint@util@analysis.py@.PATH_END.py
{ "filename": "_colorscale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/histogram/marker/_colorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="histogram.marker", **kwargs ): super(ColorscaleValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@histogram@marker@_colorscale.py@.PATH_END.py
{ "filename": "canyon_decimation.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/docs/source/mayavi/auto/canyon_decimation.py", "type": "Python" }
""" Use the greedy-terrain-decimator to display a decimated terrain view. This example illustrates decimating a terrain. We use the greedy-terrain-decimator to create a reduced mesh with an optimized grid that approximates the initial regular grid. The initial grid is displayed in white, and the optimized grid is dis...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@docs@source@mayavi@auto@canyon_decimation.py@.PATH_END.py
{ "filename": "_showlegend.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/_showlegend.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scatterpolar", **kwargs): super(ShowlegendValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@_showlegend.py@.PATH_END.py
{ "filename": "cm_region.py", "repo_name": "HERA-Team/hera_mc", "repo_path": "hera_mc_extracted/hera_mc-main/scripts/cm_region.py", "type": "Python" }
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2016 the HERA Collaboration # Licensed under the 2-clause BSD license. """ Script to check region(s) of a list of antenna(s). """ import argparse from hera_mc import geo_sysdef parser = argparse.ArgumentParser() parser.add_argument("ants", hel...
HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@scripts@cm_region.py@.PATH_END.py
{ "filename": "_label.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcats/dimension/_label.py", "type": "Python" }
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="label", parent_name="parcats.dimension", **kwargs): super(LabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcats@dimension@_label.py@.PATH_END.py
{ "filename": "Neural_Network_and_Data_Loading.ipynb", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/docs/notebooks/Neural_Network_and_Data_Loading.ipynb", "type": "Jupyter Notebook" }
# Training a simple neural network, with PyTorch data loading <!--* freshness: { reviewed: '2024-05-03' } *--> [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/jax-ml/jax/blob/main/docs/notebooks/Neural_Network_and_Data_Loading.ipynb) [![Open in Kag...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@notebooks@Neural_Network_and_Data_Loading.ipynb@.PATH_END.py
{ "filename": "hist_plot.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/plot_types/stats/hist_plot.py", "type": "Python" }
""" ======= hist(x) ======= Compute and plot a histogram. See `~matplotlib.axes.Axes.hist`. """ import matplotlib.pyplot as plt import numpy as np plt.style.use('_mpl-gallery') # make data np.random.seed(1) x = 4 + np.random.normal(0, 1.5, 200) # plot: fig, ax = plt.subplots() ax.hist(x, bins=8, linewidth=0.5, edg...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@plot_types@stats@hist_plot.py@.PATH_END.py
{ "filename": "mpi_test.py", "repo_name": "rmjarvis/TreeCorr", "repo_path": "TreeCorr_extracted/TreeCorr-main/tests/mpi_test.py", "type": "Python" }
# Copyright (c) 2003-2024 by Mike Jarvis # # TreeCorr is free software: redistribution and use in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condi...
rmjarvisREPO_NAMETreeCorrPATH_START.@TreeCorr_extracted@TreeCorr-main@tests@mpi_test.py@.PATH_END.py
{ "filename": "stratsi_maxvshear.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/stratsi_maxvshear.py", "type": "Python" }
import numpy as np import scipy.optimize delta = 1e-6 stokes= 0.01 hd = np.sqrt(delta/(stokes+delta)) metal = 0.03 dgmid = metal/hd eta_hat=0.05 def func(x): return (x - 1)/(x + 1) - dgmid*np.exp(-x/2.0) def epsilon(z): return dgmid*np.exp(-stokes*z*z/(2.0*delta)) def depsilon(z): return -stokes...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@stratsi_maxvshear.py@.PATH_END.py
{ "filename": "mapping.py", "repo_name": "ratt-ru/QuartiCal", "repo_path": "QuartiCal_extracted/QuartiCal-main/quartical/calibration/mapping.py", "type": "Python" }
import dask.array as da import numpy as np import xarray from uuid import uuid4 def make_mapping_datasets(data_xds_list, chain): mapping_xds_list = [] for data_xds in data_xds_list: mappings = {} for gain_obj in chain: # Check whether we are dealing with BDA data. ...
ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@quartical@calibration@mapping.py@.PATH_END.py
{ "filename": "acscourseMountConsumer.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acscourse/ws/src/acscourseMountConsumer.py", "type": "Python" }
#!/usr/bin/env python # @(#) $Id: acscourseMountConsumer.py,v 1.4 2005/07/04 16:51:58 dfugate Exp $ #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acscourse@ws@src@acscourseMountConsumer.py@.PATH_END.py
{ "filename": "_yanchor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py", "type": "Python" }
import _plotly_utils.basevalidators class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): super(YanchorValidator, self).__init__( plotly...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@marker@colorbar@_yanchor.py@.PATH_END.py
{ "filename": "plot.py", "repo_name": "AstroUGent/shadowfax", "repo_path": "shadowfax_extracted/shadowfax-master/rundir/testsuite/vacuum/plot.py", "type": "Python" }
################################################################################ # This file is part of Shadowfax # Copyright (C) 2015 Bert Vandenbroucke (bert.vandenbroucke@gmail.com) # # Shadowfax is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as ...
AstroUGentREPO_NAMEshadowfaxPATH_START.@shadowfax_extracted@shadowfax-master@rundir@testsuite@vacuum@plot.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "AOtools/aotools", "repo_path": "aotools_extracted/aotools-main/aotools/__init__.py", "type": "Python" }
from . import astronomy, functions, image_processing, wfs, turbulence, opticalpropagation from .astronomy import * from .functions import * from .fouriertransform import * from .interpolation import * from .turbulence import * from .image_processing import * from ._version import get_versions __version__ = get_versio...
AOtoolsREPO_NAMEaotoolsPATH_START.@aotools_extracted@aotools-main@aotools@__init__.py@.PATH_END.py
{ "filename": "chunkstore_s3.py", "repo_name": "ska-sa/katdal", "repo_path": "katdal_extracted/katdal-master/katdal/chunkstore_s3.py", "type": "Python" }
################################################################################ # Copyright (c) 2017-2023, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at # # ...
ska-saREPO_NAMEkatdalPATH_START.@katdal_extracted@katdal-master@katdal@chunkstore_s3.py@.PATH_END.py
{ "filename": "Units.ipynb", "repo_name": "hannorein/REBOUND", "repo_path": "REBOUND_extracted/REBOUND-main/ipython_examples/Units.ipynb", "type": "Jupyter Notebook" }
# Unit convenience functions For convenience, REBOUND offers simple functionality for converting units. One implicitly sets the units for the simulation through the values used for the initial conditions, but one has to set the appropriate value for the gravitational constant `G`, and sometimes it is convenient to ge...
hannoreinREPO_NAMEREBOUNDPATH_START.@REBOUND_extracted@REBOUND-main@ipython_examples@Units.ipynb@.PATH_END.py
{ "filename": "invert.py", "repo_name": "j0r1/GRALE2", "repo_path": "GRALE2_extracted/GRALE2-master/inversion_examples/example6/invert.py", "type": "Python" }
from grale.constants import * import grale.inversion as inversion import grale.renderers as renderers import grale.plotutil as plotutil from grale.cosmology import Cosmology import grale.images as images import numpy as np # Write the RNG state, in case we want to reproduce the run exactly # (note that the GRALE_DEBUG...
j0r1REPO_NAMEGRALE2PATH_START.@GRALE2_extracted@GRALE2-master@inversion_examples@example6@invert.py@.PATH_END.py
{ "filename": "_font.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "sunburst.marker.colorbar.title" _path_str = "sunburst.marker.colorbar.title.font" _valid_props...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@sunburst@marker@colorbar@title@_font.py@.PATH_END.py
{ "filename": "faceted_histogram.py", "repo_name": "mwaskom/seaborn", "repo_path": "seaborn_extracted/seaborn-master/examples/faceted_histogram.py", "type": "Python" }
""" Facetting histograms by subsets of data ======================================= _thumb: .33, .57 """ import seaborn as sns sns.set_theme(style="darkgrid") df = sns.load_dataset("penguins") sns.displot( df, x="flipper_length_mm", col="species", row="sex", binwidth=3, height=3, facet_kws=dict(margin_titles=...
mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@examples@faceted_histogram.py@.PATH_END.py
{ "filename": "config.py", "repo_name": "ivkram/specvizitor", "repo_path": "specvizitor_extracted/specvizitor-main/specvizitor/config/config.py", "type": "Python" }
from dataclasses import dataclass, field from typing import Any from ..utils.params import Params @dataclass class Catalogue: filename: str | None = None translate: dict[str, list[str]] = field(default_factory=dict) @dataclass class Image: filename: str wcs_source: str | None = None loader: str...
ivkramREPO_NAMEspecvizitorPATH_START.@specvizitor_extracted@specvizitor-main@specvizitor@config@config.py@.PATH_END.py
{ "filename": "test_mpl_imshow.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/io/tests/test_mpl_imshow.py", "type": "Python" }
import numpy as np import pytest from skimage import io from skimage._shared._warnings import expected_warnings from skimage._shared._dependency_checks import is_wasm plt = pytest.importorskip("matplotlib.pyplot") if plt: plt.switch_backend("Agg") @pytest.fixture(autouse=True) def _reset_plugins(): io.rese...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@io@tests@test_mpl_imshow.py@.PATH_END.py
{ "filename": "_ellip_harm.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/special/_ellip_harm.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import threading import numpy as np from ._ufuncs import _ellip_harm from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm def ellip_harm(h2, k2, n, p, s, signm=1, signn=1): r""" Ellipsoidal harmonic functions E^p_n(l) These are also kno...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@special@_ellip_harm.py@.PATH_END.py
{ "filename": "logprobs.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/how_to/logprobs.ipynb", "type": "Jupyter Notebook" }
# How to get log probabilities :::info Prerequisites This guide assumes familiarity with the following concepts: - [Chat models](/docs/concepts/chat_models) - [Tokens](/docs/concepts/tokens) ::: Certain [chat models](/docs/concepts/chat_models/) can be configured to return token-level log probabilities representing...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@how_to@logprobs.ipynb@.PATH_END.py
{ "filename": "conf.py", "repo_name": "sibirrer/AstroObjectAnalyser", "repo_path": "AstroObjectAnalyser_extracted/AstroObjectAnalyser-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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. # # ...
sibirrerREPO_NAMEAstroObjectAnalyserPATH_START.@AstroObjectAnalyser_extracted@AstroObjectAnalyser-master@docs@conf.py@.PATH_END.py
{ "filename": "line_identify_simple.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/igrins/procedures/line_identify_simple.py", "type": "Python" }
import numpy as np import itertools from scipy.interpolate import interp1d import scipy.spatial as spatial import operator import json import os def match_lines1_pixel(cent_list, ref_pix_list): """ """ if len(cent_list): # find nearest matches kdtree = spatial.KDTree(cent_list.reshape([...
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@procedures@line_identify_simple.py@.PATH_END.py
{ "filename": "detector.py", "repo_name": "gwastro/pycbc", "repo_path": "pycbc_extracted/pycbc-master/pycbc/detector.py", "type": "Python" }
# -*- coding: UTF-8 -*- # Copyright (C) 2012 Alex Nitz # # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This pr...
gwastroREPO_NAMEpycbcPATH_START.@pycbc_extracted@pycbc-master@pycbc@detector.py@.PATH_END.py
{ "filename": "pysimple.py", "repo_name": "Trovemaster/TROVE", "repo_path": "TROVE_extracted/TROVE-master/wigxjpf-1.5/example/pysimple.py", "type": "Python" }
#!/usr/bin/python # # Copyright 2015 Christian Forssen # # This file is part of WIGXJPF. # # WIGXJPF is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
TrovemasterREPO_NAMETROVEPATH_START.@TROVE_extracted@TROVE-master@wigxjpf-1.5@example@pysimple.py@.PATH_END.py
{ "filename": "converter.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/plotting/_matplotlib/converter.py", "type": "Python" }
from __future__ import annotations import contextlib import datetime as pydt from datetime import ( datetime, tzinfo, ) import functools from typing import ( TYPE_CHECKING, Any, cast, ) import warnings import matplotlib as mpl import matplotlib.dates as mdates import matplotlib.units as munits imp...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@plotting@_matplotlib@converter.py@.PATH_END.py
{ "filename": "test_spectral.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/sklearn/cluster/tests/test_spectral.py", "type": "Python" }
"""Testing for Spectral Clustering methods""" import pickle import re import numpy as np import pytest from scipy.linalg import LinAlgError from sklearn.cluster import SpectralClustering, spectral_clustering from sklearn.cluster._spectral import cluster_qr, discretize from sklearn.datasets import make_blobs from skl...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@sklearn@cluster@tests@test_spectral.py@.PATH_END.py
{ "filename": "masksmodels.py", "repo_name": "jtschindler/sculptor", "repo_path": "sculptor_extracted/sculptor-main/sculptor/masksmodels.py", "type": "Python" }
#!/usr/bin/env python import os import glob import importlib import numpy as np import pkg_resources from astropy import constants as const from lmfit import Model, Parameters c_km_s = const.c.to('km/s').value # ------------------------------------------------------------------------------ # Model functions # -----...
jtschindlerREPO_NAMEsculptorPATH_START.@sculptor_extracted@sculptor-main@sculptor@masksmodels.py@.PATH_END.py
{ "filename": "transform.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/library/transform.py", "type": "Python" }
# Copyright(c) 2018-2020 Association of Universities for Research in Astronomy, Inc. # """ transform.py This module contains classes related to the geometric transformation of arrays and AstroData objects. Classes: Block: a container for array-like objects that are adjacent to each other and so much be...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@library@transform.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnel/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._showscale import ShowscaleValidator from ._reversescale import ReversescaleValidator from ._opacitysrc import OpacitysrcValidator from ._opacity import OpacityValidator from ._line import LineValidator...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnel@marker@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "s-ilic/ECLAIR", "repo_path": "ECLAIR_extracted/ECLAIR-master/likelihoods/CMB/Planck/PR4/hillipop_TT/__init__.py", "type": "Python" }
import glob import logging import os import re from itertools import combinations from typing import Optional import astropy.io.fits as fits import numpy as np from . import foregrounds as fg from . import tools ############################# ### First initialisations ### ############################# planck_pr4_ro...
s-ilicREPO_NAMEECLAIRPATH_START.@ECLAIR_extracted@ECLAIR-master@likelihoods@CMB@Planck@PR4@hillipop_TT@__init__.py@.PATH_END.py
{ "filename": "RedClump_GSP-Spec_SF.ipynb", "repo_name": "gaia-unlimited/gaiaunlimited", "repo_path": "gaiaunlimited_extracted/gaiaunlimited-main/docs/notebooks/RedClump_GSP-Spec_SF.ipynb", "type": "Jupyter Notebook" }
# 🔴 Selecting red clump stars from Gaia DR3 with good GSP-Spec abundances We start with this query, which selects stars whose location in a colour-absolute magnitude diagram (not corrected for extinction) is within 0.4 mag of the fiducial line corresponding to the red clump: ```sql select * from ( select ra,...
gaia-unlimitedREPO_NAMEgaiaunlimitedPATH_START.@gaiaunlimited_extracted@gaiaunlimited-main@docs@notebooks@RedClump_GSP-Spec_SF.ipynb@.PATH_END.py