repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
JyotiJanai/test | [
"c4d536a208c10e6465864f1029ee90f371991276"
] | [
"modules/python/test/tests_common.py"
] | [
"#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport unittest\nimport sys\nimport hashlib\nimport os\nimport numpy as np\nimport cv2\nimport cv2.cv as cv\n\n# Python 3 moved urlopen to urllib.requests\ntry:\n from urllib.request import urlopen\nexcept ImportError:\n from urllib import url... | [
[
"numpy.array",
"numpy.fromstring"
]
] |
patricialarsen/descqa | [
"5b9b168751238b2c36a59a4339872c85730181a4"
] | [
"descqa/SizeDistribution.py"
] | [
"import os\nimport numpy as np\nfrom itertools import count\nimport re\nfrom .base import BaseValidationTest, TestResult\nfrom .plotting import plt\nfrom .utils import get_opt_binpoints\n\n__all__ = ['SizeDistribution']\n\nclass SizeDistribution(BaseValidationTest):\n \"\"\"\n validation test to check the slo... | [
[
"numpy.max",
"numpy.histogram",
"numpy.isinf",
"numpy.isnan",
"numpy.median",
"numpy.sum",
"numpy.min",
"numpy.loadtxt",
"numpy.polyfit",
"numpy.all",
"numpy.log10"
]
] |
samehkamaleldin/libkge | [
"e1204cb78bb91ffe3126df62d2d14b20da950694",
"e1204cb78bb91ffe3126df62d2d14b20da950694"
] | [
"libkge/io/base.py",
"tests/libkge/util/test_kg.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport gzip\nimport bz2\nimport numpy as np\n\n\ndef advanced_open(filepath, *args, **kwargs):\n \"\"\" Open function interface for files with different extensions.\n\n Parameters\n ----------\n filepath: str\n File path with extension.\n args: list\n Non-key... | [
[
"numpy.array"
],
[
"numpy.array"
]
] |
lgrcia/prose | [
"bf5482f775eb8cfee261620901cebafb6edb650a",
"bf5482f775eb8cfee261620901cebafb6edb650a"
] | [
"prose/blocks/psf.py",
"prose/io/io.py"
] | [
"from scipy.optimize import minimize\nimport warnings\nimport numpy as np\nfrom astropy.io import fits\nfrom astropy.table import Table\nfrom astropy.nddata import NDData\nfrom photutils.psf import extract_stars\nfrom astropy.stats import gaussian_sigma_to_fwhm\nfrom ..core import Block\nimport matplotlib.pyplot as... | [
[
"numpy.median",
"numpy.min",
"numpy.mean",
"numpy.exp",
"numpy.cos",
"numpy.max",
"matplotlib.pyplot.colorbar",
"numpy.sin",
"numpy.linalg.norm",
"numpy.arange",
"numpy.isfinite",
"numpy.sqrt",
"matplotlib.pyplot.gca",
"scipy.optimize.minimize",
"numpy.a... |
yasserglez/kaggle_titanic | [
"7a4857ec9a99c31eb53a91dda3ad9ecd5b647278"
] | [
"gendered-pronoun-resolution/data.py"
] | [
"import csv\nimport logging\nimport random\nimport re\nfrom collections import OrderedDict\nfrom enum import IntEnum\nfrom pathlib import Path\nfrom typing import Optional, Tuple, List\n\nimport attr\nfrom torch.utils.data import Dataset\nfrom syntok import segmenter\nfrom sklearn.model_selection import train_test_... | [
[
"sklearn.model_selection.train_test_split"
]
] |
ChenyanWu/seg_super_pixel | [
"dfa4334bc229094fa26fb67594a00965fbdf0bfd"
] | [
"dataloaders/datasets/pascal.py"
] | [
"from __future__ import print_function, division\nimport os\nfrom PIL import Image\nimport numpy as np\nfrom torch.utils.data import Dataset\nfrom mypath import Path\nfrom torchvision import transforms\nfrom dataloaders import custom_transforms as tr\nfrom dataloaders import sp_transforms as tr_sp\n\nclass VOCSegme... | [
[
"numpy.array",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.transpose",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.subplot"
]
] |
geoffbacon/does-bert-agree | [
"9ece52d01f30352a200ad841efb6162e7597f0e4",
"9ece52d01f30352a200ad841efb6162e7597f0e4"
] | [
"src/experiment.py",
"src/bylemmata.py"
] | [
"\"\"\"Run experiment.\n\nThis module is intended to be run as a script:\n $ python src/experiment.py\n\n\"\"\"\nimport os\n\nimport pandas as pd\n\nfrom bert import BERT\nfrom constants import LANGUAGES, MASK, MISSING\nfrom filenames import CLOZE_DIR, EXPERIMENTS_DIR, FEATURES_DIR\nfrom utils import refresh\n\n... | [
[
"pandas.DataFrame"
],
[
"pandas.DataFrame",
"pandas.read_csv",
"numpy.isnan",
"pandas.merge"
]
] |
winni2k/tskit | [
"92fe9c04a27385401732a698843756aa797bacdd"
] | [
"python/tskit/drawing.py"
] | [
"# MIT License\n#\n# Copyright (c) 2018-2019 Tskit Developers\n# Copyright (c) 2015-2017 University of Oxford\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, ... | [
[
"numpy.zeros_like",
"numpy.log",
"numpy.zeros",
"numpy.unique",
"numpy.flip"
]
] |
lemay-ai/lazyTextPredict | [
"e7bdb31c63978b8c1bb01476720571838a565623"
] | [
"lazytextpredict/basic_classification.py"
] | [
"import pandas as pd\nimport gc\nimport transformers\nfrom transformers import BertForSequenceClassification, BertTokenizerFast, Trainer, TrainingArguments\nfrom nlp import load_dataset, Dataset\nimport torch\nimport numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer\nfrom sk... | [
[
"pandas.DataFrame.from_dict",
"pandas.DataFrame",
"pandas.read_excel",
"sklearn.model_selection.GridSearchCV",
"sklearn.metrics.hamming_loss",
"numpy.mean",
"sklearn.metrics.accuracy_score",
"sklearn.metrics.classification_report",
"sklearn.metrics.precision_recall_fscore_suppo... |
flyingleafe/asteroid | [
"1c3c68ffc83f4b0bf7b00893083e4eff1f577b88"
] | [
"notebooks/train_tasnet.py"
] | [
"import torch\nimport os\nimport os.path\nimport shutil\nimport numpy as np\nimport soundfile as sf\n\nfrom pathlib import PurePath\nfrom torch import nn\nfrom torch.utils.data import DataLoader, random_split\nfrom asteroid.data import TimitDataset\nfrom asteroid.data.utils import CachedWavSet, RandomMixtureSet, Fi... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.Generator",
"torch.utils.data.DataLoader"
]
] |
eightlay/SudokuSolver | [
"6e79d2ab752ee059fa62c77da913cd1b9215ee4b"
] | [
"src/model_train.py"
] | [
"# Import packages\nimport os\nfrom tensorflow.keras.optimizers import Adam\nfrom tensorflow.keras.datasets import mnist\nfrom sklearn.preprocessing import LabelBinarizer\n\n# Import model builder from model_build.py\nfrom model_build import DRbuild\n\n# Load MNIST dataset\n((trainData, trainLabels), (testData, tes... | [
[
"tensorflow.keras.datasets.mnist.load_data",
"sklearn.preprocessing.LabelBinarizer",
"tensorflow.keras.optimizers.Adam"
]
] |
yuzheyyyy/Pytorch_Retinaface | [
"ef9812819026b766f2d1196770c74d17f22f3da9"
] | [
"data/data_augment.py"
] | [
"from torch.nn.functional import pad\nimport cv2\nimport numpy as np\nimport random\n\nimport imgaug as ia\nimport imgaug.augmenters as iaa\nfrom utils.box_utils import matrix_iof\n\n\ndef _crop(image, boxes, labels, landm, angles, visible, img_dim):\n height, width, _ = image.shape\n pad_image_flag = True\n\... | [
[
"numpy.max",
"numpy.logical_or",
"numpy.array",
"numpy.empty",
"numpy.random.rand",
"numpy.minimum",
"numpy.ones",
"numpy.min",
"numpy.shape",
"numpy.logical_and",
"numpy.any",
"numpy.random.randint",
"numpy.clip",
"numpy.hstack",
"numpy.expand_dims",
... |
iCGY96/APR | [
"72557dfbd496f6088f002e26ac96d11534beed2f"
] | [
"main.py"
] | [
"import os\nimport sys\nimport argparse\nimport datetime\nimport time\nimport csv\nimport os.path as osp\nimport numpy as np\nimport warnings\nimport importlib\nimport pandas as pd\nwarnings.filterwarnings('ignore')\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim import lr_scheduler\nimport torch.backends.... | [
[
"torch.cuda.manual_seed_all",
"torch.optim.SGD",
"numpy.mean",
"torch.optim.lr_scheduler.MultiStepLR",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.nn.CrossEntropyLoss"
]
] |
gilbert2002/dlib | [
"7eac06947dc07cc34ca095c934d8cb1722d372a7"
] | [
"tools/python/test/test_numpy_returns.py"
] | [
"import sys\nimport pickle\n\nimport dlib\nimport pytest\n\nimport utils\n\n# Paths are relative to dlib root\nimage_path = \"examples/faces/Tom_Cruise_avp_2014_4.jpg\"\nshape_path = \"tools/python/test/shape.pkl\"\nface_chip_path = \"tools/python/test/test_face_chip.npy\"\n\ndef get_test_image_and_shape():\n im... | [
[
"numpy.load",
"numpy.array_equal"
]
] |
yashrsharma44/sunpy | [
"f1dda2e188e5384eec472ceefceb2ed0f9781e75"
] | [
"sunpy/timeseries/timeseriesbase.py"
] | [
"\"\"\"\nTimeSeries is a generic time series class from which all other TimeSeries\nclasses inherit from.\n\"\"\"\nimport copy\nimport warnings\nfrom collections import OrderedDict\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport astropy\nimport astropy.units as u\nfrom astropy.table import Table, ... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.figure"
]
] |
nmstreethran/WindTurbineClassification | [
"b0ea6de909ccd5bb425cee291ca3c252c11df4eb"
] | [
"scripts/plot/powercurves-filter-T1.py"
] | [
"\"\"\"Plot power curves for turbine 1 with data filters\n\n\"\"\"\n\n# import libraries\nimport pandas as pd\nimport numpy as np\nimport itertools\nimport matplotlib.pyplot as plt\n\n# import data\ndf = pd.read_csv('data/SCADA_downtime_merged.csv', skip_blank_lines=True)\n\n# list of turbines to plot (just 1)\nlis... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.subplots_adjust"
]
] |
valschmidt/vgrid | [
"7e52937d9959984b370f0bab885b8d27eb78e14a"
] | [
"VGRID/vgrid.py"
] | [
"#!/usr/bin/env python\n#\n# ---- VGRID ----\n# A Class for Incremental Gridding\n#\n# Val Schmidt\n# Center for Coastal and Ocean Mapping\n# Univeristy of New Hampshire\n# Copyright, 2018-2019\n# All Rights Reserved\n\n\nimport numpy as np\nfrom line_profiler import LineProfiler\nimport sys\nimport scipy.spatial a... | [
[
"numpy.concatenate",
"matplotlib.pyplot.ion",
"numpy.array",
"numpy.empty",
"numpy.copy",
"numpy.random.random",
"numpy.arange",
"matplotlib.pyplot.pause",
"numpy.isscalar",
"numpy.append",
"numpy.power",
"matplotlib.pyplot.show",
"numpy.sqrt",
"numpy.meshgr... |
gaochangfeng/pykaldi2 | [
"5e988e5968aa9a5867f8179e6c53ea715ac46bdc"
] | [
"bin/train_se.py"
] | [
"\"\"\" \nCopyright (c) 2019 Microsoft Corporation. All rights reserved. \n \nMIT License ... | [
[
"numpy.array",
"numpy.sum",
"torch.save",
"torch.load",
"torch.nn.CrossEntropyLoss"
]
] |
Soula09/fuelcell | [
"cf2a726c78d2b87f8b212e4c0f791d1d5e12009a"
] | [
"fuelcell/model.py"
] | [
"import numpy as np\nimport pandas as pd\nimport os\nimport re\nimport fuelcell as fc\n\nclass Datum():\n\tdef __init__(self, name, data):\n\t\t# data\n\t\tself.name = name\n\t\tself.raw_data = data\n\t\tself.label = name\n\t\tself.processed_data = None\n\t\tself.expt_type = None\n\t\t\n\t\t# processed values\n\t\t... | [
[
"numpy.asarray"
]
] |
ferdinand-popp/BIDD | [
"ada79c6033687662ddecdc96740e747f3eb8d7cf"
] | [
"app.py"
] | [
"import streamlit as st\nimport pandas as pd\nfrom PIL import Image\nimport subprocess\nimport os\nimport base64\nimport pickle\n\n# Molecular descriptor calculator\ndef desc_calc():\n # Performs the descriptor calculation\n bashCommand = \"java -Xms2G -Xmx2G -Djava.awt.headless=true -jar ./PaDEL-Descriptor/P... | [
[
"pandas.concat",
"pandas.read_table",
"pandas.read_csv",
"pandas.Series"
]
] |
nilsvu/spectre | [
"1455b9a8d7e92db8ad600c66f54795c29c3052ee",
"1455b9a8d7e92db8ad600c66f54795c29c3052ee",
"9350d61830b360e2d5b273fdd176dcc841dbefb0"
] | [
"tests/Unit/Evolution/Systems/CurvedScalarWave/BoundaryConditions/ConstraintPreservingSphericalRadiation.py",
"tests/Unit/Evolution/Systems/NewtonianEuler/BoundaryConditions/Outflow.py",
"tests/Unit/Evolution/Systems/GrMhd/ValenciaDivClean/BoundaryCorrections/Rusanov.py"
] | [
"# Distributed under the MIT License.\n# See LICENSE.txt for details.\n\nimport numpy as np\nfrom Evolution.Systems.CurvedScalarWave.Characteristics import (\n char_speed_vpsi, char_speed_vzero, char_speed_vplus, char_speed_vminus)\n\n\ndef error(face_mesh_velocity, normal_covector, normal_vector, psi, phi,\n ... | [
[
"numpy.dot",
"numpy.einsum",
"numpy.linalg.norm"
],
[
"numpy.einsum",
"numpy.sqrt"
],
[
"numpy.dot",
"numpy.einsum",
"numpy.maximum"
]
] |
fcakyon/tensorflow-yolov4 | [
"3d31292cefba198b1528a90b3f435204efe7be73"
] | [
"py_src/yolov4/tf/dataset/keras_sequence.py"
] | [
"\"\"\"\nMIT License\n\nCopyright (c) 2019 YangYun\nCopyright (c) 2020 Việt Hùng\nCopyright (c) 2020-2021 Hyeonki Hong <hhk7734@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software... | [
[
"numpy.concatenate",
"numpy.stack",
"numpy.random.randint",
"numpy.expand_dims"
]
] |
johnjasa/WISDEM | [
"a4571e71cb5b9869c81790f8abb1bb7fba8fdb02",
"a4571e71cb5b9869c81790f8abb1bb7fba8fdb02"
] | [
"wisdem/test/test_drivetrainse/test_gearbox.py",
"wisdem/drivetrainse/layout.py"
] | [
"import unittest\n\nimport numpy as np\nimport numpy.testing as npt\nimport wisdem.drivetrainse.gearbox as gb\n\n\nclass TestGearbox(unittest.TestCase):\n def setUp(self):\n self.inputs = {}\n self.outputs = {}\n self.discrete_inputs = {}\n self.discrete_outputs = {}\n\n # 5MW ... | [
[
"numpy.testing.assert_almost_equal",
"numpy.prod",
"numpy.testing.assert_equal"
],
[
"numpy.array",
"numpy.sin",
"numpy.dot",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.tan",
"numpy.eye",
"scipy.special.ellipeinc",
"numpy.outer",
"numpy.trapz",
... |
ygrepo/fastMRI | [
"cb9a2019f1833bfffe4969023113189abcbad0f7"
] | [
"models/mri_model.py"
] | [
"\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport pytorch_li... | [
[
"torch.utils.data.sampler.RandomSampler",
"pandas.DataFrame",
"numpy.mean",
"numpy.stack",
"torch.utils.data.DataLoader",
"numpy.abs",
"torch.Tensor"
]
] |
airbert-vln/bnb-dataset | [
"2f7b7181bab6084d0bcf60407939556e89fdd551"
] | [
"scripts/detect_room.py"
] | [
"\"\"\"\nGet attributes about images\nInspired by https://github.com/CSAILVision/places365/blob/master/run_placesCNN_unified.py\n\"\"\"\nfrom pathlib import Path\nimport argparse\nfrom typing import List, Iterator, Tuple, Optional, Union, Dict\nimport hashlib\nimport json\nfrom multiprocessing import Pool\nimport u... | [
[
"numpy.max",
"numpy.array",
"numpy.uint8",
"torch.nn.AvgPool2d",
"torch.no_grad",
"torch.utils.data._utils.collate.default_collate",
"numpy.load",
"numpy.min",
"numpy.mean",
"torch.tensor",
"torch.utils.data.DataLoader",
"torch.load",
"torch.nn.functional.softma... |
tacaswell/mpl-qtthread | [
"68ebb73394e6aa5550c16abf954a36a8ad3a4de6"
] | [
"UAT.py"
] | [
"import threading\nimport time\nimport mpl_qtthread.backend\nimport matplotlib\nimport matplotlib.backends.backend_qt\nimport matplotlib.pyplot as plt\nfrom matplotlib.backends.qt_compat import QtWidgets, QtCore\n\n\n# set up the teleporter\nmpl_qtthread.backend.initialize_qt_teleporter()\n# tell Matplotlib to use ... | [
[
"matplotlib.use",
"matplotlib.backends.qt_compat.QtWidgets.QPushButton",
"matplotlib.backends.qt_compat.QtCore.QTimer",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.show"
]
] |
mmagnuski/mne-python | [
"8b4aa6731b828430453b6e36405313e1bea3d701",
"8b4aa6731b828430453b6e36405313e1bea3d701",
"8b4aa6731b828430453b6e36405313e1bea3d701"
] | [
"mne/decoding/tests/test_transformer.py",
"mne/viz/tests/test_misc.py",
"mne/decoding/base.py"
] | [
"# Author: Mainak Jas <mainak@neuro.hut.fi>\n# Romain Trachel <trachelr@gmail.com>\n#\n# License: BSD (3-clause)\n\nimport warnings\nimport os.path as op\nimport numpy as np\n\nfrom nose.tools import assert_true, assert_raises\nfrom numpy.testing import assert_array_equal\n\nfrom mne import io, read_events,... | [
[
"numpy.testing.assert_array_equal"
],
[
"matplotlib.use",
"numpy.testing.assert_raises",
"numpy.ones"
],
[
"numpy.get_printoptions",
"numpy.set_printoptions",
"numpy.dot",
"sklearn.linear_model.LogisticRegression"
]
] |
dcmartin/digits | [
"4a16aef47226413eba232e268049678816281c7d"
] | [
"digits/extensions/data/objectDetection/utils.py"
] | [
"# Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.\n\nimport csv\nimport os\n\nimport numpy as np\nimport PIL.Image\n\n\nclass ObjectType:\n\n Dontcare, Car, Van, Truck, Bus, Pickup, VehicleWithTrailer, SpecialVehicle,\\\n Person, Person_fa, Person_unsure, People, Cyclist, Tram, Person_... | [
[
"numpy.zeros"
]
] |
jbburt/jburt | [
"7745491214ef2b665ca8d1fc526bc802a36985ff"
] | [
"jburt/mask.py"
] | [
"from typing import List\n\nimport numpy as np\n\n\ndef mask_nan(arrays: List[np.ndarray]) -> List[np.ndarray]:\n \"\"\"\n Drop indices from equal-sized arrays if the element at that index is NaN in\n any of the input arrays.\n\n Parameters\n ----------\n arrays : List[np.ndarray]\n list of... | [
[
"numpy.where",
"numpy.array",
"numpy.isnan"
]
] |
LastRemote/amazon-sagemaker-examples | [
"e9adcb67289f5c177701e0bc8f1aea0c0910cdc7"
] | [
"reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/agent_ctrl/obstacles_agent_ctrl.py"
] | [
"'''This module implements concrete agent controllers for the rollout worker'''\nimport numpy as np\nimport os\nimport random\nimport rospkg\nimport rospy\n\nfrom gazebo_msgs.msg import ModelState\nfrom gazebo_msgs.srv import SetModelState, SpawnModel\nfrom markov.agent_ctrl.constants import ConfigParams, BOT_CAR_Z... | [
[
"numpy.linspace"
]
] |
zhaojunz/tensorflow | [
"d1415bdc03fcdb090752ab0c91ee529dc09eb4ee",
"4ac9c09d5ca57a03b8daa5fb9e295947b1619854",
"4ac9c09d5ca57a03b8daa5fb9e295947b1619854"
] | [
"tensorflow/python/kernel_tests/batch_matmul_op_test.py",
"tensorflow/python/ops/script_ops.py",
"tensorflow/python/saved_model/saved_model_test.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.random.normal",
"numpy.matrix",
"numpy.array",
"numpy.array_equal",
"numpy.zeros",
"numpy.random.seed",
"tensorflow.python.ops.math_ops.matmul",
"tensorflow.python.ops.gradient_checker.compute_gradient",
"tensorflow.python.framework.constant_op.constant",
"tensorflow... |
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | [
"ee45bee6f96cdb6d91184abc16f41bba1546c943"
] | [
"python-packages/mne-python-0.10/mne/tests/test_evoked.py"
] | [
"# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Denis Engemann <denis.engemann@gmail.com>\n# Andrew Dykstra <andrew.r.dykstra@gmail.com>\n# Mads Jensen <mje.mads@gmail.com>\n#\n# License: BSD (3-clause)\n\nimport os.path as op\nfrom copy import deepcopy\nimport war... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.dot",
"numpy.ones_like",
"numpy.zeros_like",
"numpy.testing.assert_equal",
"numpy.random.RandomState",
"numpy.testing.assert_array_equal",
"numpy.logical_and",
"numpy.mean",
"numpy.testing.assert_array_almost_equal"... |
Opendigitalradio/ODR-StaticPrecorrection | [
"984c14bf46ebd7dc66954a653c8f17212ed97efb"
] | [
"src/tcp_sync.py"
] | [
"\"\"\"Tcp client for synchronous uhd message tcp port\"\"\"\n\nimport threading\nimport Queue\nimport time\nimport socket\nimport struct\nimport numpy as np\n\nclass _TcpSyncClient(threading.Thread):\n \"\"\"Thead for message polling\"\"\"\n queue = Queue.Queue()\n q_quit = Queue.Queue()\n\n ip_address... | [
[
"numpy.array"
]
] |
wennieWN/endernewton_tf-faster-rcnn | [
"463d1be4d6be1d1b095df0fa41040de70d217c7f"
] | [
"lib/roi_data_layer/minibatch.py"
] | [
"# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick and Xinlei Chen\n# --------------------------------------------------------\n\n\"\"\"Compute minibatch blobs for training ... | [
[
"numpy.array",
"numpy.empty",
"numpy.zeros",
"numpy.load",
"numpy.where"
]
] |
jhunkeler/tweakwcs | [
"6a7f5153850474e1c0ecc2dfe1ec1af76fcf5fd2"
] | [
"tweakwcs/linearfit.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nA module that provides algorithms for performing linear fit between\nsets of 2D points.\n\n:Authors: Mihai Cara, Warren Hack\n\n:License: :doc:`../LICENSE`\n\n\"\"\"\nimport logging\nimport numbers\nimport numpy as np\n\nfrom .linalg import i... | [
[
"numpy.dot",
"numpy.mean",
"numpy.sign",
"numpy.cos",
"numpy.deg2rad",
"numpy.count_nonzero",
"numpy.linalg.norm",
"numpy.zeros_like",
"numpy.sin",
"numpy.logical_and",
"numpy.sqrt",
"numpy.isfinite",
"numpy.mod",
"numpy.vstack",
"numpy.array",
"nump... |
times-software/Corvus | [
"d220e2db28743ecb6748e2a245eb3992daa554c1"
] | [
"corvus/mbconv.py"
] | [
"from corvus.structures import Handler, Exchange, Loop, Update\nimport corvutils.pyparsing as pp\nimport os, sys, subprocess, shutil #, resource\nimport re\nfrom scipy.interpolate import CubicSpline\nfrom scipy.integrate import quad\nfrom scipy.signal import convolve\nimport numpy as np\n# Debug: FDV\nimport pprint... | [
[
"numpy.array",
"numpy.convolve",
"scipy.interpolate.CubicSpline",
"numpy.ediff1d",
"numpy.arange",
"numpy.linspace",
"scipy.signal.convolve"
]
] |
shaun95/google-research | [
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5",
"d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e... | [
"widget_caption/widget_caption_model.py",
"graph_embedding/slaq/slaq.py",
"extreme_memorization/cifar100_dataset.py",
"social_rl/gym_multigrid/envs/tag.py",
"fairness_teaching/rl/train.py",
"reset_free_learning/test_script.py",
"readtwice/layers/recompute_grad.py",
"routing_transformer/sparse_image_tr... | [
"# coding=utf-8\n# Copyright 2022 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.make_tensor_proto",
"tensorflow.io.gfile.GFile",
"tensorflow.constant_initializer",
"tensorflow.keras.callbacks.TerminateOnNaN",
"tensorflow.ones",
"tensorflow.logical_not",
"tensorflow.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.py_function",
"tensor... |
janjagusch/kartothek | [
"90ee486b73b0de84b7e69f97f8246446ba6001e2"
] | [
"kartothek/io/dask/_shuffle.py"
] | [
"from functools import partial\nfrom typing import List, Optional, Sequence, cast\n\nimport dask.array as da\nimport dask.dataframe as dd\nimport numpy as np\nimport pandas as pd\n\nfrom kartothek.core.typing import StoreFactory\nfrom kartothek.io.dask.compression import pack_payload, unpack_payload_pandas\nfrom ka... | [
[
"numpy.uint64",
"pandas.util.hash_pandas_object",
"numpy.array",
"numpy.log2"
]
] |
I-Bouros/seqgibbs | [
"139e6e5b160586a70dad9c5f7bbfe1c7e56e5cc9"
] | [
"seqgibbs/tests/test_samplers.py"
] | [
"#\n# This file is part of SEQGIBBS\n# (https://github.com/I-Bouros/seqgibbs.git) which is released\n# under the MIT license. See accompanying LICENSE for copyright\n# notice and full license details.\n#\n\nimport unittest\n\nimport scipy.stats\nimport numpy as np\nimport numpy.testing as npt\n\nimport seqgibbs as ... | [
[
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.testing.assert_array_equal",
"numpy.ones",
"numpy.prod"
]
] |
WeihanSun/python_sample | [
"e69e218558733733960a4633c8e7c92d7c3530c0"
] | [
"opencv/src/face_motion1.py"
] | [
"#!/usr/bin/env python\n\nimport os\nimport cv2\nimport numpy as np\nfrom enum import Enum\nimport math\n\nclass Calc (Enum):\n OPENCV = 1\n GSL_MULTI_ROOT = 2\n GSL_MULTI_FIT = 3\n\nimage_file_name = \"Man2_10deg.png\"\n\nuse_calc = Calc.GSL_MULTI_FIT\n#use_calc = Calc.GSL_MULTI_ROOT\n#use_calc = Calc.OPE... | [
[
"numpy.array",
"numpy.fabs",
"numpy.linalg.det"
]
] |
SLINGhub/MSOrganiser | [
"918acda503093963a87a272f73bf6b07e8363e19"
] | [
"MSOrganiser.py"
] | [
"# coding: utf-8\nimport sys\nimport MSDuplicateCheck\nimport MSParser\nfrom MSAnalysis import MS_Analysis\nfrom MSDataOutput import MSDataOutput_Excel\nfrom MSDataOutput import MSDataOutput_csv\nfrom MSDataReport import MSDataReport_PDF\n\nfrom logging.handlers import TimedRotatingFileHandler\n\nimport os\nimport ... | [
[
"pandas.DataFrame",
"pandas.merge",
"pandas.concat"
]
] |
astrofyz/PH482_582 | [
"bb36cfe78d91204f5907a2a79a49ea6af7d3ff0e"
] | [
"students_final_projects/group-f/gizmo_analysis/gizmo_file.py"
] | [
"#!/usr/bin/env python3\n\n'''\nEdit gizmo snapshot files: compress, delete, transfer across machines.\n\n@author: Andrew Wetzel <arwetzel@gmail.com>\n'''\n\n# system ----\nfrom __future__ import absolute_import, division, print_function # python 2 compatability\nimport os\nimport sys\nimport glob\nimport numpy as... | [
[
"numpy.arange",
"numpy.isscalar"
]
] |
yuchen071/Normal-map-generator | [
"40f92a38a75a35dcf4b8309517bf83b6a52b4fbb"
] | [
"train_norm.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jun 7 14:34:39 2021\n\n@author: Eric\n\"\"\"\n#%%\nfrom model import Unet\nfrom utils import random_fliplr, random_crop\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torchvision import transforms\nfrom torch.utils.data import DataLoader\n... | [
[
"torch.cat",
"torch.nn.MSELoss",
"matplotlib.pyplot.xlabel",
"torch.no_grad",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.mean",
"matplotlib.pyplot.figure",
"torch.cuda.empty_cache",
"torch.cuda.is_available",
"torch.utils... |
lc0/nn | [
"0de7e343a11685de37a03ae4ee2510d18fc07369"
] | [
"labml_nn/transformers/feedback/experiment.py"
] | [
"\"\"\"\n---\ntitle: Train Feedback Transformer\nsummary: This is training code with notes for a feedback transformer.\n---\n\n# Train Feedback Transformer\n\nThis trains a [feedback transformer](index.html) model for auto-regression.\nYou can pick the original feedback transformer or the new version\nwhere the key... | [
[
"torch.nn.Linear",
"torch.nn.Embedding"
]
] |
VincentWang25/Kaggle_TGBR | [
"9a93d8cf75ae0a9716a72cb6da49645eac63a641"
] | [
"src/util.py"
] | [
"import sys\nimport cv2\nimport os\nfrom ast import literal_eval\nfrom pathlib import Path\nimport shutil\nimport logging\nimport random\nimport pickle\nimport yaml\nimport subprocess\nfrom PIL import Image\nfrom glob import glob\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom matp... | [
[
"torch.cuda.manual_seed",
"numpy.minimum",
"numpy.set_printoptions",
"numpy.exp",
"numpy.where",
"torch.load",
"matplotlib.pyplot.imshow",
"torch.hub.load",
"numpy.concatenate",
"numpy.max",
"torch.manual_seed",
"numpy.transpose",
"numpy.arange",
"numpy.argm... |
statKim/TIL | [
"3297d09023d97653773b35160794d3324b95c111"
] | [
"Python/tensorflow/DeepLearningZeroToAll/ver.py/Lab02-1-linear_regression.py"
] | [
"# Lab 2 Linear Regression\nimport tensorflow as tf\n\ntf.set_random_seed(777) # seed 설정\n\n# training data\nx_train = [1, 2, 3]\ny_train = [1, 2, 3]\n\n# regerssion 결과는 W = 1, b = 0 이라는 것을 알 수 있음\n# but tensorflow로 training 시켜서 해보기!!\n# W와 b는 어떻게 달라질까?\n\n# tf.Variable() : tensorflow가 사용하는 변수(trainable variable)\... | [
[
"tensorflow.set_random_seed",
"tensorflow.Session",
"tensorflow.global_variables_initializer",
"tensorflow.square",
"tensorflow.random_normal",
"tensorflow.train.GradientDescentOptimizer"
]
] |
wileyw/VideoGAN | [
"d5c40ce4180b63d9dc6017a8caf19cfd63166a96"
] | [
"process.py"
] | [
"import os\nimport scipy.misc\nimport torch\nimport numpy as np\nimport torch.optim as optim\n\nimport config\nimport data_loader\nimport d_net\nimport loss_funs\nimport g_net\n\ndtype = config.dtype\n\n\ndef save_samples(generated_images, iteration, prefix):\n\n generated_images = generated_images.data.cpu().nu... | [
[
"torch.zeros",
"numpy.zeros",
"numpy.rollaxis",
"torch.ones",
"numpy.sqrt"
]
] |
speedcell4/OpenSelfSup | [
"f80fad08c795143e0e9cf2dc9466df3c6eec67d7",
"f80fad08c795143e0e9cf2dc9466df3c6eec67d7"
] | [
"tools/extract.py",
"openselfsup/utils/collect.py"
] | [
"import argparse\nimport importlib\nimport mmcv\nimport numpy as np\nimport os\nimport os.path as osp\nimport time\nimport torch\nfrom mmcv.parallel import MMDataParallel, MMDistributedDataParallel\nfrom mmcv.runner import get_dist_info, init_dist, load_checkpoint\n\nfrom openselfsup.datasets import build_dataloade... | [
[
"numpy.save",
"torch.cuda.current_device"
],
[
"numpy.concatenate",
"torch.no_grad"
]
] |
UASLab/OpenFlightAnalysis | [
"b5ecb3ea7ff82f5fb21efa7e9cbee60bf68aea37"
] | [
"Core/OpenData.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Dec 28 15:05:36 2018\n\n@author: louismueller\n\"\"\"\n\n# import\nimport numpy as np\n\n#%% \ndef PlotOverview(oData):\n import matplotlib.pyplot as plt\n from mpl_toolkits.mplot3d import Axes3D\n\n # Overview Plots\n # Find inter... | [
[
"numpy.linalg.norm",
"numpy.ones_like",
"numpy.copy",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"numpy.where",
"matplotlib.pyplot.show"
]
] |
Vaibhavs10/IMS-Toucan | [
"931e4ce63a4cc675cb15b72474a3c3619632a07b",
"931e4ce63a4cc675cb15b72474a3c3619632a07b"
] | [
"InferenceInterfaces/Nancy_Tacotron2.py",
"TrainingInterfaces/Text_to_Spectrogram/Tacotron2/tacotron2_train_loop.py"
] | [
"import os\n\nimport librosa.display as lbd\nimport matplotlib.pyplot as plt\nimport sounddevice\nimport soundfile\nimport torch\n\nfrom InferenceInterfaces.InferenceArchitectures.InferenceHiFiGAN import HiFiGANGenerator\nfrom InferenceInterfaces.InferenceArchitectures.InferenceTacotron2 import Tacotron2\nfrom Prep... | [
[
"torch.zeros",
"torch.device",
"torch.cat",
"torch.no_grad",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots_adjust"
],
[
"torch.utils.data.dataloader.DataLoader",
"torch.stack",
"torch.cuda.amp.a... |
oyj0594/apex | [
"b66ffc1d952d0b20d6706ada783ae5b23e4ee734",
"b66ffc1d952d0b20d6706ada783ae5b23e4ee734"
] | [
"apex/pyprof/examples/jit/jit_script_method.py",
"apex/pyprof/examples/imagenet/imagenet.py"
] | [
"#!/usr/bin/env python3\n\nimport torch\nimport torch.cuda.profiler as profiler\nfrom apex import pyprof\n\nclass Foo(torch.jit.ScriptModule):\n def __init__(self, size):\n super(Foo, self).__init__()\n self.n = torch.nn.Parameter(torch.ones(size))\n self.m = torch.nn.Parameter(torch.ones(si... | [
[
"torch.cuda.profiler.start",
"torch.autograd.profiler.emit_nvtx",
"torch.cuda.profiler.stop",
"torch.ones"
],
[
"torch.rand",
"torch.autograd.profiler.emit_nvtx",
"torch.cuda.profiler.stop",
"torch.cuda.profiler.start",
"torch.empty",
"torch.nn.CrossEntropyLoss"
]
] |
enohoxha/AxonPy | [
"2c89200cdc1818cdaa4dc9b0fbec68036cb11a4b"
] | [
"playgrounds/keras_models/features/girl_boy/girl_boy_feature.py"
] | [
"import cv2\nimport numpy as np\n\nimport definitions\nfrom playgrounds.core.features import Feature\nfrom playgrounds.keras_models.features.girl_boy.workers.custom_workers import CustomWorker1\nfrom playgrounds.opencv import face_detection\nfrom playgrounds.utilities import opencv_utilities\n\n\nclass GenderClassi... | [
[
"numpy.expand_dims"
]
] |
RPGroup-PBoC/sortseq_belliveau | [
"ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2"
] | [
"code/figures/figS8_purT_massspec_scatter_nohypoxanthine.py"
] | [
"import os\nimport glob\nimport pickle\nimport re\n\n# Our numerical workhorses\nimport numpy as np\nimport pandas as pd\n\n# Import the project utils\nimport sys\nsys.path.insert(0, '../')\nimport NB_sortseq_utils as utils\n\n# Import matplotlib stuff for plotting\nimport matplotlib.pyplot as plt\nimport matplotli... | [
[
"pandas.merge",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.percentile",
"numpy.exp",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"pandas.read_csv"
]
] |
jo-ny/CarND-Advanced-Lane-Lines | [
"9362e11cdd239fbf7422fa057a44734d9c0938d3"
] | [
"lane/Lane.py"
] | [
"# -*- coding: utf-8 -*-\nimport cv2\nimport numpy as np\nimport matplotlib.image as mpimg\nimport matplotlib.pyplot as plt\n\n\n# Define a class to receive the characteristics of each line detection\nclass Lane():\n def __init__(self):\n # 当前的图像\n self.current_warped_binary = None\n # 当前图片的... | [
[
"numpy.max",
"numpy.concatenate",
"numpy.array",
"numpy.int",
"numpy.sum",
"matplotlib.image.imread",
"numpy.mean",
"numpy.argmax",
"numpy.polyfit",
"numpy.absolute",
"matplotlib.pyplot.show",
"numpy.linspace",
"matplotlib.pyplot.imshow"
]
] |
arepstein/pymatgen | [
"084adf5262ff5151bf07fb93cbd4524101bfaf62"
] | [
"pymatgen/io/vasp/outputs.py"
] | [
"# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\n\"\"\"\nClasses for reading/manipulating/writing VASP ouput files.\n\"\"\"\n\nimport json\nimport glob\nimport itertools\nimport logging\nimport math\nimport os\nimport re\nimport warnings\nfrom pathli... | [
[
"numpy.dot",
"numpy.exp",
"numpy.frombuffer",
"numpy.max",
"numpy.histogram",
"numpy.sin",
"numpy.linalg.norm",
"numpy.prod",
"numpy.swapaxes",
"numpy.conj",
"numpy.sqrt",
"numpy.cross",
"numpy.array",
"numpy.zeros",
"numpy.fft.ifftshift",
"numpy.lin... |
lmluzern/MultiOpenCrowd | [
"520d141769bf99d0e3a363d20e2d0e55b34a3224"
] | [
"src/feature_based/multiclass_opencrowd/nn_em.py"
] | [
"import pandas as pd\nimport csv\nimport numpy as np\nfrom tensorflow.keras import Sequential, Model\nfrom tensorflow.keras.layers import Dense, Concatenate, Input, Conv1D, MaxPooling1D, Flatten, Dropout, GlobalAveragePooling1D\nfrom tensorflow.keras.callbacks import EarlyStopping\nfrom sklearn.preprocessing import... | [
[
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Sequential",
"numpy.where",
"tensorflow.keras.Model",
"numpy.random.random",
"pandas.read_csv",
"numpy.concatenate",
"numpy.linalg.norm",
"tensorflow.keras.layers.MaxPooling1D",
"sklear... |
mickyLing/tensorflow | [
"bba3f6a4e733dfd5865dfb14943624c13a7ba9fd"
] | [
"tensorflow/python/keras/optimizer_v2/adam_test.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.variables.Variable",
"numpy.copy",
"tensorflow.python.keras.optimizer_v2.adam.Adam",
"tensorflow.python.keras.optimizers.Adam",
"tensorflow.python.eager.context.executing_eagerly",
"tensorflow.python.platform.test.main",
"tensorflow.python.eager.context.eager_mod... |
Banyc/TensorFlow_practice | [
"f9b0d27cbc440d6c67dd29b94828a08f192f76e1",
"f9b0d27cbc440d6c67dd29b94828a08f192f76e1"
] | [
"mnist/LeNet-5/mnist_inference.py",
"mnist/test/filed/read_model_sess_reorganized.py"
] | [
"# -*- coding: utf-8 -*-\nimport tensorflow as tf\n\nINPUT_NODE = 784\nOUTPUT_NODE = 10\n\n# 28 (edge) * 28\nIMAGE_SIZE = 28\n# 黑白\nNUM_CHANNELS = 1\nNUM_LABELS = 10\n\nCONV1_DEEP = 32\n# 过滤器尺寸\nCONV1_SIZE = 5\nCONV2_DEEP = 64\nCONV2_SIZE = 5\n# num of Fully connected nodes\nFC_SIZE = 512\n\n\n# def get_weight_vari... | [
[
"tensorflow.constant_initializer",
"tensorflow.nn.conv2d",
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.variable_scope",
"tensorflow.name_scope",
"tensorflow.truncated_normal_initializer",
"tensorflow.nn.bias_add",
"tensorflow.nn.max_pool",
"tensorflow.nn.dropout"... |
smilelight/lightNLP | [
"772c5f6a1be9943c2ed4d1d713dd456089b48268"
] | [
"lightnlp/tg/lm/module.py"
] | [
"import torch\nfrom tqdm import tqdm\nimport torch.nn.functional as F\nfrom torch.utils.tensorboard import SummaryWriter\n\nimport flask\nfrom flask import Flask, request\n\nfrom ...utils.deploy import get_free_tcp_port\nfrom ...utils.learning import adjust_learning_rate\nfrom ...utils.log import logger\nfrom ...ba... | [
[
"torch.log10",
"torch.tensor",
"torch.utils.tensorboard.SummaryWriter",
"torch.topk"
]
] |
liuximarcus/GewitterGefahr | [
"d819874d616f98a25187bfd3091073a2e6d5279e"
] | [
"gewittergefahr/plotting/feature_map_plotting.py"
] | [
"\"\"\"Plotting methods for CNN feature maps.\"\"\"\n\nimport numpy\nimport matplotlib\nmatplotlib.use('agg')\nimport matplotlib.pyplot as pyplot\nfrom gewittergefahr.gg_utils import error_checking\nfrom gewittergefahr.plotting import plotting_utils\n\nDEFAULT_FIG_WIDTH_INCHES = 15\nDEFAULT_FIG_HEIGHT_INCHES = 15\n... | [
[
"matplotlib.use",
"numpy.array",
"numpy.reshape",
"matplotlib.pyplot.rc"
]
] |
bstadlbauer/panel | [
"c4c8255dfb1bb28b239067548bdd425f5d07bb5c"
] | [
"panel/tests/util.py"
] | [
"from __future__ import absolute_import, division, unicode_literals\n\nimport sys\n\nimport numpy as np\nimport pytest\n\ntry:\n import holoviews as hv\nexcept Exception:\n hv = None\nhv_available = pytest.mark.skipif(hv is None, reason=\"requires holoviews\")\n\ntry:\n import matplotlib as mpl\n mpl.us... | [
[
"matplotlib.use",
"numpy.random.rand",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
]
] |
lgvaz/dqn | [
"b9961a9930b858d42ea69a3e27cad1bbb1ec04c6"
] | [
"rlbox/models/value_graphs.py"
] | [
"import tensorflow as tf\n\n\ndef dense_value_graph(inputs, activation_fn=tf.nn.tanh, scope='value_graph', reuse=None):\n with tf.variable_scope(scope, reuse=reuse):\n net = inputs\n net = tf.contrib.layers.flatten(net)\n net = tf.layers.dense(net, 64, activation=activation_fn)\n net ... | [
[
"tensorflow.variable_scope",
"tensorflow.contrib.layers.flatten",
"tensorflow.squeeze",
"tensorflow.layers.dense"
]
] |
alvarodemig/AlgorithmsPerformanceComparison | [
"22af010be047422c5c561e68e5a8cece5580c3f0"
] | [
"AlgPerformComparison.py"
] | [
"import pandas as pd\nimport os\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import roc_curve, auc\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import precision_recall_curve\nfrom sklearn.metrics import average_precision_score\nimport time\n\n#Criteo's CT... | [
[
"matplotlib.pyplot.xlim",
"pandas.read_csv",
"sklearn.metrics.precision_recall_curve",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.get_cmap",
"sklearn.decomposition.PCA",
"sklearn.discriminant_analysis.LinearDiscriminantAnalysis",
"numpy.array",
"sklearn.ensemble.RandomFore... |
yifan-you-37/rl_swiss | [
"8b0ee7caa5c1fa93860916004cf4fd970667764f",
"8b0ee7caa5c1fa93860916004cf4fd970667764f",
"8b0ee7caa5c1fa93860916004cf4fd970667764f",
"8b0ee7caa5c1fa93860916004cf4fd970667764f",
"8b0ee7caa5c1fa93860916004cf4fd970667764f",
"8b0ee7caa5c1fa93860916004cf4fd970667764f"
] | [
"rlkit/scripted_experts/linear_few_shot_reach_env_expert.py",
"gen_models/convgru.py",
"rlkit/data_management/pusher_mil_pytorch_data_loader.py",
"data_gen/gen_walls.py",
"rlkit/envs/pickup_task_point_mass_env.py",
"plotting_scripts/plot_adv_irl_hyper_range.py"
] | [
"import time\nimport random\nimport numpy as np\nimport gym\nfrom rlkit.scripted_experts.scripted_policy import ScriptedPolicy\n\nACT_MAG = 0.275\nACT_NOISE_SCALE = 0.1\nACT_SLOW_NOISE_SCALE = 0.05\nSLOW_DOWN_RADIUS = 0.01\n\ndef get_linear_pos_act(cur_pos, reach_pos):\n cur_pos = cur_pos.copy()\n reach_pos =... | [
[
"numpy.clip",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.random.uniform"
],
[
"torch.zeros",
"torch.cat",
"torch.nn.init.orthogonal",
"torch.nn.init.constant",
"torch.nn.Conv2d",
"torch.cuda.is_available"
],
[
"numpy.array",
"numpy.random.choice",
"numpy... |
Schmitze333/pandas | [
"165d5ee40862ba155b5988045164e21aaaefd556"
] | [
"pandas/core/groupby/ops.py"
] | [
"\"\"\"\nProvide classes to perform the groupby aggregate operations.\n\nThese are not exposed to the user and provide implementations of the grouping\noperations, primarily in cython. These classes (BaseGrouper and BinGrouper)\nare contained *in* the SeriesGroupBy and DataFrameGroupBy objects.\n\"\"\"\n\nimport co... | [
[
"pandas._libs.reduction.SeriesBinGrouper",
"pandas.core.sorting.get_group_index",
"pandas.core.dtypes.common.is_datetime64_any_dtype",
"pandas.core.sorting.get_group_index_sorter",
"pandas.core.index.MultiIndex",
"pandas.core.dtypes.common.ensure_platform_int",
"numpy.bincount",
"p... |
angela18199/CORL_hyperparameter_search | [
"c2cfc4c4e34dedb65929a8b7d68c61e53681a67c"
] | [
"hyper_attention/run.py"
] | [
"#!/usr/bin/env python\n\nimport os\nimport json\nimport pprint as pp\nfrom time import time\n\nimport torch\nimport torch.optim as optim\nfrom tensorboard_logger import Logger as TbLogger\n\nfrom nets.critic_network import CriticNetwork\nfrom options import get_options\nfrom train import train_epoch, validate, get... | [
[
"torch.device",
"torch.cuda.get_rng_state_all",
"torch.get_rng_state",
"torch.cuda.set_rng_state_all",
"torch.is_tensor",
"torch.cuda.device_count",
"torch.manual_seed",
"torch.set_rng_state",
"torch.optim.lr_scheduler.LambdaLR",
"torch.nn.DataParallel"
]
] |
CopperHu/tequila | [
"e361af51e9716b347f79640ce5a968e92b8585f8"
] | [
"src/tequila/quantumchemistry/qc_base.py"
] | [
"import os\nfrom dataclasses import dataclass\nfrom tequila import TequilaException, BitString, TequilaWarning\nfrom tequila.hamiltonian import QubitHamiltonian\nfrom tequila.wavefunction import QubitWaveFunction\nfrom tequila.hamiltonian.paulis import Sp, Sm, Qp, Qm\n\nfrom tequila.circuit import QCircuit, gates, ... | [
[
"numpy.ndenumerate",
"numpy.isclose",
"numpy.zeros",
"numpy.linalg.eigh",
"numpy.take",
"numpy.ndarray",
"numpy.fabs",
"numpy.loadtxt",
"numpy.einsum",
"numpy.abs"
]
] |
newTypeGeek/Network-Reconstruction | [
"135a07cc304dac0666a9d11d3548aee7a669eaad"
] | [
"gen_cov/logistic_diffusive.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy as np\nfrom tqdm import tqdm\nimport os\nimport sys\n\nROOT_DIR = os.path.abspath(\"../\")\nsys.path.append(ROOT_DIR)\nfrom utils import network\n\n\ndef logistic_diffusive(W, r, sigma, int_dt, sample_dt, sample_start, data_num, get_ts=False):\n '''\n Simulate the coupl... | [
[
"numpy.isinf",
"numpy.random.normal",
"numpy.isnan",
"numpy.matmul",
"numpy.zeros",
"numpy.isfinite",
"numpy.sqrt",
"numpy.outer",
"numpy.diag"
]
] |
greenrock21/test | [
"a0d97e6eb96c107a303cb1b897f746a37dc2d968"
] | [
"dbox_aux.py"
] | [
"import pandas as pd\r\nimport io\r\nimport dropbox\r\nimport streamlit as st\r\n\r\nTOKEN = st.secrets[\"TOKEN\"]\r\ndbx = dropbox.Dropbox(TOKEN)\r\n\r\ndef read_dbx_file(file):\r\n print('Getting latest file')\r\n _, f = dbx.files_download(file)\r\n with io.BytesIO(f.content) as stream:\r\n df = p... | [
[
"pandas.read_csv"
]
] |
tiagokv/drlberkeley | [
"309b3d3f6b3334c8de8e41cce758423d16f7def9"
] | [
"hw2/plot.py"
] | [
"import seaborn as sns\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport json\nimport os\n\n\"\"\"\nUsing the plotter:\n\nCall it from the command line, and supply it with logdirs to experiments.\nSuppose you ran an experiment with name 'test', and you ran 'test' for 10 \nrandom seeds. The runner code s... | [
[
"matplotlib.pyplot.show",
"pandas.read_table",
"matplotlib.pyplot.legend",
"pandas.concat"
]
] |
dylanv/unet | [
"31f0deac92c89fff9a86573439235efc09fb1b37"
] | [
"unet/data/synthetic_data.py"
] | [
"\"\"\"Utilities for generating synthetic segmentation datasets.\"\"\"\n\nimport os\nfrom typing import Tuple\nfrom pathlib import Path\n\nimport numpy as np\nfrom skimage.draw import random_shapes\nfrom skimage.transform import rotate\nfrom skimage.io import imsave\n\n\ndef gen_shape_image(im_size: Tuple[int, int]... | [
[
"numpy.random.rand",
"numpy.zeros",
"numpy.where",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.unique"
]
] |
ealejo1/bigdata-machine-learning-challenge | [
"152de2c4245b4c303c4578cfc9f72176ad711af9"
] | [
"model.py"
] | [
"# Dependencies\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.neighbors import KNeighborsClassifier\nimport pickle\n\ndef train_model():\n # Read data set\n spotify_df = pd.read_csv(\"spotify_data_v4... | [
[
"sklearn.model_selection.train_test_split",
"pandas.read_csv",
"sklearn.preprocessing.MinMaxScaler"
]
] |
weiguangcui/pymsz | [
"79d81ef070a02f4109f5307407e0f549f44a8ec7"
] | [
"pymsz/SZpack_models.py"
] | [
"\"\"\"\nProjection class for the Sunyaev-Zeldovich effect. Requires SZpack (version 1.1.1),\nwhich is included in SZpack.v1.1.1 and will be automatically installed.\nWebsite for the SZpack library: http://www.chluba.de/SZpack/\n\nFor details on the computations involved please refer to the following references:\nC... | [
[
"numpy.array",
"numpy.asarray"
]
] |
jerinka/voxelmorph_demo | [
"c7994b09049c286922a441bf5b9291ef00ed504e"
] | [
"register_basics.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"poc.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1fTzz1aT2sb8oAXRO1-dr6O_IR6dof36e\n\nA simple example for deep-learning-based non-rigid image registration\nwith the MNIST dataset.\n\n**README:** If the ... | [
[
"tensorflow.keras.optimizers.SGD",
"tensorflow.keras.backend.image_data_format",
"tensorflow.ones_like",
"numpy.where",
"tensorflow.keras.Model",
"tensorflow.clip_by_value",
"tensorflow.stack",
"tensorflow.tile",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.cas... |
musicpiano/mlmicrophysics | [
"720e09b9003285e4e601df8befd58337bee691f5"
] | [
"scripts/search_ml_model_params.py"
] | [
"import numpy as np\nimport yaml\nfrom dask.distributed import Client, LocalCluster, as_completed\nimport argparse\nfrom os.path import exists, join\nfrom os import makedirs\nfrom mlmicrophysics.data import subset_data_files_by_date, assemble_data_files\nfrom sklearn.ensemble import RandomForestRegressor, RandomFor... | [
[
"numpy.count_nonzero",
"numpy.random.RandomState",
"pandas.DataFrame",
"sklearn.model_selection.ParameterSampler",
"pandas.Series",
"numpy.unique"
]
] |
neukirchen-212/phonopy | [
"e34588dcb32fb15aa2a6604ffd3e62ebb0927c0f",
"e34588dcb32fb15aa2a6604ffd3e62ebb0927c0f"
] | [
"phonopy/qha/core.py",
"phonopy/phonon/thermal_properties.py"
] | [
"\"\"\"Phonopy QHA module.\"\"\"\n\n# Copyright (C) 2012 Atsushi Togo\n# All rights reserved.\n#\n# This file is part of phonopy.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of sour... | [
[
"numpy.array",
"numpy.dot",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.tight_layout",
"numpy.polyfit",
"numpy.abs",
"matplotlib.ticker.ScalarFormatter.__init__"
],
[
"numpy.extract",
"numpy.array",
"n... |
hyunghunny/AutoDL-Projects | [
"a885090b153e6ccd7c77b94aceac5de857622829",
"a885090b153e6ccd7c77b94aceac5de857622829"
] | [
"nas201bench/models/__init__.py",
"exps/experimental/visualize-nas-bench-x.py"
] | [
"##################################################\n# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 #\n##################################################\nfrom os import path as osp\nfrom typing import List, Text\nimport torch\n\n__all__ = ['change_key', 'get_cell_based_tiny_net', 'get_search_spaces', 'get_cifar_... | [
[
"torch.load"
],
[
"matplotlib.use",
"numpy.array",
"matplotlib.pyplot.grid",
"torch.save",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"matplotlib.ticker.FormatStrFormatter",
"torch.load",
"num... |
kaushikponnapalli/dymos | [
"3fba91d0fc2c0e8460717b1bec80774676287739",
"3fba91d0fc2c0e8460717b1bec80774676287739"
] | [
"dymos/examples/vanderpol/vanderpol_ode.py",
"dymos/examples/brachistochrone/doc/test_doc_brachistochrone_tandem_phases.py"
] | [
"import numpy as np\nimport openmdao.api as om\nimport time\nfrom openmdao.utils.array_utils import evenly_distrib_idxs\n\n\nclass VanderpolODE(om.ExplicitComponent):\n \"\"\"intentionally slow version of vanderpol_ode for effects of demonstrating distributed component calculations\n\n MPI can run this compon... | [
[
"numpy.ones",
"numpy.arange"
],
[
"matplotlib.pyplot.switch_backend",
"numpy.sin",
"numpy.zeros",
"numpy.tan",
"matplotlib.pyplot.subplots",
"numpy.arange",
"numpy.cos",
"numpy.sqrt",
"matplotlib.pyplot.show"
]
] |
bpkwee/metrics | [
"3aba057ad9ff87183aaaf5988b8ccfdab81b2095",
"3aba057ad9ff87183aaaf5988b8ccfdab81b2095",
"3aba057ad9ff87183aaaf5988b8ccfdab81b2095"
] | [
"tests/regression/test_tweedie_deviance.py",
"torchmetrics/functional/retrieval/fall_out.py",
"tests/classification/test_confusion_matrix.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.rand",
"torch.isnan",
"sklearn.metrics.mean_tweedie_deviance",
"torch.cuda.is_available",
"torch.tensor",
"torch.randn"
],
[
"torch.argsort",
"torch.tensor"
],
[
"sklearn.metrics.multilabel_confusion_matrix",
"sklearn.metrics.confusion_matrix",
"torch.ran... |
2xyo/msticpy | [
"54c6d74e0bb25528dd0347edb40c693dd7b1eac7"
] | [
"msticpy/analysis/eventcluster.py"
] | [
"# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------\n... | [
[
"numpy.zeros_like",
"sklearn.preprocessing.Normalizer",
"matplotlib.pyplot.annotate",
"matplotlib.pyplot.xlabel",
"matplotlib.cm.Spectral",
"matplotlib.pyplot.title",
"sklearn.cluster.DBSCAN",
"matplotlib.pyplot.ylabel",
"pandas.concat",
"matplotlib.pyplot.show",
"numpy... |
wyyy04/scene-graph-TF-release | [
"4c9e3c6a5cb0e6a241a92dc9b786f74e69ca35c4"
] | [
"lib/roi_data_layer/minibatch.py"
] | [
"# --------------------------------------------------------\n# Adapted from Faster R-CNN (https://github.com/rbgirshick/py-faster-rcnn)\n# Written by Danfei Xu\n# --------------------------------------------------------\n\n\"\"\"Compute minibatch blobs for training a Fast R-CNN network.\"\"\"\n\nimport numpy as np\... | [
[
"numpy.array",
"numpy.random.choice",
"numpy.setdiff1d",
"numpy.zeros",
"numpy.minimum",
"numpy.round",
"numpy.ones",
"numpy.where",
"numpy.hstack",
"numpy.vstack"
]
] |
James-P-D/Maze | [
"95a142379bce4da21b3a49a7c0ece26f355e582c"
] | [
"src/MazePy/MazePy/MazePy.py"
] | [
"import pygame # Tested with pygame v1.9.6\nfrom UIControls import Button\nfrom constants import *\nimport numpy as np\nimport random\nimport time\nimport os\nfrom nodes import bfs_node\nimport sys\nimport threading\n\n\n###############################################\n# Globals\n##################################... | [
[
"numpy.ndarray"
]
] |
chadwickbureau/data-boxscores | [
"225fb21072784f6709d6954bfe94d51992e50cdf"
] | [
"hgame/boxscore/extract.py"
] | [
"\"\"\"Extract data from transcription format.\"\"\"\nimport sys\nimport datetime\nimport io\nimport pathlib\nimport tabulate\n\nimport pandas as pd\n\nfrom . import config\n\n\nsubstitution_keys = (\"*\", \"+\", \"^\", \"&\", \"$\", \"%\")\n\n\ndef process_source(game, value):\n title, d = (x.strip() for x in v... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
samgoldman97/icml18-jtnn | [
"20c7831a81a942bd9b98ee492951e7a5e3237a8d"
] | [
"jtnn/jtnn_vae.py"
] | [
"import torch\nimport torch.nn as nn\nfrom .mol_tree import Vocab, MolTree\nfrom .nnutils import create_var\nfrom .jtnn_enc import JTNNEncoder\nfrom .jtnn_dec import JTNNDecoder\nfrom .mpn import MPN, mol2graph\nfrom .jtmpn import JTMPN\n\nfrom .chemutils import enum_assemble, set_atommap, copy_edit_mol, attach_mol... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.cat",
"torch.nn.Softmax",
"torch.mv",
"torch.nn.CrossEntropyLoss",
"torch.bmm",
"torch.sort",
"torch.LongTensor",
"torch.nn.CosineSimilarity",
"torch.exp",
"torch.randn"
]
] |
arvidl/gcn_metric_learning | [
"62750e15e0107fab9fc279b17dbc8f509d5dbbba"
] | [
"lib/abide_utils.py"
] | [
"# Copyright (c) 2017 Sofia Ira Ktena <ira.ktena@imperial.ac.uk>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to... | [
[
"numpy.delete",
"numpy.triu_indices_from",
"scipy.io.loadmat",
"scipy.io.savemat",
"numpy.loadtxt",
"numpy.arctanh",
"numpy.vstack",
"sklearn.covariance.GraphLassoCV"
]
] |
RosaliaTufano/rlgameauthors | [
"d18bedd82da66be1b222e86ff63344d85f1ba92a"
] | [
"CartPole/CartPole_RL-baseline_1k_episodes.py"
] | [
"# **********************************************************************************************************************\n# **********************************************************************************************************************\n# *********************************************************************... | [
[
"torch.nn.Linear",
"torch.nn.Softmax",
"numpy.percentile",
"torch.FloatTensor",
"numpy.mean",
"torch.nn.ReLU",
"torch.LongTensor",
"torch.load",
"torch.nn.CrossEntropyLoss"
]
] |
kingsley1989/Parallel-Ultrametric | [
"12d690b2f7b206140bee826bc136fa1a71114df6"
] | [
"setup.py"
] | [
"from setuptools import setup\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\nsetup(\n\tname='ultmul', \n\text_modules=[\n\tCUDAExtension(\n\t\t'ultMul_cuda',\n[\n\t\t\t'ultMul_cuda.cpp',\n\t\t\t'ultMul_cuda_kernel.cu', #.cpp and .cu file must have different name\n\t\t])],\n\tcmdclass = {\n\... | [
[
"torch.utils.cpp_extension.CUDAExtension"
]
] |
deepakmuralidharan/tensorflow | [
"f40e41f9c71ef2865f96f3db3cea2909797fe2a3",
"f40e41f9c71ef2865f96f3db3cea2909797fe2a3"
] | [
"tensorflow/python/kernel_tests/matmul_op_test.py",
"tensorflow/g3doc/how_tos/reading_data/fully_connected_preloaded.py"
] | [
"# Copyright 2015 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"numpy.matrix",
"tensorflow.matmul",
"tensorflow.constant",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.arange",
"tensorflow.test.main",
"numpy.complex",
"tensorflow.python.kernel_tests.gradient_checker.ComputeGradientError"
],
[
"tensorflow.train.start_queue... |
sourcery-ai-bot/scikit-learn | [
"0f7933a8f7527d13e822217cb2d42340be3cdfa4",
"0f7933a8f7527d13e822217cb2d42340be3cdfa4"
] | [
"examples/cluster/plot_optics.py",
"examples/cluster/plot_agglomerative_clustering_metrics.py"
] | [
"\"\"\"\n===================================\nDemo of OPTICS clustering algorithm\n===================================\n\n.. currentmodule:: sklearn\n\nFinds core samples of high density and expands clusters from them.\nThis example uses data that is generated so that the clusters have\ndifferent densities.\nThe :c... | [
[
"sklearn.cluster.cluster_optics_dbscan",
"numpy.random.seed",
"numpy.full_like",
"numpy.random.randn",
"matplotlib.pyplot.figure",
"sklearn.cluster.OPTICS",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show",
"matplotlib.gridspec.GridSpec",
"numpy.vstack",
"matp... |
gameon67/tensorflow | [
"be647ad9512f7d2b891494ef8abbbde46e2e0663"
] | [
"tensorflow/contrib/tensor_forest/python/tensor_forest.py"
] | [
"# pylint: disable=g-bad-file-header\n# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l... | [
[
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.ops.control_flow_ops.tuple",
"tensorflow.python.ops.math_ops.equal",
"tensorflow.python.ops.state_ops.assign_add",
"tensorflow.python.ops.state_ops.assign",
"tensorflow.python.ops.array_ops.where",
"tensorflow.python.ops.ma... |
ArgonneCPAC/dsps | [
"a08da74cf9df4b12197805531d0b273d98ed5da6"
] | [
"dsps/tests/test_stellar_ages.py"
] | [
"\"\"\"\n\"\"\"\nimport numpy as np\nfrom ..stellar_ages import _get_lg_age_bin_edges, _get_lgt_birth, T_BIRTH_MIN\nfrom ..stellar_ages import _get_sfh_tables, _get_age_weights_from_tables\nfrom ..sfh_model import DEFAULT_MAH_PARAMS, DEFAULT_MS_PARAMS, DEFAULT_Q_PARAMS\nfrom ..utils import _jax_get_dt_array\n\n\nFS... | [
[
"numpy.linspace",
"numpy.diff",
"numpy.allclose",
"numpy.arange",
"numpy.log10"
]
] |
VaibhaviMishra04/pyprobml | [
"2a4b9a267f64720cbba35dfa41af3e995ea006ca",
"2a4b9a267f64720cbba35dfa41af3e995ea006ca"
] | [
"scripts/hbayes_binom_rats_pymc3.py",
"scripts/ecdf_sample.py"
] | [
"\n#https://docs.pymc.io/notebooks/GLM-hierarchical-binominal-model.html\n\nimport matplotlib.pyplot as plt\nimport scipy.stats as stats\nimport numpy as np\nimport pandas as pd\n#import seaborn as sns\nimport pymc3 as pm\nimport arviz as az\nimport theano.tensor as tt\n\nnp.random.seed(123)\n\n\n\n\n# rat data (BD... | [
[
"numpy.array",
"numpy.reshape",
"numpy.zeros",
"numpy.asarray",
"numpy.random.seed",
"matplotlib.pyplot.savefig",
"numpy.sum",
"numpy.mean",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.subplots_adjust"
],
[
"scipy.stats.expon",
"scipy.st... |
k101w/phyre_ODE | [
"5d775d3722043725b254cc8be83cad56462d9bef"
] | [
"data/task_scripts/main/task01002.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.random.RandomState"
]
] |
rbalda/neural_ocr | [
"140585a7e99f1d49e52b142811273b02c08c0675"
] | [
"env/lib/python2.7/site-packages/matplotlib/dates.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nMatplotlib provides sophisticated date plotting capabilities, standing on the\nshoulders of python :mod:`datetime`, the add-on modules :mod:`pytz` and\n:mod:`dateutil`. :class:`datetime` objects are converted to floating point\nnumbers which represent time in days since 0001-01-01 U... | [
[
"numpy.ceil",
"matplotlib.cbook.is_string_like",
"matplotlib.ticker.MultipleLocator",
"numpy.asarray",
"numpy.vectorize",
"matplotlib.externals.six.callable",
"matplotlib.units.ConversionInterface.is_numlike",
"matplotlib.cbook.iterable",
"matplotlib.externals.six.moves.zip",
... |
soldfield/xyz_surfaces | [
"0685ba8f104df08f0f5180ea435425287960c039"
] | [
"StratWedge.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Aug 3 19:42:46 2017\n\nShort script to generate a two-dimensional fold, based on a cosine curve.\n\nOutputs xyz point cloud as a text file in the working directory.\n\n@author: Simon J. Oldfield\n\n Copyright 2016 Simon Oldfield\n\n Licensed under the Apache Lic... | [
[
"numpy.full",
"numpy.array",
"numpy.delete",
"numpy.zeros",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"numpy.arange",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"numpy.empty_like",
"numpy.vstack",
"numpy.hstack",
"numpy.column_stack",
... |
daochenzha/rapid | [
"1611e47fffac0f61e6c07ad5388eb2368a426f06"
] | [
"rapid/mujoco_envs/episode_hopper.py"
] | [
"import numpy as np\nfrom gym import utils\nfrom gym.envs.mujoco import mujoco_env\n\nclass EpisodeHopperEnv(mujoco_env.MujocoEnv, utils.EzPickle):\n def __init__(self):\n self.t = 0\n self.r = 0\n mujoco_env.MujocoEnv.__init__(self, 'hopper.xml', 4)\n utils.EzPickle.__init__(self)\n\... | [
[
"numpy.square",
"numpy.abs",
"numpy.isfinite",
"numpy.clip"
]
] |
edge-analytics/fpga-sleep-tracker | [
"50efd114500e134297be5229775a9ec6809abb53"
] | [
"fpga/test/featurize/actigraphy_counts/actigraphy_counts_tb.py"
] | [
"import cocotb\nfrom cocotb.clock import Clock\nfrom cocotb.triggers import ClockCycles, ReadWrite, NextTimeStep, RisingEdge, FallingEdge\nfrom cocotb.binary import BinaryValue\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom scipy.signal import butter, filtfilt\nfrom fixedpoint import FixedPoint\n\n... | [
[
"numpy.loadtxt",
"numpy.amax",
"numpy.interp",
"numpy.amin"
]
] |
tehkillerbee/mmdetection-to-tensorrt | [
"b1532465ab1c6617b350981bbda2bc361fe291a6"
] | [
"mmdet2trt/models/dense_heads/fovea_head.py"
] | [
"import mmdet2trt.ops.util_ops as mm2trt_util\nimport torch\nfrom mmdet2trt.models.builder import register_wraper\nfrom mmdet2trt.models.dense_heads.anchor_free_head import AnchorFreeHeadWraper\n\n\n@register_wraper('mmdet.models.FoveaHead')\nclass FoveaHeadWraper(AnchorFreeHeadWraper):\n\n def __init__(self, mo... | [
[
"torch.cat",
"torch.stack"
]
] |
russellmendonca/RoboNet | [
"de30fa069dacb2888e62bd239e7a3471ea3aaa9d"
] | [
"robonet/video_prediction/utils/ffmpeg_gif.py"
] | [
"import os\n\nimport numpy as np\n\n\ndef save_gif(gif_fname, images, fps):\n \"\"\"\n To generate a gif from image files, first generate palette from images\n and then generate the gif from the images and the palette.\n ffmpeg -i input_%02d.jpg -vf palettegen -y palette.png\n ffmpeg -i input_%02d.jp... | [
[
"numpy.all",
"numpy.random.randint"
]
] |
mathandy/functorch | [
"8d82eb3bb963e6d83d62df2f17b91ab6381dc1f0"
] | [
"examples/compilation/simple_function.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom functorch import grad, nnc_jit, make_fx, make_nnc\nimport torch\nimport time\n\n\ndef f(x):\n ... | [
[
"torch.randn",
"torch.sin"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.