metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "function_utils.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/util/function_utils.py", "type": "Python" }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@util@function_utils.py@.PATH_END.py
{ "filename": "_reversescale.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter/marker/line/_reversescale.py", "type": "Python" }
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter@marker@line@_reversescale.py@.PATH_END.py
{ "filename": "_enabled.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py", "type": "Python" }
import _plotly_utils.basevalidators class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): super(EnabledValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@coloraxis@colorbar@tickformatstop@_enabled.py@.PATH_END.py
{ "filename": "huggingface_hub.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/llms/huggingface_hub.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.llms import HuggingFaceHub # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@llms@huggingface_hub.py@.PATH_END.py
{ "filename": "imports.py", "repo_name": "CMB-S4/spt3g_software", "repo_path": "spt3g_software_extracted/spt3g_software-master/gcp/tests/imports.py", "type": "Python" }
import spt3g._libgcp for k in dir(spt3g._libgcp): print(k, getattr(spt3g._libgcp, k)) from spt3g._libgcp import ACUStatus import spt3g.gcp from spt3g import gcp from spt3g.gcp import ACUStatus
CMB-S4REPO_NAMEspt3g_softwarePATH_START.@spt3g_software_extracted@spt3g_software-master@gcp@tests@imports.py@.PATH_END.py
{ "filename": "acorns-adi.py", "repo_name": "t-brandt/acorns-adi", "repo_path": "acorns-adi_extracted/acorns-adi-master/acorns-adi.py", "type": "Python" }
#!/usr/bin/env python # # Original filename: flat_coadd.py # # Author: Tim Brandt # Email: tbrandt@astro.princeton.edu # Date: 7 June 2011 # # Summary: Reduce HiCIAO ADI Data # import optparse, sys, re, os import pyfits as pyf import numpy as np from scipy import signal from adiparam import * import centroid import...
t-brandtREPO_NAMEacorns-adiPATH_START.@acorns-adi_extracted@acorns-adi-master@acorns-adi.py@.PATH_END.py
{ "filename": "test_box.py", "repo_name": "philbull/FastBox", "repo_path": "FastBox_extracted/FastBox-main/fastbox/tests/test_box.py", "type": "Python" }
#!/usr/bin/env python import pytest import numpy as np from fastbox.box import CosmoBox, default_cosmo def test_gaussian_box(): """Generate Gaussian density field in box.""" # Realise Gaussian box np.random.seed(11) box = CosmoBox(cosmo=default_cosmo, box_scale=(1e2, 1e2, 1e2), nsamp=16, ...
philbullREPO_NAMEFastBoxPATH_START.@FastBox_extracted@FastBox-main@fastbox@tests@test_box.py@.PATH_END.py
{ "filename": "replace.py", "repo_name": "nasa/kepler-pipeline", "repo_path": "kepler-pipeline_extracted/kepler-pipeline-master/source-code/java/pi/python-src/replace.py", "type": "Python" }
#!/usr/bin/python # # Copyright 2017 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # This file is available under the terms of the NASA Open Source Agreement # (NOSA). You should have received a copy of this agreement with...
nasaREPO_NAMEkepler-pipelinePATH_START.@kepler-pipeline_extracted@kepler-pipeline-master@source-code@java@pi@python-src@replace.py@.PATH_END.py
{ "filename": "test_stackexchange.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/utilities/test_stackexchange.py", "type": "Python" }
"""Integration test for Stack Exchange.""" from langchain_community.utilities import StackExchangeAPIWrapper def test_call() -> None: """Test that call runs.""" stackexchange = StackExchangeAPIWrapper() # type: ignore[call-arg] output = stackexchange.run("zsh: command not found: python") assert outp...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@utilities@test_stackexchange.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/violin/legendgrouptitle/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="violin.legendgrouptitle.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_na...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@violin@legendgrouptitle@font@_size.py@.PATH_END.py
{ "filename": "_marker.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/treemap/_marker.py", "type": "Python" }
import _plotly_utils.basevalidators class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="treemap", **kwargs): super(MarkerValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@treemap@_marker.py@.PATH_END.py
{ "filename": "sr_mhd_linwave.py", "repo_name": "PrincetonUniversity/athena", "repo_path": "athena_extracted/athena-master/tst/regression/scripts/tests/sr/sr_mhd_linwave.py", "type": "Python" }
""" Regression test based on SR MHD linear wave convergence problem. Runs a linear wave convergence test in 3D and checks L1 errors as saved by the executable in linearwave-errors.dat. """ # Modules import logging import numpy as np import scripts.utils.athena as athena import sys sys.path.insert(0, '../../vis/python...
PrincetonUniversityREPO_NAMEathenaPATH_START.@athena_extracted@athena-master@tst@regression@scripts@tests@sr@sr_mhd_linwave.py@.PATH_END.py
{ "filename": "fastjsonschema_exceptions.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py", "type": "Python" }
import re SPLIT_RE = re.compile(r'[\.\[\]]+') class JsonSchemaException(ValueError): """ Base exception of ``fastjsonschema`` library. """ class JsonSchemaValueException(JsonSchemaException): """ Exception raised by validation function. Available properties: * ``message`` containing huma...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@setuptools@config@_validate_pyproject@fastjsonschema_exceptions.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/cli/langchain_cli/integration_template/tests/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@langchain_cli@integration_template@tests@__init__.py@.PATH_END.py
{ "filename": "eis_fit_cube_example.py", "repo_name": "USNavalResearchLaboratory/eispac", "repo_path": "eispac_extracted/eispac-main/examples/eis_fit_cube_example.py", "type": "Python" }
import matplotlib.pyplot as plt import astropy.units as u import eispac if __name__ == '__main__': # input data and template files data_filepath = '../data/eis_20190404_131513.data.h5' template_filepath = '../templates/eis_template_dir/fe_12_195_119.2c.template.h5' # read fit template tmplt = eisp...
USNavalResearchLaboratoryREPO_NAMEeispacPATH_START.@eispac_extracted@eispac-main@examples@eis_fit_cube_example.py@.PATH_END.py
{ "filename": "_color_data.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/lib/matplotlib/_color_data.py", "type": "Python" }
BASE_COLORS = { 'b': (0, 0, 1), # blue 'g': (0, 0.5, 0), # green 'r': (1, 0, 0), # red 'c': (0, 0.75, 0.75), # cyan 'm': (0.75, 0, 0.75), # magenta 'y': (0.75, 0.75, 0), # yellow 'k': (0, 0, 0), # black 'w': (1, 1, 1), # white } # These colors are fr...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@lib@matplotlib@_color_data.py@.PATH_END.py
{ "filename": "gen_qa_identity_models.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/common/gen_qa_identity_models.py", "type": "Python" }
#!/usr/bin/env python3 # Copyright 2019-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 ...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@common@gen_qa_identity_models.py@.PATH_END.py
{ "filename": "_ticklabeloverflow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/isosurface/colorbar/_ticklabeloverflow.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="isosurface.colorbar", **kwargs, ): super(TicklabeloverflowValidator, self).__init__(...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@isosurface@colorbar@_ticklabeloverflow.py@.PATH_END.py
{ "filename": "move.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/emcee_ES/moves/move.py", "type": "Python" }
# -*- coding: utf-8 -*- import numpy as np __all__ = ["Move"] class Move(object): def tune(self, state, accepted): pass def update(self, old_state, new_state, accepted, subset=None): """Update a given subset of the ensemble with an accepted proposal Args: coords: The or...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@emcee_ES@moves@move.py@.PATH_END.py
{ "filename": "property_importer.py", "repo_name": "pynbody/tangos", "repo_path": "tangos_extracted/tangos-master/tangos/tools/property_importer.py", "type": "Python" }
import numbers import numpy as np from .. import core, parallel_tasks from ..log import logger from ..util import proxy_object, timestep_object_cache from . import GenericTangosTool class PropertyImporter(GenericTangosTool): tool_name = 'import-properties' tool_description = 'Import properties that were cal...
pynbodyREPO_NAMEtangosPATH_START.@tangos_extracted@tangos-master@tangos@tools@property_importer.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "pyro-ppl/pyro", "repo_path": "pyro_extracted/pyro-master/docs/source/conf.py", "type": "Python" }
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import os import sys import sphinx_rtd_theme # import pkg_resources # -*- coding: utf-8 -*- # # Pyro documentation build configuration file, created by # sphinx-quickstart on Thu Jun 15 17:16:14 2017. # # This file is execfile()...
pyro-pplREPO_NAMEpyroPATH_START.@pyro_extracted@pyro-master@docs@source@conf.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/sankey/node/line/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.node.line", **kwargs): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@sankey@node@line@_color.py@.PATH_END.py
{ "filename": "sunf90.py", "repo_name": "rat-pac/rat-pac", "repo_path": "rat-pac_extracted/rat-pac-master/python/SCons/Tool/sunf90.py", "type": "Python" }
"""SCons.Tool.sunf90 Tool-specific initialization for sunf90, the Sun Studio F90 compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20...
rat-pacREPO_NAMErat-pacPATH_START.@rat-pac_extracted@rat-pac-master@python@SCons@Tool@sunf90.py@.PATH_END.py
{ "filename": "plotters.py", "repo_name": "pyspeckit/pyspeckit", "repo_path": "pyspeckit_extracted/pyspeckit-master/pyspeckit/spectrum/plotters.py", "type": "Python" }
""" ======= Plotter ======= .. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com> """ from __future__ import print_function import matplotlib import matplotlib.figure import numpy as np import astropy.units as u import copy import inspect from astropy import log # this mess is to handle a nested hell of differe...
pyspeckitREPO_NAMEpyspeckitPATH_START.@pyspeckit_extracted@pyspeckit-master@pyspeckit@spectrum@plotters.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@hoverlabel@font@_size.py@.PATH_END.py
{ "filename": "dbapi20.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/adodbapi/test/dbapi20.py", "type": "Python" }
#!/usr/bin/env python """Python DB API 2.0 driver compliance unit test suite. This software is Public Domain and may be used without restrictions. "Now we have booze and barflies entering the discussion, plus rumours of DBAs on drugs... and I won't tell you what flashes through my mind each time I read the subje...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@adodbapi@test@dbapi20.py@.PATH_END.py
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/table/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="table", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, d...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@table@_stream.py@.PATH_END.py
{ "filename": "_len.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/marker/colorbar/_len.py", "type": "Python" }
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="len", parent_name="bar.marker.colorbar", **kwargs): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@marker@colorbar@_len.py@.PATH_END.py
{ "filename": "test_simulations_gs_param_hist.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/tests/test_simulations_gs_param_hist.py", "type": "Python" }
""" test_21cm_parameterized.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Wed Aug 6 08:54:15 MDT 2014 Description: 21-cm signal in absence of astrophysical sources. """ import ares import numpy as np def test(): # Create instance of Hydrogen class hydr = ares.physi...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@test_simulations_gs_param_hist.py@.PATH_END.py
{ "filename": "example11_parse_measurements_log.py", "repo_name": "Vital-Fernandez/lime", "repo_path": "lime_extracted/lime-master/examples/tutorials/various/example11_parse_measurements_log.py", "type": "Python" }
import numpy as np from astropy.io import fits import lime def import_osiris_fits(file_address, ext=0): # Open fits file with fits.open(file_address) as hdul: data, hdr = hdul[ext].data, hdul[ext].header w_min, dw, n_pix = hdr['CRVAL1'], hdr['CD1_1'], hdr['NAXIS1'] w_max = w_min + dw * n_pi...
Vital-FernandezREPO_NAMElimePATH_START.@lime_extracted@lime-master@examples@tutorials@various@example11_parse_measurements_log.py@.PATH_END.py
{ "filename": "_pi_pi_etap.py", "repo_name": "LoganAMorrison/Hazma", "repo_path": "Hazma_extracted/Hazma-master/hazma/form_factors/vector/_pi_pi_etap.py", "type": "Python" }
""" Module implementing the pi-pi-eta' form factor. """ from dataclasses import InitVar, dataclass, field from typing import overload import numpy as np from hazma.phase_space import PhaseSpaceDistribution1D from hazma.utils import ComplexArray, ComplexOrComplexArray, RealArray, RealOrRealArray from ._three_body im...
LoganAMorrisonREPO_NAMEHazmaPATH_START.@Hazma_extracted@Hazma-master@hazma@form_factors@vector@_pi_pi_etap.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "sjforeman/bskit", "repo_path": "bskit_extracted/bskit-master/README.md", "type": "Markdown" }
# bskit `bskit` is a Python package for measuring density bispectra from snapshots of cosmological N-body or hydrodynamical simulations. It can measure auto or cross bispectra in a user-specified set of triangle bins (that is, triplets of 3-vector wavenumbers (k_1,k_2,k_3) such that k_1, k_2, and k_3 fall into separat...
sjforemanREPO_NAMEbskitPATH_START.@bskit_extracted@bskit-master@README.md@.PATH_END.py
{ "filename": "make_lightcones_for_fisher.py", "repo_name": "charlottenosam/21cmfish", "repo_path": "21cmfish_extracted/21cmfish-master/scripts/make_lightcones_for_fisher.py", "type": "Python" }
import py21cmfast as p21c import os import glob import numpy as np import time from joblib import Parallel, delayed import argparse import configparser import multiprocessing import py21cmfish as p21fish import logging logger = logging.getLogger("21cmFAST") logger.setLevel(logging.INFO) print(f"21cmFAST version is {...
charlottenosamREPO_NAME21cmfishPATH_START.@21cmfish_extracted@21cmfish-master@scripts@make_lightcones_for_fisher.py@.PATH_END.py
{ "filename": "_decomp_qr.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py3/scipy/linalg/_decomp_qr.py", "type": "Python" }
"""QR decomposition functions.""" import numpy # Local imports from .lapack import get_lapack_funcs from ._misc import _datacopied __all__ = ['qr', 'qr_multiply', 'rq'] def safecall(f, name, *args, **kwargs): """Call a LAPACK routine, determining lwork automatically and handling error return values""" l...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py3@scipy@linalg@_decomp_qr.py@.PATH_END.py
{ "filename": "pallas_call_registration.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/pallas/mosaic/pallas_call_registration.py", "type": "Python" }
# Copyright 2023 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...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@pallas@mosaic@pallas_call_registration.py@.PATH_END.py
{ "filename": "helpers.py", "repo_name": "jabesq-org/pyatmo", "repo_path": "pyatmo_extracted/pyatmo-master/src/pyatmo/helpers.py", "type": "Python" }
"""Collection of helper functions.""" from __future__ import annotations import logging from typing import Any, cast from pyatmo.const import RawData from pyatmo.exceptions import NoDevice LOG: logging.Logger = logging.getLogger(__name__) def fix_id(raw_data: RawData) -> dict[str, Any]: """Fix known errors in...
jabesq-orgREPO_NAMEpyatmoPATH_START.@pyatmo_extracted@pyatmo-master@src@pyatmo@helpers.py@.PATH_END.py
{ "filename": "collecting_1000th.ipynb", "repo_name": "jan-rybizki/Galaxia_wrap", "repo_path": "Galaxia_wrap_extracted/Galaxia_wrap-master/notebook/notebook_sweep/collecting_1000th.ipynb", "type": "Jupyter Notebook" }
```python %pylab inline from astropy.io import fits from numpy.lib.recfunctions import stack_arrays ``` Populating the interactive namespace from numpy and matplotlib /home/rybizki/anaconda3/lib/python3.6/site-packages/astropy/extern/bundled/six.py:60: ResourceWarning: unclosed file <_io.TextIOWrapper name='...
jan-rybizkiREPO_NAMEGalaxia_wrapPATH_START.@Galaxia_wrap_extracted@Galaxia_wrap-master@notebook@notebook_sweep@collecting_1000th.ipynb@.PATH_END.py
{ "filename": "astroserver.py", "repo_name": "Fermipy/fermipy", "repo_path": "fermipy_extracted/fermipy-master/fermipy/scripts/astroserver.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function import subprocess from subprocess import call import os import glob import argparse from os.path import join, basename, dirname, splitext import yaml import numpy as np #from dsphs.utils.ut...
FermipyREPO_NAMEfermipyPATH_START.@fermipy_extracted@fermipy-master@fermipy@scripts@astroserver.py@.PATH_END.py
{ "filename": "test_simpleRun.ipynb", "repo_name": "anchal-009/SAVED21cm", "repo_path": "SAVED21cm_extracted/SAVED21cm-master/tests_new/test_simpleRun.ipynb", "type": "Jupyter Notebook" }
```python import sys; sys.path.insert(1, "./../") from src.runpipe import Pipeline from settings import Settings %matplotlib inline ``` ```python set = Settings() set.ANT = ["dipole", "logspiral", "sinuous"] set.LST = 2 set.PATH21TS = "../data/TS21/lfcal_training_set_8-2020.hdf5" set.PATHFGTS = "../data/TSFG/Nreg_1/...
anchal-009REPO_NAMESAVED21cmPATH_START.@SAVED21cm_extracted@SAVED21cm-master@tests_new@test_simpleRun.ipynb@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/treemap/pathbar/textfont/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.pathbar.textfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@treemap@pathbar@textfont@_color.py@.PATH_END.py
{ "filename": "TO_DO.md", "repo_name": "rpoleski/MulensModel", "repo_path": "MulensModel_extracted/MulensModel-master/examples/example_16/TO_DO.md", "type": "Markdown" }
### To be discussed: - periodic variables - log10 variables etc. - for plots: t_0, \Delta t_0, or t_0 - 2456780 ??? ### Documentation: - Delta t_0 - binary source - x_caustic_in etc. - ob08092-o4_prior.yaml - posterior files - print model - example with add_2450000: False - yaml output in README.md # NOW - plot traj...
rpoleskiREPO_NAMEMulensModelPATH_START.@MulensModel_extracted@MulensModel-master@examples@example_16@TO_DO.md@.PATH_END.py
{ "filename": "test_ini.py", "repo_name": "timothydmorton/isochrones", "repo_path": "isochrones_extracted/isochrones-master/isochrones/tests/test_ini.py", "type": "Python" }
import os import numpy as np from isochrones.mist import MIST_Isochrone from isochrones import StarModel, BinaryStarModel, TripleStarModel from isochrones.starmodel import BasicStarModel FOLDER = os.path.abspath(os.path.join(os.path.dirname(__file__))) MIST = MIST_Isochrone() def test_ini(): _check_ini(MIST) ...
timothydmortonREPO_NAMEisochronesPATH_START.@isochrones_extracted@isochrones-master@isochrones@tests@test_ini.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "telegraphic/fits2hdf", "repo_path": "fits2hdf_extracted/fits2hdf-master/fits2hdf/__init__.py", "type": "Python" }
from __future__ import absolute_import from . import io from . import idi from . import pyhdfits from . import pyhdfits as pf
telegraphicREPO_NAMEfits2hdfPATH_START.@fits2hdf_extracted@fits2hdf-master@fits2hdf@__init__.py@.PATH_END.py
{ "filename": "SED_prior_model_v2.ipynb", "repo_name": "H-E-L-P/XID_plus", "repo_path": "XID_plus_extracted/XID_plus-master/docs/build/html/notebooks/examples/SED_prior_model_v2.ipynb", "type": "Jupyter Notebook" }
```python import os import numpy as np from astropy.io import ascii from scipy.interpolate import interp1d import xidplus temps=os.listdir('/Users/pdh21/astrodata/SEDs/Berta2013/templates_berta_norm_LIR/') ``` ```python temps ``` ['Blue_SF_glx.norm_LIR', 'BroadFIR_SF_glx.norm_LIR', 'Cold_glx.norm_LI...
H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@html@notebooks@examples@SED_prior_model_v2.ipynb@.PATH_END.py
{ "filename": "masterdark.py", "repo_name": "juanep97/iop4", "repo_path": "iop4_extracted/iop4-main/iop4admin/modeladmins/masterdark.py", "type": "Python" }
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.safestring import mark_safe from iop4api.filters import * from iop4api.models import * from .fitfile import AdminFitFile, action_mark_ignore, action_unmark_ignore import logging logger = logg...
juanep97REPO_NAMEiop4PATH_START.@iop4_extracted@iop4-main@iop4admin@modeladmins@masterdark.py@.PATH_END.py
{ "filename": "_testutils.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/special/_testutils.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import os from distutils.version import LooseVersion import functools import numpy as np from numpy.testing import assert_ import pytest import scipy.special as sc __all__ = ['with_special_errors', 'assert_tol_equal', 'assert_func_equal', ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@special@_testutils.py@.PATH_END.py
{ "filename": "recipes_ARC_LS_SPECT.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/niri/recipes/sq/recipes_ARC_LS_SPECT.py", "type": "Python" }
""" MS: this is just an MVP, copying the corresponding GNIRS recipe. Expect Olesja will improve this after she finds some bandwidth. Recipes available to data with tags ['NIRI', 'SPECT', 'LS'], excluding data with tags ['FLAT', 'DARK', 'BIAS']. These are NIRI longslit arc-lamp or sky-line calibrations. Default is "...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@niri@recipes@sq@recipes_ARC_LS_SPECT.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "mikecokina/elisa", "repo_path": "elisa_extracted/elisa-master/src/elisa/observer/__init__.py", "type": "Python" }
mikecokinaREPO_NAMEelisaPATH_START.@elisa_extracted@elisa-master@src@elisa@observer@__init__.py@.PATH_END.py
{ "filename": "ifttt.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/tools/ifttt.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.tools import IFTTTWebhook # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED_...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@tools@ifttt.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/bar/_hoverinfo.py", "type": "Python" }
import _plotly_utils.basevalidators class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="bar", **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@bar@_hoverinfo.py@.PATH_END.py
{ "filename": "11143_rval_050015.py", "repo_name": "shreeyesh-biswal/Rvalue_3D", "repo_path": "Rvalue_3D_extracted/Rvalue_3D-main/Codes/Zero/AR_11143/11143_rval_050015.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jul 26 20:36:28 2022 @author: shreeyeshbiswal """ import os import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.pyplot import figure AR = "11143" core_dir = "/home/shreeyeshbiswal/IDLWorkspace/Dataset_PF/" ...
shreeyesh-biswalREPO_NAMERvalue_3DPATH_START.@Rvalue_3D_extracted@Rvalue_3D-main@Codes@Zero@AR_11143@11143_rval_050015.py@.PATH_END.py
{ "filename": "generate_observation.py", "repo_name": "Smithsonian/ngehtsim", "repo_path": "ngehtsim_extracted/ngehtsim-main/examples/example_data_generation/generate_observation.py", "type": "Python" }
####################################################### # imports import ngehtsim.obs.obs_generator as og import ngehtsim.obs.obs_plotter as op import ngehtsim.metrics as cm ####################################################### # generate an observation # input settings file yamlfile = './settings.yaml' # initial...
SmithsonianREPO_NAMEngehtsimPATH_START.@ngehtsim_extracted@ngehtsim-main@examples@example_data_generation@generate_observation.py@.PATH_END.py
{ "filename": "test_avg.py", "repo_name": "NannyML/nannyml", "repo_path": "nannyml_extracted/nannyml-main/tests/stats/test_avg.py", "type": "Python" }
# Author: Niels Nuyttens <niels@nannyml.com> # Author: Nikolaos Perrakis <nikos@nannyml.com> # # License: Apache Software License 2.0 """Tests for Drift package.""" import pytest import pandas as pd from typing import Tuple from nannyml.datasets import load_synthetic_car_loan_dataset from nannyml.stats impo...
NannyMLREPO_NAMEnannymlPATH_START.@nannyml_extracted@nannyml-main@tests@stats@test_avg.py@.PATH_END.py
{ "filename": "deterministics.ipynb", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/examples/notebooks/deterministics.ipynb", "type": "Jupyter Notebook" }
# Deterministic Terms in Time Series Models ```python import matplotlib.pyplot as plt import numpy as np import pandas as pd plt.rc("figure", figsize=(16, 9)) plt.rc("font", size=16) ``` ## Basic Use Basic configurations can be directly constructed through `DeterministicProcess`. These can include a constant, a ti...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@examples@notebooks@deterministics.ipynb@.PATH_END.py
{ "filename": "_showtickprefix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="choroplethmapbox.colorbar", **kwargs ): super(ShowtickprefixValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@choroplethmapbox@colorbar@_showtickprefix.py@.PATH_END.py
{ "filename": "sim_chime_repeaters.py", "repo_name": "TRASAL/frbpoppy", "repo_path": "frbpoppy_extracted/frbpoppy-master/tests/dm_snr/sim_chime_repeaters.py", "type": "Python" }
"""Plot DM/SNR distributions of repeater populations observed with CHIME.""" import numpy as np import matplotlib.pyplot as plt from frbpoppy import CosmicPopulation, Survey, SurveyPopulation, plot from frbpoppy import split_pop, pprint from tests.convenience import hist, plot_aa_style, rel_path DAYS = 4 INTERACTIVE...
TRASALREPO_NAMEfrbpoppyPATH_START.@frbpoppy_extracted@frbpoppy-master@tests@dm_snr@sim_chime_repeaters.py@.PATH_END.py
{ "filename": "_tickmode.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py", "type": "Python" }
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattermapbox.marker.colorbar", **kwargs, ): super(TickmodeValidator, self).__init__( plot...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattermapbox@marker@colorbar@_tickmode.py@.PATH_END.py
{ "filename": "tod.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/toast/tod/tod.py", "type": "Python" }
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. from ..mpi import MPI import numpy as np from ..dist import distribute_samples from ..cache import Cache from .. import qa...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@toast@tod@tod.py@.PATH_END.py
{ "filename": "bhlight.py", "repo_name": "AFD-Illinois/ebhlight", "repo_path": "ebhlight_extracted/ebhlight-master/script/bhlight.py", "type": "Python" }
################################################################################ # # # BASE MODULE FOR PYTHON SCRIPTING # # ...
AFD-IllinoisREPO_NAMEebhlightPATH_START.@ebhlight_extracted@ebhlight-master@script@bhlight.py@.PATH_END.py
{ "filename": "loss-function-short-desc.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage/loss-function-short-desc.md", "type": "Markdown" }
The [metric](../../../concepts/loss-functions.md) to use in training. The specified value also determines the machine learning problem to solve. Some metrics support optional parameters (see the [Objectives and metrics](../../../concepts/loss-functions.md) section for details on each metric).
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage@loss-function-short-desc.md@.PATH_END.py
{ "filename": "test_traps.py", "repo_name": "wfirst-cgi/emccd_detect", "repo_path": "emccd_detect_extracted/emccd_detect-master/arcticpy_folder/build/lib/test_arcticpy/test_traps.py", "type": "Python" }
import numpy as np import pytest from scipy import integrate import matplotlib.pyplot as plt from copy import deepcopy import arcticpy as ac # Example traps (timescale such that 50% (25%) of charges released each step) traps_1_spec = [ ac.TrapInstantCapture(density=10, release_timescale=-1 / np.log(0.5)), ] trap...
wfirst-cgiREPO_NAMEemccd_detectPATH_START.@emccd_detect_extracted@emccd_detect-master@arcticpy_folder@build@lib@test_arcticpy@test_traps.py@.PATH_END.py
{ "filename": "intro.md", "repo_name": "exo-cesm/CESM2.1.3", "repo_path": "CESM2.1.3_extracted/CESM2.1.3-main/intro.md", "type": "Markdown" }
# Welcome to your Jupyter Book This is a small sample book to give you a feel for how book content is structured. It shows off a few of the major file types, as well as some sample content. It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more ...
exo-cesmREPO_NAMECESM2.1.3PATH_START.@CESM2.1.3_extracted@CESM2.1.3-main@intro.md@.PATH_END.py
{ "filename": "base.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/scipy/integrate/_ivp/base.py", "type": "Python" }
from __future__ import division, print_function, absolute_import import numpy as np def check_arguments(fun, y0, support_complex): """Helper function for checking arguments common to all solvers.""" y0 = np.asarray(y0) if np.issubdtype(y0.dtype, np.complexfloating): if not support_complex: ...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@scipy@integrate@_ivp@base.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "lockepatton/sonipy", "repo_path": "sonipy_extracted/sonipy-master/tests/__init__.py", "type": "Python" }
lockepattonREPO_NAMEsonipyPATH_START.@sonipy_extracted@sonipy-master@tests@__init__.py@.PATH_END.py
{ "filename": "channel_info.py", "repo_name": "nu-radio/NuRadioMC", "repo_path": "NuRadioMC_extracted/NuRadioMC-master/NuRadioReco/detector/detector_browser/channel_info.py", "type": "Python" }
from NuRadioReco.detector.detector_browser.app import app from dash import html from dash.dependencies import Input, Output import NuRadioReco.detector.detector_browser.detector_provider layout = html.Div([ html.Div([ html.Div('Channel Info', className='panel panel-heading'), html.Div([ ...
nu-radioREPO_NAMENuRadioMCPATH_START.@NuRadioMC_extracted@NuRadioMC-master@NuRadioReco@detector@detector_browser@channel_info.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/datetimes/__init__.py", "type": "Python" }
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@datetimes@__init__.py@.PATH_END.py
{ "filename": "_colorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@hoverlabel@font@_colorsrc.py@.PATH_END.py
{ "filename": "parsescan.py", "repo_name": "igmhub/baofit", "repo_path": "baofit_extracted/baofit-master/data/parsescan.py", "type": "Python" }
#!/usr/bin/env python # usage example: ./parsescan.py BOSSDR11QSOLyaF_scan.dat BOSSDR11QSOLyaF.scan 10 11 import sys # expected command-line args are <infile> <outfile> <index1> <index2> infile,outfile,index1,index2 = sys.argv[1:] # check that the parameter indices are integers try: index1,index2 = map(int,(index1...
igmhubREPO_NAMEbaofitPATH_START.@baofit_extracted@baofit-master@data@parsescan.py@.PATH_END.py
{ "filename": "2022_06_20_123921_7296741dff68_add_protected_column_for_block_types.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/server/database/_migrations/versions/postgresql/2022_06_20_123921_7296741dff68_add_protected_column_for_block_types.py", "type": "Pyt...
"""Add protected column for block types Revision ID: 7296741dff68 Revises: d335ad57d5ba Create Date: 2022-06-20 12:39:21.112876 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "7296741dff68" down_revision = "29ad9bef6147" branch_labels = None depends_on = None ...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@server@database@_migrations@versions@postgresql@2022_06_20_123921_7296741dff68_add_protected_column_for_block_types.py@.PATH_END.py
{ "filename": "atmosphere.py", "repo_name": "LSSTDESC/Spectractor", "repo_path": "Spectractor_extracted/Spectractor-master/spectractor/simulation/atmosphere.py", "type": "Python" }
import os import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from scipy.interpolate import interp1d, RegularGridInterpolator from spectractor.config import set_logger import spectractor.parameters as parameters import spectractor.simulation.libradtran as libradtran from spectractor.simula...
LSSTDESCREPO_NAMESpectractorPATH_START.@Spectractor_extracted@Spectractor-master@spectractor@simulation@atmosphere.py@.PATH_END.py
{ "filename": "callStack.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/gempy/library/config/callStack.py", "type": "Python" }
# # LSST Data Management System # Copyright 2017 AURA/LSST. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # 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 Found...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@gempy@library@config@callStack.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/treemap/__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 ._valuessrc import ValuessrcValidator from ._values import ValuesValidator from ._uirevision import UirevisionValidator from ._uid import UidValidator from ._ti...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@treemap@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/box/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._hoverlabel import Hoverlabel from ._legendgrouptitle import Legendgrouptitle from ._line import Line from ._marker import Marker from ._selected import Selected from ._stream import Stream from...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@box@__init__.py@.PATH_END.py
{ "filename": "household.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/test-projects/tasks/household.py", "type": "Python" }
from prefect import task @task def do_the_dishes(): return "The dishes are :sparkles: clean!"
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test-projects@tasks@household.py@.PATH_END.py
{ "filename": "contributing.md", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/docs/contributing.md", "type": "Markdown" }
# How to contribute Everyone can contribute to Flax, and the Flax development team values everyone's contributions! You can contribute in many more ways than just writing code. Answering questions on the [Flax GitHub Discussions page](https://github.com/google/flax/discussions), helping each other, and improving Flax ...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@docs@contributing.md@.PATH_END.py
{ "filename": "parsec.py", "repo_name": "danxhuber/evolstate", "repo_path": "evolstate_extracted/evolstate-master/parsec.py", "type": "Python" }
# code to generate TAMS and base of the RGB files from Parsec models import numpy as np import matplotlib.pyplot as plt from astropy.io import ascii import glob # models from https://people.sissa.it/~sbressan/CAF09_V1.2S_M36_LT/ # solar metallicity files=glob.glob('Z0.017Y0.279/*') # [M/H]~0.3 #files=glob.glob('Z0.03...
danxhuberREPO_NAMEevolstatePATH_START.@evolstate_extracted@evolstate-master@parsec.py@.PATH_END.py
{ "filename": "splittst.py", "repo_name": "mhammond/pywin32", "repo_path": "pywin32_extracted/pywin32-main/Pythonwin/pywin/Demos/splittst.py", "type": "Python" }
import commctrl import fontdemo import win32ui from pywin.mfc import docview, window # derive from CMDIChild. This does much work for us. class SplitterFrame(window.MDIChildWnd): def __init__(self): # call base CreateFrame self.images = None window.MDIChildWnd.__init__(self) def OnC...
mhammondREPO_NAMEpywin32PATH_START.@pywin32_extracted@pywin32-main@Pythonwin@pywin@Demos@splittst.py@.PATH_END.py
{ "filename": "DivFrhoResolutionStudy.py", "repo_name": "mmicromegas/ransX", "repo_path": "ransX_extracted/ransX-master/EQUATIONS/FOR_RESOLUTION_STUDY/DivFrhoResolutionStudy.py", "type": "Python" }
import numpy as np from scipy import integrate import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Ar...
mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EQUATIONS@FOR_RESOLUTION_STUDY@DivFrhoResolutionStudy.py@.PATH_END.py
{ "filename": "test_fm_fakedisk.py", "repo_name": "vortex-exoplanet/VIP", "repo_path": "VIP_extracted/VIP-master/tests/pre_3_10/test_fm_fakedisk.py", "type": "Python" }
""" Tests for fm/fakecomp.py """ import sys sys.path.append(".../tests") from tests.helpers import aarc import sys sys.path.append(".../tests") from tests.helpers import fixture import sys sys.path.append(".../tests") from tests.helpers import np from vip_hci.fm import cube_inject_fakedisk from vip_hci.fm import cu...
vortex-exoplanetREPO_NAMEVIPPATH_START.@VIP_extracted@VIP-master@tests@pre_3_10@test_fm_fakedisk.py@.PATH_END.py
{ "filename": "optical_flow.py", "repo_name": "itseez/opencv", "repo_path": "opencv_extracted/opencv-master/samples/dnn/optical_flow.py", "type": "Python" }
#!/usr/bin/env python ''' This sample using FlowNet v2 and RAFT model to calculate optical flow. FlowNet v2 Original Paper: https://arxiv.org/abs/1612.01925. FlowNet v2 Repo: https://github.com/lmb-freiburg/flownet2. Download the converted .caffemodel model from https://drive.google.com/open?id=16qvE9VNmU39NttpZwZs8...
itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@samples@dnn@optical_flow.py@.PATH_END.py
{ "filename": "InstrumentData.py", "repo_name": "agreenbaum/ImPlaneIA", "repo_path": "ImPlaneIA_extracted/ImPlaneIA-master/nrm_analysis/InstrumentData.py", "type": "Python" }
#! /usr/bin/env python """ InstrumentData Class -- defines data format, wavelength info, mask geometry Instruments/masks supported: GPI NRM NIRISS AMI VISIR SAM ** we like acronyms ** """ # Standard Imports from __future__ import print_function import numpy as np from astropy.io import fits import os, sys, time #...
agreenbaumREPO_NAMEImPlaneIAPATH_START.@ImPlaneIA_extracted@ImPlaneIA-master@nrm_analysis@InstrumentData.py@.PATH_END.py
{ "filename": "DIP.py", "repo_name": "EjjeSynho/DIP", "repo_path": "DIP_extracted/DIP-main/DIP.py", "type": "Python" }
#%% # Commom modules import torch import numpy as np from torch import nn from torch.nn.functional import conv3d class DIP(nn.Module): def __init__(self, tel, device, norm_mode): super().__init__() self.oversampling = 1 self.norm_mode = norm_mode self.img_size = tel.img_r...
EjjeSynhoREPO_NAMEDIPPATH_START.@DIP_extracted@DIP-main@DIP.py@.PATH_END.py
{ "filename": "create_skeleton.py", "repo_name": "galtay/urchin", "repo_path": "urchin_extracted/urchin-main/src/eagle/create_skeleton.py", "type": "Python" }
import os import sys import h5py import h5py_wrap as h5 import numpy as np def create_skeleton( fname0 ): """ Given the name of any file in an Eagle snapshot, this function creates a set of skeleton output files which contain fields for gas particle IDs and HI number density. """ if not os.path....
galtayREPO_NAMEurchinPATH_START.@urchin_extracted@urchin-main@src@eagle@create_skeleton.py@.PATH_END.py
{ "filename": "XID+posterior_analysis_validation.ipynb", "repo_name": "H-E-L-P/XID_plus", "repo_path": "XID_plus_extracted/XID_plus-master/docs/build/html/notebooks/examples/XID+posterior_analysis_validation.ipynb", "type": "Jupyter Notebook" }
# XID+ Example Output Analysis (This is based on a Jupyter notebook, available in the [XID+ package](https://github.com/H-E-L-P/XID_plus/tree/master/docs/notebooks/examples/) and can be interactively run and edited) This notebook provides some example code for basic analysis of the XID+ outputs, including: 1. Loadin...
H-E-L-PREPO_NAMEXID_plusPATH_START.@XID_plus_extracted@XID_plus-master@docs@build@html@notebooks@examples@XID+posterior_analysis_validation.ipynb@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/io/clipboard/__init__.py", "type": "Python" }
""" Pyperclip A cross-platform clipboard module for Python, with copy & paste functions for plain text. By Al Sweigart al@inventwithpython.com Licence at LICENSES/PYPERCLIP_LICENSE Usage: import pyperclip pyperclip.copy('The text to be copied to the clipboard.') spam = pyperclip.paste() if not pyperclip.is_a...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@io@clipboard@__init__.py@.PATH_END.py
{ "filename": "How_to_open_the_machine_learning_H5_files_hdr2.1.ipynb", "repo_name": "HETDEX/hetdex_api", "repo_path": "hetdex_api_extracted/hetdex_api-master/notebooks/old_notebooks/How_to_open_the_machine_learning_H5_files_hdr2.1.ipynb", "type": "Jupyter Notebook" }
# How to Open Machine Learning Input Products For each detectid in the line emission database (detect_hdr2.h5) we have generated 100 pixel (200 Angstrom) by 9 pixel fiber cutouts of the weighted sum of all fibers used to measured the extracton as well as cutouts of the four brightest fibers contributing to the flux. W...
HETDEXREPO_NAMEhetdex_apiPATH_START.@hetdex_api_extracted@hetdex_api-master@notebooks@old_notebooks@How_to_open_the_machine_learning_H5_files_hdr2.1.ipynb@.PATH_END.py
{ "filename": "_currentvalue.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/slider/_currentvalue.py", "type": "Python" }
import _plotly_utils.basevalidators class CurrentvalueValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="currentvalue", parent_name="layout.slider", **kwargs ): super(CurrentvalueValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@slider@_currentvalue.py@.PATH_END.py
{ "filename": "oci_generative_ai.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/llms/oci_generative_ai.py", "type": "Python" }
from __future__ import annotations import json from abc import ABC, abstractmethod from enum import Enum from typing import Any, Dict, Iterator, List, Mapping, Optional from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.outputs import ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@llms@oci_generative_ai.py@.PATH_END.py
{ "filename": "dq_init_step.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/dq_init/dq_init_step.py", "type": "Python" }
#! /usr/bin/env python from stdatamodels.jwst import datamodels from ..stpipe import Step from . import dq_initialization __all__ = ["DQInitStep"] class DQInitStep(Step): """Initialize the Data Quality extension from the mask reference file. The dq_init step initializes the pixeldq attribute of the ...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@dq_init@dq_init_step.py@.PATH_END.py
{ "filename": "main_step2.py", "repo_name": "shihyuntang/igrins_rv", "repo_path": "igrins_rv_extracted/igrins_rv-master/main_step2.py", "type": "Python" }
from Engine.importmodule import * from Engine.importmodule import read_prepdata from Engine.set_argparse import _argparse_step2 from Engine.IO_AB import setup_templates, init_fitsread, setup_outdir from Engine.clips import basicclip_above from Engine.contfit import a0cont from Engine.classes import Fit...
shihyuntangREPO_NAMEigrins_rvPATH_START.@igrins_rv_extracted@igrins_rv-master@main_step2.py@.PATH_END.py
{ "filename": "plot_wind.ipynb", "repo_name": "sirocco-rt/sirocco", "repo_path": "sirocco_extracted/sirocco-main/docs/sphinx/source/plotting/plot_wind.ipynb", "type": "Jupyter Notebook" }
# Plotting Wind Properties As described under [Models](../output/model.rst), SIROCCO saves wind properties in binary wind_save files. This notebook explains how to read and plot wind variables for the ```cv_standard``` file found in the examples. Before running the python commands, you need to run the model from the co...
sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@docs@sphinx@source@plotting@plot_wind.ipynb@.PATH_END.py
{ "filename": "welcome.md", "repo_name": "amrvac/amrvac", "repo_path": "amrvac_extracted/amrvac-master/doc/welcome.md", "type": "Markdown" }
# Welcome page [TOC] # Introduction {#introduction} This is the documentation for the 3.1 version of MPI-AMRVAC. The code is available on [Github](https://github.com/amrvac/amrvac), and the documentation on [amrvac.org](http://amrvac.org/). If you have questions about MPI-AMRVAC, please send them to the mailing list...
amrvacREPO_NAMEamrvacPATH_START.@amrvac_extracted@amrvac-master@doc@welcome.md@.PATH_END.py
{ "filename": "example_lognorm_censored_MAR.py", "repo_name": "rfeldmann/leopy", "repo_path": "leopy_extracted/leopy-master/examples/example_lognorm_censored_MAR.py", "type": "Python" }
"""Example of data with missing and censored values and lognormal distribution This file is part of LEO-Py -- Likelihood Estimation of Observational data with Python Copyright 2019 University of Zurich, Robert Feldmann LEO-Py is free software: you can redistribute it and/or modify it under the terms of the GNU Gener...
rfeldmannREPO_NAMEleopyPATH_START.@leopy_extracted@leopy-master@examples@example_lognorm_censored_MAR.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/box/selected/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._marker import Marker else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"])
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@box@selected@__init__.py@.PATH_END.py
{ "filename": "_align.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/title/_align.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="indicator.title", **kwargs): super(AlignValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@title@_align.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "ejhigson/perfectns", "repo_path": "perfectns_extracted/perfectns-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
ejhigsonREPO_NAMEperfectnsPATH_START.@perfectns_extracted@perfectns-master@docs@conf.py@.PATH_END.py
{ "filename": "bspline.py", "repo_name": "grzeimann/Panacea", "repo_path": "Panacea_extracted/Panacea-master/bspline.py", "type": "Python" }
# -*- coding: utf-8 -*- """Python/Numpy implementation of Bspline basis functions via Cox - de Boor algorithm.""" from __future__ import division, print_function, absolute_import from functools import partial import numpy as np class memoize(object): """Cache the return value of a method. This class is m...
grzeimannREPO_NAMEPanaceaPATH_START.@Panacea_extracted@Panacea-master@bspline.py@.PATH_END.py
{ "filename": "histogram_ops_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/kernel_tests/histogram_ops_test.py", "type": "Python" }
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@kernel_tests@histogram_ops_test.py@.PATH_END.py
{ "filename": "radialfun.py", "repo_name": "dsavransky/EXOSIMS", "repo_path": "EXOSIMS_extracted/EXOSIMS-master/EXOSIMS/util/radialfun.py", "type": "Python" }
""" Utilities for radial computations on rectangular data arrays """ import numpy as np from scipy.interpolate import RectBivariateSpline from scipy import optimize def pixel_dists(dims, center): """ Compute pixel distances from center of an image Args: dims (tuple(float,float)): Ima...
dsavranskyREPO_NAMEEXOSIMSPATH_START.@EXOSIMS_extracted@EXOSIMS-master@EXOSIMS@util@radialfun.py@.PATH_END.py
{ "filename": "_bordercolor.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): super(BordercolorValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scatterpolargl@marker@colorbar@_bordercolor.py@.PATH_END.py