metadata
dict
text
stringlengths
0
40.6M
id
stringlengths
14
255
{ "filename": "ClassReCluster.py", "repo_name": "saopicc/killMS", "repo_path": "killMS_extracted/killMS-master/killMS/Data/ClassReCluster.py", "type": "Python" }
#!/usr/bin/env python """ killMS, a package for calibration in radio interferometry. Copyright (C) 2013-2017 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 ...
saopiccREPO_NAMEkillMSPATH_START.@killMS_extracted@killMS-master@killMS@Data@ClassReCluster.py@.PATH_END.py
{ "filename": "poet_1event.py", "repo_name": "kevin218/POET", "repo_path": "POET_extracted/POET-master/code/lib/poet_1event.py", "type": "Python" }
# $Author: patricio $ # $Revision: 302 $ # $Date: 2010-07-10 01:35:30 -0400 (Sat, 10 Jul 2010) $ # $HeadURL: file:///home/esp01/svn/code/python/branches/patricio/photpipe/lib/poet_1event.py $ # $Id: poet_1event.py 302 2010-07-10 05:35:30Z patricio $ import os, sys, re, time #FINDME Megan added this #if '/Users/megan/...
kevin218REPO_NAMEPOETPATH_START.@POET_extracted@POET-master@code@lib@poet_1event.py@.PATH_END.py
{ "filename": "ccd.py", "repo_name": "roman-corgi/emccd_detect", "repo_path": "emccd_detect_extracted/emccd_detect-master/arcticpy_folder/build/lib/arcticpy/ccd.py", "type": "Python" }
import numpy as np from copy import deepcopy from arcticpy import util import arcticpy as ac class CCD(object): def __init__( self, fraction_of_traps_per_phase=[1], full_well_depth=1e4, well_notch_depth=0.0, well_fill_power=0.58, well_bloom_level=None, ): ...
roman-corgiREPO_NAMEemccd_detectPATH_START.@emccd_detect_extracted@emccd_detect-master@arcticpy_folder@build@lib@arcticpy@ccd.py@.PATH_END.py
{ "filename": "demo_ticklabel_direction.py", "repo_name": "matplotlib/matplotlib", "repo_path": "matplotlib_extracted/matplotlib-main/galleries/examples/axisartist/demo_ticklabel_direction.py", "type": "Python" }
""" =================== Ticklabel direction =================== """ import matplotlib.pyplot as plt import mpl_toolkits.axisartist.axislines as axislines def setup_axes(fig, pos): ax = fig.add_subplot(pos, axes_class=axislines.Axes) ax.set_yticks([0.2, 0.8]) ax.set_xticks([0.2, 0.8]) return ax fi...
matplotlibREPO_NAMEmatplotlibPATH_START.@matplotlib_extracted@matplotlib-main@galleries@examples@axisartist@demo_ticklabel_direction.py@.PATH_END.py
{ "filename": "EnthalpyVarianceEquation.py", "repo_name": "mmicromegas/ransX", "repo_path": "ransX_extracted/ransX-master/EQUATIONS/EnthalpyVarianceEquation.py", "type": "Python" }
import numpy as np import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Arnett, 2014, Compressible Hyd...
mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EQUATIONS@EnthalpyVarianceEquation.py@.PATH_END.py
{ "filename": "plot_save_mesa_comparison_panels_acc_fin.py", "repo_name": "NikolayBritavskiyAstro/fast_rotating_binaries", "repo_path": "fast_rotating_binaries_extracted/fast_rotating_binaries-main/src/scripts/plot_save_mesa_comparison_panels_acc_fin.py", "type": "Python" }
import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import numpy as np import os import mesaPlot as mp from showyourwork.paths import user as Paths paths = Paths() if os.path.exists(os.path.join(paths.data, 'acceleration/HD191495_mesa/LOGS1/history.data')): pass else: os.syste...
NikolayBritavskiyAstroREPO_NAMEfast_rotating_binariesPATH_START.@fast_rotating_binaries_extracted@fast_rotating_binaries-main@src@scripts@plot_save_mesa_comparison_panels_acc_fin.py@.PATH_END.py
{ "filename": "activations.py", "repo_name": "ultralytics/yolov5", "repo_path": "yolov5_extracted/yolov5-master/utils/activations.py", "type": "Python" }
# Ultralytics YOLOv5 🚀, AGPL-3.0 license """Activation functions.""" import torch import torch.nn as nn import torch.nn.functional as F class SiLU(nn.Module): """Applies the Sigmoid-weighted Linear Unit (SiLU) activation function, also known as Swish.""" @staticmethod def forward(x): """ ...
ultralyticsREPO_NAMEyolov5PATH_START.@yolov5_extracted@yolov5-master@utils@activations.py@.PATH_END.py
{ "filename": "materials_db.py", "repo_name": "PyEllips/pyElli", "repo_path": "pyElli_extracted/pyElli-master/src/elli/database/materials_db.py", "type": "Python" }
# Encoding: utf-8 from ..dispersions import ConstantRefractiveIndex from ..materials import IsotropicMaterial AIR = IsotropicMaterial(ConstantRefractiveIndex(n=1))
PyEllipsREPO_NAMEpyElliPATH_START.@pyElli_extracted@pyElli-master@src@elli@database@materials_db.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "MarcoMuellner/SMURFS", "repo_path": "SMURFS_extracted/SMURFS-master/smurfs/smurfs_cli/__init__.py", "type": "Python" }
MarcoMuellnerREPO_NAMESMURFSPATH_START.@SMURFS_extracted@SMURFS-master@smurfs@smurfs_cli@__init__.py@.PATH_END.py
{ "filename": "test_templating.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/partners/prompty/tests/unit_tests/test_templating.py", "type": "Python" }
from pathlib import Path import pytest from langchain_prompty import create_chat_prompt PROMPT_DIR = Path(__file__).parent / "prompts" def test_double_templating() -> None: """ Assess whether double templating occurs when invoking a chat prompt. If it does, an error is thrown and the test fails. ""...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@partners@prompty@tests@unit_tests@test_templating.py@.PATH_END.py
{ "filename": "defaults.py", "repo_name": "MNGuenther/allesfitter", "repo_path": "allesfitter_extracted/allesfitter-master/allesfitter/v2/defaults.py", "type": "Python" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 8 18:34:28 2020 @author: Maximilian N. Günther MIT Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02109, USA Email: maxgue@mit.edu Web: www.mnguenther.com """ fr...
MNGuentherREPO_NAMEallesfitterPATH_START.@allesfitter_extracted@allesfitter-master@allesfitter@v2@defaults.py@.PATH_END.py
{ "filename": "logic.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/testing/op_tests/logic.py", "type": "Python" }
# Copyright 2019 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@lite@testing@op_tests@logic.py@.PATH_END.py
{ "filename": "getVariables.py", "repo_name": "fmihpc/analysator", "repo_path": "analysator_extracted/analysator-master/projects/DiffusionScripts/getVariables.py", "type": "Python" }
import pytools as pt import numpy as np import sys,os run = sys.argv[1] folder = sys.argv[2] bulkStart = int(sys.argv[3]) bulkEnd = int(sys.argv[4]) interval = int(sys.argv[5]) timetot = range(bulkStart, bulkEnd-interval+1,1) path_bulk = "/scratch/project_2000203/dubartma/"+run+'/'+folder+'/bulk/' path_save = ...
fmihpcREPO_NAMEanalysatorPATH_START.@analysator_extracted@analysator-master@projects@DiffusionScripts@getVariables.py@.PATH_END.py
{ "filename": "test_distortion_correct_with_wavelength_solution.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gmos/tests/spect/test_distortion_correct_with_wavelength_solution.py", "type": "Python" }
#!/usr/bin/env python """ Tests related to GMOS Long-slit 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 from copy import deep...
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gmos@tests@spect@test_distortion_correct_with_wavelength_solution.py@.PATH_END.py
{ "filename": "alg.py", "repo_name": "Keck-DataReductionPipelines/KPF-Pipeline", "repo_path": "KPF-Pipeline_extracted/KPF-Pipeline-master/modules/radial_velocity/src/alg.py", "type": "Python" }
from astropy.io import fits import numpy as np from astropy.modeling import models, fitting from astropy import constants as const import warnings import datetime import pandas as pd import os import math from modules.radial_velocity.src.alg_rv_init import RadialVelocityAlgInit from modules.radial_velocity.src.alg_rv_...
Keck-DataReductionPipelinesREPO_NAMEKPF-PipelinePATH_START.@KPF-Pipeline_extracted@KPF-Pipeline-master@modules@radial_velocity@src@alg.py@.PATH_END.py
{ "filename": "cygrid_demo_zea_elliptical.py", "repo_name": "bwinkel/cygrid", "repo_path": "cygrid_extracted/cygrid-master/docs/images/cygrid_demo_zea_elliptical.py", "type": "Python" }
#!/usr/bin/python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from kapteyn import maputils import matplotlib.pyplot as plt import cygrid from astropy.io import fits as pf from astropy import wcs ...
bwinkelREPO_NAMEcygridPATH_START.@cygrid_extracted@cygrid-master@docs@images@cygrid_demo_zea_elliptical.py@.PATH_END.py
{ "filename": "flexible_dtypes.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/framework/flexible_dtypes.py", "type": "Python" }
# Copyright 2023 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@framework@flexible_dtypes.py@.PATH_END.py
{ "filename": "tool.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/tools/zapier/tool.py", "type": "Python" }
"""[DEPRECATED] ## Zapier Natural Language Actions API \ Full docs here: https://nla.zapier.com/start/ **Zapier Natural Language Actions** gives you access to the 5k+ apps, 20k+ actions on Zapier's platform through a natural language API interface. NLA supports apps like Gmail, Salesforce, Trello, Slack, Asana, HubS...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@tools@zapier@tool.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/densitymap/colorbar/_tickvalssrc.py", "type": "Python" }
import _plotly_utils.basevalidators class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="densitymap.colorbar", **kwargs ): super(TickvalssrcValidator, self).__init__( plotly_name=plotly_name, ...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@densitymap@colorbar@_tickvalssrc.py@.PATH_END.py
{ "filename": "train.py", "repo_name": "Zafiirah13/FRBID", "repo_path": "FRBID_extracted/FRBID-master/train.py", "type": "Python" }
#!/usr/bin/env python """ Authors : Zafiirah Hosenie Email : zafiirah.hosenie@gmail.com or zafiirah.hosenie@postgrad.manchester.ac.uk Affiliation : The University of Manchester, UK. License : MIT Status : Under Development Description : Python implementation for FRBID: Fast Radio Burst Intelligent Distinguisher. This ...
Zafiirah13REPO_NAMEFRBIDPATH_START.@FRBID_extracted@FRBID-master@train.py@.PATH_END.py
{ "filename": "base_context.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/jedi/py2/jedi/evaluate/base_context.py", "type": "Python" }
""" Contexts are the "values" that Python would return. However Contexts are at the same time also the "contexts" that a user is currently sitting in. A ContextSet is typically used to specify the return of a function or any other static analysis operation. In jedi there are always multiple returns and not just one. "...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@jedi@py2@jedi@evaluate@base_context.py@.PATH_END.py
{ "filename": "_size.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattercarpet/selected/marker/_size.py", "type": "Python" }
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.selected.marker", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_n...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattercarpet@selected@marker@_size.py@.PATH_END.py
{ "filename": "run_vega_mpi.py", "repo_name": "andreicuceu/vega", "repo_path": "vega_extracted/vega-master/bin/run_vega_mpi.py", "type": "Python" }
#!/usr/bin/env python import argparse import sys from mpi4py import MPI from vega import VegaInterface if __name__ == '__main__': pars = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='Run Vega in parallel.') pars.add_argument('config', type=str,...
andreicuceuREPO_NAMEvegaPATH_START.@vega_extracted@vega-master@bin@run_vega_mpi.py@.PATH_END.py
{ "filename": "tfsa-2020-021.md", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/security/advisory/tfsa-2020-021.md", "type": "Markdown" }
## TFSA-2020-021: Heap buffer overflow in SparseFillEmptyRowsGrad ### CVE Number CVE-2020-15195 ### Impact The implementation of `SparseFillEmptyRowsGrad` uses a [double indexing pattern](https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/core/kernels/sparse_fill_empty_r...
tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@security@advisory@tfsa-2020-021.md@.PATH_END.py
{ "filename": "test_imaging_data_with_interferometric_changes.py", "repo_name": "sibirrer/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/test/test_Data/test_imaging_data_with_interferometric_changes.py", "type": "Python" }
import numpy as np import numpy.testing as npt from lenstronomy.Data.imaging_data import ImageData def test_interferometry_likelihood(): """Test interferometry natural weighting likelihood function, test likelihood_method function output.""" test_data = np.zeros((5, 5)) test_data[0, :] = 1 test_d...
sibirrerREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@test@test_Data@test_imaging_data_with_interferometric_changes.py@.PATH_END.py
{ "filename": "train_my_forse_copy1.py", "repo_name": "yaojian95/ForSEplus", "repo_path": "ForSEplus_extracted/ForSEplus-main/scripts/train_my_forse_copy1.py", "type": "Python" }
import ForSEplus from ForSEplus import my_forse_class import argparse parser = argparse.ArgumentParser() parser.add_argument('--output_dirs', type=str, required=True) parser.add_argument('--patch_file', type=str, required=True) args = parser.parse_args() print(args.output_dirs) print(args.patch_file) test_forse = m...
yaojian95REPO_NAMEForSEplusPATH_START.@ForSEplus_extracted@ForSEplus-main@scripts@train_my_forse_copy1.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "vislearn/FrEIA", "repo_path": "FrEIA_extracted/FrEIA-master/FrEIA/modules/__init__.py", "type": "Python" }
'''Subclasses of torch.nn.Module, that are reversible and can be used in the nodes of the GraphINN class. The only additional things that are needed compared to the base class is an @staticmethod otuput_dims, and the 'rev'-argument of the forward-method. Abstract template: * InvertibleModule Coupling blocks: * AllI...
vislearnREPO_NAMEFrEIAPATH_START.@FrEIA_extracted@FrEIA-master@FrEIA@modules@__init__.py@.PATH_END.py
{ "filename": "_column.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/layout/mapbox/domain/_column.py", "type": "Python" }
import _plotly_utils.basevalidators class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.mapbox.domain", **kwargs ): super(ColumnValidator, self).__init__( plotly_name=plotly_name, parent_nam...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@layout@mapbox@domain@_column.py@.PATH_END.py
{ "filename": "L98-59d.ipynb", "repo_name": "nichollsh/AGNI", "repo_path": "AGNI_extracted/AGNI-main/misc/L98-59d.ipynb", "type": "Jupyter Notebook" }
```julia # Import system packages using Printf using DelimitedFiles using Plots using LaTeXStrings ``` ```julia # Psurf/kbar Msurf/Me Rsurf/Re Fint/ Wm-2 structure = [36.606020371988 1.89635484051907 1.26977486802543 0.1 72.7858858655158 1.8715524695897...
nichollshREPO_NAMEAGNIPATH_START.@AGNI_extracted@AGNI-main@misc@L98-59d.ipynb@.PATH_END.py
{ "filename": "testMaxMsgSizeSimpleClient.py", "repo_name": "ACS-Community/ACS", "repo_path": "ACS_extracted/ACS-master/Benchmark/stress/test/testMaxMsgSizeSimpleClient.py", "type": "Python" }
import sys import time from Acspy.Clients.SimpleClient import PySimpleClient remoteComponentName="TESTMAXMSGSIZE" # Loop and call the sendSequence method on the component # making the size of the sequence sent larger w/ each iteration # at some point, the ORB should fail because omniorb's max # msg size will have be...
ACS-CommunityREPO_NAMEACSPATH_START.@ACS_extracted@ACS-master@Benchmark@stress@test@testMaxMsgSizeSimpleClient.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "GeminiDRSoftware/DRAGONS", "repo_path": "DRAGONS_extracted/DRAGONS-master/geminidr/gnirs/tests/crossdispersed/__init__.py", "type": "Python" }
#!/usr/bin/env python3 """ Tests for GNIRS XD Primitives. """
GeminiDRSoftwareREPO_NAMEDRAGONSPATH_START.@DRAGONS_extracted@DRAGONS-master@geminidr@gnirs@tests@crossdispersed@__init__.py@.PATH_END.py
{ "filename": "nuclear.py", "repo_name": "PlasmaPy/PlasmaPy", "repo_path": "PlasmaPy_extracted/PlasmaPy-main/src/plasmapy/particles/nuclear.py", "type": "Python" }
"""Functions that are related to nuclear reactions.""" __all__ = ["nuclear_binding_energy", "nuclear_reaction_energy", "mass_energy"] import re import astropy.units as u from plasmapy.particles.decorators import particle_input from plasmapy.particles.exceptions import InvalidParticleError, ParticleError from plasma...
PlasmaPyREPO_NAMEPlasmaPyPATH_START.@PlasmaPy_extracted@PlasmaPy-main@src@plasmapy@particles@nuclear.py@.PATH_END.py
{ "filename": "diagnostics_utils.py", "repo_name": "mackelab/sbi", "repo_path": "sbi_extracted/sbi-main/sbi/utils/diagnostics_utils.py", "type": "Python" }
import torch from joblib import Parallel, delayed from torch import Tensor from tqdm import tqdm from sbi.inference.posteriors.base_posterior import NeuralPosterior from sbi.inference.posteriors.vi_posterior import VIPosterior from sbi.sbi_types import Shape def get_posterior_samples_on_batch( xs: Tensor, po...
mackelabREPO_NAMEsbiPATH_START.@sbi_extracted@sbi-main@sbi@utils@diagnostics_utils.py@.PATH_END.py
{ "filename": "test_photometry.py", "repo_name": "LCOGT/banzai", "repo_path": "banzai_extracted/banzai-main/banzai/tests/test_photometry.py", "type": "Python" }
from banzai.utils import photometry_utils import numpy as np from astropy.coordinates import SkyCoord from astropy import units from astropy.table import Table from astropy.utils.data import get_pkg_data_filename from astropy.io import fits def test_match_catalog(): np.random.seed(10142134) # make a few hundr...
LCOGTREPO_NAMEbanzaiPATH_START.@banzai_extracted@banzai-main@banzai@tests@test_photometry.py@.PATH_END.py
{ "filename": "conf.py", "repo_name": "thomasorb/orcs", "repo_path": "orcs_extracted/orcs-master/docs/conf.py", "type": "Python" }
# -*- coding: utf-8 -*- # # Orcs documentation build configuration file, created by # sphinx-quickstart on Sat May 26 01:02:35 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
thomasorbREPO_NAMEorcsPATH_START.@orcs_extracted@orcs-master@docs@conf.py@.PATH_END.py
{ "filename": "get_feature_names-desc.md", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/catboost/docs/en/_includes/work_src/reusage-python/get_feature_names-desc.md", "type": "Markdown" }
Return the names of features from the dataset.
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@catboost@docs@en@_includes@work_src@reusage-python@get_feature_names-desc.md@.PATH_END.py
{ "filename": "test_simple_variance_mapper.py", "repo_name": "cosmo-ethz/seek", "repo_path": "seek_extracted/seek-master/test/test_simple_variance_mapper.py", "type": "Python" }
# SEEK 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. # # SEEK is distributed in the hope that it will be useful, # but WITHOUT ANY W...
cosmo-ethzREPO_NAMEseekPATH_START.@seek_extracted@seek-master@test@test_simple_variance_mapper.py@.PATH_END.py
{ "filename": "test_items.py", "repo_name": "simonsobs/nextline-schedule", "repo_path": "nextline-schedule_extracted/nextline-schedule-main/tests/schema/queries/queue/test_items.py", "type": "Python" }
from hypothesis import given from strawberry.types import ExecutionResult from nextline_schedule.graphql import QUERY_QUEUE_ITEMS from nextline_schedule.queue.strategies import Queue, st_queue from tests.schema.conftest import Schema @given(queue=st_queue()) async def test_schema(queue: Queue, schema: Schema) -> Non...
simonsobsREPO_NAMEnextline-schedulePATH_START.@nextline-schedule_extracted@nextline-schedule-main@tests@schema@queries@queue@test_items.py@.PATH_END.py
{ "filename": "zogy.py", "repo_name": "pmvreeswijk/ZOGY", "repo_path": "ZOGY_extracted/ZOGY-main/zogy.py", "type": "Python" }
import os import sys import subprocess import glob import tempfile import shutil import argparse import importlib import resource import traceback import warnings warnings.filterwarnings('ignore', '.*output shape of zoom.*') from functools import partial import math import collections import itertools import gc import ...
pmvreeswijkREPO_NAMEZOGYPATH_START.@ZOGY_extracted@ZOGY-main@zogy.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "oliverphilcox/OneLoopBispectrum", "repo_path": "OneLoopBispectrum_extracted/OneLoopBispectrum-main/README.md", "type": "Markdown" }
# One Loop Galaxy Bispectrum Computation of the one-loop bispectrum of galaxies in redshift space, using Mathematica. This is described in [Philcox+22](https://arxiv.org/abs/2206.02800). The code contains a number of components: 1. [Kernels.nb](Kernels.nb) \& [KernelsFlat.nb](KernelsFlat.nb): Computation and simplifica...
oliverphilcoxREPO_NAMEOneLoopBispectrumPATH_START.@OneLoopBispectrum_extracted@OneLoopBispectrum-main@README.md@.PATH_END.py
{ "filename": "CONTRIBUTING.md", "repo_name": "CosmoStat/shapepipe", "repo_path": "shapepipe_extracted/shapepipe-master/CONTRIBUTING.md", "type": "Markdown" }
# Contributing to ShapePipe ShapePipe is an open source galaxy shape measurement pipeline developed within the [CosmoStat](http://www.cosmostat.org/) lab at CEA Paris-Saclay. These guidelines are intended to help you contribute to improving this package by fixing bugs, adding new features or simply making suggestions...
CosmoStatREPO_NAMEshapepipePATH_START.@shapepipe_extracted@shapepipe-master@CONTRIBUTING.md@.PATH_END.py
{ "filename": "settings.py", "repo_name": "ParisAstronomicalDataCentre/OPUS", "repo_path": "OPUS_extracted/OPUS-master/uws_server/settings.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 by Mathieu Servillat # Licensed under MIT (https://github.com/mservillat/uws-server/blob/master/LICENSE) """ Settings for the UWS server """ #---------- # WARNING: # If ../settings_local.py is found (see settings_local.dist.py for a template), # some ...
ParisAstronomicalDataCentreREPO_NAMEOPUSPATH_START.@OPUS_extracted@OPUS-master@uws_server@settings.py@.PATH_END.py
{ "filename": "upload_gmock.py", "repo_name": "hpc4cmb/toast", "repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googlemock/scripts/upload_gmock.py", "type": "Python" }
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googlemock@scripts@upload_gmock.py@.PATH_END.py
{ "filename": "vectara.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/vectara.py", "type": "Python" }
from __future__ import annotations import json import logging import os import warnings from dataclasses import dataclass, field from hashlib import md5 from typing import Any, Iterable, Iterator, List, Optional, Tuple, Type import requests from langchain_core.callbacks.manager import ( CallbackManagerForRetrieve...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@vectara.py@.PATH_END.py
{ "filename": "spurmrot.py", "repo_name": "lucabaldini/ixpeobssim", "repo_path": "ixpeobssim_extracted/ixpeobssim-main/ixpeobssim/evt/spurmrot.py", "type": "Python" }
#!/usr/bin/env python # # Copyright (C) 2021, the ixpeobssim team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # #...
lucabaldiniREPO_NAMEixpeobssimPATH_START.@ixpeobssim_extracted@ixpeobssim-main@ixpeobssim@evt@spurmrot.py@.PATH_END.py
{ "filename": "test_image_parsing.py", "repo_name": "PrefectHQ/prefect", "repo_path": "prefect_extracted/prefect-main/tests/docker/test_image_parsing.py", "type": "Python" }
import packaging.version import pytest from prefect.utilities.dockerutils import ( format_outlier_version_name, parse_image_tag, split_repository_path, ) @pytest.mark.parametrize( "value,expected", [ ("localhost/simpleimage", ("localhost/simpleimage", None)), ("localhost/simpleima...
PrefectHQREPO_NAMEprefectPATH_START.@prefect_extracted@prefect-main@tests@docker@test_image_parsing.py@.PATH_END.py
{ "filename": "test_physics_secondary_elec.py", "repo_name": "mirochaj/ares", "repo_path": "ares_extracted/ares-main/tests/test_physics_secondary_elec.py", "type": "Python" }
""" test_secondary_electrons.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Thu Apr 3 16:58:43 MDT 2014 Description: Reproduce Figures 1-3 (kind of) in Furlanetto & Stoever (2010). """ import ares import numpy as np # First, compare at fixed ionized fraction xe = [1e-4, 1e-3...
mirochajREPO_NAMEaresPATH_START.@ares_extracted@ares-main@tests@test_physics_secondary_elec.py@.PATH_END.py
{ "filename": "es.py", "repo_name": "3fon3fonov/exostriker", "repo_path": "exostriker_extracted/exostriker-main/exostriker/lib/es.py", "type": "Python" }
# Form implementation generated from reading ui file 'es.ui' # # Created by: PyQt6 UI code generator 6.6.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. from PyQt6 import QtCore, QtGui, QtWidgets class Ui_MainWin...
3fon3fonovREPO_NAMEexostrikerPATH_START.@exostriker_extracted@exostriker-main@exostriker@lib@es.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "spedas/pyspedas", "repo_path": "pyspedas_extracted/pyspedas-master/pyspedas/projects/kyoto/README.md", "type": "Markdown" }
## Kyoto Dst The routines in this module can be used to load Dst data from the World Data Center for Geomagnetism, Kyoto, Japan. Example page: https://wdc.kugi.kyoto-u.ac.jp/dst_final/197407/index.html ### Examples Get started by importing pyspedas and tplot; these are required to load and plot the data: ```python ...
spedasREPO_NAMEpyspedasPATH_START.@pyspedas_extracted@pyspedas-master@pyspedas@projects@kyoto@README.md@.PATH_END.py
{ "filename": "test_redis_schema.py", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/libs/community/tests/unit_tests/vectorstores/redis/test_redis_schema.py", "type": "Python" }
import pytest from langchain_community.vectorstores.redis.schema import ( FlatVectorField, HNSWVectorField, NumericFieldSchema, RedisModel, RedisVectorField, TagFieldSchema, TextFieldSchema, read_schema, ) def test_text_field_schema_creation() -> None: """Test creating a text fiel...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@tests@unit_tests@vectorstores@redis@test_redis_schema.py@.PATH_END.py
{ "filename": "mcmc_sampling.py", "repo_name": "sibirrer/hierArc", "repo_path": "hierArc_extracted/hierArc-main/hierarc/Sampling/mcmc_sampling.py", "type": "Python" }
import emcee from hierarc.Likelihood.cosmo_likelihood import CosmoLikelihood from lenstronomy.Util import sampling_util class MCMCSampler(object): """Class which executes the different sampling methods.""" def __init__(self, *args, **kwargs): """Initialise the classes of the chain and for parameter ...
sibirrerREPO_NAMEhierArcPATH_START.@hierArc_extracted@hierArc-main@hierarc@Sampling@mcmc_sampling.py@.PATH_END.py
{ "filename": "_ticklen.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py", "type": "Python" }
import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(TicklenValidator, self).__init__( plotly_name=...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattermapbox@marker@colorbar@_ticklen.py@.PATH_END.py
{ "filename": "_textcase.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scatterpolargl/legendgrouptitle/font/_textcase.py", "type": "Python" }
import _plotly_utils.basevalidators class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): super(TextcaseValidator, self).__init__( ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scatterpolargl@legendgrouptitle@font@_textcase.py@.PATH_END.py
{ "filename": "_totals.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/waterfall/_totals.py", "type": "Python" }
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Totals(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.totals" _valid_props = {"marker"} # marker # ----...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@waterfall@_totals.py@.PATH_END.py
{ "filename": "_theta.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/scatterpolargl/_theta.py", "type": "Python" }
import _plotly_utils.basevalidators class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="theta", parent_name="scatterpolargl", **kwargs): super(ThetaValidator, 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@scatterpolargl@_theta.py@.PATH_END.py
{ "filename": "datetimelike_accumulations.py", "repo_name": "pandas-dev/pandas", "repo_path": "pandas_extracted/pandas-main/pandas/core/array_algos/datetimelike_accumulations.py", "type": "Python" }
""" datetimelke_accumulations.py is for accumulations of datetimelike extension arrays """ from __future__ import annotations from typing import TYPE_CHECKING import numpy as np from pandas._libs import iNaT from pandas.core.dtypes.missing import isna if TYPE_CHECKING: from collections.abc import Callable d...
pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@core@array_algos@datetimelike_accumulations.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Zstone19/pypetal", "repo_path": "pypetal_extracted/pypetal-main/src/pypetal/weighting/__init__.py", "type": "Python" }
from .module import * from .plotting import * from .utils import * __all__ = ["pypetal.weighting.module", "pypetal.weighting.plotting", "pypetal.weighting.utils"]
Zstone19REPO_NAMEpypetalPATH_START.@pypetal_extracted@pypetal-main@src@pypetal@weighting@__init__.py@.PATH_END.py
{ "filename": "utils.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/_plotly_utils/utils.py", "type": "Python" }
import base64 import decimal import json as _json import sys import re from functools import reduce from _plotly_utils.optional_imports import get_module from _plotly_utils.basevalidators import ( ImageUriValidator, copy_to_readonly_numpy_array, is_homogeneous_array, ) int8min = -128 int8max = 127 int16m...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@_plotly_utils@utils.py@.PATH_END.py
{ "filename": "mpsolve.py", "repo_name": "robol/MPSolve", "repo_path": "MPSolve_extracted/MPSolve-master/examples/python/mpsolve.py", "type": "Python" }
import sys import ctypes import ctypes.util # from gmpy2 import mpq # Load the libmps shared library. We should keep the .so version update # in case we bump it in the future. _mps = ctypes.CDLL("libmps.so.3") class Cplx(ctypes.Structure): _mps.mps_chebyshev_poly_new.restype = ctypes.c_void_p _mps.mps_context...
robolREPO_NAMEMPSolvePATH_START.@MPSolve_extracted@MPSolve-master@examples@python@mpsolve.py@.PATH_END.py
{ "filename": "spemd.py", "repo_name": "lenstronomy/lenstronomy", "repo_path": "lenstronomy_extracted/lenstronomy-main/lenstronomy/LensModel/Profiles/spemd.py", "type": "Python" }
__author__ = "sibirrer" import numpy as np import lenstronomy.Util.param_util as param_util from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase __all__ = ["SPEMD"] class SPEMD(LensProfileBase): """Class for smooth power law ellipse mass density profile (SPEMD). This class effectively per...
lenstronomyREPO_NAMElenstronomyPATH_START.@lenstronomy_extracted@lenstronomy-main@lenstronomy@LensModel@Profiles@spemd.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="name", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs ): super(NameValidator, self).__init__( plotly_nam...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@marker@colorbar@tickformatstop@_name.py@.PATH_END.py
{ "filename": "model.py", "repo_name": "triton-inference-server/server", "repo_path": "server_extracted/server-main/qa/L0_model_config/autofill_noplatform/python/output_missing_name/model.py", "type": "Python" }
# Copyright 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list o...
triton-inference-serverREPO_NAMEserverPATH_START.@server_extracted@server-main@qa@L0_model_config@autofill_noplatform@python@output_missing_name@model.py@.PATH_END.py
{ "filename": "iso_hpffm.py", "repo_name": "jruffio/breads", "repo_path": "breads_extracted/breads-main/breads/fm/iso_hpffm.py", "type": "Python" }
import numpy as np from copy import copy import pandas as pd from astropy import constants as const from breads.utils import broaden from breads.utils import LPFvsHPF def pixgauss2d(p, shape, hdfactor=10, xhdgrid=None, yhdgrid=None): """ 2d gaussian model. Documentation to be completed. Also faint of t ...
jruffioREPO_NAMEbreadsPATH_START.@breads_extracted@breads-main@breads@fm@iso_hpffm.py@.PATH_END.py
{ "filename": "recipe_5.py", "repo_name": "subisarkar/JexoSim", "repo_path": "JexoSim_extracted/JexoSim-master/jexosim/run_files/recipe_5.py", "type": "Python" }
''' JexoSim 2.0 Recipe 5 : Used to loop through code upto detector module ''' import numpy as np import time, os from datetime import datetime from jexosim.modules import exosystem, telescope, channel, backgrounds, output from jexosim.modules import detector, timeline, light_curve, systematics, noise from jexosim.lib....
subisarkarREPO_NAMEJexoSimPATH_START.@JexoSim_extracted@JexoSim-master@jexosim@run_files@recipe_5.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/waterfall/connector/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="waterfall.connector", **kwargs): super(LineValidator, 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@waterfall@connector@_line.py@.PATH_END.py
{ "filename": "_bgcolorsrc.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py", "type": "Python" }
import _plotly_utils.basevalidators class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattergl.hoverlabel", **kwargs ): super(BgcolorsrcValidator, self).__init__( plotly_name=plotly_name, pa...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattergl@hoverlabel@_bgcolorsrc.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "matplotlib/viscm", "repo_path": "viscm_extracted/viscm-main/viscm/__init__.py", "type": "Python" }
# Copyright (C) 2014 Nathaniel Smith <njs@pobox.com> # See file LICENSE.txt for license information. from .gui import viscm, viscm_editor __all__ = ["viscm", "viscm_editor"]
matplotlibREPO_NAMEviscmPATH_START.@viscm_extracted@viscm-main@viscm@__init__.py@.PATH_END.py
{ "filename": "zernike.py", "repo_name": "AOtools/aotools", "repo_path": "aotools_extracted/aotools-main/aotools/functions/zernike.py", "type": "Python" }
import numpy from . import circle def phaseFromZernikes(zCoeffs, size, norm="noll", rot=0): """ Creates an array of the sum of zernike polynomials with specified coefficeints Parameters: zCoeffs (list): zernike Coefficients size (int): Diameter of returned array norm (string, optio...
AOtoolsREPO_NAMEaotoolsPATH_START.@aotools_extracted@aotools-main@aotools@functions@zernike.py@.PATH_END.py
{ "filename": "dataset.py", "repo_name": "RobertJaro/InstrumentToInstrument", "repo_path": "InstrumentToInstrument_extracted/InstrumentToInstrument-master/itipy/data/dataset.py", "type": "Python" }
import gc import glob import logging import os import random from collections import Iterable from enum import Enum from typing import List, Union import numpy as np from astropy.visualization import AsinhStretch from dateutil.parser import parse from torch.utils.data import Dataset, DataLoader from tqdm import tqdm ...
RobertJaroREPO_NAMEInstrumentToInstrumentPATH_START.@InstrumentToInstrument_extracted@InstrumentToInstrument-master@itipy@data@dataset.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/splom/marker/__init__.py", "type": "Python" }
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._colorbar import ColorBar from ._line import Line from . import colorbar else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, ["....
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@splom@marker@__init__.py@.PATH_END.py
{ "filename": "_line.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/scattercarpet/_line.py", "type": "Python" }
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattercarpet", **kwargs): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@scattercarpet@_line.py@.PATH_END.py
{ "filename": "README.md", "repo_name": "mbejger/polgraw-allsky", "repo_path": "polgraw-allsky_extracted/polgraw-allsky-master/gridgen/old-version/gridgen_v0.2.34/README.md", "type": "Markdown" }
GridsGenerator generate effective grids which can be used in gravitational waves searches. Information about algorithms used in program can be found in articles: http://dx.doi.org/10.1088/0264-9381/32/14/145014 http://arxiv.org/abs/1302.0509v3 ================================================================ Tit...
mbejgerREPO_NAMEpolgraw-allskyPATH_START.@polgraw-allsky_extracted@polgraw-allsky-master@gridgen@old-version@gridgen_v0.2.34@README.md@.PATH_END.py
{ "filename": "WeylScalarInvariants_Cartesian.py", "repo_name": "zachetienne/nrpytutorial", "repo_path": "nrpytutorial_extracted/nrpytutorial-master/WeylScal4NRPy/WeylScalarInvariants_Cartesian.py", "type": "Python" }
# This code calculates the invariant scalars I, J, J1, J2, J3, and J4. It does so by following the papers # arXiv:gr-qc/0407013 and arXiv:0704.1756, and the example set by the Kranc-generated ETK thorn which # can be found at https://bitbucket.org/einsteintoolkit/einsteinanalysis/src. While WeylScalarInvariants_Cartesi...
zachetienneREPO_NAMEnrpytutorialPATH_START.@nrpytutorial_extracted@nrpytutorial-master@WeylScal4NRPy@WeylScalarInvariants_Cartesian.py@.PATH_END.py
{ "filename": "pipelineai.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/llms/pipelineai.ipynb", "type": "Jupyter Notebook" }
# PipelineAI >[PipelineAI](https://pipeline.ai) allows you to run your ML models at scale in the cloud. It also provides API access to [several LLM models](https://pipeline.ai). This notebook goes over how to use Langchain with [PipelineAI](https://docs.pipeline.ai/docs). ## PipelineAI example [This example shows h...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@llms@pipelineai.ipynb@.PATH_END.py
{ "filename": "TotalEnergyEquationCalculation.py", "repo_name": "mmicromegas/ransX", "repo_path": "ransX_extracted/ransX-master/EQUATIONS/TotalEnergyEquationCalculation.py", "type": "Python" }
import numpy as np from UTILS.Calculus import Calculus from UTILS.Tools import Tools # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Arnett, 2014, Compressible Hydrodynamic Mean-Field # # Equations in Spherical Geometry and their Application to Turbulent Stellar # # Convection Data...
mmicromegasREPO_NAMEransXPATH_START.@ransX_extracted@ransX-master@EQUATIONS@TotalEnergyEquationCalculation.py@.PATH_END.py
{ "filename": "strip-charts.md", "repo_name": "plotly/plotly.py", "repo_path": "plotly.py_extracted/plotly.py-master/doc/python/strip-charts.md", "type": "Markdown" }
--- jupyter: jupytext: notebook_metadata_filter: all text_representation: extension: .md format_name: markdown format_version: '1.2' jupytext_version: 1.4.2 kernelspec: display_name: Python 3 language: python name: python3 language_info: codemirror_mode: name:...
plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@doc@python@strip-charts.md@.PATH_END.py
{ "filename": "axisman.py", "repo_name": "simonsobs/sotodlib", "repo_path": "sotodlib_extracted/sotodlib-master/sotodlib/core/axisman.py", "type": "Python" }
import numpy as np from collections import OrderedDict as odict import scipy.sparse as sparse ## "temporary" fix to deal with scipy>1.8 changing the sparse setup try: from scipy.sparse import csr_array except ImportError: from scipy.sparse import csr_matrix as csr_array from .util import get_coindices class...
simonsobsREPO_NAMEsotodlibPATH_START.@sotodlib_extracted@sotodlib-master@sotodlib@core@axisman.py@.PATH_END.py
{ "filename": "masking.py", "repo_name": "fchollet/keras", "repo_path": "keras_extracted/keras-master/keras/src/layers/core/masking.py", "type": "Python" }
from keras.src import backend from keras.src import ops from keras.src.api_export import keras_export from keras.src.layers.layer import Layer @keras_export("keras.layers.Masking") class Masking(Layer): """Masks a sequence by using a mask value to skip timesteps. For each timestep in the input tensor (dimens...
fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@layers@core@masking.py@.PATH_END.py
{ "filename": "factory.py", "repo_name": "ratt-ru/montblanc", "repo_path": "montblanc_extracted/montblanc-master/montblanc/factory.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 Simon Perkins # # This file is part of montblanc. # # 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 2 of the L...
ratt-ruREPO_NAMEmontblancPATH_START.@montblanc_extracted@montblanc-master@montblanc@factory.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/layout/ternary/caxis/title/__init__.py", "type": "Python" }
import sys if sys.version_info < (3, 7): from ._text import TextValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._text.TextValidator", "._font.FontValidator"] )
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@layout@ternary@caxis@title@__init__.py@.PATH_END.py
{ "filename": "slurp_craco_cubes.py", "repo_name": "FRBs/zdm", "repo_path": "zdm_extracted/zdm-main/papers/H0_I/Analysis/CRACO/py/slurp_craco_cubes.py", "type": "Python" }
""" Simple script to slurp """ from zdm import analyze_cube def main(pargs): if pargs.run == 'Emax': # Emax input_file = 'Cubes/craco_H0_Emax_cube.json' prefix = 'Cubes/tmp' nsurveys = 1 # Run it analyze_cube.slurp_cube(input_file, prefix, 'Cubes/craco_H0_Emax_cu...
FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@papers@H0_I@Analysis@CRACO@py@slurp_craco_cubes.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "Jammy2211/PyAutoLens", "repo_path": "PyAutoLens_extracted/PyAutoLens-main/test_autolens/point/fit/__init__.py", "type": "Python" }
Jammy2211REPO_NAMEPyAutoLensPATH_START.@PyAutoLens_extracted@PyAutoLens-main@test_autolens@point@fit@__init__.py@.PATH_END.py
{ "filename": "bispec.py", "repo_name": "toshiyan/cmblensplus", "repo_path": "cmblensplus_extracted/cmblensplus-master/wrap/curvedsky/bispec.py", "type": "Python" }
import libcurvedsky import numpy def make_quad_gauss(lmax,alm): """ Return a non-Gaussian alm. The corresponding non-Gaussian field is defined as delta^NL(n) = delta^L(n) + delta^L(n)**2 where delta^L(n) is a gaussian field obtained from the input alm. Args: :lmax (*int*): Maximum multipole of alm ...
toshiyanREPO_NAMEcmblensplusPATH_START.@cmblensplus_extracted@cmblensplus-master@wrap@curvedsky@bispec.py@.PATH_END.py
{ "filename": "transit_model.py", "repo_name": "petigura/terra", "repo_path": "terra_extracted/terra-master/terra/transit_model.py", "type": "Python" }
import sys import numpy as np from scipy import optimize import pandas as pd from matplotlib.pylab import * from emcee import EnsembleSampler import keptoy from plotting.kplot import * from utils import h5plus class TransitModel(h5plus.iohelper): """ TransitModel Simple class for fitting transit ...
petiguraREPO_NAMEterraPATH_START.@terra_extracted@terra-master@terra@transit_model.py@.PATH_END.py
{ "filename": "_colorbar.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contourcarpet/_colorbar.py", "type": "Python" }
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="contourcarpet", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contourcarpet@_colorbar.py@.PATH_END.py
{ "filename": "test_calibration.py", "repo_name": "tomasstolker/species", "repo_path": "species_extracted/species-main/tests/test_read/test_calibration.py", "type": "Python" }
import os import shutil import pytest import numpy as np from species import SpeciesInit from species.data.database import Database from species.read.read_calibration import ReadCalibration from species.util import test_util class TestCalibration: def setup_class(self): self.limit = 1e-8 self.te...
tomasstolkerREPO_NAMEspeciesPATH_START.@species_extracted@species-main@tests@test_read@test_calibration.py@.PATH_END.py
{ "filename": "_legendgrouptitle.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/shape/_legendgrouptitle.py", "type": "Python" }
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="layout.shape", **kwargs ): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name,...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@shape@_legendgrouptitle.py@.PATH_END.py
{ "filename": "test_parallax_computation.py", "repo_name": "golmschenk/eesunhong", "repo_path": "eesunhong_extracted/eesunhong-main/tests/unit_tests/test_parallax_computation.py", "type": "Python" }
from ctypes import POINTER, c_double, c_int from pathlib import Path import numpy as np import pytest from eesunhong.eesunhong import compute_parallax_using_geo_par, create_vbbl, destroy_vbbl, \ set_object_coordinates_for_vbbl, compute_parallax_for_vbbl, set_parallax_system_for_vbbl def test_parallax_computatio...
golmschenkREPO_NAMEeesunhongPATH_START.@eesunhong_extracted@eesunhong-main@tests@unit_tests@test_parallax_computation.py@.PATH_END.py
{ "filename": "systemconfig.py", "repo_name": "astroufsc/chimera", "repo_path": "chimera_extracted/chimera-master/src/chimera/core/systemconfig.py", "type": "Python" }
from chimera.core.location import Location from chimera.core.exceptions import ChimeraException from chimera.core.constants import ( SYSTEM_CONFIG_DEFAULT_FILENAME, MANAGER_DEFAULT_HOST, MANAGER_DEFAULT_PORT, ) import yaml # import chimera.core.log import logging log = logging.getLogger(__name__) class ...
astroufscREPO_NAMEchimeraPATH_START.@chimera_extracted@chimera-master@src@chimera@core@systemconfig.py@.PATH_END.py
{ "filename": "zhipuai.ipynb", "repo_name": "langchain-ai/langchain", "repo_path": "langchain_extracted/langchain-master/docs/docs/integrations/text_embedding/zhipuai.ipynb", "type": "Jupyter Notebook" }
--- sidebar_label: ZhipuAI keywords: [zhipuaiembeddings] --- # ZhipuAIEmbeddings This will help you get started with ZhipuAI embedding models using LangChain. For detailed documentation on `ZhipuAIEmbeddings` features and configuration options, please refer to the [API reference](https://bigmodel.cn/dev/api#vector). ...
langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@docs@docs@integrations@text_embedding@zhipuai.ipynb@.PATH_END.py
{ "filename": "_linewidth.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/scene/zaxis/_linewidth.py", "type": "Python" }
import _plotly_utils.basevalidators class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.scene.zaxis", **kwargs ): super(LinewidthValidator, self).__init__( plotly_name=plotly_name, pare...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@scene@zaxis@_linewidth.py@.PATH_END.py
{ "filename": "point_source_model.py", "repo_name": "Herculens/herculens", "repo_path": "herculens_extracted/herculens-main/herculens/PointSourceModel/point_source_model.py", "type": "Python" }
# Copyright (c) 2023, herculens developers and contributors __author__ = 'austinpeel' from herculens.PointSourceModel.point_source import PointSource __all__ = ['PointSourceModel'] SUPPORTED_TYPES = ['IMAGE_POSITIONS', 'SOURCE_POSITION'] class PointSourceModel(object): """Collection of point sources defined i...
HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@PointSourceModel@point_source_model.py@.PATH_END.py
{ "filename": "cattools.py", "repo_name": "desihub/LSS", "repo_path": "LSS_extracted/LSS-main/py/LSS/main/cattools.py", "type": "Python" }
''' python functions to do various useful date processing/manipulation ''' import numpy as np import glob import os from random import random import astropy.io.fits as fits from astropy.table import Table,join,unique,vstack,setdiff import fitsio from matplotlib import pyplot as plt import healpy as hp #from LSS.C...
desihubREPO_NAMELSSPATH_START.@LSS_extracted@LSS-main@py@LSS@main@cattools.py@.PATH_END.py
{ "filename": "modhead.py", "repo_name": "Keck-DataReductionPipelines/KCWI_DRP", "repo_path": "KCWI_DRP_extracted/KCWI_DRP-master/kcwidrp/scripts/modhead.py", "type": "Python" }
#!/usr/bin/env python """Modify FITS header keyword""" from astropy.io import fits import argparse import sys import os def _parse_arguments(in_args: list) -> argparse.Namespace: description = "modify FITS header keyword" parser = argparse.ArgumentParser(prog=f"{in_args[0]}", ...
Keck-DataReductionPipelinesREPO_NAMEKCWI_DRPPATH_START.@KCWI_DRP_extracted@KCWI_DRP-master@kcwidrp@scripts@modhead.py@.PATH_END.py
{ "filename": "_name.py", "repo_name": "catboost/catboost", "repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/updatemenu/_name.py", "type": "Python" }
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.updatemenu", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@updatemenu@_name.py@.PATH_END.py
{ "filename": "__init__.py", "repo_name": "sampsyo/clusterfutures", "repo_path": "clusterfutures_extracted/clusterfutures-master/cfut/__init__.py", "type": "Python" }
"""Python futures for Condor clusters.""" from concurrent import futures from itertools import count import os import sys import threading import time import traceback from . import condor from . import slurm from .util import ( random_string, local_filename, INFILE_FMT, OUTFILE_FMT, ) import cloudpickle __versio...
sampsyoREPO_NAMEclusterfuturesPATH_START.@clusterfutures_extracted@clusterfutures-master@cfut@__init__.py@.PATH_END.py
{ "filename": "data.py", "repo_name": "gammapy/enrico", "repo_path": "enrico_extracted/enrico-master/enrico/data.py", "type": "Python" }
"""Utilities to download / preprocess data""" import os from os.path import join import glob import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) # @todo: use config file for this? from enrico.environ import CATALOG_DIR, CATALOG, DIFFUSE_DIR, DIFFUSE_GAL, DIFFUSE_ISO_SOURCE, DIFFUSE...
gammapyREPO_NAMEenricoPATH_START.@enrico_extracted@enrico-master@enrico@data.py@.PATH_END.py
{ "filename": "helper.py", "repo_name": "bwinkel/pycraf", "repo_path": "pycraf_extracted/pycraf-master/pycraf/pathprof/helper.py", "type": "Python" }
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import ( absolute_import, unicode_literals, division, print_function ) # from functools import partial, lru_cache import os from astropy import units as apu import numpy as np from scipy.interpolate import RegularGridInterpolator from astropy.utils...
bwinkelREPO_NAMEpycrafPATH_START.@pycraf_extracted@pycraf-master@pycraf@pathprof@helper.py@.PATH_END.py
{ "filename": "check_empty_regions.ipynb", "repo_name": "GalSim-developers/GalSim", "repo_path": "GalSim_extracted/GalSim-main/devel/external/AEGIS/check_empty_regions.ipynb", "type": "Jupyter Notebook" }
### Program to create image with correlated noise for AEGIS using empty regions 16 empty regions in the AEGIS fileds (in V/F606W and I/F814W bands) were visually idenitified and thier information was saved in empty_fields.txt. The empty feilds are picked from different regions and have varying sizes. Correlation functi...
GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@external@AEGIS@check_empty_regions.ipynb@.PATH_END.py
{ "filename": "test_util.py", "repo_name": "tensorflow/tensorflow", "repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/test_util.py", "type": "Python" }
# Copyright 2020 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@distribute@test_util.py@.PATH_END.py