metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "_stream.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/heatmap/_stream.py", "type": "Python" }
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="heatmap", **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@heatmap@_stream.py@.PATH_END.py
{ "filename": "common.py", "repo_name": "marblestation/iSpec", "repo_path": "iSpec_extracted/iSpec-master/ispec/common.py", "type": "Python" }
# # This file is part of iSpec. # Copyright Sergi Blanco-Cuaresma - http://www.blancocuaresma.com/s/ # # iSpec is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
marblestationREPO_NAMEiSpecPATH_START.@iSpec_extracted@iSpec-master@ispec@common.py@.PATH_END.py
{ "filename": "misc_functions.py", "repo_name": "ireis/PRF", "repo_path": "PRF_extracted/PRF-master/PRF/misc_functions.py", "type": "Python" }
import numpy from numba import jit from scipy.stats import norm cache = True ############################################################ ############################################################ ############ Propogate Probabilities functions ############ #########################################################...
ireisREPO_NAMEPRFPATH_START.@PRF_extracted@PRF-master@PRF@misc_functions.py@.PATH_END.py
{ "filename": "dcr_metric.py", "repo_name": "lsst/rubin_sim", "repo_path": "rubin_sim_extracted/rubin_sim-main/rubin_sim/maf/metrics/dcr_metric.py", "type": "Python" }
__all__ = ("DcrPrecisionMetric",) import numpy as np import rubin_scheduler.utils as utils import rubin_sim.maf.utils as mafUtils from .base_metric import BaseMetric class DcrPrecisionMetric(BaseMetric): """Determine how precise a DCR correction could be made Parameters ---------- atm_err : `float...
lsstREPO_NAMErubin_simPATH_START.@rubin_sim_extracted@rubin_sim-main@rubin_sim@maf@metrics@dcr_metric.py@.PATH_END.py
{ "filename": "ernie.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/langchain/langchain/embeddings/ernie.py", "type": "Python" }
from typing import TYPE_CHECKING, Any from langchain._api import create_importer if TYPE_CHECKING: from langchain_community.embeddings import ErnieEmbeddings # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEP...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@langchain@langchain@embeddings@ernie.py@.PATH_END.py
{ "filename": "parallel.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/joblib/joblib/parallel.py", "type": "Python" }
""" Helpers for embarrassingly parallel code. """ # Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org > # Copyright: 2010, Gael Varoquaux # License: BSD 3 clause from __future__ import division import os import sys from math import sqrt import functools import collections import time import threading ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@joblib@joblib@parallel.py@.PATH_END.py
{ "filename": "test_numpy_compat.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/indexes/test_numpy_compat.py", "type": "Python" }
import numpy as np import pytest from pandas import ( CategoricalIndex, DatetimeIndex, Index, PeriodIndex, TimedeltaIndex, isna, ) import pandas._testing as tm from pandas.api.types import ( is_complex_dtype, is_numeric_dtype, ) from pandas.core.arrays import BooleanArray from pandas.co...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@indexes@test_numpy_compat.py@.PATH_END.py
{ "filename": "autocorr.py", "repo_name": "HETDEX/elixer", "repo_path": "elixer_extracted/elixer-main/elixer/emcee/autocorr.py", "type": "Python" }
# -*- coding: utf-8 -*- import logging import numpy as np __all__ = ["function_1d", "integrated_time", "AutocorrError"] logger = logging.getLogger(__name__) def next_pow_two(n): """Returns the next power of two greater than or equal to `n`""" i = 1 while i < n: i = i << 1 return i def fu...
HETDEXREPO_NAMEelixerPATH_START.@elixer_extracted@elixer-main@elixer@emcee@autocorr.py@.PATH_END.py
{ "filename": "plot_stars.py", "repo_name": "vblanka24/Ba_star_classification_PaperIII", "repo_path": "Ba_star_classification_PaperIII_extracted/Ba_star_classification_PaperIII-main/data_processing_and_plotting/plot_stars.py", "type": "Python" }
import sys, os import pandas as pd import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np from process_data_lib import * FIGSIZE = [20, 8] EDGECOLOR = "midnightblue" MARKERCOLOR = "yellow" FONTSIZE = 18 MARKERSIZE = 16 LINESIZE = 2 ZMIN = 6 IRONZ = 26 LIMIT_DIL = False def get_dic...
vblanka24REPO_NAMEBa_star_classification_PaperIIIPATH_START.@Ba_star_classification_PaperIII_extracted@Ba_star_classification_PaperIII-main@data_processing_and_plotting@plot_stars.py@.PATH_END.py
{ "filename": "getcollisionsY1_ran.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/scripts/getcollisionsY1_ran.py", "type": "Python" }
''' Find all of the collisions for Y1 randoms ''' import numpy as np import os from astropy.table import Table import argparse from fiberassign.hardware import load_hardware from fiberassign.tiles import load_tiles from fiberassign.targets import Targets, TargetsAvailable, LocationsAvailable, create_tagalong, load_tar...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@scripts@getcollisionsY1_ran.py@.PATH_END.py
{ "filename": "hb.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/io/harwell_boeing/hb.py", "type": "Python" }
""" Implementation of Harwell-Boeing read/write. At the moment not the full Harwell-Boeing format is supported. Supported features are: - assembled, non-symmetric, real matrices - integer for pointer/indices - exponential format for float values, and int format """ from __future__ import division, print_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@io@harwell_boeing@hb.py@.PATH_END.py
{ "filename": "test_background_tasks.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/test_background_tasks.py", "type": "Python" }
import asyncio from datetime import timedelta from pathlib import Path from typing import TYPE_CHECKING, AsyncGenerator, Iterable, Tuple from unittest import mock import pytest import prefect.results from prefect import Task, task, unmapped from prefect.blocks.core import Block from prefect.client.orchestration impor...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@test_background_tasks.py@.PATH_END.py
{ "filename": "_showticksuffix.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py", "type": "Python" }
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattermapbox.marker.colorbar", **kwargs, ): super(ShowticksuffixValidator, self).__init__...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattermapbox@marker@colorbar@_showticksuffix.py@.PATH_END.py
{ "filename": "_lightposition.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/volume/_lightposition.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "volume" _path_str = "volume.lightposition" _valid_props = {"x", "y", "z"} # x ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@volume@_lightposition.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "simonsobs/socs", "repo_path": "socs_extracted/socs-main/socs/agents/labjack/__init__.py", "type": "Python" }
simonsobsREPO_NAMEsocsPATH_START.@socs_extracted@socs-main@socs@agents@labjack@__init__.py@.PATH_END.py
{ "filename": "itep.py", "repo_name": "astrocatalogs/supernovae", "repo_path": "supernovae_extracted/supernovae-master/tasks/itep.py", "type": "Python" }
"""Import tasks for ITEP. Import tasks for the Sternberg Astronomical Institute's Supernova Light Curve Catalog, from the ITEP-SAI group. """ import csv import os import re from collections import OrderedDict from html import unescape from astrocats.catalog.utils import jd_to_mjd, pbar, uniq_cdl from astrocats.catalo...
astrocatalogsREPO_NAMEsupernovaePATH_START.@supernovae_extracted@supernovae-master@tasks@itep.py@.PATH_END.py
{ "filename": "test_shell_util.py", "repo_name": "crossbario/crossbar", "repo_path": "crossbar_extracted/crossbar-master/crossbar/shell/tests/test_shell_util.py", "type": "Python" }
############################################################################### # # Crossbar.io Shell # Copyright (c) typedef int GmbH. Licensed under EUPLv1.2. # ############################################################################### from crossbar.shell.util import localnow def test_localnow(): now = lo...
crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@shell@tests@test_shell_util.py@.PATH_END.py
{ "filename": "MakeTable1.ipynb", "repo_name": "kgullikson88/Companion-Finder", "repo_path": "Companion-Finder_extracted/Companion-Finder-master/MakeTable1.ipynb", "type": "Jupyter Notebook" }
#Making Table 1 for the paper Table 1 contains the radial velocity measurements shifted to the reference frame of the binary system velocity. Therefore I need a bit of code to make the table. ```python import numpy as np import pandas as pd import MassRatio_Fitter import matplotlib.pyplot as plt %matplotlib inline `...
kgullikson88REPO_NAMECompanion-FinderPATH_START.@Companion-Finder_extracted@Companion-Finder-master@MakeTable1.ipynb@.PATH_END.py
{ "filename": "spinOS_io.py", "repo_name": "matthiasfabry/spinOS", "repo_path": "spinOS_extracted/spinOS-master/modules/spinOS_io.py", "type": "Python" }
""" Copyright 2020-2024 Matthias Fabry This file is part of spinOS. spinOS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. spinOS is distri...
matthiasfabryREPO_NAMEspinOSPATH_START.@spinOS_extracted@spinOS-master@modules@spinOS_io.py@.PATH_END.py
{ "filename": "noxfile.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/noxfile.py", "type": "Python" }
""" Nox is an automation tool used by PlasmaPy to run tests, build documentation, and perform other checks. Nox sessions are defined in noxfile.py. Running `nox` without arguments will run tests with the version of Python that `nox` is installed under, skipping slow tests. To invoke a nox session, enter the top-level ...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@noxfile.py@.PATH_END.py
{ "filename": "test_c_implementation_simplified.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/test/suite/compile_tests/test_c_implementation_simplified.py", "type": "Python" }
import unittest import numpy from amuse.support.interface import InCodeComponentImplementation from amuse.test.amusetest import TestWithMPI from amuse.test import compile_tools from amuse.support import exceptions import os import time from amuse.units import nbody_system from amuse.units import units from amuse impo...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@test@suite@compile_tests@test_c_implementation_simplified.py@.PATH_END.py
{ "filename": "test_lg.py", "repo_name": "icrar/daliuge", "repo_path": "daliuge_extracted/daliuge-master/daliuge-translator/test/dropmake/test_lg.py", "type": "Python" }
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2024 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
icrarREPO_NAMEdaliugePATH_START.@daliuge_extracted@daliuge-master@daliuge-translator@test@dropmake@test_lg.py@.PATH_END.py
{ "filename": "firefly-js-modules.md", "repo_name": "Caltech-IPAC/firefly", "repo_path": "firefly_extracted/firefly-master/docs/firefly-js-modules.md", "type": "Markdown" }
### Modules in use for the firefly js environment **React.js**, see: http://facebook.github.io/react/docs/getting-started.html * the core UI library **underscore.string**, see: http://epeli.github.io/underscore.string/ * complete string manipulation operations **lodash**, see https://lodash.com * useful utility ...
Caltech-IPACREPO_NAMEfireflyPATH_START.@firefly_extracted@firefly-master@docs@firefly-js-modules.md@.PATH_END.py
{ "filename": "test_assumed_shape.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/f2py/tests/test_assumed_shape.py", "type": "Python" }
import os import pytest import tempfile from . import util class TestAssumedShapeSumExample(util.F2PyTest): sources = [ util.getpath("tests", "src", "assumed_shape", "foo_free.f90"), util.getpath("tests", "src", "assumed_shape", "foo_use.f90"), util.getpath("tests", "src", "assumed_shape"...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@f2py@tests@test_assumed_shape.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/stream/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._token import TokenValidator from ._maxpoints import MaxpointsValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@stream@__init__.py@.PATH_END.py
{ "filename": "policies.py", "repo_name": "DLR-RM/stable-baselines3", "repo_path": "stable-baselines3_extracted/stable-baselines3-master/stable_baselines3/common/policies.py", "type": "Python" }
"""Policies: abstract base class and concrete implementations.""" import collections import copy import warnings from abc import ABC, abstractmethod from functools import partial from typing import Any, Optional, TypeVar, Union import numpy as np import torch as th from gymnasium import spaces from torch import nn f...
DLR-RMREPO_NAMEstable-baselines3PATH_START.@stable-baselines3_extracted@stable-baselines3-master@stable_baselines3@common@policies.py@.PATH_END.py
{ "filename": "nm.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/experimental/sparse/nm.py", "type": "Python" }
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@experimental@sparse@nm.py@.PATH_END.py
{ "filename": "example_HelicalTangled_jet.ipynb", "repo_name": "me-manu/gammaALPs", "repo_path": "gammaALPs_extracted/gammaALPs-master/notebooks/example_HelicalTangled_jet.ipynb", "type": "Jupyter Notebook" }
This example shows the HelicalTangled magnetic field class, for a blazar jet magnetic field comprised of a helical and a tangled component. Values used for the jet properties come from the best fit of the Potter & Cotter model: Potter & Cotter 2015, https://ui.adsabs.harvard.edu/abs/2015MNRAS.453.4070P/ ## Imports `...
me-manuREPO_NAMEgammaALPsPATH_START.@gammaALPs_extracted@gammaALPs-master@notebooks@example_HelicalTangled_jet.ipynb@.PATH_END.py
{ "filename": "typing.py", "repo_name": "astropy/astropy", "repo_path": "astropy_extracted/astropy-main/astropy/io/typing.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Type annotations for ``astropy.io``. These are type annotations for I/O-related functions and classes. Some of the type objects can also be used as runtime-checkable :class:`~typing.Protocol` objects. """ from __future__ import annotations __all__ = ...
astropyREPO_NAMEastropyPATH_START.@astropy_extracted@astropy-main@astropy@io@typing.py@.PATH_END.py
{ "filename": "test_determine_distortion.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gnirs/tests/crossdispersed/test_determine_distortion.py", "type": "Python" }
#!/usr/bin/env python3 """ Test related to GNIRS Cross-dispersed spectroscopy arc primitives. Notes ----- - The `indirect` argument on `@pytest.mark.parametrize` fixture forces the `ad` and `ad_ref` fixtures to be called and the AstroData object returned. """ import numpy as np import os import pytest import astrod...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gnirs@tests@crossdispersed@test_determine_distortion.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/image/legendgrouptitle/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._font import Font else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@image@legendgrouptitle@__init__.py@.PATH_END.py
{ "filename": "Surface.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/tests/functional/Surfaces/Surface.py", "type": "Python" }
#ATS:t1 = test( SELF, "--CRKSPH True --cfl 0.25 --clearDirectories True --steps=2 --nx=50 --ny=50 --checkAnswer=True --detectSurfaces=True --detectThreshold=0.99 --sweepAngle=pi/4.0 --detectRange=2.0", label="Surface Detection Test -- 2-D (serial)") from math import * import mpi import os, sys, shutil from Spher...
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@tests@functional@Surfaces@Surface.py@.PATH_END.py
{ "filename": "test_nlargest.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/series/methods/test_nlargest.py", "type": "Python" }
""" Note: for naming purposes, most tests are title with as e.g. "test_nlargest_foo" but are implicitly also testing nsmallest_foo. """ import numpy as np import pytest import pandas as pd from pandas import Series import pandas._testing as tm def assert_check_nselect_boundary(vals, dtype, method): # helper fun...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@series@methods@test_nlargest.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "shadden/celmech", "repo_path": "celmech_extracted/celmech-master/setup.py", "type": "Python" }
try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension from codecs import open import os import sys import sysconfig suffix = sysconfig.get_config_var('EXT_SUFFIX') if suffix is None: suffix = ".so" # Try to get git hash try: import subprocess ...
shaddenREPO_NAMEcelmechPATH_START.@celmech_extracted@celmech-master@setup.py@.PATH_END.py
{ "filename": "truthloader.py", "repo_name": "LSSTDESC/elasticc", "repo_path": "elasticc_extracted/elasticc-main/tom_management/truthloader.py", "type": "Python" }
raise RuntimeError( "Deprecated. See elasticc2/management/commands/load_snana_fits.py in desc-tom" ) import sys import pandas import numpy import json import gzip import logging from tomconnection import TomConnection class TruthLoader(TomConnection): def __init__( self, *args, converters=None, urlend=None, rena...
LSSTDESCREPO_NAMEelasticcPATH_START.@elasticc_extracted@elasticc-main@tom_management@truthloader.py@.PATH_END.py
{ "filename": "mwm_rv.py", "repo_name": "sdss/target_selection", "repo_path": "target_selection_extracted/target_selection-main/python/target_selection/cartons/mwm_rv.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: Pramod Gupta (psgupta@uw.edu) # @Date: 2020-06-10 # @Filename: mwm_rv.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) import math import peewee from sdssdb.peewee.sdss5db.catalogdb import ( Catalog, CatalogToGaia_DR3, ...
sdssREPO_NAMEtarget_selectionPATH_START.@target_selection_extracted@target_selection-main@python@target_selection@cartons@mwm_rv.py@.PATH_END.py
{ "filename": "_hoveron.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatter/_hoveron.py", "type": "Python" }
import _plotly_utils.basevalidators class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scatter", **kwargs): super(HoveronValidator, 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@scatter@_hoveron.py@.PATH_END.py
{ "filename": "055_markdown.md", "repo_name": "CosmicFish/CosmicFish", "repo_path": "CosmicFish_extracted/CosmicFish-master/bundled/doxygen/testing/055_markdown.md", "type": "Markdown" }
<!-- // objective: test markdown parsing // check: md_055_markdown.xml --> # Foo ## Bar [Inline link](http://example.com/inline) [Reference link][1] [1]: http://example.com/reference ## Baz More text [Upper-cased reference link on last line][U] [U]: http://example.com/last-line
CosmicFishREPO_NAMECosmicFishPATH_START.@CosmicFish_extracted@CosmicFish-master@bundled@doxygen@testing@055_markdown.md@.PATH_END.py
{ "filename": "test_serpapi.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/integration_tests/utilities/test_serpapi.py", "type": "Python" }
"""Integration test for SerpAPI.""" from langchain_community.utilities import SerpAPIWrapper def test_call() -> None: """Test that call gives the correct answer.""" chain = SerpAPIWrapper() # type: ignore[call-arg] output = chain.run("What was Obama's first name?") assert output == "Barack Hussein O...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@integration_tests@utilities@test_serpapi.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._value import ValueValidator from ._templateitemname import TemplateitemnameValidator from ._name import NameValidator from ._enabled import EnabledValidator from ._dtickrange import DtickrangeValidator...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@parcats@line@colorbar@tickformatstop@__init__.py@.PATH_END.py
{ "filename": "_functions.py", "repo_name": "AOtools/aotools", "repo_path": "aotools_extracted/aotools-main/aotools/functions/_functions.py", "type": "Python" }
import numpy def gaussian2d(size, width, amplitude=1., cent=None): ''' Generates 2D gaussian distribution Args: size (tuple, float): Dimensions of Array to place gaussian (y, x) width (tuple, float): Width of distribution. Accepts tuple for x and y values ...
AOtoolsREPO_NAMEaotoolsPATH_START.@aotools_extracted@aotools-main@aotools@functions@_functions.py@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/pie/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="pie", **kwargs): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, parent_name=par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@pie@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "alejandrobll/py-sphviewer", "repo_path": "py-sphviewer_extracted/py-sphviewer-master/sphviewer/__init__.py", "type": "Python" }
""" Py-SPHViewer is an object-oriented rendering library. It was developed mainly for rendering cosmological Smoothed Particles Hydrodynamical (SPH) simulations of galaxy formation, but in its current version, it can renderize any set of particles. Author: Alejandro Benitez-Llambay E-mail: If you have any question, o...
alejandrobllREPO_NAMEpy-sphviewerPATH_START.@py-sphviewer_extracted@py-sphviewer-master@sphviewer@__init__.py@.PATH_END.py
{ "filename": "stn_alt_az_integration_test.py", "repo_name": "creaneroDIAS/beamModelTester", "repo_path": "beamModelTester_extracted/beamModelTester-master/WIP/stn_alt_az_integration_test.py", "type": "Python" }
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed May 30 19:17:51 2018 @author: creanero """ from horizontalAzEl2stnAzEl import horizon_to_station stn_alt_az=horizon_to_station(stnid, merge_df.az, merge_df.alt) #stn_alt_az_t=zip(*stn_alt_az) # #stn_alt=np.array(stn_alt_az_t[1])*180/np.pi #stn_az=np.a...
creaneroDIASREPO_NAMEbeamModelTesterPATH_START.@beamModelTester_extracted@beamModelTester-master@WIP@stn_alt_az_integration_test.py@.PATH_END.py
{ "filename": "DoubleSeq.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/LGPL/CommonSoftware/acspycommon/src/ACSImpl/DoubleSeq.py", "type": "Python" }
# @(#) $Id: DoubleSeq.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $ # # Copyright (C) 2001 # Associated Universities, Inc. Washington DC, USA. # # Produced for the ALMA project # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as pu...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@LGPL@CommonSoftware@acspycommon@src@ACSImpl@DoubleSeq.py@.PATH_END.py
{ "filename": "compiler.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/cairosvg_ES/cssselect2/compiler.py", "type": "Python" }
import re from urllib.parse import urlparse from tinycss2.nth import parse_nth from webencodings import ascii_lower from . import parser from .parser import SelectorError # http://dev.w3.org/csswg/selectors/#whitespace split_whitespace = re.compile('[^ \t\r\n\f]+').findall def compile_selector_list(input, namespac...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@cairosvg_ES@cssselect2@compiler.py@.PATH_END.py
{ "filename": "test_decomp_cholesky.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/linalg/tests/test_decomp_cholesky.py", "type": "Python" }
import pytest import numpy as np from numpy.testing import assert_array_almost_equal from pytest import raises as assert_raises from numpy import array, transpose, dot, conjugate, zeros_like, empty from numpy.random import random from scipy.linalg import (cholesky, cholesky_banded, cho_solve_banded, cho_factor, c...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@linalg@tests@test_decomp_cholesky.py@.PATH_END.py
{ "filename": "test_classes.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/numpy/polynomial/tests/test_classes.py", "type": "Python" }
"""Test inter-conversion of different polynomial classes. This tests the convert and cast methods of all the polynomial classes. """ from __future__ import division, absolute_import, print_function import operator as op from numbers import Number import numpy as np from numpy.polynomial import ( Polynomial, Leg...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@numpy@polynomial@tests@test_classes.py@.PATH_END.py
{ "filename": "tf2migration_fuzz.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/fuzzing/tf2migration_fuzz.py", "type": "Python" }
# Copyright 2021 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@security@fuzzing@tf2migration_fuzz.py@.PATH_END.py
{ "filename": "rayleigh_benard.py", "repo_name": "minkailin/stratsi", "repo_path": "stratsi_extracted/stratsi-master/dedalus_repo/examples/ivp/2d_rayleigh_benard/rayleigh_benard.py", "type": "Python" }
""" Dedalus script for 2D Rayleigh-Benard convection. This script uses a Fourier basis in the x direction with periodic boundary conditions. The equations are scaled in units of the buoyancy time (Fr = 1). This script can be ran serially or in parallel, and uses the built-in analysis framework to save data snapshots...
minkailinREPO_NAMEstratsiPATH_START.@stratsi_extracted@stratsi-master@dedalus_repo@examples@ivp@2d_rayleigh_benard@rayleigh_benard.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/splom/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="splom.marker.colorbar.tickformatstop", **kwargs, ): super(TemplateitemnameValidator, self)...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@splom@marker@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py
{ "filename": "example_poincare.py", "repo_name": "GalacticDynamics-Oxford/Agama", "repo_path": "Agama_extracted/Agama-master/py/example_poincare.py", "type": "Python" }
#!/usr/bin/python ''' This interactive example shows the meridional plane {x,z} (left panel) and the Poincare surface of section {x,v_x} for an axisymmetric potential, where x is either cylindrical radius R when L_z>0 or the x coordinate otherwise, and points on the SoS are placed when passing through the z=0 plane wit...
GalacticDynamics-OxfordREPO_NAMEAgamaPATH_START.@Agama_extracted@Agama-master@py@example_poincare.py@.PATH_END.py
{ "filename": "run_3MdB_17.py", "repo_name": "Morisset/pyCloudy", "repo_path": "pyCloudy_extracted/pyCloudy-master/pyCloudy/3MdB_17/run_3MdB_17.py", "type": "Python" }
import pyCloudy as pc #import numpy as np from pyCloudy.db import use3MdB #import pandas as pd #import pymysql #import os #import matplotlib.pyplot as plt import pyneb as pn #%% OVN_dic = {'host' : 'nefeles', 'user_name' : 'OVN_admin', 'user_passwd' : 'getenv', 'base_name' : '3MdB_17', 'tmp...
MorissetREPO_NAMEpyCloudyPATH_START.@pyCloudy_extracted@pyCloudy-master@pyCloudy@3MdB_17@run_3MdB_17.py@.PATH_END.py
{ "filename": "Errors.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/tools/cython/Cython/Compiler/Errors.py", "type": "Python" }
# # Errors # from __future__ import absolute_import try: from __builtin__ import basestring as any_string_type except ImportError: any_string_type = (bytes, str) import sys from contextlib import contextmanager from ..Utils import open_new_file from . import DebugFlags from . import Options class PyrexE...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@cython@Cython@Compiler@Errors.py@.PATH_END.py
{ "filename": "_tickvalssrc.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/surface/colorbar/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="surface.colorbar", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, par...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@surface@colorbar@_tickvalssrc.py@.PATH_END.py
{ "filename": "fancyfont.py", "repo_name": "CadenArmstrong/simuTrans", "repo_path": "simuTrans_extracted/simuTrans-master/fancyfont.py", "type": "Python" }
class colors(object): def __init__(self): self.HEADER = '\033[95m' self.OKBLUE = '\033[94m' self.OKGREEN = '\033[92m' self.WARNING = '\033[93m' self.FAIL = '\033[91m' self.ENDC = '\033[0m' self.BOLD = "\033[1m" self.UNDERLINE = '\033[4m' def red(s...
CadenArmstrongREPO_NAMEsimuTransPATH_START.@simuTrans_extracted@simuTrans-master@fancyfont.py@.PATH_END.py
{ "filename": "constants.py", "repo_name": "sebhoof/bhsr", "repo_path": "bhsr_extracted/bhsr-main/python/bhsr/constants.py", "type": "Python" }
#################################### # Physical and other constants # #################################### import numpy as np # Units conversions eV_per_kg = 1.782622e-36 inv_eVs = 6.582119e-16 mP_in_GeV = 1.220890e19 # GeV mP_in_eV = 1e9*mP_in_GeV # eV mPred_in_GeV = mP_in_GeV/np.sqrt(8.0*np.pi) # GeV mPred_in_e...
sebhoofREPO_NAMEbhsrPATH_START.@bhsr_extracted@bhsr-main@python@bhsr@constants.py@.PATH_END.py
{ "filename": "process_wvlsol_volume_fit.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/igrins/procedures/process_wvlsol_volume_fit.py", "type": "Python" }
import numpy as np import pandas as pd # import json from numpy.linalg import lstsq from .nd_poly import NdPolyNamed def _get_center(key_list): key_list = sorted(key_list) n = len(key_list) assert divmod(n, 2)[1] == 1 center_key = key_list[divmod(n, 2)[0]] return center_key def _append_offset(...
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@procedures@process_wvlsol_volume_fit.py@.PATH_END.py
{ "filename": "test1a.py", "repo_name": "teuben/QAC", "repo_path": "QAC_extracted/QAC-master/ngVLA/test1a.py", "type": "Python" }
# test1 with more configurations # # test = 'test1a' model = '../models/skymodel.fits' # this has phasecenter with dec=-30 for ALMA sims phasecenter = 'J2000 180.000000deg 40.000000deg' # so modify this for ngVLA # pick the piece of the model to image, and at what pixel size # natively th...
teubenREPO_NAMEQACPATH_START.@QAC_extracted@QAC-master@ngVLA@test1a.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sherpa/sherpa", "repo_path": "sherpa_extracted/sherpa-main/sherpa/utils/__init__.py", "type": "Python" }
# # Copyright (C) 2007, 2015, 2016, 2018 - 2024 # Smithsonian Astrophysical Observatory # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your o...
sherpaREPO_NAMEsherpaPATH_START.@sherpa_extracted@sherpa-main@sherpa@utils@__init__.py@.PATH_END.py
{ "filename": "cube_utils.py", "repo_name": "radio-astro-tools/spectral-cube", "repo_path": "spectral-cube_extracted/spectral-cube-master/spectral_cube/cube_utils.py", "type": "Python" }
import contextlib import warnings from copy import deepcopy import builtins import dask.array as da import numpy as np from astropy.wcs.utils import proj_plane_pixel_area from astropy.wcs import (WCSSUB_SPECTRAL, WCSSUB_LONGITUDE, WCSSUB_LATITUDE) from astropy.wcs import WCS from . import wcs_utils from .utils import...
radio-astro-toolsREPO_NAMEspectral-cubePATH_START.@spectral-cube_extracted@spectral-cube-master@spectral_cube@cube_utils.py@.PATH_END.py
{ "filename": "DistortedModel.py", "repo_name": "CU-NESS/pylinex", "repo_path": "pylinex_extracted/pylinex-master/pylinex/model/DistortedModel.py", "type": "Python" }
""" File: pylinex/model/DistortedModel.py Author: Keith Tauscher Date: 3 Aug 2018 Description: File containing a class representing a model which is the same as a different model except with transformed inputs. """ import numpy as np from distpy import TransformList from .Model import Model class Distort...
CU-NESSREPO_NAMEpylinexPATH_START.@pylinex_extracted@pylinex-master@pylinex@model@DistortedModel.py@.PATH_END.py
{ "filename": "models.py", "repo_name": "OxES/OxKeplerSC", "repo_path": "OxKeplerSC_extracted/OxKeplerSC-master/src/jc/models.py", "type": "Python" }
from __future__ import division from math import log, pi from numpy import ndarray, array, zeros from scipy.optimize import minimize from pyde.de import DiffEvol from .core import * from .fmodels import models as fm ln_two_pi = log(2*pi) def lnlikelihood(obs, mod, err): n = float(obs.size) return -0.5 * (n*l...
OxESREPO_NAMEOxKeplerSCPATH_START.@OxKeplerSC_extracted@OxKeplerSC-master@src@jc@models.py@.PATH_END.py
{ "filename": "test_example.py", "repo_name": "spacetelescope/pystortion", "repo_path": "pystortion_extracted/pystortion-master/pystortion/tests/test_example.py", "type": "Python" }
def test_primes(): from ..example_mod import primes assert primes(10) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] def test_deprecation(): import warnings warnings.warn( "This is deprecated, but shouldn't raise an exception, unless " "enable_deprecations_as_exceptions() called from conft...
spacetelescopeREPO_NAMEpystortionPATH_START.@pystortion_extracted@pystortion-master@pystortion@tests@test_example.py@.PATH_END.py
{ "filename": "top__desc.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-loss-functions/top__desc.md", "type": "Markdown" }
The number of top samples in a group that are used to calculate the ranking metric. Top samples are either the samples with the largest approx values or the ones with the lowest target values if approx values are the same.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-loss-functions@top__desc.md@.PATH_END.py
{ "filename": "logger.py", "repo_name": "cosmostatistics/ebms_mcmc", "repo_path": "ebms_mcmc_extracted/ebms_mcmc-main/ebms_mcmc/util/logger.py", "type": "Python" }
import logging import os from importlib import reload def separator()->None: logging.info( "-----------------------------------------------" ) def init_logger(*, fn: str, verbose: bool = True) -> None: """ Initialize the logger with the specified log file path and verbosity level. A...
cosmostatisticsREPO_NAMEebms_mcmcPATH_START.@ebms_mcmc_extracted@ebms_mcmc-main@ebms_mcmc@util@logger.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "cmccully/astroscrappy", "repo_path": "astroscrappy_extracted/astroscrappy-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # 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 file. # # All configurati...
cmccullyREPO_NAMEastroscrappyPATH_START.@astroscrappy_extracted@astroscrappy-master@docs@conf.py@.PATH_END.py
{ "filename": "gui.py", "repo_name": "gammapy/enrico", "repo_path": "enrico_extracted/enrico-master/enrico/gui.py", "type": "Python" }
import gtk import sys,os import logging from math import log10,pow from enrico.extern.configobj import ConfigObj, flatten_errors from enrico.config import get_config from enrico.utils import GetIRFS,Checkevtclass class EnricoGui: def getirfs(self,widget,data=None): win = gtk.Window(gtk.WINDOW_TOPLEVEL) ...
gammapyREPO_NAMEenricoPATH_START.@enrico_extracted@enrico-master@enrico@gui.py@.PATH_END.py
{ "filename": "mpsig.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/scipy/py2/scipy/signal/tests/mpsig.py", "type": "Python" }
""" Some signal functions implemented using mpmath. """ from __future__ import division try: import mpmath except ImportError: mpmath = None def _prod(seq): """Returns the product of the elements in the sequence `seq`.""" p = 1 for elem in seq: p *= elem return p def _relative_degr...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@scipy@py2@scipy@signal@tests@mpsig.py@.PATH_END.py
{ "filename": "lisaxml.py", "repo_name": "vallis/synthlisa", "repo_path": "synthlisa_extracted/synthlisa-master/lisasim/lisaxml.py", "type": "Python" }
# $Id$ # $Date$ # $Author$ # $Revision$ import synthlisa import sys import os.path import time import string import re import math import numpy import pyRXPU as pyRXP # require xmlutils from pyRXP examples import xmlutils # begin definitions encoding synthLISA syntax argumentList = {} outputList = {} # give para...
vallisREPO_NAMEsynthlisaPATH_START.@synthlisa_extracted@synthlisa-master@lisasim@lisaxml.py@.PATH_END.py
{ "filename": "parameters.py", "repo_name": "mtalapinto/moes", "repo_path": "platospec/optics/parameters.py", "type": "Python" }
import numpy as np def get_name(i): basedir = '/home/eduspec/Documentos/moes/v3.1/vis/parameters/' param_file = open(basedir+'init_params_siman_a.txt', 'r') params_names = [] for line in param_file: linea = line.split() params_names.append(str(linea[0])) for k in range(len(params_...
mtalapintoREPO_NAMEmoesPATH_START.@platospec@optics@parameters.py@.PATH_END.py
{ "filename": "override.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/setuptools/py3/_distutils_hack/override.py", "type": "Python" }
__import__('_distutils_hack').do_override()
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@setuptools@py3@_distutils_hack@override.py@.PATH_END.py
{ "filename": "_bgcolor.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/_bgcolor.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="parcoords.line.colorbar", **kwargs ): super(BgcolorValidator, self).__init__( plotly_name=plotly_name, parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@_bgcolor.py@.PATH_END.py
{ "filename": "random_cat.md", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/docs/source/random_cat.md", "type": "Markdown" }
# Create random catalogue This section describes how to create a random catalogue from ShapePipe mask files corresponding to a selection of tiles. ## Set up First, if if does not exist already, create the file ``tile_numbers.txt`` containing a list of tile IDs, one per line. This is the same format as the input file...
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@docs@source@random_cat.md@.PATH_END.py
{ "filename": "markup.py", "repo_name": "dingswin/psrvlbireduce", "repo_path": "psrvlbireduce_extracted/psrvlbireduce-master/datareduction/markup.py", "type": "Python" }
# This code is in the public domain, it comes # with absolutely no warranty and you can do # absolutely whatever you want with it. __date__ = '1 October 2012' __version__ = '1.9' __doc__= """ This is markup.py - a Python module that attempts to make it easier to generate HTML/XML from a Python program in an intuitive,...
dingswinREPO_NAMEpsrvlbireducePATH_START.@psrvlbireduce_extracted@psrvlbireduce-master@datareduction@markup.py@.PATH_END.py
{ "filename": "ModLinAlg.py", "repo_name": "saopicc/DDFacet", "repo_path": "DDFacet_extracted/DDFacet-master/DDFacet/Array/ModLinAlg.py", "type": "Python" }
''' DDFacet, a facet-based radio imaging package Copyright (C) 2013-2016 Cyril Tasse, l'Observatoire de Paris, SKA South Africa, Rhodes University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; eit...
saopiccREPO_NAMEDDFacetPATH_START.@DDFacet_extracted@DDFacet-master@DDFacet@Array@ModLinAlg.py@.PATH_END.py
{ "filename": "missing-values__categorical-features-values.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-missing-values/missing-values__categorical-features-values.md", "type": "Markdown" }
{{ product }} does not process categorical features in any specific way.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-missing-values@missing-values__categorical-features-values.md@.PATH_END.py
{ "filename": "test_svm_hrcsbc.py", "repo_name": "spacetelescope/drizzlepac", "repo_path": "drizzlepac_extracted/drizzlepac-main/tests/hap/test_svm_hrcsbc.py", "type": "Python" }
""" This module tests full pipeline SVM processing as a demonstration template. """ import datetime import glob import os import pytest import numpy as np from drizzlepac.haputils import astroquery_utils as aqutils from drizzlepac import runsinglehap from astropy.io import fits, ascii from pathlib import Path """ ...
spacetelescopeREPO_NAMEdrizzlepacPATH_START.@drizzlepac_extracted@drizzlepac-main@tests@hap@test_svm_hrcsbc.py@.PATH_END.py
{ "filename": "version.py", "repo_name": "emerge-erc/ALminer", "repo_path": "ALminer_extracted/ALminer-main/alminer/version.py", "type": "Python" }
__version__ = "0.1.3"
emerge-ercREPO_NAMEALminerPATH_START.@ALminer_extracted@ALminer-main@alminer@version.py@.PATH_END.py
{ "filename": "nuance.py", "repo_name": "lgrcia/paper-nuance", "repo_path": "paper-nuance_extracted/paper-nuance-main/workflows/benchmark/scripts/nuance.py", "type": "Python" }
import yaml import numpy as np import os from multiprocessing import cpu_count cores = 1 #int(eval(snakemake.wildcards.cores)) os.environ["XLA_FLAGS"] = f"--xla_force_host_platform_device_count={cores}" import jax from time import time as _time import jax import os os.environ["XLA_FLAGS"] = f"--xla_force_host_plat...
lgrciaREPO_NAMEpaper-nuancePATH_START.@paper-nuance_extracted@paper-nuance-main@workflows@benchmark@scripts@nuance.py@.PATH_END.py
{ "filename": "solves.py", "repo_name": "jax-ml/jax", "repo_path": "jax_extracted/jax-main/jax/_src/lax/control_flow/solves.py", "type": "Python" }
# Copyright 2022 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
jax-mlREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@lax@control_flow@solves.py@.PATH_END.py
{ "filename": "agreement.py", "repo_name": "statsmodels/statsmodels", "repo_path": "statsmodels_extracted/statsmodels-main/statsmodels/graphics/agreement.py", "type": "Python" }
""" Bland-Altman mean-difference plots Author: Joses Ho License: BSD-3 """ import numpy as np from . import utils def mean_diff_plot( m1, m2, sd_limit=1.96, ax=None, scatter_kwds=None, mean_line_kwds=None, limit_lines_kwds=None, ): """ Construct a Tukey/Bland-Altman Mean Differe...
statsmodelsREPO_NAMEstatsmodelsPATH_START.@statsmodels_extracted@statsmodels-main@statsmodels@graphics@agreement.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/MAROONXDR", "repo_path": "MAROONXDR_extracted/MAROONXDR-main/maroonxdr/maroonx/recipes/__init__.py", "type": "Python" }
GeminiDRSoftwareREPO_NAMEMAROONXDRPATH_START.@MAROONXDR_extracted@MAROONXDR-main@maroonxdr@maroonx@recipes@__init__.py@.PATH_END.py
{ "filename": "_smoothing.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattersmith/line/_smoothing.py", "type": "Python" }
import _plotly_utils.basevalidators class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="scattersmith.line", **kwargs ): super(SmoothingValidator, self).__init__( plotly_name=plotly_name, paren...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattersmith@line@_smoothing.py@.PATH_END.py
{ "filename": "_position.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/funnelarea/title/_position.py", "type": "Python" }
import _plotly_utils.basevalidators class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="position", parent_name="funnelarea.title", **kwargs ): super(PositionValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@funnelarea@title@_position.py@.PATH_END.py
{ "filename": "_color.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/violin/marker/line/_color.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.marker.line", **kwargs): super(ColorValidator, 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@violin@marker@line@_color.py@.PATH_END.py
{ "filename": "CAMB.py", "repo_name": "Valcin/BE_HaPPy", "repo_path": "BE_HaPPy_extracted/BE_HaPPy-master/coefficients/other neutrinos masses/0.45eV/CAMB.py", "type": "Python" }
import numpy as np import camb import sys,os ################################## INPUT ###################################### # neutrino parameters hierarchy = 'degenerate' #'degenerate', 'normal', 'inverted' Mnu = 0.45 #eV Nnu = 3 #number of massive neutrinos Neff = 3.046 #~ Neff = 0.00641 # ...
ValcinREPO_NAMEBE_HaPPyPATH_START.@BE_HaPPy_extracted@BE_HaPPy-master@coefficients@other neutrinos masses@0.45eV@CAMB.py@.PATH_END.py
{ "filename": "definitions.py", "repo_name": "rennehan/yt-swift", "repo_path": "yt-swift_extracted/yt-swift-main/yt/frontends/artio/definitions.py", "type": "Python" }
yt_to_art = { "Density": "HVAR_GAS_DENSITY", "TotalEnergy": "HVAR_GAS_ENERGY", "GasEnergy": "HVAR_INTERNAL_ENERGY", "Pressure": "HVAR_PRESSURE", "XMomentumDensity": "HVAR_MOMENTUM_X", "YMomentumDensity": "HVAR_MOMENTUM_Y", "ZMomentumDensity": "HVAR_MOMENTUM_Z", "Gamma": "HVAR_GAMMA", ...
rennehanREPO_NAMEyt-swiftPATH_START.@yt-swift_extracted@yt-swift-main@yt@frontends@artio@definitions.py@.PATH_END.py
{ "filename": "custom_batching.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/custom_batching.py", "type": "Python" }
# Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@jax@_src@custom_batching.py@.PATH_END.py
{ "filename": "_separatethousands.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py", "type": "Python" }
import _plotly_utils.basevalidators class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.coloraxis.colorbar", **kwargs, ): super(SeparatethousandsValidator, self).__init...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@coloraxis@colorbar@_separatethousands.py@.PATH_END.py
{ "filename": "manually_test_power_mnu.ipynb", "repo_name": "LSSTDESC/CCL", "repo_path": "CCL_extracted/CCL-master/benchmarks/data/codes/manually_test_power_mnu.ipynb", "type": "Jupyter Notebook" }
```python %matplotlib inline import matplotlib.pyplot as plt import numpy as np import pyccl as ccl ``` We want to compare the matter power spectrum as output manually from class with massive neutrinos nonzero to the power spectrum as output from class via ccl for the same parameters. This is a sanity check. ```pyt...
LSSTDESCREPO_NAMECCLPATH_START.@CCL_extracted@CCL-master@benchmarks@data@codes@manually_test_power_mnu.ipynb@.PATH_END.py
{ "filename": "test_py_hipert_em.py", "repo_name": "NumCosmo/NumCosmo", "repo_path": "NumCosmo_extracted/NumCosmo-master/tests/test_py_hipert_em.py", "type": "Python" }
#!/usr/bin/env python # # test_py_hipert_em.py # # Tue Apr 16 10:24:29 2024 # Copyright 2024 Sandro Dias Pinto Vitenti # <vitenti@uel.br> # # test_hipert_em.py # Copyright (C) 2024 Sandro Dias Pinto Vitenti <vitenti@uel.br> # # numcosmo is free software: you can redistribute it and/or modify it # under the terms of t...
NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@tests@test_py_hipert_em.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/cluster/__init__.py", "type": "Python" }
from .load import load from pyspedas.utilities.datasets import find_datasets from .load_csa import load_csa from typing import List, Union, Optional from .fgm import fgm from .aspoc import aspoc from .cis import cis from .dwp import dwp from .edi import edi from .efw import efw from .peace import peace from .rapid imp...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@cluster@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/indicator/delta/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._valueformat import ValueformatValidator from ._relative import RelativeValidator from ._reference import ReferenceValidator from ._position import PositionValidator from ._increasing import IncreasingValidator from ._font import FontValidator ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@indicator@delta@__init__.py@.PATH_END.py
{ "filename": "yaml2avsc.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/utility/DP02/yaml2avsc.py", "type": "Python" }
import json, sys from yaml import load, dump from yaml import CLoader as Loader, CDumper as Dumper def fix_type(typ): if typ == 'char': return 'string' else: return typ def table_schema(table): fields = [] for column in table['columns']: field = { 'name':column['name'], ...
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@utility@DP02@yaml2avsc.py@.PATH_END.py
{ "filename": "measurement_set.py", "repo_name": "RTIP/artip", "repo_path": "artip_extracted/artip-master/src/main/python/models/measurement_set.py", "type": "Python" }
import casac import itertools import numpy from datetime import datetime, timedelta from itertools import product from casa.casa_runner import CasaRunner from casa.flag_reasons import BAD_ANTENNA, BAD_ANTENNA_TIME, BAD_BASELINE_TIME, BAD_TIME from casa.flag_recorder import FlagRecorder from configs import config from ...
RTIPREPO_NAMEartipPATH_START.@artip_extracted@artip-master@src@main@python@models@measurement_set.py@.PATH_END.py
{ "filename": "martini_simba.ipynb", "repo_name": "kyleaoman/martini", "repo_path": "martini_extracted/martini-main/examples/martini_simba.ipynb", "type": "Jupyter Notebook" }
In this short tutorial we will install and use [MARTINI](https://martini.readthedocs.io/en/latest/), an analysis package for creating mock HI-data cubes similar to radio interferometer data, written by Kyle Oman (kyle.a.oman@durham.ac.uk). This example uses input from the [Simba](https://ui.adsabs.harvard.edu/abs/2019M...
kyleaomanREPO_NAMEmartiniPATH_START.@martini_extracted@martini-main@examples@martini_simba.ipynb@.PATH_END.py
{ "filename": "optical_depth.py", "repo_name": "annehutter/grid-model", "repo_path": "grid-model_extracted/grid-model-master/analysis_tools/optical_depth.py", "type": "Python" }
import sys import os import numpy as np from numpy.random import random import math as m import matplotlib as m m.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as mt from matplotlib import gridspec from matplotlib import rc from grid import * import read_parameterfile as rp import read_fields as ...
annehutterREPO_NAMEgrid-modelPATH_START.@grid-model_extracted@grid-model-master@analysis_tools@optical_depth.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "Vital-Fernandez/lime", "repo_path": "lime_extracted/lime-master/docs/source/conf.py", "type": "Python" }
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
Vital-FernandezREPO_NAMElimePATH_START.@lime_extracted@lime-master@docs@source@conf.py@.PATH_END.py
{ "filename": "full_W_complex.py", "repo_name": "ratt-ru/CubiCal", "repo_path": "CubiCal_extracted/CubiCal-master/cubical/kernels/full_W_complex.py", "type": "Python" }
# CubiCal: a radio interferometric calibration suite # (c) 2017 Rhodes University & Jonathan S. Kenyon # http://github.com/ratt-ru/CubiCal # This code is distributed under the terms of GPLv2, see LICENSE.md for details """ Cython kernels for the robust 2x2 complex gain machine. Functions require output arrays to be pr...
ratt-ruREPO_NAMECubiCalPATH_START.@CubiCal_extracted@CubiCal-master@cubical@kernels@full_W_complex.py@.PATH_END.py