metadata dict | text stringlengths 0 40.6M | id stringlengths 14 255 |
|---|---|---|
{
"filename": "AutoDriver.py",
"repo_name": "Keck-DataReductionPipelines/MosfireDRP",
"repo_path": "MosfireDRP_extracted/MosfireDRP-master/apps/AutoDriver.py",
"type": "Python"
} | #!/usr/local/bin/python
import MOSFIRE
from MOSFIRE import IO, Wavelength
from MOSFIRE.IO import fname_to_path
import os
try:
from astropy.io import fits as pf
except:... | Keck-DataReductionPipelinesREPO_NAMEMosfireDRPPATH_START.@MosfireDRP_extracted@MosfireDRP-master@apps@AutoDriver.py@.PATH_END.py |
{
"filename": "TiffTags.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/PIL/TiffTags.py",
"type": "Python"
} | #
# The Python Imaging Library.
# $Id$
#
# TIFF tags
#
# This module provides clear-text names for various well-known
# TIFF tags. the TIFF codec works just fine without it.
#
# Copyright (c) Secret Labs AB 1999.
#
# See the README file for information on usage and redistribution.
#
##
# This module provides constant... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@PIL@TiffTags.py@.PATH_END.py |
{
"filename": "gof.py",
"repo_name": "JohannesBuchner/BXA",
"repo_path": "BXA_extracted/BXA-master/bxa/xspec/gof.py",
"type": "Python"
} | """
Compute poisson-based GOF
"""
from __future__ import print_function
import sys, os
import numpy
import scipy.stats, scipy.special
import matplotlib.pyplot as plt
def build(options, k):
if len(options) == 1:
o = options[0]
if k < len(o):
#print 'yielding kth option', k, o
yield [o[k]]
else:
for i, o ... | JohannesBuchnerREPO_NAMEBXAPATH_START.@BXA_extracted@BXA-master@bxa@xspec@gof.py@.PATH_END.py |
{
"filename": "thirdai_neuraldb.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/retrievers/thirdai_neuraldb.py",
"type": "Python"
} | from __future__ import annotations
import importlib
import os
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Union
from langchain_core.callbacks import CallbackManagerForRetrieverRun
from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
from l... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@retrievers@thirdai_neuraldb.py@.PATH_END.py |
{
"filename": "reverb.ipynb",
"repo_name": "sirocco-rt/sirocco",
"repo_path": "sirocco_extracted/sirocco-main/examples/reverb/reverb.ipynb",
"type": "Jupyter Notebook"
} | # Reverberation Mapping
`SIROCCO` has the capability to generate transfer functions/reverberation signatures for the systems it models. These describe how a change in the ionising continuum is reprocessed into a change in line emission. These signatures can (approximately) be recovered from observation, if there's a su... | sirocco-rtREPO_NAMEsiroccoPATH_START.@sirocco_extracted@sirocco-main@examples@reverb@reverb.ipynb@.PATH_END.py |
{
"filename": "config_maps.py",
"repo_name": "bsafdi/NPTFit",
"repo_path": "NPTFit_extracted/NPTFit-master/NPTFit/config_maps.py",
"type": "Python"
} | ###############################################################################
# config_maps.py
###############################################################################
#
# Configure the maps - data, exposure, and templates - required to perform the
# scan.
#
# These maps are input by the user as well as the ma... | bsafdiREPO_NAMENPTFitPATH_START.@NPTFit_extracted@NPTFit-master@NPTFit@config_maps.py@.PATH_END.py |
{
"filename": "convert_models.md",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/lite/g3doc/models/convert/convert_models.md",
"type": "Markdown"
} | # Convert TensorFlow models
This page describes how to convert a TensorFlow model
to a TensorFlow Lite model (an optimized
[FlatBuffer](https://google.github.io/flatbuffers/) format identified by the
`.tflite` file extension) using the TensorFlow Lite converter.
Note: This guide assumes you've both
[installed TensorF... | tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@lite@g3doc@models@convert@convert_models.md@.PATH_END.py |
{
"filename": "extract_controls.py",
"repo_name": "nworbde/dStar",
"repo_path": "dStar_extracted/dStar-master/tools/extract_controls.py",
"type": "Python"
} | #!/usr/bin/env python
import re
import argparse
parser = argparse.ArgumentParser(description="reads a list of variable declarations and strips off everything to the left of the '::'. This is useful for generating default listings and namelists")
parser.add_argument('-d','--default-assignment',help='append equals si... | nworbdeREPO_NAMEdStarPATH_START.@dStar_extracted@dStar-master@tools@extract_controls.py@.PATH_END.py |
{
"filename": "fds_test.py",
"repo_name": "GalSim-developers/GalSim",
"repo_path": "GalSim_extracted/GalSim-main/devel/fds_test.py",
"type": "Python"
} | # Copyright (c) 2012-2023 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... | GalSim-developersREPO_NAMEGalSimPATH_START.@GalSim_extracted@GalSim-main@devel@fds_test.py@.PATH_END.py |
{
"filename": "memory_checker_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/framework/memory_checker_test.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@framework@memory_checker_test.py@.PATH_END.py |
{
"filename": "spectrumutils.py",
"repo_name": "mlafarga/raccoon",
"repo_path": "raccoon_extracted/raccoon-master/raccoon/spectrumutils.py",
"type": "Python"
} | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
import ipdb
import pickle
import sys
from astropy.convolution import convolve, Box1DKernel, Gaussian1DKernel
from astropy.stats import sigma_clip
import numpy as np
from scipy.interpolate import interp1d
from scipy.interpolate... | mlafargaREPO_NAMEraccoonPATH_START.@raccoon_extracted@raccoon-master@raccoon@spectrumutils.py@.PATH_END.py |
{
"filename": "_color.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/heatmap/hoverlabel/font/_color.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="heatmap.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@heatmap@hoverlabel@font@_color.py@.PATH_END.py |
{
"filename": "tstquery.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/astropy/vo/validator/tstquery.py",
"type": "Python"
} | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Temporary solution until `astropy.vo.validator.Conf.conesearch_master_list`
includes ``<testQuery>`` fields.
In case USVO service is unstable, it does the following:
#. Try USVO production server.
#. If fails, try USVO test server (has latest ... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@astropy@vo@validator@tstquery.py@.PATH_END.py |
{
"filename": "test_OFTI.py",
"repo_name": "sblunt/orbitize",
"repo_path": "orbitize_extracted/orbitize-main/tests/test_OFTI.py",
"type": "Python"
} | #!/usr/bin/env python
"""
Test the orbitize.sampler OFTI class which performs OFTI on astrometric data
"""
import numpy as np
import os
import pytest
import time
import orbitize
import orbitize.sampler as sampler
import orbitize.driver
import orbitize.priors as priors
import orbitize.system as system
import orbitize.s... | sbluntREPO_NAMEorbitizePATH_START.@orbitize_extracted@orbitize-main@tests@test_OFTI.py@.PATH_END.py |
{
"filename": "data_structures.py",
"repo_name": "yt-project/yt",
"repo_path": "yt_extracted/yt-main/yt/frontends/gadget_fof/data_structures.py",
"type": "Python"
} | import os
import weakref
from collections import defaultdict
from functools import cached_property, partial
import numpy as np
from yt.data_objects.selection_objects.data_selection_objects import (
YTSelectionContainer,
)
from yt.data_objects.static_output import ParticleDataset
from yt.frontends.gadget.data_stru... | yt-projectREPO_NAMEytPATH_START.@yt_extracted@yt-main@yt@frontends@gadget_fof@data_structures.py@.PATH_END.py |
{
"filename": "upload_coverage.py",
"repo_name": "h5py/h5py",
"repo_path": "h5py_extracted/h5py-master/ci/upload_coverage.py",
"type": "Python"
} | """
Helper script to combine coverage (as codecov seems to have problems...).
Written in python to be cross-platform
"""
import argparse
import os
from os import chdir, environ
from pathlib import Path
import platform
from pprint import pprint
import signal
from subprocess import PIPE, Popen, CalledProcessError, Timeo... | h5pyREPO_NAMEh5pyPATH_START.@h5py_extracted@h5py-master@ci@upload_coverage.py@.PATH_END.py |
{
"filename": "test_py_data_funnel.py",
"repo_name": "NumCosmo/NumCosmo",
"repo_path": "NumCosmo_extracted/NumCosmo-master/tests/test_py_data_funnel.py",
"type": "Python"
} | #!/usr/bin/env python
#
# test_py_data_funnel.py
#
# thu Dec 29 15:44:00 2023
# Copyright 2023 Sandro Dias Pinto Vitenti
# <vitenti@uel.br>
#
# test_py_data_funnel.py
# Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
#
# numcosmo is free software: you can redistribute it and/or modify it
# under the ter... | NumCosmoREPO_NAMENumCosmoPATH_START.@NumCosmo_extracted@NumCosmo-master@tests@test_py_data_funnel.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/mesh3d/lightposition/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="y", parent_name="mesh3d.lightposition", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edi... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@mesh3d@lightposition@_y.py@.PATH_END.py |
{
"filename": "Survey_Refactor.ipynb",
"repo_name": "FRBs/zdm",
"repo_path": "zdm_extracted/zdm-main/docs/nb/Survey_Refactor.ipynb",
"type": "Jupyter Notebook"
} | # Survey Refactor
```python
# imports
from importlib import reload
import pandas
from astropy.table import Table
from zdm import misc_functions
from zdm import survey
from zdm import parameters
from zdm import cosmology as cos
from zdm import survey_data
from zdm import data_class
```
/home/xavier/Projects/FRB... | FRBsREPO_NAMEzdmPATH_START.@zdm_extracted@zdm-main@docs@nb@Survey_Refactor.ipynb@.PATH_END.py |
{
"filename": "Populations_Explorer.ipynb",
"repo_name": "ManuelDMorales/datagen-sngw-phen",
"repo_path": "datagen-sngw-phen_extracted/datagen-sngw-phen-main/Codes/Populations_Explorer.ipynb",
"type": "Jupyter Notebook"
} | <font size="5.5"><u><i>Populations Explorer</i></u></font>
<font size="4">Script to explore samples populations (run only if you have samples of the three classes)</font>
<br/>
<font size="4">Author: Manuel David Morales</font>
## 1. Library imports
```python
# Data analysis
import numpy as np
import pandas as pd
... | ManuelDMoralesREPO_NAMEdatagen-sngw-phenPATH_START.@datagen-sngw-phen_extracted@datagen-sngw-phen-main@Codes@Populations_Explorer.ipynb@.PATH_END.py |
{
"filename": "_colorsrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/volume/hoverlabel/font/_colorsrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="volume.hoverlabel.font", **kwargs
):
super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@volume@hoverlabel@font@_colorsrc.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/ops/structured/__init__.py",
"type": "Python"
} | """Structured Tensors."""
| tensorflowREPO_NAMEtensorflowPATH_START.@tensorflow_extracted@tensorflow-master@tensorflow@python@ops@structured@__init__.py@.PATH_END.py |
{
"filename": "tutorial_1.ipynb",
"repo_name": "richteague/eddy",
"repo_path": "eddy_extracted/eddy-master/docs/tutorials/tutorial_1.ipynb",
"type": "Jupyter Notebook"
} | # 1 - Fitting Rotation Maps
A common task for analyses of protoplanetary disks is to infer their geometrical properties, namely the source centre, $(x_0,\, y_0)$, the inclination $i$, position angle, ${\rm PA}$, and stellar (dynamical) mass, $M_{\rm star}$, by fitting a simple Keplerian rotation pattern to a measured ... | richteagueREPO_NAMEeddyPATH_START.@eddy_extracted@eddy-master@docs@tutorials@tutorial_1.ipynb@.PATH_END.py |
{
"filename": "_showlegend.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/contour/_showlegend.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showlegend", parent_name="contour", **kwargs):
super(ShowlegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@contour@_showlegend.py@.PATH_END.py |
{
"filename": "_line.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/graph_objs/scatterpolargl/marker/_line.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterpolargl.marker"
_path_str = "scatterpolargl.marker.line"
_valid_props = {
"auto... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@graph_objs@scatterpolargl@marker@_line.py@.PATH_END.py |
{
"filename": "distribution_lib_test.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/backend/jax/distribution_lib_test.py",
"type": "Python"
} | """Test for distribution_lib.py."""
import functools
import os
from unittest import mock
import jax
import numpy as np
import pytest
from keras.src import backend
from keras.src import layers
from keras.src import models
from keras.src import testing
from keras.src.backend import distribution_lib as backend_dlib
fro... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@backend@jax@distribution_lib_test.py@.PATH_END.py |
{
"filename": "_tickfont.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py",
"type": "Python"
} | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tickfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter3d.line.colorbar"
_path_str = "scatter3d.line.colorbar.tickfont"
_valid_props = {
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@graph_objs@scatter3d@line@colorbar@_tickfont.py@.PATH_END.py |
{
"filename": "tls.py",
"repo_name": "crossbario/crossbar",
"repo_path": "crossbar_extracted/crossbar-master/crossbar/router/auth/tls.py",
"type": "Python"
} | #####################################################################################
#
# Copyright (c) typedef int GmbH
# SPDX-License-Identifier: EUPL-1.2
#
#####################################################################################
from typing import Dict, Any
import txaio
from txaio import make_logger... | crossbarioREPO_NAMEcrossbarPATH_START.@crossbar_extracted@crossbar-master@crossbar@router@auth@tls.py@.PATH_END.py |
{
"filename": "Documentation.md",
"repo_name": "hpc4cmb/toast",
"repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googlemock/docs/v1_5/Documentation.md",
"type": "Markdown"
} | This page lists all documentation wiki pages for Google Mock **version 1.5.0** -- **if you use a different version of Google Mock, please read the documentation for that specific version instead.**
* [ForDummies](V1_5_ForDummies.md) -- start here if you are new to Google Mock.
* [CheatSheet](V1_5_CheatSheet.md) --... | hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googlemock@docs@v1_5@Documentation.md@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/choroplethmap/_name.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="name", parent_name="choroplethmap", **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
e... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@choroplethmap@_name.py@.PATH_END.py |
{
"filename": "CalculateB.py",
"repo_name": "MehrnooshTahani/MappingBLOS_MolecularClouds",
"repo_path": "MappingBLOS_MolecularClouds_extracted/MappingBLOS_MolecularClouds-master/MolecularClouds/Classes/CalculateB.py",
"type": "Python"
} | """
This file contains the class to calculate BLOS values.
"""
import pandas as pd
import numpy as np
from . import config
# -------- CLASS DEFINITION --------
class CalculateB:
def __init__(self, AvAbundancePath, ExtincRMPath, RefPointTable, saveFilePath, ZeroNegativeExtinctionEntries = True, DeleteNegativeExti... | MehrnooshTahaniREPO_NAMEMappingBLOS_MolecularCloudsPATH_START.@MappingBLOS_MolecularClouds_extracted@MappingBLOS_MolecularClouds-master@MolecularClouds@Classes@CalculateB.py@.PATH_END.py |
{
"filename": "_autocolorscale.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattersmith/marker/_autocolorscale.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="autocolorscale", parent_name="scattersmith.marker", **kwargs
):
super(AutocolorscaleValidator, self).__init__(
plotly_name=plotly_name,... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattersmith@marker@_autocolorscale.py@.PATH_END.py |
{
"filename": "convergence_tutorial.py",
"repo_name": "lorenaacuna/GASTLI",
"repo_path": "GASTLI_extracted/GASTLI-main/Examples/convergence_tutorial.py",
"type": "Python"
} |
# Import coupling module
import gastli.Coupling as cpl
import gastli.constants as cte
# Other Python modules
# Other Python modules
import numpy as np
import matplotlib.pyplot as plt
# Create coupling class
# Time initialization time
my_coupling = cpl.coupling(path_to_file="/Users/acuna/Desktop/gastli_input_data/"... | lorenaacunaREPO_NAMEGASTLIPATH_START.@GASTLI_extracted@GASTLI-main@Examples@convergence_tutorial.py@.PATH_END.py |
{
"filename": "_templateitemname.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="templateitemname",
parent_name="surface.colorbar.tickformatstop",
**kwargs
):
super(TemplateitemnameValidator, self).__ini... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@surface@colorbar@tickformatstop@_templateitemname.py@.PATH_END.py |
{
"filename": "run_region_scan.py",
"repo_name": "gshartnett/karzas-latter-seiler",
"repo_path": "karzas-latter-seiler_extracted/karzas-latter-seiler-main/scripts/run_region_scan.py",
"type": "Python"
} | """
Copyright (C) 2023 by The RAND Corporation
See LICENSE and README.md for information on usage and licensing
"""
# imports
import argparse
import os
import pickle
import numpy as np
import emp.geometry as geometry
from emp.constants import *
from emp.region_scan import (
contour_plot,
data_dic_to_xyz,
... | gshartnettREPO_NAMEkarzas-latter-seilerPATH_START.@karzas-latter-seiler_extracted@karzas-latter-seiler-main@scripts@run_region_scan.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "spacetelescope/jdaviz",
"repo_path": "jdaviz_extracted/jdaviz-main/jdaviz/configs/default/plugins/about/tests/__init__.py",
"type": "Python"
} | spacetelescopeREPO_NAMEjdavizPATH_START.@jdaviz_extracted@jdaviz-main@jdaviz@configs@default@plugins@about@tests@__init__.py@.PATH_END.py | |
{
"filename": "collapse.py",
"repo_name": "spacetelescope/specview",
"repo_path": "specview_extracted/specview-master/specview/analysis/collapse.py",
"type": "Python"
} | import numpy as np
from astropy.units import Unit
from specview.core import CubeData, ImageArray
def collapse(cube_data, method='average', axis=0):
if method == 'average':
new_data = np.nanmean(cube_data.data, axis=axis)
elif method == 'median':
new_data = np.nanmedian(cube_data.data, axis=a... | spacetelescopeREPO_NAMEspecviewPATH_START.@specview_extracted@specview-master@specview@analysis@collapse.py@.PATH_END.py |
{
"filename": "sky_sampler.py",
"repo_name": "grburgess/popsynth",
"repo_path": "popsynth_extracted/popsynth-master/popsynth/aux_samplers/sky_sampler.py",
"type": "Python"
} | import numpy as np
from popsynth.auxiliary_sampler import NonObservedAuxSampler
from popsynth.utils.spherical_geometry import sample_theta_phi
class SkySampler(object):
_auxiliary_sampler_name = "SkySampler"
def __init__(
self,
ra_sampler: NonObservedAuxSampler = None,
dec_sampler: N... | grburgessREPO_NAMEpopsynthPATH_START.@popsynth_extracted@popsynth-master@popsynth@aux_samplers@sky_sampler.py@.PATH_END.py |
{
"filename": "m31.ipynb",
"repo_name": "changhoonhahn/provabgs",
"repo_path": "provabgs_extracted/provabgs-main/nb/m31.ipynb",
"type": "Jupyter Notebook"
} | ```python
import os
import h5py
import numpy as np
from astropy.io import fits
from astropy import table as aTable
from desispec.io import read_spectra
```
```python
# lets install the python package `provabgs`, a python package for generating the PRObabilistic Value-Added BGS (PROVABGS)
!pip uninstall -y provabgs
!p... | changhoonhahnREPO_NAMEprovabgsPATH_START.@provabgs_extracted@provabgs-main@nb@m31.ipynb@.PATH_END.py |
{
"filename": "launch_cscs_2dcnn.py",
"repo_name": "deepsphere/deepsphere-cosmo-tf1",
"repo_path": "deepsphere-cosmo-tf1_extracted/deepsphere-cosmo-tf1-master/launch_cscs_2dcnn.py",
"type": "Python"
} | #!/usr/bin/env python3
"""
Script to run experiments on the Swiss National Supercomputing Centre (CSCS).
https://www.cscs.ch/
"""
import os
from grid import pgrid
txtfile = '''#!/bin/bash -l
#SBATCH --time=6:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --constraint=gpu
#SBATCH --account=sd01
#SBATCH --output... | deepsphereREPO_NAMEdeepsphere-cosmo-tf1PATH_START.@deepsphere-cosmo-tf1_extracted@deepsphere-cosmo-tf1-master@launch_cscs_2dcnn.py@.PATH_END.py |
{
"filename": "actionAngleStaeckelGrid.py",
"repo_name": "jobovy/galpy",
"repo_path": "galpy_extracted/galpy-main/galpy/actionAngle/actionAngleStaeckelGrid.py",
"type": "Python"
} | ###############################################################################
# actionAngle: a Python module to calculate actions, angles, and frequencies
#
# class: actionAngleStaeckelGrid
#
# build grid in integrals of motion to quickly evaluate
# actionAngleStaeckel
#
# methods... | jobovyREPO_NAMEgalpyPATH_START.@galpy_extracted@galpy-main@galpy@actionAngle@actionAngleStaeckelGrid.py@.PATH_END.py |
{
"filename": "energy.py",
"repo_name": "bcerutti/Zeltron-code",
"repo_path": "Zeltron-code_extracted/Zeltron-code-master/plot2D/energy.py",
"type": "Python"
} | #***********************************************************************!
# The Zeltron code project. !
#***********************************************************************!
# Copyright (C) 2012-2015. Authors: Benoit Cerutti & Greg Werner !
# ... | bceruttiREPO_NAMEZeltron-codePATH_START.@Zeltron-code_extracted@Zeltron-code-master@plot2D@energy.py@.PATH_END.py |
{
"filename": "cli.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/cli/langchain_cli/cli.py",
"type": "Python"
} | from typing import Optional
import typer
from typing_extensions import Annotated
from langchain_cli._version import __version__
from langchain_cli.namespaces import app as app_namespace
from langchain_cli.namespaces import integration as integration_namespace
from langchain_cli.namespaces import template as template_... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@cli@langchain_cli@cli.py@.PATH_END.py |
{
"filename": "EclipsingBinary_FullSolution_Laplace.ipynb",
"repo_name": "rodluger/starry",
"repo_path": "starry_extracted/starry-master/notebooks/todo/EclipsingBinary_FullSolution_Laplace.ipynb",
"type": "Jupyter Notebook"
} | # Eclipsing binary: Laplace approximation
In this notebook, we're continuing our tutorial on how to do inference. In the [last notebook](EclipsingBinary_FullSolution.ipynb), we solved for *everything* at once using `pymc3`.
**Note that since we're using pymc3, we need to enable lazy evaluation mode in starry.**
```... | rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@notebooks@todo@EclipsingBinary_FullSolution_Laplace.ipynb@.PATH_END.py |
{
"filename": "_name.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/icicle/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="icicle.marker.colorbar.tickformatstop",
**kwargs,
):
super(NameValidator, self).__init__(
plotly_name=... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@icicle@marker@colorbar@tickformatstop@_name.py@.PATH_END.py |
{
"filename": "test_textreader.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/io/parser/test_textreader.py",
"type": "Python"
} | """
Tests the TextReader class in parsers.pyx, which
is integral to the C engine in parsers.py
"""
from io import (
BytesIO,
StringIO,
)
import numpy as np
import pytest
import pandas._libs.parsers as parser
from pandas._libs.parsers import TextReader
from pandas.errors import ParserWarning
from pandas impo... | pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@io@parser@test_textreader.py@.PATH_END.py |
{
"filename": "train_combined.ipynb",
"repo_name": "ESA-Datalabs/XAMI-model",
"repo_path": "XAMI-model_extracted/XAMI-model-main/xami_model/train/train_combined.ipynb",
"type": "Jupyter Notebook"
} | # Setup
```python
from ultralytics import YOLO, RTDETR
from matplotlib import pyplot as plt
import cv2
import torch
import os
import numpy as np
import random
import json
import sys
from datetime import datetime
# os.environ['CUDA_VISIBLE_DEVICES'] = "0, 1, 2, 3" # replace with the GPU IDs that are available
# to h... | ESA-DatalabsREPO_NAMEXAMI-modelPATH_START.@XAMI-model_extracted@XAMI-model-main@xami_model@train@train_combined.ipynb@.PATH_END.py |
{
"filename": "_texttemplatesrc.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py2/plotly/validators/waterfall/_texttemplatesrc.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="texttemplatesrc", parent_name="waterfall", **kwargs
):
super(TexttemplatesrcValidator, self).__init__(
plotly_name=plotly_name,
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py2@plotly@validators@waterfall@_texttemplatesrc.py@.PATH_END.py |
{
"filename": "rrule.py",
"repo_name": "waynebhayes/SpArcFiRe",
"repo_path": "SpArcFiRe_extracted/SpArcFiRe-master/scripts/SpArcFiRe-pyvenv/lib/python2.7/site-packages/dateutil/rrule.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <http://www.ietf.org/rfc/rfc2445.txt>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import sys
try:
from ... | waynebhayesREPO_NAMESpArcFiRePATH_START.@SpArcFiRe_extracted@SpArcFiRe-master@scripts@SpArcFiRe-pyvenv@lib@python2.7@site-packages@dateutil@rrule.py@.PATH_END.py |
{
"filename": "_meta.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/layout/_meta.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class MetaValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="meta", parent_name="layout", **kwargs):
super(MetaValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok=kw... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@layout@_meta.py@.PATH_END.py |
{
"filename": "report.py",
"repo_name": "itseez/opencv",
"repo_path": "opencv_extracted/opencv-master/modules/ts/misc/report.py",
"type": "Python"
} | #!/usr/bin/env python
""" Print performance test run statistics.
Performance data is stored in the GTest log file created by performance tests. Default name is
`test_details.xml`. It can be changed with the `--gtest_output=xml:<location>/<filename>.xml` test
option. See https://github.com/opencv/opencv/wiki/HowToUsePe... | itseezREPO_NAMEopencvPATH_START.@opencv_extracted@opencv-master@modules@ts@misc@report.py@.PATH_END.py |
{
"filename": "doppler.py",
"repo_name": "rodluger/starry",
"repo_path": "starry_extracted/starry-master/starry/doppler.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
from . import config
from ._constants import *
from ._core import OpsDoppler, math
from ._core.utils import is_tensor, CompileLogMessage
from ._core.math import nadam
from ._indices import integers, get_ylm_inds, get_ylmw_inds, get_ul_inds
from .compat import evaluator, tt
from .maps import YlmB... | rodlugerREPO_NAMEstarryPATH_START.@starry_extracted@starry-master@starry@doppler.py@.PATH_END.py |
{
"filename": "conftest.py",
"repo_name": "pandas-dev/pandas",
"repo_path": "pandas_extracted/pandas-main/pandas/tests/io/json/conftest.py",
"type": "Python"
} | import pytest
@pytest.fixture(params=["split", "records", "index", "columns", "values"])
def orient(request):
"""
Fixture for orients excluding the table format.
"""
return request.param
| pandas-devREPO_NAMEpandasPATH_START.@pandas_extracted@pandas-main@pandas@tests@io@json@conftest.py@.PATH_END.py |
{
"filename": "mk_img.py",
"repo_name": "HERA-Team/aipy",
"repo_path": "aipy_extracted/aipy-main/scripts/mk_img.py",
"type": "Python"
} | #!/usr/bin/env python
"""
This is a general-purpose script for making images from MIRIAD UV files. Data
(optionally selected for baseline, channel) are read from the file, phased
to a provided position, normalized for passband/primary beam effects, gridded
to a UV matrix, and imaged
"""
from __future__ import print_... | HERA-TeamREPO_NAMEaipyPATH_START.@aipy_extracted@aipy-main@scripts@mk_img.py@.PATH_END.py |
{
"filename": "report_destriper.md",
"repo_name": "litebird/litebird_sim",
"repo_path": "litebird_sim_extracted/litebird_sim-master/templates/report_destriper.md",
"type": "Markdown"
} | ## Destriper
### Input parameters
The destriper was executed with the following parameters:
- `NSIDE = {{ results.nside }}`
- Coordinate system for the output map: `{{ results.params.output_coordinate_system }}`
- Detector split: `{{ detector_split }}`
- Time split: `{{ time_split }}`
- Samples per baseline: `{{ res... | litebirdREPO_NAMElitebird_simPATH_START.@litebird_sim_extracted@litebird_sim-master@templates@report_destriper.md@.PATH_END.py |
{
"filename": "plotting.py",
"repo_name": "juanep97/iop4",
"repo_path": "iop4_extracted/iop4-main/iop4lib/utils/plotting.py",
"type": "Python"
} | """
Some plotting utilities for the IOP4 project.
"""
import iop4lib.config
iop4conf = iop4lib.Config(config_db=False)
# other imports
import numpy as np
import scipy as sp
import matplotlib as mplt
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import itertools
from astropy.coordinates impo... | juanep97REPO_NAMEiop4PATH_START.@iop4_extracted@iop4-main@iop4lib@utils@plotting.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "google/flax",
"repo_path": "flax_extracted/flax-main/examples/lm1b/README.md",
"type": "Markdown"
} |
## Language modeling
Trains a Transformer-based model (Vaswani *et al.*, 2017) on the One Billion
Word Benchmark (lm1b; Chelba *et al.*, 2013).
This example uses linear learning rate warmup and inverse square root learning
rate schedule. Based off of Machine Translation `wmt` example.
### Requirements
* TensorFl... | googleREPO_NAMEflaxPATH_START.@flax_extracted@flax-main@examples@lm1b@README.md@.PATH_END.py |
{
"filename": "test_fitter_rbf.py",
"repo_name": "cylammarco/WDPhotTools",
"repo_path": "WDPhotTools_extracted/WDPhotTools-main/test/test_fitter_rbf.py",
"type": "Python"
} | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Testing the fitter using RBF interpolator"""
import numpy as np
from WDPhotTools.fitter import WDfitter
from WDPhotTools.reddening import reddening_vector_filter
from WDPhotTools.reddening import reddening_vector_interpolated
# testing with logg=7.5 and Teff=13000.
... | cylammarcoREPO_NAMEWDPhotToolsPATH_START.@WDPhotTools_extracted@WDPhotTools-main@test@test_fitter_rbf.py@.PATH_END.py |
{
"filename": "powerspectrum.py",
"repo_name": "COINtoolbox/extragalactic_hostless",
"repo_path": "extragalactic_hostless_extracted/extragalactic_hostless-main/src/powerspectrum.py",
"type": "Python"
} | import numpy as np
import astropy.table as at
from scipy.stats import binned_statistic, wasserstein_distance, anderson_ksamp, kstest
def detect_host_with_powerspectrum(sci_image=None, tpl_image=None, number_of_iterations=1000, cutout_sizes=[7, 15, 29],
metric='kstest'):
"""
... | COINtoolboxREPO_NAMEextragalactic_hostlessPATH_START.@extragalactic_hostless_extracted@extragalactic_hostless-main@src@powerspectrum.py@.PATH_END.py |
{
"filename": "central_storage_strategy.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/distribute/central_storage_strategy.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@distribute@central_storage_strategy.py@.PATH_END.py |
{
"filename": "CODE_OF_CONDUCT.md",
"repo_name": "arjunsavel/SImMER",
"repo_path": "SImMER_extracted/SImMER-main/CODE_OF_CONDUCT.md",
"type": "Markdown"
} | # Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of... | arjunsavelREPO_NAMESImMERPATH_START.@SImMER_extracted@SImMER-main@CODE_OF_CONDUCT.md@.PATH_END.py |
{
"filename": "dashvector.py",
"repo_name": "langchain-ai/langchain",
"repo_path": "langchain_extracted/langchain-master/libs/community/langchain_community/vectorstores/dashvector.py",
"type": "Python"
} | from __future__ import annotations
import logging
import uuid
from typing import (
Any,
Iterable,
List,
Optional,
Tuple,
)
import numpy as np
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.utils import get_from_env
from langchain_... | langchain-aiREPO_NAMElangchainPATH_START.@langchain_extracted@langchain-master@libs@community@langchain_community@vectorstores@dashvector.py@.PATH_END.py |
{
"filename": "_variant.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/barpolar/marker/colorbar/title/font/_variant.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="variant",
parent_name="barpolar.marker.colorbar.title.font",
**kwargs,
):
super(VariantValidator, self).__init__(
p... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@barpolar@marker@colorbar@title@font@_variant.py@.PATH_END.py |
{
"filename": "dtype_policy_map.py",
"repo_name": "fchollet/keras",
"repo_path": "keras_extracted/keras-master/keras/src/dtype_policies/dtype_policy_map.py",
"type": "Python"
} | import re
from collections.abc import MutableMapping
from keras.src import dtype_policies
from keras.src.api_export import keras_export
from keras.src.dtype_policies import DTypePolicy
@keras_export(["keras.dtype_policies.DTypePolicyMap"])
class DTypePolicyMap(DTypePolicy, MutableMapping):
"""Dict-like object ma... | fcholletREPO_NAMEkerasPATH_START.@keras_extracted@keras-master@keras@src@dtype_policies@dtype_policy_map.py@.PATH_END.py |
{
"filename": "config_test.py",
"repo_name": "tensorflow/tensorflow",
"repo_path": "tensorflow_extracted/tensorflow-master/tensorflow/python/framework/config_test.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@python@framework@config_test.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "michaelhb/superplot",
"repo_path": "superplot_extracted/superplot-master/superplot/plotlib/__init__.py",
"type": "Python"
} | __all__ = ["base", "plot_mod", "plots"] | michaelhbREPO_NAMEsuperplotPATH_START.@superplot_extracted@superplot-master@superplot@plotlib@__init__.py@.PATH_END.py |
{
"filename": "tarfile.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/tarfile.py",
"type": "Python"
} | #!/usr/bin/env python3
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any pers... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@tarfile.py@.PATH_END.py |
{
"filename": "ufuncs.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/doc/ufuncs.py",
"type": "Python"
} | """
===================
Universal Functions
===================
Ufuncs are, generally speaking, mathematical functions or operations that are
applied element-by-element to the contents of an array. That is, the result
in each output array element only depends on the value in the corresponding
input array (or arrays) a... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@doc@ufuncs.py@.PATH_END.py |
{
"filename": "autoencoder.ipynb",
"repo_name": "HITS-AIN/PINK",
"repo_path": "PINK_extracted/PINK-master/jupyter/devel/autoencoder.ipynb",
"type": "Jupyter Notebook"
} | ```python
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
from tensorflow.keras import layers
print(tf.version.VERSION)
print(tf.keras.__version__)
```
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passi... | HITS-AINREPO_NAMEPINKPATH_START.@PINK_extracted@PINK-master@jupyter@devel@autoencoder.ipynb@.PATH_END.py |
{
"filename": "CheatSheet.md",
"repo_name": "hpc4cmb/toast",
"repo_path": "toast_extracted/toast-main/src/libtoast/gtest/googlemock/docs/CheatSheet.md",
"type": "Markdown"
} |
# Defining a Mock Class #
## Mocking a Normal Class ##
Given
```
class Foo {
...
virtual ~Foo();
virtual int GetSize() const = 0;
virtual string Describe(const char* name) = 0;
virtual string Describe(int type) = 0;
virtual bool Process(Bar elem, int count) = 0;
};
```
(note that `~Foo()` **must** be vi... | hpc4cmbREPO_NAMEtoastPATH_START.@toast_extracted@toast-main@src@libtoast@gtest@googlemock@docs@CheatSheet.md@.PATH_END.py |
{
"filename": "_adapters.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/tools/python3/Lib/importlib/resources/_adapters.py",
"type": "Python"
} | from contextlib import suppress
from io import TextIOWrapper
from . import abc
class SpecLoaderAdapter:
"""
Adapt a package spec to adapt the underlying loader.
"""
def __init__(self, spec, adapter=lambda spec: spec.loader):
self.spec = spec
self.loader = adapter(spec)
def __get... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@tools@python3@Lib@importlib@resources@_adapters.py@.PATH_END.py |
{
"filename": "sersic_utils.py",
"repo_name": "Herculens/herculens",
"repo_path": "herculens_extracted/herculens-main/herculens/MassModel/Profiles/sersic_utils.py",
"type": "Python"
} | # Utility methods for Sersic profiles
#
# Copyright (c) 2021, herculens developers and contributors
# Copyright (c) 2018, Simon Birrer & lenstronomy contributors
# based on the LensModel.Profiles module from lenstronomy (version 1.9.3)
__author__ = 'sibirrer', 'jiwoncpark', 'austinpeel', 'aymgal'
import scipy.speci... | HerculensREPO_NAMEherculensPATH_START.@herculens_extracted@herculens-main@herculens@MassModel@Profiles@sersic_utils.py@.PATH_END.py |
{
"filename": "c4c88519fb71_fft_overflow.py",
"repo_name": "HERA-Team/hera_mc",
"repo_path": "hera_mc_extracted/hera_mc-main/alembic/versions/c4c88519fb71_fft_overflow.py",
"type": "Python"
} | """fft_overflow
Revision ID: c4c88519fb71
Revises: 68041e36e11b
Create Date: 2020-06-12 22:52:29.674506+00:00
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "c4c88519fb71"
down_revision = "68041e36e11b"
branch_labels ... | HERA-TeamREPO_NAMEhera_mcPATH_START.@hera_mc_extracted@hera_mc-main@alembic@versions@c4c88519fb71_fft_overflow.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py",
"type": "Python"
} | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._weight import WeightValidator
from ._variant import VariantValidator
from ._textcase import TextcaseValidator
from ._style import StyleValidator
from ._size import SizeValidator
from ._shadow impor... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@scattergl@marker@colorbar@tickfont@__init__.py@.PATH_END.py |
{
"filename": "test_image_sim.py",
"repo_name": "deepskies/deeplenstronomy",
"repo_path": "deeplenstronomy_extracted/deeplenstronomy-master/exploded_setup_old/test/test_ImSim/test_image_sim.py",
"type": "Python"
} | from deeplenstronomy.ImSim import image_sim
from deeplenstronomy.PopSim.population import Population
import pytest
import numpy as np
import numpy.testing as npt
class TestImageSim(object):
def setup(self):
pass
def test_image_sim(self):
pop = Population()
kwargs_params, kwargs_model... | deepskiesREPO_NAMEdeeplenstronomyPATH_START.@deeplenstronomy_extracted@deeplenstronomy-master@exploded_setup_old@test@test_ImSim@test_image_sim.py@.PATH_END.py |
{
"filename": "translators.md",
"repo_name": "rzellem/EXOTIC",
"repo_path": "EXOTIC_extracted/EXOTIC-main/docs/regions/German/translators.md",
"type": "Markdown"
} | # List of translators of German
1. [Leon Bewersdorff](https://github.com/LeonBew) | [email](mailto:bewersdorff@pm.me)
| rzellemREPO_NAMEEXOTICPATH_START.@EXOTIC_extracted@EXOTIC-main@docs@regions@German@translators.md@.PATH_END.py |
{
"filename": "test_targetpixelfile.py",
"repo_name": "KeplerGO/PyKE",
"repo_path": "PyKE_extracted/PyKE-master/pyke/tests/test_targetpixelfile.py",
"type": "Python"
} | import numpy as np
from astropy.utils.data import get_pkg_data_filename
import pytest
from ..targetpixelfile import KeplerTargetPixelFile, KeplerQualityFlags
filename_tpf_all_zeros = get_pkg_data_filename("data/test-tpf-all-zeros.fits")
filename_tpf_one_center = get_pkg_data_filename("data/test-tpf-non-zero-center.fi... | KeplerGOREPO_NAMEPyKEPATH_START.@PyKE_extracted@PyKE-master@pyke@tests@test_targetpixelfile.py@.PATH_END.py |
{
"filename": "function_library.py",
"repo_name": "claude-bertout/SLIM2",
"repo_path": "SLIM2_extracted/SLIM2-main/function_library.py",
"type": "Python"
} | """
library of general purpose functions for source and line profile computations
"""
import numpy as np
import import_parameters as prm
import constants as const
from constants import cvel
import set_grids as grid
# define various quantities needed for the plots
if prm.velocity_index == 1 or prm.velocity_index == 3:... | claude-bertoutREPO_NAMESLIM2PATH_START.@SLIM2_extracted@SLIM2-main@function_library.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "GuillermoFrancoAbellan/Swyft-LSS",
"repo_path": "Swyft-LSS_extracted/Swyft-LSS-main/MontePython/StageIV_3x2pt/__init__.py",
"type": "Python"
} | from montepython.likelihood_class import Likelihood
import os
import numpy as np
import pandas as pd
import DMemu
from scipy.interpolate import interp1d
from scipy.integrate import trapz
from astropy import constants as const
from copy import deepcopy
import warnings
warnings.filterwarnings... | GuillermoFrancoAbellanREPO_NAMESwyft-LSSPATH_START.@Swyft-LSS_extracted@Swyft-LSS-main@MontePython@StageIV_3x2pt@__init__.py@.PATH_END.py |
{
"filename": "about.md",
"repo_name": "dfm/exoplanet",
"repo_path": "exoplanet_extracted/exoplanet-main/docs/tutorials/about.md",
"type": "Markdown"
} | ---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
# About these tutorials
+++
This and the following tutorials are automatically executed with ever... | dfmREPO_NAMEexoplanetPATH_START.@exoplanet_extracted@exoplanet-main@docs@tutorials@about.md@.PATH_END.py |
{
"filename": "utils.py",
"repo_name": "sncosmo/sncosmo",
"repo_path": "sncosmo_extracted/sncosmo-master/sncosmo/utils.py",
"type": "Python"
} | import codecs
import math
import os
import socket
import warnings
from collections import OrderedDict
import numpy as np
from scipy import integrate, optimize
def dict_to_array(d):
"""Convert a dictionary of lists (or single values) to a structured
numpy.ndarray."""
# Convert all lists/values to 1-d arr... | sncosmoREPO_NAMEsncosmoPATH_START.@sncosmo_extracted@sncosmo-master@sncosmo@utils.py@.PATH_END.py |
{
"filename": "workflow4.md",
"repo_name": "teuben/QAC",
"repo_path": "QAC_extracted/QAC-master/workflows/workflow4.md",
"type": "Markdown"
} | # TP2VIS workflow examples: skymodel
In this workflow the following is discussed:
1) simulation data, where both TP and MS are derived from a sky model, with a known flux
2) test deconvolution in tp2vis
3) continuum data
# TP data
## Model
We have separate tools to create skymodels with varying parameters. Yo... | teubenREPO_NAMEQACPATH_START.@QAC_extracted@QAC-master@workflows@workflow4.md@.PATH_END.py |
{
"filename": "_thicknessmode.py",
"repo_name": "catboost/catboost",
"repo_path": "catboost_extracted/catboost-master/contrib/python/plotly/py3/plotly/validators/parcoords/line/colorbar/_thicknessmode.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="thicknessmode",
parent_name="parcoords.line.colorbar",
**kwargs,
):
super(ThicknessmodeValidator, self).__init__(
... | catboostREPO_NAMEcatboostPATH_START.@catboost_extracted@catboost-master@contrib@python@plotly@py3@plotly@validators@parcoords@line@colorbar@_thicknessmode.py@.PATH_END.py |
{
"filename": "posterior_utils.py",
"repo_name": "ucl-exoplanets/ADC2023-baseline",
"repo_path": "ADC2023-baseline_extracted/ADC2023-baseline-main/posterior_utils.py",
"type": "Python"
} | import numpy as np
def read_data(path):
import h5py
trace = h5py.File(path,"r")
return trace
def to_matrix(data_file_gt, predicted_file, aux_df):
# careful, orders in data files are scambled. We need to "align them with id from aux file"
id_order = aux_df.index
num = len(data_file_gt.keys())
... | ucl-exoplanetsREPO_NAMEADC2023-baselinePATH_START.@ADC2023-baseline_extracted@ADC2023-baseline-main@posterior_utils.py@.PATH_END.py |
{
"filename": "_choroplethmap.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/graph_objs/layout/template/data/_choroplethmap.py",
"type": "Python"
} | from plotly.graph_objs import Choroplethmap
| plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@graph_objs@layout@template@data@_choroplethmap.py@.PATH_END.py |
{
"filename": "dumb_example.py",
"repo_name": "halomod/halomod",
"repo_path": "halomod_extracted/halomod-main/devel/dumb_example.py",
"type": "Python"
} | import matplotlib.pyplot as plt
from matplotlib.style import use
from halomod import TracerHaloModel
use("seaborn-paper")
tr = TracerHaloModel()
plt.figure(figsize=(4, 2.8))
plt.loglog(tr.r, tr.corr_auto_tracer, label="z=0")
tr.z = 1
plt.loglog(tr.r, tr.corr_auto_tracer, label="z=1")
tr.hod_params = {"M_min": 8}
plt... | halomodREPO_NAMEhalomodPATH_START.@halomod_extracted@halomod-main@devel@dumb_example.py@.PATH_END.py |
{
"filename": "120066_plots+analysis.ipynb",
"repo_name": "California-Planet-Search/planet-pi",
"repo_path": "planet-pi_extracted/planet-pi-master/120066_plots+analysis.ipynb",
"type": "Jupyter Notebook"
} | # 120066 Utilities, Plots, and Analysis
- restore MCMC results, performed at the command line
- I suggest you run the MCMC by running `radvel mcmc -s 120066.py -d results/master` in the 120066 Git repository
- preview plots & save them
- upload plots to an Overleaf paper file
### To run this notebook:
- make sur... | California-Planet-SearchREPO_NAMEplanet-piPATH_START.@planet-pi_extracted@planet-pi-master@120066_plots+analysis.ipynb@.PATH_END.py |
{
"filename": "04_🎯_Monte Carlo Method.py",
"repo_name": "ander-son-almeida/DashboardOCmass",
"repo_path": "DashboardOCmass_extracted/DashboardOCmass-main/pages/04_🎯_Monte Carlo Method.py",
"type": "Python"
} | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 30 21:34:23 2023
@author: Anderson Almeida
"""
import pandas as pd
from synthetic import *
import streamlit as st
import plotly.express as px
import plotly.graph_objects as go
import numpy as np
import numpy.lib.recfunctions as rfn
import time
from oc_tools_padova_edr3 i... | ander-son-almeidaREPO_NAMEDashboardOCmassPATH_START.@DashboardOCmass_extracted@DashboardOCmass-main@pages@04_🎯_Monte Carlo Method.py@.PATH_END.py |
{
"filename": "hi_recon.py",
"repo_name": "ska-sa/hibayes",
"repo_path": "hibayes_extracted/hibayes-master/hi_recon.py",
"type": "Python"
} | #!/usr/bin/env python
"""
# hi_recon.py
Reconstruct the (measured) spectrum from Multinest output
Generates an ascii file recon_stats.txt that you can use for plotting
Jonathan Zwart
Danny Price
Gianni Bernardi
April 2016
Usage:
./hi_recon.py config_file.ini
"""
import os
import sys
import numpy
from scipy imp... | ska-saREPO_NAMEhibayesPATH_START.@hibayes_extracted@hibayes-master@hi_recon.py@.PATH_END.py |
{
"filename": "_helper.py",
"repo_name": "numpy/numpy",
"repo_path": "numpy_extracted/numpy-main/numpy/fft/_helper.py",
"type": "Python"
} | """
Discrete Fourier Transforms - _helper.py
"""
from numpy._core import integer, empty, arange, asarray, roll
from numpy._core.overrides import array_function_dispatch, set_module
# Created by Pearu Peterson, September 2002
__all__ = ['fftshift', 'ifftshift', 'fftfreq', 'rfftfreq']
integer_types = (int, integer)
... | numpyREPO_NAMEnumpyPATH_START.@numpy_extracted@numpy-main@numpy@fft@_helper.py@.PATH_END.py |
{
"filename": "__init__.py",
"repo_name": "scipy/scipy",
"repo_path": "scipy_extracted/scipy-main/scipy/optimize/__init__.py",
"type": "Python"
} | """
=====================================================
Optimization and root finding (:mod:`scipy.optimize`)
=====================================================
.. currentmodule:: scipy.optimize
.. toctree::
:hidden:
optimize.cython_optimize
SciPy ``optimize`` provides functions for minimizing (or maximi... | scipyREPO_NAMEscipyPATH_START.@scipy_extracted@scipy-main@scipy@optimize@__init__.py@.PATH_END.py |
{
"filename": "example.py",
"repo_name": "ryanvarley/exodata",
"repo_path": "exodata_extracted/exodata-master/exodata/example.py",
"type": "Python"
} | """ Code to contain example and other empty classes mainly for tests
"""
# I am making a make system so that unit tests in EASE can load fake targets that will stay constant for the tests
# Due to its wider applicability im putting these here
from .astroclasses import Planet, Star, Binary, System, Parameters, PlanetP... | ryanvarleyREPO_NAMEexodataPATH_START.@exodata_extracted@exodata-master@exodata@example.py@.PATH_END.py |
{
"filename": "fname_to_date.py",
"repo_name": "iancze/PSOAP",
"repo_path": "PSOAP_extracted/PSOAP-master/scripts/TRES/fname_to_date.py",
"type": "Python"
} | import EchelleJSON as ej
import numpy as np
# Read all of the file names and convert the strings to UT and JD
f = open("files.txt")
files = ["{}.json".format(ff[:-6]) for ff in f.readlines()]
# Read the HJDN field
f = open("HJD.txt", "w")
for ff in files:
edict = ej.read("jsons_BCV/{}".format(ff))
HJD = edic... | ianczeREPO_NAMEPSOAPPATH_START.@PSOAP_extracted@PSOAP-master@scripts@TRES@fname_to_date.py@.PATH_END.py |
{
"filename": "README.md",
"repo_name": "yuliang419/AstroNet-Triage",
"repo_path": "AstroNet-Triage_extracted/AstroNet-Triage-master/README.md",
"type": "Markdown"
} | # AstroNet-Triage: A Neural Network for TESS Light Curve Triage

## Contact
Liang Yu: yuliang@mit.edu
## Background
This directory contains TensorFlow models and data processing code for
identifying exoplanets in astrophysical light curves. For complete background on how CNNs ... | yuliang419REPO_NAMEAstroNet-TriagePATH_START.@AstroNet-Triage_extracted@AstroNet-Triage-master@README.md@.PATH_END.py |
{
"filename": "mu_toworld.py",
"repo_name": "kapteyn-astro/kapteyn",
"repo_path": "kapteyn_extracted/kapteyn-master/doc/source/EXAMPLES/mu_toworld.py",
"type": "Python"
} | from kapteyn import maputils
# The set is 3-dim. but default the first two axes are
# used to extract the image data
f = maputils.FITSimage("ngc6946.fits")
annim = f.Annotatedimage()
x = 200; y = 350
lon, lat = annim.toworld(x,y)
print("lon, lat =", lon, lat)
x, y = annim.topixel(lon, lat)
print("x, y = ", x, y)
| kapteyn-astroREPO_NAMEkapteynPATH_START.@kapteyn_extracted@kapteyn-master@doc@source@EXAMPLES@mu_toworld.py@.PATH_END.py |
{
"filename": "myerfinv.py",
"repo_name": "bencebecsy/FurgeHullam",
"repo_path": "FurgeHullam_extracted/FurgeHullam-main/FurgeHullam/myerfinv.py",
"type": "Python"
} | #Based on https://github.com/dougthor42/PyErf
#Same thing except jitted
# ---------------------------------------------------------------------------
### Imports
# ---------------------------------------------------------------------------
# Standard Library
import math
import numba as nb
from numba import njit,prang... | bencebecsyREPO_NAMEFurgeHullamPATH_START.@FurgeHullam_extracted@FurgeHullam-main@FurgeHullam@myerfinv.py@.PATH_END.py |
{
"filename": "kobe_columns.py",
"repo_name": "exomishra/kobe",
"repo_path": "kobe_extracted/kobe-master/code/kobe_columns.py",
"type": "Python"
} | # Some columns are essential for running KOBE.
# note: -1 is coming because python indexing starts at 0
# please select model from following options and specify in kobe_choices:
# for bern model (planete + completo): 'bern_model'
# for NGPPS EVO (Christoph)'s completo: 'ngpps_evo'
from kobe_choices import *
if m... | exomishraREPO_NAMEkobePATH_START.@kobe_extracted@kobe-master@code@kobe_columns.py@.PATH_END.py |
{
"filename": "_y.py",
"repo_name": "plotly/plotly.py",
"repo_path": "plotly.py_extracted/plotly.py-master/packages/python/plotly/plotly/validators/isosurface/caps/_y.py",
"type": "Python"
} | import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="y", parent_name="isosurface.caps", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_c... | plotlyREPO_NAMEplotly.pyPATH_START.@plotly.py_extracted@plotly.py-master@packages@python@plotly@plotly@validators@isosurface@caps@_y.py@.PATH_END.py |
{
"filename": "test_phase.py",
"repo_name": "ratt-ru/QuartiCal",
"repo_path": "QuartiCal_extracted/QuartiCal-main/testing/tests/gains/test_phase.py",
"type": "Python"
} | from copy import deepcopy
import pytest
import numpy as np
import dask.array as da
from quartical.calibration.calibrate import add_calibration_graph
from testing.utils.gains import apply_gains, reference_gains
@pytest.fixture(scope="module")
def opts(base_opts, select_corr, solve_per):
# Don't overwrite base con... | ratt-ruREPO_NAMEQuartiCalPATH_START.@QuartiCal_extracted@QuartiCal-main@testing@tests@gains@test_phase.py@.PATH_END.py |
{
"filename": "Cosine.py",
"repo_name": "dokester/BayesicFitting",
"repo_path": "BayesicFitting_extracted/BayesicFitting-master/BayesicFitting/source/kernels/Cosine.py",
"type": "Python"
} | import numpy as numpy
import math
from .Kernel import Kernel
__author__ = "Do Kester"
__year__ = 2017
__license__ = "GPL3"
__version__ = "0.9"
__maintainer__ = "Do"
__status__ = "Development"
# *
# * This file is part of the BayesicFitting package.
# *
# * BayesicFitting is free software: you can redistrib... | dokesterREPO_NAMEBayesicFittingPATH_START.@BayesicFitting_extracted@BayesicFitting-master@BayesicFitting@source@kernels@Cosine.py@.PATH_END.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.