metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "CatwomanModel.py", "repo_name": "kevin218/Eureka", "repo_path": "Eureka_extracted/Eureka-main/src/eureka/S5_lightcurve_fitting/models/CatwomanModel.py", "type": "Python" }
from functools import partial try: import catwoman except ImportError: print("Could not import catwoman. Functionality may be limited.") from .BatmanModels import BatmanTransitModel class CatwomanTransitModel(BatmanTransitModel): """Transit Model""" def __init__(self, **kwargs): """Initialize...
kevin218REPO_NAMEEurekaPATH_START.@Eureka_extracted@Eureka-main@src@eureka@S5_lightcurve_fitting@models@CatwomanModel.py@.PATH_END.py
{ "filename": "polynomials.py", "repo_name": "igrins/plp", "repo_path": "plp_extracted/plp-master/igrins/libs/polynomials.py", "type": "Python" }
from __future__ import print_function import numpy.polynomial as P import numpy.polynomial.chebyshev as cheb def check_string(s): if isinstance(s, str): return True else: return False def convert_to_poly(p): if p[0].lower().startswith("poly"): return P.Polynomial(p[1]) eli...
igrinsREPO_NAMEplpPATH_START.@plp_extracted@plp-master@igrins@libs@polynomials.py@.PATH_END.py
{ "filename": "VoigtFit_example.py", "repo_name": "jkrogager/VoigtFit", "repo_path": "VoigtFit_extracted/VoigtFit-master/test_data/VoigtFit_example.py", "type": "Python" }
import numpy as np import VoigtFit ### Fit DLA towards quasar Q1313+1441 ### Observed in X-shooter P089.A-0068 z_DLA = 1.7941 logNHI = 21.3, 0.1 # value, uncertainty # If log(NHI) is not known use: #logNHI = None #### Load UVB and VIS data: UVB_fname = 'data/test_UVB_1d.spec' res_UVB = 8000 VIS_fname = 'data/test_...
jkrogagerREPO_NAMEVoigtFitPATH_START.@VoigtFit_extracted@VoigtFit-master@test_data@VoigtFit_example.py@.PATH_END.py
{ "filename": "nemotsf.py", "repo_name": "amusecode/amuse", "repo_path": "amuse_extracted/amuse-main/src/amuse/io/nemotsf.py", "type": "Python" }
import re import numpy from amuse.io import base from amuse.units import units from amuse.units import nbody_system from amuse import datamodel TEMPLATE = \ """set SnapShot set Parameters int Nobj {0.number_of_particles:d} double Time {0.time:e} tes set Particles int CoordSystem {0.coordinate_system_...
amusecodeREPO_NAMEamusePATH_START.@amuse_extracted@amuse-main@src@amuse@io@nemotsf.py@.PATH_END.py
{ "filename": "ompi_cluster.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/jax/_src/clusters/ompi_cluster.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@clusters@ompi_cluster.py@.PATH_END.py
{ "filename": "zwarning.py", "repo_name": "desihub/redrock", "repo_path": "redrock_extracted/redrock-main/py/redrock/zwarning.py", "type": "Python" }
""" redrock.zwarning ================ Mask bit definitions for zwarning. WARNING on the warnings: not all of these are implemented yet. """ #- TODO: Consider using something like desispec.maskbits to provide a more #- convenient wrapper class (probably copy it here; don't make a dependency) #- That class as-is would...
desihubREPO_NAMEredrockPATH_START.@redrock_extracted@redrock-main@py@redrock@zwarning.py@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scatter3d", **kwargs ): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "observations.py", "repo_name": "dannyjacobs/ECHO", "repo_path": "ECHO_extracted/ECHO-master/ECHO/observations.py", "type": "Python" }
from . import read_utils from . import plot_utils from . import position_utils from . import time_utils from . import beams import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.dates as mdate from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d import Axes3D import pandas...
dannyjacobsREPO_NAMEECHOPATH_START.@ECHO_extracted@ECHO-master@ECHO@observations.py@.PATH_END.py
{ "filename": "rfast_noise.py", "repo_name": "hablabx/rfast", "repo_path": "rfast_extracted/rfast-main/rfast_noise.py", "type": "Python" }
# import statements import time import shutil import sys import numpy as np import matplotlib.pyplot as plt from astropy.table import Table, Column, MaskedColumn from astropy.io import ascii from rfast_routines import noise from rfast_routines import inputs # get input script filen...
hablabxREPO_NAMErfastPATH_START.@rfast_extracted@rfast-main@rfast_noise.py@.PATH_END.py
{ "filename": "readme.md", "repo_name": "cameronliang/BayesVP", "repo_path": "BayesVP_extracted/BayesVP-master/readme.md", "type": "Markdown" }
bayesvp ======== ``bayesvp`` is a Bayesian MCMC parallel Voigt profile fitting routine. ``bayesvp`` provides a number of helpful executable scripts that work with command line arguments (saved in your environment ``PATH``). The main functionality is the MCMC Voigt profile fitting (``bvpfit``) where the user supplies ...
cameronliangREPO_NAMEBayesVPPATH_START.@BayesVP_extracted@BayesVP-master@readme.md@.PATH_END.py
{ "filename": "test_besancon.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/besancon/tests/test_besancon.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os from contextlib import contextmanager import pytest from ... import besancon from ...utils import commons from astroquery.utils.mocks import MockResponse # SKIP - don't run tests because Besancon folks don't want them (based on # the fact that ...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@besancon@tests@test_besancon.py@.PATH_END.py
{ "filename": "user.py", "repo_name": "rodluger/everest", "repo_path": "everest_extracted/everest-master/everest/user.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' :py:mod:`user.py` - User Python routines ---------------------------------------- This is the gateway to the :py:obj:`everest` catalog, containing all of the user-facing code. - :py:class:`Everest` is the main user-facing class for interfacing with the catalog - :py...
rodlugerREPO_NAMEeverestPATH_START.@everest_extracted@everest-master@everest@user.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/densitymapbox/hoverlabel/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): super(TextcaseValidator, self).__init__( plot...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymapbox@hoverlabel@font@_textcase.py@.PATH_END.py
{ "filename": "shallow_water_init_conds.py", "repo_name": "ExeClim/Isca", "repo_path": "Isca_extracted/Isca-master/src/extra/python/scripts/shallow_water_init_conds.py", "type": "Python" }
# -*- coding: utf-8 -*-s from typing import NoReturn import numpy as np import pdb import create_timeseries as cts import xarray as xar import gauss_grid as gg import matplotlib.pyplot as plt import windspharm as wsp import pdb def convert_to_vor_div(u_in, v_in, lat_arr, planet_radius): """convert spherical polar ...
ExeClimREPO_NAMEIscaPATH_START.@Isca_extracted@Isca-master@src@extra@python@scripts@shallow_water_init_conds.py@.PATH_END.py
{ "filename": "test_cdms.py", "repo_name": "D-arioSpace/astroquery", "repo_path": "astroquery_extracted/astroquery-main/astroquery/linelists/cdms/tests/test_cdms.py", "type": "Python" }
import numpy as np import pytest import os from astropy import units as u from astropy.table import Table from astroquery.linelists.cdms.core import CDMS, parse_letternumber from astroquery.utils.mocks import MockResponse colname_set = set(['FREQ', 'ERR', 'LGINT', 'DR', 'ELO', 'GUP', 'TAG', 'QNFMT', ...
D-arioSpaceREPO_NAMEastroqueryPATH_START.@astroquery_extracted@astroquery-main@astroquery@linelists@cdms@tests@test_cdms.py@.PATH_END.py
{ "filename": "brick.py", "repo_name": "astroweaver/the_farmer", "repo_path": "the_farmer_extracted/the_farmer-master/farmer/brick.py", "type": "Python" }
from collections import OrderedDict import config as conf from .image import BaseImage from .utils import load_brick_position, dilate_and_group, clean_catalog, build_regions, run_group from .group import Group import logging import os, time from functools import partial from astropy.nddata import Cutout2D import astro...
astroweaverREPO_NAMEthe_farmerPATH_START.@the_farmer_extracted@the_farmer-master@farmer@brick.py@.PATH_END.py
{ "filename": "codeutil.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipykernel/py2/ipykernel/codeutil.py", "type": "Python" }
# encoding: utf-8 """Utilities to enable code objects to be pickled. Any process that import this module will be able to pickle code objects. This includes the func_code attribute of any function. Once unpickled, new functions can be built using new.function(code, globals()). Eventually we need to automate all of ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipykernel@py2@ipykernel@codeutil.py@.PATH_END.py
{ "filename": "variable.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/src/prefect/cli/variable.py", "type": "Python" }
import json from typing import Any, Dict, List, Optional, Union import pendulum import typer from rich.pretty import Pretty from rich.table import Table from typing_extensions import Annotated from prefect.cli._types import PrefectTyper from prefect.cli._utilities import exit_with_error, exit_with_success from prefec...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@src@prefect@cli@variable.py@.PATH_END.py
{ "filename": "config_example.py", "repo_name": "jw-lin/lightbeam", "repo_path": "lightbeam_extracted/lightbeam-master/config_example.py", "type": "Python" }
''' example configuration file for run_bpm_example.py ''' ################################ ## free space wavelength (um) ## ################################ wl0 = 1.55 ######################## ## lantern parameters ## ######################## zex = 30000 # length of lantern, in um scale = 1/4 # how much smaller the ...
jw-linREPO_NAMElightbeamPATH_START.@lightbeam_extracted@lightbeam-master@config_example.py@.PATH_END.py
{ "filename": "test_survival.py", "repo_name": "scipy/scipy", "repo_path": "scipy_extracted/scipy-main/scipy/stats/tests/test_survival.py", "type": "Python" }
import pytest import numpy as np from numpy.testing import assert_equal, assert_allclose from scipy import stats from scipy.stats import _survival def _kaplan_meier_reference(times, censored): # This is a very straightforward implementation of the Kaplan-Meier # estimator that does almost everything different...
scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@stats@tests@test_survival.py@.PATH_END.py
{ "filename": "warnings.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/traitlets/py3/traitlets/utils/warnings.py", "type": "Python" }
from __future__ import annotations import inspect import os import typing as t import warnings def warn(msg: str, category: t.Any, *, stacklevel: int, source: t.Any = None) -> None: """Like warnings.warn(), but category and stacklevel are required. You pretty much never want the default stacklevel of 1, so ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@traitlets@py3@traitlets@utils@warnings.py@.PATH_END.py
{ "filename": "winatt.py", "repo_name": "shkarupa-alex/tfswin", "repo_path": "tfswin_extracted/tfswin-master/tfswin/winatt.py", "type": "Python" }
import numpy as np import tensorflow as tf from keras.src import initializers, layers, ops from keras.src.layers.input_spec import InputSpec from keras.src.saving import register_keras_serializable from tfswin.window import window_partition_fused, window_reverse_fused @register_keras_serializable(package='TFSwin') cl...
shkarupa-alexREPO_NAMEtfswinPATH_START.@tfswin_extracted@tfswin-master@tfswin@winatt.py@.PATH_END.py
{ "filename": "plot_b_aperture.py", "repo_name": "jpierel14/space_phot", "repo_path": "space_phot_extracted/space_phot-main/Docs/source/_examples/plot_b_aperture.py", "type": "Python" }
""" =================== Aperture Photometry =================== Measuring PSF Photometry with space_phot. """ ############################################################### # An example HST Dataset is downloaded, and then we measure # aperture photometry. This is public HST data for the # gravitationally lensed SN ...
jpierel14REPO_NAMEspace_photPATH_START.@space_phot_extracted@space_phot-main@Docs@source@_examples@plot_b_aperture.py@.PATH_END.py
{ "filename": "mod.md", "repo_name": "wlxu/RelicClass", "repo_path": "RelicClass_extracted/RelicClass-master/doc/input/mod.md", "type": "Markdown" }
Updating the manual =================== Author: D. C. Hooper (hooper@physik.rwth-aachen.de) This pdf manual and accompanying web version have been generated using the `doxygen` software (http://www.doxygen.org). This software directly reads the code and extracts the necessary comments to form the manual, meaning it is...
wlxuREPO_NAMERelicClassPATH_START.@RelicClass_extracted@RelicClass-master@doc@input@mod.md@.PATH_END.py
{ "filename": "index.md", "repo_name": "janosch314/GWFish", "repo_path": "GWFish_extracted/GWFish-main/docs/source/index.md", "type": "Markdown" }
# GWFish GWFish is a Fisher matrix code geared towards future gravitational-wave detectors. It is able to provide estimates of the signal-to-noise ratio and of the errors on our estimates of the parameters, for a signal as it would be seen by one or more future detectors, among: - [LIGO](https://ligo.caltech.edu) ...
janosch314REPO_NAMEGWFishPATH_START.@GWFish_extracted@GWFish-main@docs@source@index.md@.PATH_END.py
{ "filename": "_maxpoints.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py", "type": "Python" }
import _plotly_utils.basevalidators class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs ): super(MaxpointsValidator, self).__init__( plotly_name=plotly_name, parent...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@indicator@stream@_maxpoints.py@.PATH_END.py
{ "filename": "_version.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/ipython-genutils/py2/ipython_genutils/_version.py", "type": "Python" }
version_info = (0, 2, 0) __version__ = '.'.join(map(str, version_info))
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@ipython-genutils@py2@ipython_genutils@_version.py@.PATH_END.py
{ "filename": "test_5_occurrence.py", "repo_name": "GijsMulders/epos", "repo_path": "epos_extracted/epos-master/EPOS/scriptdir/tests/test_5_occurrence.py", "type": "Python" }
#! /usr/bin/env ipython ''' Test if EPOS can calculate occurrence rates Plots should appear in the directory png/test_5/occurrence/ ''' import EPOS ''' initialize the EPOS class ''' epos= EPOS.epos(name='test_5') ''' load the kepler dr25 exoplanets and survey efficiency ''' obs, survey= EPOS.kepler.dr25(Huber=True...
GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@scriptdir@tests@test_5_occurrence.py@.PATH_END.py
{ "filename": "bao_correlation_Chen2019.py", "repo_name": "Samreay/Barry", "repo_path": "Barry_extracted/Barry-master/barry/models/bao_correlation_Chen2019.py", "type": "Python" }
import sys sys.path.append("../..") from barry.models import PowerChen2019 from barry.models.bao_correlation import CorrelationFunctionFit import numpy as np class CorrChen2019(CorrelationFunctionFit): """xi(s) model inspired from Chen 2019. See https://ui.adsabs.harvard.edu/abs/2019JCAP...09..017C/abstract...
SamreayREPO_NAMEBarryPATH_START.@Barry_extracted@Barry-master@barry@models@bao_correlation_Chen2019.py@.PATH_END.py
{ "filename": "code_of_conduct.md", "repo_name": "sbi-dev/sbi", "repo_path": "sbi_extracted/sbi-main/docs/docs/code_of_conduct.md", "type": "Markdown" }
{!CODE_OF_CONDUCT.md!}
sbi-devREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@docs@docs@code_of_conduct.md@.PATH_END.py
{ "filename": "_z.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/contours/_z.py", "type": "Python" }
import _plotly_utils.basevalidators class ZValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="z", parent_name="surface.contours", **kwargs): super(ZValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@contours@_z.py@.PATH_END.py
{ "filename": "test_array_ext.py", "repo_name": "enthought/mayavi", "repo_path": "mayavi_extracted/mayavi-master/tvtk/tests/test_array_ext.py", "type": "Python" }
"""Unit tests for the array related extension code. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005, Enthought, Inc. # License: BSD Style. import unittest import numpy from tvtk.array_handler import ID_TYPE_CODE, set_id_type_array_py from tvtk.array_ext import set_id_type_array clas...
enthoughtREPO_NAMEmayaviPATH_START.@mayavi_extracted@mayavi-master@tvtk@tests@test_array_ext.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "nickhand/pyRSD", "repo_path": "pyRSD_extracted/pyRSD-master/pyRSD/rsd/power/gal/Pcs/__init__.py", "type": "Python" }
from .. import GalaxyPowerTerm, ZeroShotNoise from .PcAsA import PcAsA from .PcAsB import PcAsB from .PcBsA import PcBsA from .PcBsB import PcBsB class Pcs(GalaxyPowerTerm): """ The cross specturm of central and satellite galaxies """ name = "Pcs" def __init__(self, model): super(Pcs,...
nickhandREPO_NAMEpyRSDPATH_START.@pyRSD_extracted@pyRSD-master@pyRSD@rsd@power@gal@Pcs@__init__.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/threeML/plugins/__init__.py", "type": "Python" }
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@plugins@__init__.py@.PATH_END.py
{ "filename": "album.py", "repo_name": "dstndstn/astrometry.net", "repo_path": "astrometry.net_extracted/astrometry.net-main/net/views/album.py", "type": "Python" }
import os from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import get_object_or_404, redirect, render from django.template import Context, RequestContext, loader from django.contrib.auth.decorators import login_required from django import forms from dj...
dstndstnREPO_NAMEastrometry.netPATH_START.@astrometry.net_extracted@astrometry.net-main@net@views@album.py@.PATH_END.py
{ "filename": "test_colours.py", "repo_name": "Samreay/ChainConsumer", "repo_path": "ChainConsumer_extracted/ChainConsumer-master/tests/test_colours.py", "type": "Python" }
import numpy as np import pytest from chainconsumer.color_finder import ALL_COLOURS, colors def test_colors_rgb2hex_1(): c = np.array([1, 1, 1, 1]) assert colors.get_formatted([c])[0] == "#ffffff" def test_colors_rgb2hex_2(): c = np.array([0, 0, 0.5, 1]) assert colors.get_formatted([c])[0] == "#000...
SamreayREPO_NAMEChainConsumerPATH_START.@ChainConsumer_extracted@ChainConsumer-master@tests@test_colours.py@.PATH_END.py
{ "filename": "_style.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/waterfall/outsidetextfont/_style.py", "type": "Python" }
import _plotly_utils.basevalidators class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="waterfall.outsidetextfont", **kwargs ): super(StyleValidator, self).__init__( plotly_name=plotly_name, paren...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@waterfall@outsidetextfont@_style.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/tools/graph_transforms/README.md", "type": "Markdown" }
# Graph Transform Tool ## Table of Contents * [Introduction](#introduction) * [Using the Graph Transform Tool](#using-the-graph-transform-tool) * [Inspecting Graphs](#inspecting-graphs) * [Common Use Cases](#common-use-cases) * [Optimizing for Deployment](#optimizing-for-deployment) * [Fixing Miss...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@tools@graph_transforms@README.md@.PATH_END.py
{ "filename": "pull_data.py", "repo_name": "annayqho/TheCannon", "repo_path": "TheCannon_extracted/TheCannon-master/code/lamost/abundances/pull_data.py", "type": "Python" }
""" Generate the files to run the abundances paper """ import pyfits import numpy as np from TheCannon import dataset import sys #sys.path.append("/Users/annaho/Dropbox/Research/TheCannon/code/lamost") #from get_colors import get_colors def load_all_ref_label(): DATA_DIR = "/Users/annaho/Data/LAMOST/Abundances" ...
annayqhoREPO_NAMETheCannonPATH_START.@TheCannon_extracted@TheCannon-master@code@lamost@abundances@pull_data.py@.PATH_END.py
{ "filename": "development.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/android/development.md", "type": "Markdown" }
# Development tools for Android TensorFlow Lite provides a number of tools for integrating models into Android apps. This page describes development tools for use in building apps with Kotlin, Java, and C++, as well as support for TensorFlow Lite development in Android Studio. Key Point: In general, you should use th...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@android@development.md@.PATH_END.py
{ "filename": "base_cxx_network.py", "repo_name": "pynucastro/pynucastro", "repo_path": "pynucastro_extracted/pynucastro-main/pynucastro/networks/base_cxx_network.py", "type": "Python" }
"""Support for a pure C++ reaction network. These functions will write the C++ code necessary to integrate a reaction network comprised of the rates that are passed in. """ import itertools import re import shutil import sys import warnings from abc import ABC, abstractmethod from pathlib import Path import numpy ...
pynucastroREPO_NAMEpynucastroPATH_START.@pynucastro_extracted@pynucastro-main@pynucastro@networks@base_cxx_network.py@.PATH_END.py
{ "filename": "considerations.ipynb", "repo_name": "nicokurtovic/SIMIO", "repo_path": "SIMIO_extracted/SIMIO-main/docs/content/considerations.ipynb", "type": "Jupyter Notebook" }
# Considerations ## Input image details For each template, aim to have a pixel size at least $\times6\sim10$ times smaller than the angular resolution and image sizes larger than $\times6\sim10''$. For optimal results, generate a different image for observations at different distances. In short, smaller pixel sizes a...
nicokurtovicREPO_NAMESIMIOPATH_START.@SIMIO_extracted@SIMIO-main@docs@content@considerations.ipynb@.PATH_END.py
{ "filename": "ncl.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/ncl.py", "type": "Python" }
""" pygments.lexers.ncl ~~~~~~~~~~~~~~~~~~~ Lexers for NCAR Command Language. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words from pygments.token import Text, Comment, O...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@ncl.py@.PATH_END.py
{ "filename": "cache.py", "repo_name": "vaexio/vaex", "repo_path": "vaex_extracted/vaex-master/packages/vaex-core/vaex/file/cache.py", "type": "Python" }
try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import logging import os import mmap import numpy as np from pyarrow.fs import FileSystemHandler import vaex.utils import vaex.file DEFAULT_BLOCK_SIZE = 1024*1024*1 # 1mb by default logger = logging.getLogger("vaex.f...
vaexioREPO_NAMEvaexPATH_START.@vaex_extracted@vaex-master@packages@vaex-core@vaex@file@cache.py@.PATH_END.py
{ "filename": "_offset.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/bar/_offset.py", "type": "Python" }
import _plotly_utils.basevalidators class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="offset", parent_name="bar", **kwargs): super(OffsetValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, array...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@bar@_offset.py@.PATH_END.py
{ "filename": "imviz_color_display.ipynb", "repo_name": "spacetelescope/jdaviz", "repo_path": "jdaviz_extracted/jdaviz-main/notebooks/concepts/imviz_color_display.ipynb", "type": "Jupyter Notebook" }
## Proof of concept using Imviz to display RGB layers We start off by silencing warnings that can happen when loading data as well as deprecation warnings, for clarity: ```python import warnings warnings.simplefilter('ignore') ``` Import modules needed for this notebook. ```python from glue.core.component_link im...
spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@notebooks@concepts@imviz_color_display.ipynb@.PATH_END.py
{ "filename": "extraction.py", "repo_name": "HiPERCAM/hipercam", "repo_path": "hipercam_extracted/hipercam-master/hipercam/extraction.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Defines classes and functions used to detect and characterise objects in photometric data. Adds optional dependency on sep package () """ import struct import sep from astropy.convolution import Gaussian2DKernel from astropy.stats import gaussian_fwh...
HiPERCAMREPO_NAMEhipercamPATH_START.@hipercam_extracted@hipercam-master@hipercam@extraction.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): 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@py2@plotly@graph_objs@barpolar@marker@colorbar@title@__init__.py@.PATH_END.py
{ "filename": "enable_mlir_bridge.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/compiler/mlir/tensorflow/g3doc/enable_mlir_bridge.md", "type": "Markdown" }
# Enable MLIR-Based new TPU Bridge **MLIR-Based new TPU Bridge is an experimental feature, tread lightly.** ## For TF 1.x-Based Models In tf.ConfigProto.Experimental, there is a knob controlling whether the new TPU Bridge is enabled or not. You can set it by using the following example code: ``` session_config = tf...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@compiler@mlir@tensorflow@g3doc@enable_mlir_bridge.md@.PATH_END.py
{ "filename": "recipes_FLAT.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/ghost/recipes/sq/recipes_FLAT.py", "type": "Python" }
""" Recipes available to data with tags ``['GHOST', 'CAL', 'FLAT']``. Default is ``makeProcessedFlat``. """ recipe_tags = set(['GHOST', 'CAL', 'FLAT']) def makeProcessedFlat(p): """ This recipe performs the standardization and corrections needed to convert the raw input flat images into a single stacked fl...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@ghost@recipes@sq@recipes_FLAT.py@.PATH_END.py
{ "filename": "legendre.py", "repo_name": "numpy/numpy", "repo_path": "numpy_extracted/numpy-main/numpy/polynomial/legendre.py", "type": "Python" }
""" ================================================== Legendre Series (:mod:`numpy.polynomial.legendre`) ================================================== This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a `Legendre` class that encapsulates the usual arit...
numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@polynomial@legendre.py@.PATH_END.py
{ "filename": "objects.Range.ipynb", "repo_name": "mwaskom/seaborn", "repo_path": "seaborn_extracted/seaborn-master/doc/_docstrings/objects.Range.ipynb", "type": "Jupyter Notebook" }
```python import seaborn.objects as so from seaborn import load_dataset penguins = load_dataset("penguins") ``` This mark will often be used in the context of a stat transform that adds an errorbar interval: ```python ( so.Plot(penguins, x="body_mass_g", y="species", color="sex") .add(so.Dot(), so.Agg(), so.Do...
mwaskomREPO_NAMEseabornPATH_START.@seaborn_extracted@seaborn-master@doc@_docstrings@objects.Range.ipynb@.PATH_END.py
{ "filename": "test_fit.py", "repo_name": "scikit-image/scikit-image", "repo_path": "scikit-image_extracted/scikit-image-main/skimage/measure/tests/test_fit.py", "type": "Python" }
import numpy as np import pytest from skimage._shared import testing from skimage._shared._warnings import expected_warnings from skimage._shared.testing import ( arch32, is_wasm, assert_almost_equal, assert_array_less, assert_equal, xfail, assert_stacklevel, ) from skimage.measure import C...
scikit-imageREPO_NAMEscikit-imagePATH_START.@scikit-image_extracted@scikit-image-main@skimage@measure@tests@test_fit.py@.PATH_END.py
{ "filename": "win32.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/colorama/py2/colorama/win32.py", "type": "Python" }
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004 try: import ctypes from ctypes import LibraryLoader windll = LibraryLoader(ctypes.WinDLL) from ctypes import wintypes except (AttributeErro...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@colorama@py2@colorama@win32.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "keras-team/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/merging/__init__.py", "type": "Python" }
keras-teamREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@merging@__init__.py@.PATH_END.py
{ "filename": "plotting.py", "repo_name": "Hoeijmakers/StarRotator", "repo_path": "StarRotator_extracted/StarRotator-master/lib/plotting.py", "type": "Python" }
def plot_star_3D(): #THIS IS NOT WORKING, ITS A WIP. import numpy as np import matplotlib.pyplot as plt from matplotlib import cm, colors from mpl_toolkits.mplot3d import Axes3D from scipy.special import sph_harm #import package to calculate spherical harmonics import pdb theta = n...
HoeijmakersREPO_NAMEStarRotatorPATH_START.@StarRotator_extracted@StarRotator-master@lib@plotting.py@.PATH_END.py
{ "filename": "test_merge_ordered.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/reshape/merge/test_merge_ordered.py", "type": "Python" }
import re import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, merge_ordered, ) import pandas._testing as tm @pytest.fixture def left(): return DataFrame({"key": ["a", "c", "e"], "lvalue": [1, 2.0, 3]}) @pytest.fixture def right(): return DataFrame({"key": ["b", "c"...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@reshape@merge@test_merge_ordered.py@.PATH_END.py
{ "filename": "check_configuration.py", "repo_name": "BiaPyX/BiaPy", "repo_path": "BiaPy_extracted/BiaPy-master/biapy/engine/check_configuration.py", "type": "Python" }
import os import numpy as np import collections from biapy.utils.misc import get_checkpoint_path from biapy.data.data_manipulation import check_value def check_configuration(cfg, jobname, check_data_paths=True): """ Check if the configuration is good. """ if cfg.SYSTEM.NUM_WORKERS < 0: raise ...
BiaPyXREPO_NAMEBiaPyPATH_START.@BiaPy_extracted@BiaPy-master@biapy@engine@check_configuration.py@.PATH_END.py
{ "filename": "occurrence.py", "repo_name": "GijsMulders/epos", "repo_path": "epos_extracted/epos-master/EPOS/plot/occurrence.py", "type": "Python" }
#import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.colorbar as clrbar import matplotlib.colors from matplotlib.cm import get_cmap import numpy as np from . import helpers, parametric from EPOS.population import periodradius clrs= ['r','g','b','m'] # in epos.prep...
GijsMuldersREPO_NAMEeposPATH_START.@epos_extracted@epos-master@EPOS@plot@occurrence.py@.PATH_END.py
{ "filename": "plot_hdbscan.py", "repo_name": "scikit-learn/scikit-learn", "repo_path": "scikit-learn_extracted/scikit-learn-main/examples/cluster/plot_hdbscan.py", "type": "Python" }
# -*- coding: utf-8 -*- """ ==================================== Demo of HDBSCAN clustering algorithm ==================================== .. currentmodule:: sklearn In this demo we will take a look at :class:`cluster.HDBSCAN` from the perspective of generalizing the :class:`cluster.DBSCAN` algorithm. We'll compare bo...
scikit-learnREPO_NAMEscikit-learnPATH_START.@scikit-learn_extracted@scikit-learn-main@examples@cluster@plot_hdbscan.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "waynebhayes/SpArcFiRe", "repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/modeling/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage provides a framework for representing models and performing model evaluation and fitting. It supports 1D and 2D models and fitting with parameter constraints. It has some predefined models and fitting routines. """ from . import fitti...
waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@modeling@__init__.py@.PATH_END.py
{ "filename": "_hovertemplatesrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergeo/_hovertemplatesrc.py", "type": "Python" }
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattergeo", **kwargs ): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergeo@_hovertemplatesrc.py@.PATH_END.py
{ "filename": "linear.py", "repo_name": "google/flax", "repo_path": "flax_extracted/flax-main/flax/linen/linear.py", "type": "Python" }
# Copyright 2024 The Flax 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@flax@linen@linear.py@.PATH_END.py
{ "filename": "test_function_calling.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/core/tests/unit_tests/utils/test_function_calling.py", "type": "Python" }
# mypy: disable-error-code="annotation-unchecked" import sys import typing from collections.abc import Iterable, Mapping, MutableMapping, Sequence from typing import Annotated as ExtensionsAnnotated from typing import ( Any, Callable, Literal, Optional, Union, ) from typing import TypedDict as Typin...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@core@tests@unit_tests@utils@test_function_calling.py@.PATH_END.py
{ "filename": "_gradient.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatterpolar/marker/_gradient.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolar.marker" _path_str = "scatterpolar.marker.gradient" _valid_props = {"color", "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatterpolar@marker@_gradient.py@.PATH_END.py
{ "filename": "_shadow.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatter3d/legendgrouptitle/font/_shadow.py", "type": "Python" }
import _plotly_utils.basevalidators class ShadowValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): super(ShadowValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatter3d@legendgrouptitle@font@_shadow.py@.PATH_END.py
{ "filename": "optimize_pca.py", "repo_name": "arjunsavel/cortecs", "repo_path": "cortecs_extracted/cortecs-main/src/cortecs/opt/optimize_pca.py", "type": "Python" }
""" Performs simple optimization of PCA hyperparameters — i.e., number of components and wavelength index for computing eigenvectors. """ import math import numpy as np from tqdm.autonotebook import tqdm from cortecs.fit.fit import Fitter from cortecs.fit.fit_neural_net import * from cortecs.fit.fit_pca import * de...
arjunsavelREPO_NAMEcortecsPATH_START.@cortecs_extracted@cortecs-main@src@cortecs@opt@optimize_pca.py@.PATH_END.py
{ "filename": "paths.py", "repo_name": "NikolayBritavskiyAstro/fast_rotating_binaries", "repo_path": "fast_rotating_binaries_extracted/fast_rotating_binaries-main/src/scripts/paths.py", "type": "Python" }
""" Exposes common paths useful for manipulating datasets and generating figures. """ from pathlib import Path # Absolute path to the top level of the repository root = Path(__file__).resolve().parents[2].absolute() # Absolute path to the `src` folder src = root / "src" # Absolute path to the `src/data` folder (con...
NikolayBritavskiyAstroREPO_NAMEfast_rotating_binariesPATH_START.@fast_rotating_binaries_extracted@fast_rotating_binaries-main@src@scripts@paths.py@.PATH_END.py
{ "filename": "cholesky_update_test.py", "repo_name": "google/jax", "repo_path": "jax_extracted/jax-main/tests/cholesky_update_test.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 # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing...
googleREPO_NAMEjaxPATH_START.@jax_extracted@jax-main@tests@cholesky_update_test.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "solerjuan/magnetar", "repo_path": "magnetar_extracted/magnetar-master/extern/__init__.py", "type": "Python" }
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This packages contains python packages that are bundled with the affiliated package but are external to the affiliated package, and hence are developed in a separate source tree. Note that this package is distinct from the /cextern directory of the sou...
solerjuanREPO_NAMEmagnetarPATH_START.@magnetar_extracted@magnetar-master@extern@__init__.py@.PATH_END.py
{ "filename": "test_rates.py", "repo_name": "pynucastro/pynucastro", "repo_path": "pynucastro_extracted/pynucastro-main/pynucastro/rates/tests/test_rates.py", "type": "Python" }
# unit tests for rates import math import pytest from pytest import approx from pynucastro import Composition, rates from pynucastro.nucdata import Nucleus class TestTfactors: @pytest.fixture(scope="class") def tf(self): return rates.Tfactors(2.e9) def test_tfactors(self, tf): assert tf...
pynucastroREPO_NAMEpynucastroPATH_START.@pynucastro_extracted@pynucastro-main@pynucastro@rates@tests@test_rates.py@.PATH_END.py
{ "filename": "barklem2016.ipynb", "repo_name": "tardis-sn/carsus", "repo_path": "carsus_extracted/carsus-master/docs/io/barklem2016.ipynb", "type": "Jupyter Notebook" }
## Barklem & Collet 2016 Data Ingestion [Barklem & Collet 2016](https://ui.adsabs.harvard.edu/abs/2016A%26A...588A..96B/abstract) contains information for molecular formation that are useful for calculating number densities of molecules in stellar atmospheres. This data ingestor by default grabs mirrored tables from t...
tardis-snREPO_NAMEcarsusPATH_START.@carsus_extracted@carsus-master@docs@io@barklem2016.ipynb@.PATH_END.py
{ "filename": "diagtable.py", "repo_name": "ExeClim/Isca", "repo_path": "Isca_extracted/Isca-master/src/extra/python/isca/diagtable.py", "type": "Python" }
import copy from jinja2 import Template _TEMPLATE = Template(""" {%- macro fortrantrue(t) -%} {%- if t -%} .true. {%- else -%} .false. {%- endif -%} {%- endmacro -%} "FMS Model results" {% if calendar -%} 0001 1 1 0 0 0 {%- else -%} 0 0 0 0 0 0 {%- endif %} # = output files = # file_name, output_freq, output_units, fo...
ExeClimREPO_NAMEIscaPATH_START.@Isca_extracted@Isca-master@src@extra@python@isca@diagtable.py@.PATH_END.py
{ "filename": "_alignmentgroup.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/bar/_alignmentgroup.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="bar", **kwargs): super(AlignmentgroupValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@bar@_alignmentgroup.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/retrievers/document_compressors/__init__.py", "type": "Python" }
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@retrievers@document_compressors@__init__.py@.PATH_END.py
{ "filename": "apps.py", "repo_name": "lsst-uk/lasair-lsst", "repo_path": "lasair-lsst_extracted/lasair-lsst-main/webserver/lasair/apps/annotator/apps.py", "type": "Python" }
from django.apps import AppConfig class AnnotatorConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'lasair.apps.annotator'
lsst-ukREPO_NAMElasair-lsstPATH_START.@lasair-lsst_extracted@lasair-lsst-main@webserver@lasair@apps@annotator@apps.py@.PATH_END.py
{ "filename": "match_pinholes.py", "repo_name": "mwanakijiji/dewarp", "repo_path": "dewarp_extracted/dewarp-master/astrom/match_pinholes.py", "type": "Python" }
# This is the script to run for making a warping/astrometric solution to LMIRCam, using data taken # in Nov and Dev 2016 # created by E.S., Nov 2016 # revamped to be more user-friendly, Nov 2017 import numpy as np from astrom_lmircam_soln import * from astrom_lmircam_soln import find_pinhole_centroids from astrom_lmi...
mwanakijijiREPO_NAMEdewarpPATH_START.@dewarp_extracted@dewarp-master@astrom@match_pinholes.py@.PATH_END.py
{ "filename": "pascal.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/Pygments/py3/pygments/lexers/pascal.py", "type": "Python" }
""" pygments.lexers.pascal ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Pascal family languages. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer from pygments.util import get_bool_opt, get_list_opt fro...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@Pygments@py3@pygments@lexers@pascal.py@.PATH_END.py
{ "filename": "metaobject.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/metaobject.py", "type": "Python" }
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@metaobject.py@.PATH_END.py
{ "filename": "builder.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/fonttools/fontTools/colorLib/builder.py", "type": "Python" }
""" colorLib.builder: Build COLR/CPAL tables from scratch """ import collections import copy import enum from functools import partial from math import ceil, log from typing import ( Any, Dict, Generator, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, TypeVar, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@fonttools@fontTools@colorLib@builder.py@.PATH_END.py
{ "filename": "MF_example.ipynb", "repo_name": "ander-son-almeida/DashboardOCmass", "repo_path": "DashboardOCmass_extracted/DashboardOCmass-main/examples/MF_example.ipynb", "type": "Jupyter Notebook" }
In this notebook we will demonstrate how we build the histograms of the individual masses of the OCs. This histogram is used to calculate the mass function of each cluster through a segmented function and with the aid of the curve_fit function to determine the best parameters (alpha high, alpha low and Mc). We will us...
ander-son-almeidaREPO_NAMEDashboardOCmassPATH_START.@DashboardOCmass_extracted@DashboardOCmass-main@examples@MF_example.ipynb@.PATH_END.py
{ "filename": "find_halo_ids.py", "repo_name": "SWIFTSIM/SOAP", "repo_path": "SOAP_extracted/SOAP-master/tests/FLAMINGO/find_halo_ids.py", "type": "Python" }
#!/bin/env python3 # # Find IDs of halos in a corner of the simulation box # # Run with e.g. `python3 ./find_halo_ids.py L1000N1800/HYDRO_FIDUCIAL 57 10` # import sys import numpy as np import h5py def find_halo_indices(sim, snap_nr, boxsize): soap_file = f"/cosma8/data/dp004/flamingo/Runs/{sim}/SOAP-HBT/halo_pro...
SWIFTSIMREPO_NAMESOAPPATH_START.@SOAP_extracted@SOAP-master@tests@FLAMINGO@find_halo_ids.py@.PATH_END.py
{ "filename": "obshelpers.py", "repo_name": "jhparkastro/gpcal", "repo_path": "gpcal_extracted/gpcal-master/gpcal/obshelpers.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 29 13:59:06 2021 @author: jpark """ import numpy as np from astropy.coordinates import EarthLocation import astropy.time as at import datetime as dt from AIPSData import AIPSUVData, AIPSImage from Wizardry.AIPSData import AIPSUVData as WAIPSUVDa...
jhparkastroREPO_NAMEgpcalPATH_START.@gpcal_extracted@gpcal-master@gpcal@obshelpers.py@.PATH_END.py
{ "filename": "simulate.py", "repo_name": "HERA-Team/hera_sim", "repo_path": "hera_sim_extracted/hera_sim-main/hera_sim/simulate.py", "type": "Python" }
"""Module containing a high-level interface for :mod:`hera_sim`. This module defines the :class:`Simulator` class, which provides the user with a high-level interface to all of the features provided by :mod:`hera_sim`. For detailed instructions on how to manage a simulation using the :class:`Simulator`, please refer t...
HERA-TeamREPO_NAMEhera_simPATH_START.@hera_sim_extracted@hera_sim-main@hera_sim@simulate.py@.PATH_END.py
{ "filename": "_dtickrange.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py", "type": "Python" }
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): super(DtickrangeValidator, self).__init__( ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@scattergl@marker@colorbar@tickformatstop@_dtickrange.py@.PATH_END.py
{ "filename": "_sizemode.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/_sizemode.py", "type": "Python" }
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattermapbox.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, p...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@_sizemode.py@.PATH_END.py
{ "filename": "spectrum_likelihood.py", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/threeML/utils/spectrum/spectrum_likelihood.py", "type": "Python" }
import copy from builtins import object from typing import Optional import numba as nb import numpy as np from threeML.io.logging import setup_logger from threeML.utils.numba_utils import nb_sum from threeML.utils.statistics.likelihood_functions import ( half_chi2, poisson_log_likelihood_ideal_bkg, poisson_ob...
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@threeML@utils@spectrum@spectrum_likelihood.py@.PATH_END.py
{ "filename": "Background_modeling.md", "repo_name": "threeML/threeML", "repo_path": "threeML_extracted/threeML-master/docs/md_docs/fast_execute/Background_modeling.md", "type": "Markdown" }
--- jupyter: jupytext: formats: ipynb,md text_representation: extension: .md format_name: markdown format_version: '1.2' jupytext_version: 1.7.1 kernelspec: display_name: Python 3 language: python name: python3 --- <!-- #region deletable=true editable=true --> # Backgrou...
threeMLREPO_NAMEthreeMLPATH_START.@threeML_extracted@threeML-master@docs@md_docs@fast_execute@Background_modeling.md@.PATH_END.py
{ "filename": "unit_lookup_table.py", "repo_name": "yt-project/yt", "repo_path": "yt_extracted/yt-main/yt/units/unit_lookup_table.py", "type": "Python" }
from unyt._unit_lookup_table import *
yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@units@unit_lookup_table.py@.PATH_END.py
{ "filename": "setup.py", "repo_name": "VarStarDetect/varstardetect", "repo_path": "varstardetect_extracted/varstardetect-main/setup.py", "type": "Python" }
from distutils.core import setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name='varstardetect', # How you named your package folder (MyLib) packages=['varstardetect'], # Chose the same as "name" version='0.2.1.3', # Start with a small numb...
VarStarDetectREPO_NAMEvarstardetectPATH_START.@varstardetect_extracted@varstardetect-main@setup.py@.PATH_END.py
{ "filename": "cnn_classifier.py", "repo_name": "SKA-INAF/caesar", "repo_path": "caesar_extracted/caesar-master/scripts/cnn_classifier.py", "type": "Python" }
#!/usr/bin/env python ################################################## ### MODULE IMPORT ################################################## ## STANDARD MODULES import os import sys import subprocess import string import time import signal from threading import Thread import datetime import numpy as np impor...
SKA-INAFREPO_NAMEcaesarPATH_START.@caesar_extracted@caesar-master@scripts@cnn_classifier.py@.PATH_END.py
{ "filename": "concatenation_test.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/compiler/tensorrt/test/concatenation_test.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@compiler@tensorrt@test@concatenation_test.py@.PATH_END.py
{ "filename": "_align.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/annotation/_align.py", "type": "Python" }
import _plotly_utils.basevalidators class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="layout.scene.annotation", **kwargs ): super(AlignValidator, self).__init__( plotly_name=plotly_name, parent_...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@annotation@_align.py@.PATH_END.py
{ "filename": "test_merge_asof.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/tests/reshape/merge/test_merge_asof.py", "type": "Python" }
import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import ( Index, Timedelta, merge_asof, option_context, to_datetime, ) import pandas._testing as tm from pandas.core.reshape.merge import MergeError class TestAsOfMerge: ...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@reshape@merge@test_merge_asof.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "fabiorigamonti/bang", "repo_path": "bang_extracted/bang-main/README.md", "type": "Markdown" }
# BANG ## BAyesian decomposiotioN of Galaxies BANG is a GPU/CPU-python code for modelling both the photometry and kinematics of galaxies. The underlying model is the superposition of different component the user has 3 possible combination: * Bulge + inner disc + outer disc + Halo * Bulge + disc + Halo * inner dis...
fabiorigamontiREPO_NAMEbangPATH_START.@bang_extracted@bang-main@README.md@.PATH_END.py
{ "filename": "_tickfont.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/indicator/gauge/axis/_tickfont.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "indicator.gauge.axis" _path_str = "indicator.gauge.axis.tickfont" _valid_props = {"color",...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@indicator@gauge@axis@_tickfont.py@.PATH_END.py
{ "filename": "checkstate.py", "repo_name": "COSMIC-PopSynth/COSMIC", "repo_path": "COSMIC_extracted/COSMIC-master/cosmic/checkstate.py", "type": "Python" }
from cosmic import _evolvebin from .filter import parse_column_filters import operator import numpy CHECKSTATE_COLUMNS = numpy.array( [ "binstate", "evol_type", "mass_1", "mass_2", "kstar_1", "kstar_2", "sep", "porb", "ecc", "rrlo_1", ...
COSMIC-PopSynthREPO_NAMECOSMICPATH_START.@COSMIC_extracted@COSMIC-master@cosmic@checkstate.py@.PATH_END.py
{ "filename": "noncrossing.ipynb", "repo_name": "ahermosillo/stochastic-randommigration", "repo_path": "stochastic-randommigration_extracted/stochastic-randommigration-main/noncrossing/noncrossing.ipynb", "type": "Jupyter Notebook" }
```python import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pylb %matplotlib inline plt.style.use('/Users/arceliahermosillo/Research/stochastic/paper_labels_colors.mplstyle') ``` # Non-crossing figures ```python colors = {"Bdazzled Blue":"#335471","Cadet Blue":"#69a2b0","French Lilac":"#7...
ahermosilloREPO_NAMEstochastic-randommigrationPATH_START.@stochastic-randommigration_extracted@stochastic-randommigration-main@noncrossing@noncrossing.ipynb@.PATH_END.py
{ "filename": "SoundSpeedPolicy.py", "repo_name": "LLNL/spheral", "repo_path": "spheral_extracted/spheral-main/src/PYB11/Hydro/SoundSpeedPolicy.py", "type": "Python" }
from PYB11Generator import * from FieldUpdatePolicy import * @PYB11module("SpheralHydro") @PYB11template("Dimension") class SoundSpeedPolicy(FieldUpdatePolicy): PYB11typedefs = """ using Scalar = typename %(Dimension)s::Scalar; using KeyType = typename SoundSpeedPolicy<%(Dimension)s>::KeyType; """ #....
LLNLREPO_NAMEspheralPATH_START.@spheral_extracted@spheral-main@src@PYB11@Hydro@SoundSpeedPolicy.py@.PATH_END.py
{ "filename": "leastsqnrm.py", "repo_name": "spacetelescope/jwst", "repo_path": "jwst_extracted/jwst-main/jwst/ami/leastsqnrm.py", "type": "Python" }
import logging import numpy as np import numpy.linalg as linalg from scipy.special import comb, jv from . import hexee log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) def flip(holearray): """ Change sign of 2nd coordinate of holes Parameters ---------- holearray: 2D fl...
spacetelescopeREPO_NAMEjwstPATH_START.@jwst_extracted@jwst-main@jwst@ami@leastsqnrm.py@.PATH_END.py