metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatterpolar/_marker.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.marker" _valid_props = { "angle", "a...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatterpolar@_marker.py@.PATH_END.py
{ "filename": "test_datacontainer.py", "repo_name": "HERA-Team/hera_cal", "repo_path": "hera_cal_extracted/hera_cal-main/hera_cal/tests/test_datacontainer.py", "type": "Python" }
# -*- coding: utf-8 -*- # Copyright 2019 the HERA Project # Licensed under the MIT License import pytest import numpy as np import os from copy import deepcopy from hera_sim.antpos import hex_array from .. import abscal, datacontainer, io, redcal from ..data import DATA_PATH from ..utils import reverse_bl @pytest.m...
HERA-TeamREPO_NAMEhera_calPATH_START.@hera_cal_extracted@hera_cal-main@hera_cal@tests@test_datacontainer.py@.PATH_END.py
{ "filename": "_ids.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/_ids.py", "type": "Python" }
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="waterfall", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@_ids.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "andreicuceu/vega", "repo_path": "vega_extracted/vega-master/vega/parameters/__init__.py", "type": "Python" }
andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@vega@parameters@__init__.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/cassandra_database/tool.py", "type": "Python" }
"""Tools for interacting with an Apache Cassandra database.""" from __future__ import annotations import traceback from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Type, Union from langchain_core.callbacks import CallbackManagerForToolRun from langchain_core.tools import BaseTool from pydantic import...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@cassandra_database@tool.py@.PATH_END.py
{ "filename": "_templateitemname.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py", "type": "Python" }
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): super(TemplateitemnameValidator, self...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@funnel@marker@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/decreasing/marker/line/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._width import WidthValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._width.Wi...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@decreasing@marker@line@__init__.py@.PATH_END.py
{ "filename": "pandexo.py", "repo_name": "natashabatalha/PandExo", "repo_path": "PandExo_extracted/PandExo-master/pandexo/engine/pandexo.py", "type": "Python" }
def wrapper(dictinput, verbose=False): """Tpo level function to call either jwst, hst, wfirst Top level function which calls either jwst, hst or wfirst noise simulation. Parameters ---------- dictinput : dictionary containing instrument parameters and exoplanet specific ...
natashabatalhaREPO_NAMEPandExoPATH_START.@PandExo_extracted@PandExo-master@pandexo@engine@pandexo.py@.PATH_END.py
{ "filename": "get_flat_field.py", "repo_name": "Exo-TiC/ExoTiC-JEDI", "repo_path": "ExoTiC-JEDI_extracted/ExoTiC-JEDI-master/exotic_jedi/stage_2/get_flat_field.py", "type": "Python" }
import os import shutil import numpy as np from astropy.io import fits from jwst import datamodels from jwst.stpipe import Step from jwst.pipeline.calwebb_spec2 import flat_field_step class FlatFieldStep(Step): """ Get flat field step. This steps enables the user to get and save flat field data. """ ...
Exo-TiCREPO_NAMEExoTiC-JEDIPATH_START.@ExoTiC-JEDI_extracted@ExoTiC-JEDI-master@exotic_jedi@stage_2@get_flat_field.py@.PATH_END.py
{ "filename": "visualization_jupyter-notebook.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/features/visualization_jupyter-notebook.md", "type": "Markdown" }
# Jupyter Notebook [Additional packages for data visualization support](../installation/python-installation-additional-data-visualization-packages.md) must be installed to plot charts in [Jupyter Notebook](http://jupyter.org/). {% note info %} CatBoost widgets do work in JupyterLab but only for versions 3.x, version...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@features@visualization_jupyter-notebook.md@.PATH_END.py
{ "filename": "plot_Fig7.py", "repo_name": "ja-vazquez/SimpleMC", "repo_path": "SimpleMC_extracted/SimpleMC-master/simplemc/plots/plot_Fig7.py", "type": "Python" }
#!/usr/bin/env python # Error bars mainly got them from # table 3 at # http://arxiv.org/pdf/1108.2635v1.pdf from RunBase import * import matplotlib.pyplot as plt import matplotlib.ticker import pylab import math as N plaw = 0.5 params1 = {'backend': 'pdf', 'axes.labelsize': 30, 'text.fontsize'...
ja-vazquezREPO_NAMESimpleMCPATH_START.@SimpleMC_extracted@SimpleMC-master@simplemc@plots@plot_Fig7.py@.PATH_END.py
{ "filename": "do_llh_outFoV4realtime2.py", "repo_name": "Swift-BAT/NITRATES", "repo_path": "NITRATES_extracted/NITRATES-main/nitrates/llh_analysis/do_llh_outFoV4realtime2.py", "type": "Python" }
import numpy as np from astropy.io import fits from astropy.table import Table from astropy.wcs import WCS import os import argparse import logging, traceback import time import pandas as pd import gc from copy import copy, deepcopy from ..analysis_seeds.bkg_rate_estimation import rate_obj_from_sqltab from ..lib.sqlit...
Swift-BATREPO_NAMENITRATESPATH_START.@NITRATES_extracted@NITRATES-main@nitrates@llh_analysis@do_llh_outFoV4realtime2.py@.PATH_END.py
{ "filename": "sku-110k.md", "repo_name": "ultralytics/ultralytics", "repo_path": "ultralytics_extracted/ultralytics-main/docs/en/datasets/detect/sku-110k.md", "type": "Markdown" }
--- comments: true description: Explore the SKU-110k dataset of densely packed retail shelf images, perfect for training and evaluating deep learning models in object detection tasks. keywords: SKU-110k, dataset, object detection, retail shelf images, deep learning, computer vision, model training --- # SKU-110k Datas...
ultralyticsREPO_NAMEultralyticsPATH_START.@ultralytics_extracted@ultralytics-main@docs@en@datasets@detect@sku-110k.md@.PATH_END.py
{ "filename": "scipy_signal_test.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/tests/scipy_signal_test.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@tests@scipy_signal_test.py@.PATH_END.py
{ "filename": "linear.py", "repo_name": "DeaglanBartlett/symbolic_pofk", "repo_path": "symbolic_pofk_extracted/symbolic_pofk-main/symbolic_pofk/linear.py", "type": "Python" }
import numpy as np import warnings import scipy.integrate from colossus.cosmology import cosmology def pk_EisensteinHu_zb(k, sigma8, Om, Ob, h, ns, use_colossus=False, integral_norm=True): """ Compute the Eisentein & Hu 1998 zero-baryon approximation to P(k) at z=0 Args: :k (np.ndarray): k values...
DeaglanBartlettREPO_NAMEsymbolic_pofkPATH_START.@symbolic_pofk_extracted@symbolic_pofk-main@symbolic_pofk@linear.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmapgl/colorbar/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="heatmapgl.colorbar", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent_name...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmapgl@colorbar@_bgcolor.py@.PATH_END.py
{ "filename": "main.py", "repo_name": "cdslaborg/paramonte", "repo_path": "paramonte_extracted/paramonte-main/benchmark/fortran/pm_arrayRefill/setRefilled_vs_direct/main.py", "type": "Python" }
#!/usr/bin/env python import matplotlib.pyplot as plt import pandas as pd import numpy as np fontsize = 14 methods = ["setRefilled", "direct"] df = pd.read_csv("main.out") #################################################################################################################################### #### Plot ...
cdslaborgREPO_NAMEparamontePATH_START.@paramonte_extracted@paramonte-main@benchmark@fortran@pm_arrayRefill@setRefilled_vs_direct@main.py@.PATH_END.py
{ "filename": "_autocolorscale.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattercarpet/marker/line/_autocolorscale.py", "type": "Python" }
import _plotly_utils.basevalidators class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattercarpet.marker.line", **kwargs, ): super(AutocolorscaleValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattercarpet@marker@line@_autocolorscale.py@.PATH_END.py
{ "filename": "search_inference.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/tutorial/source/search_inference.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ Inference algorithms and utilities used in the RSA example models. Adapted from: http://dippl.org/chapters/03-enumeration.html """ import collections import functools import queue import torch import pyro.distributions as d...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@tutorial@source@search_inference.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/src/axolotl/core/chat/__init__.py", "type": "Python" }
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@src@axolotl@core@chat@__init__.py@.PATH_END.py
{ "filename": "comparison_adult.ipynb", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/benchmarks/quality_benchmarks/notebooks/comparison_adult.ipynb", "type": "Jupyter Notebook" }
# Comparing algorithms on the Adult dataset The data is taken from [this source](https://archive.ics.uci.edu/ml/datasets/Adult). For details on running the comparison, see [this article](https://github.com/catboost/benchmarks/blob/master/comparison_description.pdf). ```python from experiment import Experiment from x...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@benchmarks@quality_benchmarks@notebooks@comparison_adult.ipynb@.PATH_END.py
{ "filename": "ollama.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/embeddings/ollama.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.embeddings import OllamaEmbeddings # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DE...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@embeddings@ollama.py@.PATH_END.py
{ "filename": "_token.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/ohlc/stream/_token.py", "type": "Python" }
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="token", parent_name="ohlc.stream", **kwargs): super(TokenValidator, 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@ohlc@stream@_token.py@.PATH_END.py
{ "filename": "conftest.py", "repo_name": "1313e/PRISM", "repo_path": "PRISM_extracted/PRISM-master/conftest.py", "type": "Python" }
# -*- coding: utf-8 -*- # %% IMPORTS # Package imports import matplotlib as mpl from py.path import local import _pytest import pytest # Set MPL backend mpl.use('Agg') # %% PYTEST CUSTOM CONFIGURATION PLUGINS # This makes the pytest report header mention the tested PRISM version def pytest_report_header(config): ...
1313eREPO_NAMEPRISMPATH_START.@PRISM_extracted@PRISM-master@conftest.py@.PATH_END.py
{ "filename": "_tick0.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterternary/marker/colorbar/_tick0.py", "type": "Python" }
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(Tick0Validator, self).__init__( plotly_name=plotly_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterternary@marker@colorbar@_tick0.py@.PATH_END.py
{ "filename": "prolog.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/prolog.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.prolog ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Prolog and Prolog-like languages. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups from pyg...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@prolog.py@.PATH_END.py
{ "filename": "_valueminus.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/histogram/error_x/_valueminus.py", "type": "Python" }
import _plotly_utils.basevalidators class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="histogram.error_x", **kwargs ): super(ValueminusValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@histogram@error_x@_valueminus.py@.PATH_END.py
{ "filename": "Hipparcos_IAD.ipynb", "repo_name": "sblunt/orbitize", "repo_path": "orbitize_extracted/orbitize-main/docs/tutorials/Hipparcos_IAD.ipynb", "type": "Jupyter Notebook" }
# Working with the Hipparcos Intermediate Astrometric Data (IAD) Sarah Blunt (2021) The Hipparcos IAD are notoriously annoying to work with, and several methods have been developed for incorporating them into orbit-fits. In this tutorial, we'll take you through the method outlined in [Nielsen et al. (2020)](https://...
sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@docs@tutorials@Hipparcos_IAD.ipynb@.PATH_END.py
{ "filename": "pyLIMA_example_4.py", "repo_name": "ebachelet/pyLIMA", "repo_path": "pyLIMA_extracted/pyLIMA-master/examples/pyLIMA_example_4.py", "type": "Python" }
''' Welcome to pyLIMA (v2) tutorial 4! In this tutorial you will learn how to code your own objective function to be optimised, instead of using the standard pyLIMA routines. For example, you might want to use SIMPLEX chi^2 minimization, instead of LM. In scipy.optimize the SIMPLEX method is called 'Nelder-Mead'. We w...
ebacheletREPO_NAMEpyLIMAPATH_START.@pyLIMA_extracted@pyLIMA-master@examples@pyLIMA_example_4.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scatterpolar/unselected/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.unselected.textfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plot...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scatterpolar@unselected@textfont@_color.py@.PATH_END.py
{ "filename": "StarClustersGaiaDR3.ipynb", "repo_name": "astro-datalab/notebooks-latest", "repo_path": "notebooks-latest_extracted/notebooks-latest-master/03_ScienceExamples/GalacticStructure/StarClustersGaiaDR3.ipynb", "type": "Jupyter Notebook" }
```python __nbid__ = '0017' __author__ = 'Leah Fulmer, Astro Data Lab Team <datalab@noirlab.edu>' __version__ = '20240603' # yyyymmdd __datasets__ = ['gaia_dr3'] __keywords__ = ['star clusters', 'stars', 'proper motions', 'parallax', 'plot:cmd', 'plot:quiver', 'plot:animation'] ``` # Visualizing Star Clusters in Gaia ...
astro-datalabREPO_NAMEnotebooks-latestPATH_START.@notebooks-latest_extracted@notebooks-latest-master@03_ScienceExamples@GalacticStructure@StarClustersGaiaDR3.ipynb@.PATH_END.py
{ "filename": "tinker13_components.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/empirical_models/occupation_models/tinker13_components.py", "type": "Python" }
""" This module contains occupation components used by the Tinker13 composite model. """ import numpy as np import math from scipy.special import erf from astropy.utils.misc import NumpyRNGContext from .occupation_model_template import OccupationComponent from .. import model_defaults, model_helpers from ..smhm_mode...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@empirical_models@occupation_models@tinker13_components.py@.PATH_END.py
{ "filename": "test_e2e.py", "repo_name": "maxpumperla/hyperas", "repo_path": "hyperas_extracted/hyperas-master/tests/test_e2e.py", "type": "Python" }
from __future__ import print_function from hyperopt import Trials, STATUS_OK, tpe from hyperas import optim from hyperas.distributions import choice, uniform from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import RMSprop from keras.datasets import mni...
maxpumperlaREPO_NAMEhyperasPATH_START.@hyperas_extracted@hyperas-master@tests@test_e2e.py@.PATH_END.py
{ "filename": "installation.md", "repo_name": "sterinaldi/figaro", "repo_path": "figaro_extracted/figaro-main/docs/source/installation.md", "type": "Markdown" }
# Installation You can install FIGARO either via pip (stable release, preferred) ``` pip install figaro ``` or from its source code (potentially unstable) ``` git clone git@github.com:sterinaldi/FIGARO.git cd FIGARO pip install . ``` ## Dependencies FIGARO has the following dependencies: ``` numpy > 1.22 scipy ma...
sterinaldiREPO_NAMEfigaroPATH_START.@figaro_extracted@figaro-main@docs@source@installation.md@.PATH_END.py
{ "filename": "_style.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/heatmap/hoverlabel/font/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="heatmap.hoverlabel.font", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, parent_...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@heatmap@hoverlabel@font@_style.py@.PATH_END.py
{ "filename": "BulkModulusPolicyInst.cc.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/Strength/BulkModulusPolicyInst.cc.py", "type": "Python" }
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Strength/BulkModulusPolicy.cc" #include "Geometry/Dimension.hh" namespace Spheral { template class BulkModu...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@Strength@BulkModulusPolicyInst.cc.py@.PATH_END.py
{ "filename": "gen_test_data.py", "repo_name": "dust-busters/DBNets", "repo_path": "DBNets_extracted/DBNets-main/test/gen_test_data.py", "type": "Python" }
import sys from unittest import result import keras import numpy as np import argparse from matplotlib import testing import matplotlib.pyplot as plt from tqdm import tqdm import pickle import tensorflow as tf # this makes the python files in ../training visible for import sys.path.append("../training") import models...
dust-bustersREPO_NAMEDBNetsPATH_START.@DBNets_extracted@DBNets-main@test@gen_test_data.py@.PATH_END.py
{ "filename": "prospector.py", "repo_name": "bd-j/prospector", "repo_path": "prospector_extracted/prospector-main/scripts/prospector.py", "type": "Python" }
#!/usr/local/bin/python import time, sys, os import numpy as np np.errstate(invalid='ignore') from prospect.models import model_setup from prospect.io import write_results from prospect import fitting from prospect.likelihood import lnlike_spec, lnlike_phot, write_log, chi_spec, chi_phot # -------------- # Read com...
bd-jREPO_NAMEprospectorPATH_START.@prospector_extracted@prospector-main@scripts@prospector.py@.PATH_END.py
{ "filename": "test_cpu_features.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/tests/test_cpu_features.py", "type": "Python" }
import sys, platform, re, pytest from numpy.core._multiarray_umath import ( __cpu_features__, __cpu_baseline__, __cpu_dispatch__, ) import numpy as np import subprocess import pathlib import os import re def assert_features_equal(actual, desired, fname): __tracebackhide__ = True # Hide traceback for p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@tests@test_cpu_features.py@.PATH_END.py
{ "filename": "example_hubble_table.py", "repo_name": "wullm/zwindstroom", "repo_path": "zwindstroom_extracted/zwindstroom-main/example_hubble_table.py", "type": "Python" }
from zwindstroom import * import numpy as np # The neutrino species M_nu = [0.06] # eV deg_nu = [1.0] # degeneracies N_nu = len(M_nu) # Initialise a unit system (default uses Mpc lengths and km/s velocities) unit_system, physical_consts = units.init_units() # We want to integrate the cosmological tables starting at ...
wullmREPO_NAMEzwindstroomPATH_START.@zwindstroom_extracted@zwindstroom-main@example_hubble_table.py@.PATH_END.py
{ "filename": "refine_prompts.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/chains/qa_with_sources/refine_prompts.py", "type": "Python" }
# flake8: noqa from langchain_core.prompts import PromptTemplate DEFAULT_REFINE_PROMPT_TMPL = ( "The original question is as follows: {question}\n" "We have provided an existing answer, including sources: {existing_answer}\n" "We have the opportunity to refine the existing answer" "(only if needed) wit...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@chains@qa_with_sources@refine_prompts.py@.PATH_END.py
{ "filename": "LICENSE.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/numpy/py3/numpy/core/src/npysort/x86-simd-sort/LICENSE.md", "type": "Markdown" }
BSD 3-Clause License Copyright (c) 2022, Intel. All rights reserved. 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 conditions and ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@numpy@py3@numpy@core@src@npysort@x86-simd-sort@LICENSE.md@.PATH_END.py
{ "filename": "test_baichuan.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/chat_models/test_baichuan.py", "type": "Python" }
from langchain_core.messages import AIMessage, HumanMessage from langchain_community.chat_models.baichuan import ChatBaichuan # For testing, run: # TEST_FILE=tests/integration_tests/chat_models/test_baichuan.py make test def test_chat_baichuan_default() -> None: chat = ChatBaichuan(streaming=True) # type: igno...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@chat_models@test_baichuan.py@.PATH_END.py
{ "filename": "ttv_basis_functions.py", "repo_name": "shadden/TTV2Fast2Furious", "repo_path": "TTV2Fast2Furious_extracted/TTV2Fast2Furious-master/ttv2fast2furious/ttv_basis_functions.py", "type": "Python" }
"""Routines for computing the basis functions used in the TTV linear model.""" import numpy as np from scipy.special import gammainc,gammaincinv from scipy.special import ellipk,ellipkinc,ellipe,ellipeinc import scipy.integrate as integrate import os from . import _clibttv2fast2furious from ctypes import c_double ###...
shaddenREPO_NAMETTV2Fast2FuriousPATH_START.@TTV2Fast2Furious_extracted@TTV2Fast2Furious-master@ttv2fast2furious@ttv_basis_functions.py@.PATH_END.py
{ "filename": "pointsource.py", "repo_name": "icecube/toise", "repo_path": "toise_extracted/toise-main/toise/pointsource.py", "type": "Python" }
import logging from copy import copy from functools import partial from io import StringIO import numpy as np from scipy import interpolate, optimize, stats from scipy.optimize import bisect from .multillh import asimov_llh, get_expectations from .util import * def is_zenith_weight(zenith_weight, aeff): zenith_...
icecubeREPO_NAMEtoisePATH_START.@toise_extracted@toise-main@toise@pointsource.py@.PATH_END.py
{ "filename": "sir.py", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/samplers/importance/sir.py", "type": "Python" }
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed # under the Apache License Version 2.0, see <https://www.apache.org/licenses/> from typing import Any, Callable import torch from torch import Tensor from tqdm.auto import tqdm from sbi.samplers.importance.importance_sampling impor...
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@samplers@importance@sir.py@.PATH_END.py
{ "filename": "picca_convert_transmission.py", "repo_name": "igmhub/picca", "repo_path": "picca_extracted/picca-master/bin/picca_convert_transmission.py", "type": "Python" }
#!/usr/bin/env python import argparse from picca import raw_io if __name__ == '__main__': parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='Script to convert noiseless transmission files to delta picca files') parser.add_argument('--object-cat...
igmhubREPO_NAMEpiccaPATH_START.@picca_extracted@picca-master@bin@picca_convert_transmission.py@.PATH_END.py
{ "filename": "export.md", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/docs/export/export.md", "type": "Markdown" }
<!--* freshness: { owner: "necula" reviewed: "2024-06-26" } *--> # Exporting and serializing staged-out computations The {ref}`ahead-of-time-lowering` APIs produce objects that can be used for debugging or for compilation and execution in the same process. Sometimes you want to serialize a lowered JAX function for co...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@docs@export@export.md@.PATH_END.py
{ "filename": "specviz_jwebbinar24.ipynb", "repo_name": "spacetelescope/jwebbinar_prep", "repo_path": "jwebbinar_prep_extracted/jwebbinar_prep-main/jdaviz_2023/specviz_jwebbinar24.ipynb", "type": "Jupyter Notebook" }
### The PI for this data is Klaus M. Pontoppidan and the Program ID is 02736. # The section below shows what the notebook looks like when it is downloaded from MAST # Jdaviz Notebook This is an auto-generated Jupyter notebook to access the JWST file(s) **jw02736-o007_s09239_nirspec_f170lp-g235m_x1d.fits** using th...
spacetelescopeREPO_NAMEjwebbinar_prepPATH_START.@jwebbinar_prep_extracted@jwebbinar_prep-main@jdaviz_2023@specviz_jwebbinar24.ipynb@.PATH_END.py
{ "filename": "_tickformat.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/funnel/marker/colorbar/_tickformat.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="funnel.marker.colorbar", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@funnel@marker@colorbar@_tickformat.py@.PATH_END.py
{ "filename": "bh.py", "repo_name": "AFD-Illinois/ebhlight", "repo_path": "ebhlight_extracted/ebhlight-master/script/machine/bh.py", "type": "Python" }
################################################################################ # # # MACHINE-SPECIFIC FUNCTIONS # # ...
AFD-IllinoisREPO_NAMEebhlightPATH_START.@ebhlight_extracted@ebhlight-master@script@machine@bh.py@.PATH_END.py
{ "filename": "ModSum.py", "repo_name": "sirocco-rt/sirocco", "repo_path": "sirocco_extracted/sirocco-main/py_progs/ModSum.py", "type": "Python" }
#!/usr/bin/env python # coding: utf-8 ''' Create a summary of the differences between various .pf files in a directory Command line usage (if any): usage: ModSum.py Description: This routine simply looks at all of the .pf files in the current working directory and constructs a summary of the ru...
sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@py_progs@ModSum.py@.PATH_END.py
{ "filename": "Tateno_2019.py", "repo_name": "geodynamics/burnman", "repo_path": "burnman_extracted/burnman-main/burnman/calibrants/Tateno_2019.py", "type": "Python" }
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for # the Earth and Planetary Sciences # Copyright (C) 2012 - 2024 by the BurnMan team, released under the GNU # GPL v2 or later. from burnman.eos.vinet import Vinet from burnman.eos.mie_grueneisen_debye import MGDBase from burnman.classes.cali...
geodynamicsREPO_NAMEburnmanPATH_START.@burnman_extracted@burnman-main@burnman@calibrants@Tateno_2019.py@.PATH_END.py
{ "filename": "prepare_data.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/barry/data/desi_mock_challenge_post_recon_stage_2/prepare_data.py", "type": "Python" }
import pickle import pandas as pd import numpy as np import os def getxi(loc): df = pd.read_csv(loc, comment="#", skiprows=0, delim_whitespace=True, names=["s", "xi0", "xi2", "xi4"], header=None) mask = df["s"] <= 200.0 masked = df.loc[mask, ["s", "xi0", "xi2", "xi4"]] return masked.astype(np.float32)...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@data@desi_mock_challenge_post_recon_stage_2@prepare_data.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/io/matlab/tests/__init__.py", "type": "Python" }
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@io@matlab@tests@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/ares/inference/__init__.py", "type": "Python" }
from ares.inference.ModelFit import ModelFit from ares.inference.ModelGrid import ModelGrid from ares.inference.ModelSample import ModelSample from ares.inference.FitGlobal21cm import FitGlobal21cm #from ares.inference.ModelEmulator import ModelEmulator from ares.inference.CalibrateModel import CalibrateModel #from are...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@ares@inference@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "HajimeKawahara/sot", "repo_path": "sot_extracted/sot-master/src/sot/sotplot/__init__.py", "type": "Python" }
__all__ = [] __version__ = "1.0" __uri__ = "" __author__ = "sot" __email__ = "" __license__ = "" __description__ = ""
HajimeKawaharaREPO_NAMEsotPATH_START.@sot_extracted@sot-master@src@sot@sotplot@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "OpenAccess-AI-Collective/axolotl", "repo_path": "axolotl_extracted/axolotl-main/tests/core/chat/__init__.py", "type": "Python" }
OpenAccess-AI-CollectiveREPO_NAMEaxolotlPATH_START.@axolotl_extracted@axolotl-main@tests@core@chat@__init__.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "sbussmann/uvmcmcfit", "repo_path": "uvmcmcfit_extracted/uvmcmcfit-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # uvmcmcfit documentation build configuration file, created by # sphinx-quickstart on Mon Aug 4 21:49:10 2014. # # 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. # #...
sbussmannREPO_NAMEuvmcmcfitPATH_START.@uvmcmcfit_extracted@uvmcmcfit-master@docs@conf.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/special/tests/data/__init__.py", "type": "Python" }
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@special@tests@data@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/__init__.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@__init__.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sunburst/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="sunburst", **kwargs): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sunburst@_marker.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolar/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatterpolar", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolar@_stream.py@.PATH_END.py
{ "filename": "_arrayminus.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter3d/error_x/_arrayminus.py", "type": "Python" }
import _plotly_utils.basevalidators class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter3d.error_x", **kwargs ): super(ArrayminusValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatter3d@error_x@_arrayminus.py@.PATH_END.py
{ "filename": "_insidetextfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/waterfall/_insidetextfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.insidetextfont" _valid_props = {"color", "colorsrc...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@waterfall@_insidetextfont.py@.PATH_END.py
{ "filename": "splitSession.py", "repo_name": "lwa-project/lsl", "repo_path": "lsl_extracted/lsl-main/scripts/splitSession.py", "type": "Python" }
#!/usr/bin/env python3 """ Script for splitting a DRX file based on the information contained in a MCS metadata tarball. """ import os import sys import time import argparse from datetime import datetime, timedelta from lsl.common.mcs import mjdmpm_to_datetime from lsl.common import metabundle from lsl.reader import...
lwa-projectREPO_NAMElslPATH_START.@lsl_extracted@lsl-main@scripts@splitSession.py@.PATH_END.py
{ "filename": "_hovertemplate.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/barpolar/_hovertemplate.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="barpolar", **kwargs): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@barpolar@_hovertemplate.py@.PATH_END.py
{ "filename": "inference.py", "repo_name": "jroulet/cogwheel", "repo_path": "cogwheel_extracted/cogwheel-main/cogwheel/validation/inference.py", "type": "Python" }
""" Functions to perform injections in reproducible Gaussian noise and do parameter estimation on them. This code assumes that injection samples were already generated using the ``generate_injections.py`` module. This module can run as a script and it also provides a function ``submit_slurm`` to submit the equivalent...
jrouletREPO_NAMEcogwheelPATH_START.@cogwheel_extracted@cogwheel-main@cogwheel@validation@inference.py@.PATH_END.py
{ "filename": "factor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py2/pygments/lexers/factor.py", "type": "Python" }
# -*- coding: utf-8 -*- """ pygments.lexers.factor ~~~~~~~~~~~~~~~~~~~~~~ Lexers for the Factor language. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, default, words from ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py2@pygments@lexers@factor.py@.PATH_END.py
{ "filename": "mathematics.py", "repo_name": "minzastro/unidam", "repo_path": "unidam_extracted/unidam-master/unidam/utils/mathematics.py", "type": "Python" }
# -*- coding: utf-8 -*- """ Created on Mon Oct 12 13:50:56 2015 @author: mints """ import numpy as np INV_SQRT2 = 1./np.sqrt(2.) INV_SQRT2Pi = 1./np.sqrt(2.*np.pi) MAD_COEFF = 1.4836 def kl_divergence(x, func, par, y): """ Symmetric Kullback-Leibler divergence value. """ values = func(x, *par) ma...
minzastroREPO_NAMEunidamPATH_START.@unidam_extracted@unidam-master@unidam@utils@mathematics.py@.PATH_END.py
{ "filename": "_hoverinfo.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymap/_hoverinfo.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="densitymap", **kwargs): super(HoverinfoValidator, 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@densitymap@_hoverinfo.py@.PATH_END.py
{ "filename": "multivoigt.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/examples/multivoigt.py", "type": "Python" }
import pyspeckit import numpy as np from pyspeckit.spectrum.models import inherited_voigtfitter # technically, the voigt fitter works as a singlefitter (i.e., you can fit the # background level and the peak simultaneously) # in practice, however, you need to fit the background independently except for # gaussians. I...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@examples@multivoigt.py@.PATH_END.py
{ "filename": "run_standardInjections.py", "repo_name": "tcallister/learning-p-det", "repo_path": "learning-p-det_extracted/learning-p-det-main/code/run_standardInjections.py", "type": "Python" }
import numpyro nChains = 2 numpyro.set_host_device_count(nChains) numpyro.set_platform(platform='gpu') from numpyro.infer import NUTS,MCMC from jax.config import config config.update("jax_enable_x64", True) from jax import random import jax.numpy as jnp import arviz as az from population_model import baseline from getD...
tcallisterREPO_NAMElearning-p-detPATH_START.@learning-p-det_extracted@learning-p-det-main@code@run_standardInjections.py@.PATH_END.py
{ "filename": "sexcatalog.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/util/sexcatalog.py", "type": "Python" }
# ====================================================================== # # Cosmograil: cosmograil.tools.sexcatalog # # sexcatalog module. # # Author: Laurent Le Guillou <laurentl@ster.kuleuven.ac.be> # # $Id: sexcatalog.py,v 1.1 2005/06/29 13:07:41 hack Exp $ # # ======================================================...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@util@sexcatalog.py@.PATH_END.py
{ "filename": "fastchem.py", "repo_name": "exoclime/FastChem", "repo_path": "FastChem_extracted/FastChem-master/python/fastchem.py", "type": "Python" }
import pyfastchem from save_output import saveChemistryOutput, saveMonitorOutput, saveChemistryOutputPandas, saveMonitorOutputPandas import numpy as np import os import matplotlib.pyplot as plt from astropy import constants as const #some input values for temperature (in K) and pressure (in bar) temperature = np.ful...
exoclimeREPO_NAMEFastChemPATH_START.@FastChem_extracted@FastChem-master@python@fastchem.py@.PATH_END.py
{ "filename": "prizmo_dust_opacity.py", "repo_name": "tgrassi/prizmo", "repo_path": "prizmo_extracted/prizmo-main/src_py/prizmo_dust_opacity.py", "type": "Python" }
import os.path import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from prizmo_commons import amin, amax, pslope, clight, hplanck, rho_bulk, erg2ev, print_title, fuv_energy1, fuv_energy2, plotOn, refInd_file from prizmo_preprocess import preprocess from bhmie import bhmie_qabs from scipy.interpolat...
tgrassiREPO_NAMEprizmoPATH_START.@prizmo_extracted@prizmo-main@src_py@prizmo_dust_opacity.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/title/pad/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._t import TValidator from ._r import RValidator from ._l import LValidator from ._b import BValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relat...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@title@pad@__init__.py@.PATH_END.py
{ "filename": "core.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/uncertainty/core.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Distribution class and associated machinery. """ import builtins import numpy as np from astropy import stats from astropy import units as u from astropy.utils.compat.numpycompat import NUMPY_LT_2_0 if NUMPY_LT_2_0: from numpy.core.multiarray ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@uncertainty@core.py@.PATH_END.py
{ "filename": "_tickvals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickvals.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="icicle.marker.colorbar", **kwargs ): super(TickvalsValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@colorbar@_tickvals.py@.PATH_END.py
{ "filename": "flickr.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/docs/sphinxext/flickr.py", "type": "Python" }
from docutils import nodes from docutils.parsers.rst import directives CODE = """\ <object width="%(width)i" height="%(height)i"> <param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F75341362%40N04%2Fsets%2F72157629059614751%2Fshow%2F&page_show_back_url=%2Fphotos%2F75341362%40N04%2Fsets%2...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@docs@sphinxext@flickr.py@.PATH_END.py
{ "filename": "nuts.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/pyro/infer/mcmc/nuts.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from collections import namedtuple import pyro import pyro.distributions as dist from pyro.distributions.util import scalar_like from pyro.infer.autoguide import init_to_uniform from pyro.infer.mcmc.hmc import HMC from pyro.ops.in...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@pyro@infer@mcmc@nuts.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/sankey/node/hoverlabel/font/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="sankey.node.hoverlabel.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@sankey@node@hoverlabel@font@_color.py@.PATH_END.py
{ "filename": "test_model_stdout.py", "repo_name": "simonsobs/nextline-rdb", "repo_path": "nextline-rdb_extracted/nextline-rdb-main/src/nextline_rdb/alembic/models/rev_f9a742bb2297/tests/test_model_stdout.py", "type": "Python" }
import datetime from hypothesis import given from hypothesis import strategies as st from sqlalchemy import select from sqlalchemy.orm import selectinload from nextline_rdb.db import DB from .. import Model, Stdout from ..strategies import st_model_stdout @given(st.data()) async def test_repr(data: st.DataObject) ...
simonsobsREPO_NAMEnextline-rdbPATH_START.@nextline-rdb_extracted@nextline-rdb-main@src@nextline_rdb@alembic@models@rev_f9a742bb2297@tests@test_model_stdout.py@.PATH_END.py
{ "filename": "PlotContours_all_fixedmass.py", "repo_name": "bradkav/EarthScatterLikelihood", "repo_path": "EarthScatterLikelihood_extracted/EarthScatterLikelihood-master/plotting/PlotContours_all_fixedmass.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.colors as colors from scipy.integrate import cumtrapz, quad from scipy.interpolate import interp1d from scipy.stats import chi2 import PlottingTools as PT import argparse import os #--------------- # MATPLOTLIB settings m...
bradkavREPO_NAMEEarthScatterLikelihoodPATH_START.@EarthScatterLikelihood_extracted@EarthScatterLikelihood-master@plotting@PlotContours_all_fixedmass.py@.PATH_END.py
{ "filename": "python_script.ipynb", "repo_name": "sterinaldi/figaro", "repo_path": "figaro_extracted/figaro-main/docs/source/python_script.ipynb", "type": "Jupyter Notebook" }
# FIGARO in a python script This notebook shows how to include FIGARO in a `python` script. If you are a casual user or you are simply interested in performing a DPGMM/(H)DPGMM reconstruction, you may want to make use of the turnkey command-line scripts already provided with FIGARO (`figaro-density` and `figaro-hierar...
sterinaldiREPO_NAMEfigaroPATH_START.@figaro_extracted@figaro-main@docs@source@python_script.ipynb@.PATH_END.py
{ "filename": "_tickformatstops.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/colorbar/_tickformatstops.py", "type": "Python" }
import _plotly_utils.basevalidators class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="surface.colorbar", **kwargs ): super(TickformatstopsValidator, self).__init__( plotly_name=plotly...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@colorbar@_tickformatstops.py@.PATH_END.py
{ "filename": "test_cycles.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/tests/test_cycles.py", "type": "Python" }
import contextlib from io import StringIO import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pytest from cycler import cycler def test_colorcycle_basic(): fig, ax = plt.subplots() ax.set_prop_cycle(cycler('color', ['r', 'g', 'y'])) for _ in range(4): ax.plot(range...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@tests@test_cycles.py@.PATH_END.py
{ "filename": "old_horizontalAzEl2stnAzEl.py", "repo_name": "creaneroDIAS/beamModelTester", "repo_path": "beamModelTester_extracted/beamModelTester-master/WIP/old_horizontalAzEl2stnAzEl.py", "type": "Python" }
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed May 30 14:47:12 2018 @author: creanero """ #!/usr/bin/env python """Script to convert horizontal Azimuth Elevation to station Azimuth Elevation. example usage: $ horizontalAzEl2stnAzEl.py SE607 0.,80. (outputs:) Horizontal coord. AZ, EL: 0.0deg, 80.000...
creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@WIP@old_horizontalAzEl2stnAzEl.py@.PATH_END.py
{ "filename": "_variant.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/textfont/_variant.py", "type": "Python" }
import _plotly_utils.basevalidators class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.textfont", **kwargs ): super(VariantValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@textfont@_variant.py@.PATH_END.py
{ "filename": "test_gi_minus_projected.py", "repo_name": "astropy/halotools", "repo_path": "halotools_extracted/halotools-master/halotools/mock_observables/ia_correlations/tests/test_gi_minus_projected.py", "type": "Python" }
""" Module providing unit-testing for the `~halotools.mock_observables.alignments.w_gplus` function. """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import warnings import pytest from astropy.utils.misc import NumpyRNGContext from ..gi_minus_projected import ...
astropyREPO_NAMEhalotoolsPATH_START.@halotools_extracted@halotools-master@halotools@mock_observables@ia_correlations@tests@test_gi_minus_projected.py@.PATH_END.py
{ "filename": "edge.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/redis/py3/redis/commands/graph/edge.py", "type": "Python" }
from ..helpers import quote_string from .node import Node class Edge: """ An edge connecting two nodes. """ def __init__(self, src_node, relation, dest_node, edge_id=None, properties=None): """ Create a new edge. """ if src_node is None or dest_node is None: ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@redis@py3@redis@commands@graph@edge.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Fermipy/fermipy", "repo_path": "fermipy_extracted/fermipy-master/fermipy/diffuse/tests/__init__.py", "type": "Python" }
FermipyREPO_NAMEfermipyPATH_START.@fermipy_extracted@fermipy-master@fermipy@diffuse@tests@__init__.py@.PATH_END.py
{ "filename": "makeplot.py", "repo_name": "VirtualPlanetaryLaboratory/vplanet", "repo_path": "vplanet_extracted/vplanet-main/examples/ParameterSweep/makeplot.py", "type": "Python" }
#!/usr/bin/env python import pathlib import subprocess import sys import bigplanet as bp import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import vplot as vpl import vplanet # Path hacks path = pathlib.Path(__file__).parents[0].absolute() sys.path.insert(1, str(path.parents[0])) from get_ar...
VirtualPlanetaryLaboratoryREPO_NAMEvplanetPATH_START.@vplanet_extracted@vplanet-main@examples@ParameterSweep@makeplot.py@.PATH_END.py
{ "filename": "EXAMPLE_main_Roman_CGI_any.py", "repo_name": "ajeldorado/falco-python", "repo_path": "falco-python_extracted/falco-python-master/roman/EXAMPLE_main_Roman_CGI_any.py", "type": "Python" }
""" Script to run high-order WFSC with any of the Roman CGI's mask configurations. Requires the Roman CGI Phase C model and data from https://sourceforge.net/projects/cgisim/ """ import numpy as np import os import copy import matplotlib.pyplot as plt import falco import falco.proper as proper # %% Uncomment the con...
ajeldoradoREPO_NAMEfalco-pythonPATH_START.@falco-python_extracted@falco-python-master@roman@EXAMPLE_main_Roman_CGI_any.py@.PATH_END.py
{ "filename": "rank_decider.py", "repo_name": "CU-NESS/pylinex", "repo_path": "pylinex_extracted/pylinex-master/examples/nonlinear/rank_decider.py", "type": "Python" }
""" File: examples/nonlinear/rank_decider.py Author: Keith Tauscher Date: 24 Apr 2019 Description: Example script showing how to use the RankDecider class, which decides how many terms to use in a multi-component data fit. """ import numpy as np from distpy import Expression from pylinex import Polynomial...
CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@examples@nonlinear@rank_decider.py@.PATH_END.py
{ "filename": "resnet.py", "repo_name": "pytorch/vision", "repo_path": "vision_extracted/vision-main/torchvision/models/resnet.py", "type": "Python" }
from functools import partial from typing import Any, Callable, List, Optional, Type, Union import torch import torch.nn as nn from torch import Tensor from ..transforms._presets import ImageClassification from ..utils import _log_api_usage_once from ._api import register_model, Weights, WeightsEnum from ._meta impor...
pytorchREPO_NAMEvisionPATH_START.@vision_extracted@vision-main@torchvision@models@resnet.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/ai21/README.md", "type": "Markdown" }
This package has moved! https://github.com/langchain-ai/langchain-ai21/tree/main/libs/ai21
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@ai21@README.md@.PATH_END.py
{ "filename": "sloppy_run.py", "repo_name": "LucaMalavolta/SLOPpy", "repo_path": "SLOPpy_extracted/SLOPpy-main/SLOPpy/sloppy_run.py", "type": "Python" }
import SLOPpy import argparse import os import sys import collections def sloppy_run(file_conf=None ): print() print('SLOPpy v{0}'.format(SLOPpy.__version__)) print() print('Python version in use:') print(sys.version) #if sys.version_info[0] == 3 and sys.version_info[1] > 7: # print('WA...
LucaMalavoltaREPO_NAMESLOPpyPATH_START.@SLOPpy_extracted@SLOPpy-main@SLOPpy@sloppy_run.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/unselected/marker/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.unselected.marker", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@unselected@marker@_color.py@.PATH_END.py
{ "filename": "CandCheck.py", "repo_name": "qianlivan/RPPPS", "repo_path": "RPPPS_extracted/RPPPS-master/CandCheck.py", "type": "Python" }
#Candidates checking, pzc, 20150619 import os,sys, getopt #1, checking if knownPSR.dat exists filename=r'./knownPSR.dat' if os.path.exists(filename): #for debug: print 'The knownPSR.dat exists.' database = 1 else: #print 'The known pulsar list file knownPSR.dat does not exist, try to create it.' database = 0 ...
qianlivanREPO_NAMERPPPSPATH_START.@RPPPS_extracted@RPPPS-master@CandCheck.py@.PATH_END.py