repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
haroldss/ae_bakeoff_VAE_6_Models
[ "3c1829ce40adbadf444e13c7f3ff83a2d0f034f8" ]
[ "src/data.py" ]
[ "\"\"\"Adopted from https://pytorch-lightning.readthedocs.io/en/stable/datamodules.html#lightningdatamodule-api\"\"\"\nimport os\n\nimport pytorch_lightning as pl\nimport torch\nfrom torch.utils.data import DataLoader, Subset\nfrom torchvision import transforms\nfrom torchvision.datasets import MNIST\n\n\nclass MNI...
[ [ "torch.utils.data.Subset", "torch.Generator", "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
piotr-tobolski/CoreMLDemo
[ "d63093f83c16e36035d4b8ddfa1c66aca3cc0c39" ]
[ "ann-read.py" ]
[ "from sklearn.externals import joblib\nfrom keras.models import load_model\n\nH = [[0.0, 0, 600, 1, 40, 3, 60000, 2, 1, 1, 50000]]\n\nscaler = joblib.load('scaler.save')\nH = scaler.transform(H)\nprint(H)\n\nmodel = load_model('classifier.hdf5')\nH_pred = model.predict(H)\nprint(H_pred)\n" ]
[ [ "sklearn.externals.joblib.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jf20541/LSTM-RNN-GRU
[ "1c14dc344776c07c53deb4a3da672a9571e1e158" ]
[ "src/engine.py" ]
[ "import torch\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n\n\ndef loss_fn(pred, y_train):\n return torch.nn.MSELoss()(pred, y_train)\n\n\ndef split_data(stock, sequence):\n data = []\n for idx in range(len(stock) - sequence):\n data.append(stock[idx : idx + sequence]...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots", "torch.from_numpy", "numpy.round", "numpy.array", "torch.nn.MSELoss", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Zillow-Project-JG-DN/clustering-project-jgdn
[ "41c82f16e9fd47855e24a4a11a79288b5718a1c4" ]
[ "wrangle.py" ]
[ "####### IMPORT LIBRARIES ############\n\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nimport env\n\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\n\n################ PULL DATA FROM DB ##############\n\n...
[ [ "pandas.read_csv", "numpy.where", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.MinMaxScaler" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
AmirHosseinAmeli/Triple-GAN
[ "127948d9e22767d315a4b3ca58fc4a56d92ff9d3" ]
[ "train_triplegan.py" ]
[ "import copy\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\n\nfrom library import inputs\nfrom Utils.checkpoints import save_context, Logger\nfrom Utils import flags\nfrom Utils import config\n\nimport Torture\nfrom library import loss_triplegan, evaluation\nimport library.loss_cla as loss_classifier\n...
[ [ "numpy.random.seed", "torch.cuda.manual_seed", "numpy.clip", "torch.manual_seed", "torch.randn", "torch.no_grad", "torch.cuda.is_available", "torch.nn.DataParallel", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lgvaz/pytorch-lightning
[ "3af4994d5a84bc80738b50983b4b42c3eb946433" ]
[ "pytorch_lightning/trainer/data_loading.py" ]
[ "import platform\nfrom abc import ABC, abstractmethod\nfrom typing import Union, List, Tuple, Callable\n\nimport torch.distributed as torch_distrib\nfrom torch.utils.data import DataLoader, RandomSampler\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom pytorch_lightning.core import LightningModu...
[ [ "torch.utils.data.distributed.DistributedSampler", "torch.distributed.barrier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
georgetown-analytics/Energy-Costs
[ "930ca1c6144b9536a3308fc083ddaa07e9449301" ]
[ "Ingest and Wrangle/ingest_bulk_csv.py" ]
[ "import pandas as pd\nimport os\nimport glob\nfrom sqlalchemy import create_engine\n\npw = input('PW:')\npath = input('Folder Path:')\n\nparams = {\n 'dbname':'energycosts',\n 'user':'energycosts',\n 'password': pw,\n 'host':'georgetownenergycosts.cr1legfnv0nf.us-east-1.rds.amazonaws.com',\n 'port': ...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
01pooja10/SimpleGAN
[ "47a762a0e4abd8cbf680aad971b7f5b90fd32270" ]
[ "code/training.py" ]
[ "#imports\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nimport torchvision.datasets as datasets\nimport torchvision.transforms as transforms\nfrom model import Discriminator, Generator\nfrom torch.optim import Adam\nfrom torch.cuda.amp import autocast, GradScaler...
[ [ "torch.randn", "torch.utils.data.DataLoader", "torch.zeros_like", "torch.cuda.amp.autocast", "torch.cuda.amp.GradScaler", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.ones_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jcchiba/fonty
[ "ebf27303ac5a90378d7b4947a8bb2c29f092054c" ]
[ "model/unet.py" ]
[ "# -*- coding: utf-8 -*-\n\n\n\nimport tensorflow as tf\nimport numpy as np\nimport scipy.misc as misc\nimport os\nimport time\nfrom collections import namedtuple\nfrom .ops import conv2d, deconv2d, lrelu, fc, batch_norm, init_embedding, conditional_instance_norm\nfrom .dataset import TrainDataProvider, InjectDataP...
[ [ "tensorflow.concat", "numpy.linspace", "numpy.asarray", "tensorflow.global_variables", "numpy.concatenate", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.nn.l2_loss", "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.square", "t...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "1.0", "0.19", "0.18", "1.2", "0.12", "0.10", "0.17", "0.16" ], "tensorflow": [ "1.10" ] } ]
96jhwei/Genetic-U-Net
[ "25116f01afcf8ed4386cd0fc258da15e1c982cb5", "25116f01afcf8ed4386cd0fc258da15e1c982cb5" ]
[ "code/metrics/metrics.py", "code/train/util/util.py" ]
[ "import torch\nimport numpy as np\n\nbce = torch.nn.BCEWithLogitsLoss(reduction='none')\n\ndef _upscan(f):\n for i, fi in enumerate(f):\n if fi == np.inf: continue\n for j in range(1,i+1):\n x = fi+j*j\n if f[i-j] < x: break\n f[i-j] = x\n\n\ndef dice_coefficient_nu...
[ [ "numpy.asarray", "torch.sigmoid", "torch.nn.BCEWithLogitsLoss", "numpy.logical_and" ], [ "torch.cuda.set_device", "numpy.random.seed", "torch.cuda.manual_seed", "torch.manual_seed", "torch.cuda.current_device", "torch.cuda.reset_max_memory_cached", "torch.cuda.empty...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oliveiracwb/ForwardTacotron
[ "6c549b97d500e0e4192698f935ba512eece780c7" ]
[ "train_tacotron.py" ]
[ "import argparse\nimport itertools\nfrom pathlib import Path\n\nimport torch\nfrom torch import optim\nfrom torch.utils.data.dataloader import DataLoader\nfrom models.tacotron import Tacotron\nfrom trainer.taco_trainer import TacoTrainer\nfrom utils import hparams as hp\nfrom utils.checkpoints import restore_checkp...
[ [ "torch.device", "torch.cuda.device_count", "torch.no_grad", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Andlon/crest
[ "f79bf5a68f3eb86f5e3422881678bc6f9011730a" ]
[ "pycrest/test/private/test_cffi.py" ]
[ "from numpy.testing import assert_array_almost_equal\nfrom numpy.testing import assert_array_equal\n\nfrom pycrest.mesh import Mesh2d\nfrom pycrest.private.cffi import _mesh_to_flat_mesh_data, _flat_mesh_data_to_mesh\n\n\ndef test_mesh_flat_data_roundtrip():\n vertices = [\n (0.0, 0.0),\n (1.0, 0.0...
[ [ "numpy.testing.assert_array_equal", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PHT-Medic/aggregation-protocol
[ "44c04c692bb6ba5c180e2cd3e87ea823c6361739" ]
[ "tests/test_masking.py" ]
[ "import os\n\nimport numpy as np\nimport pytest\n\nfrom protocol import ClientProtocol, ServerProtocol\nfrom protocol.models.server_messages import BroadCastClientKeys, ServerKeyBroadcast\nfrom protocol.secrets.masking import (generate_user_masks, generate_random_seed, integer_seed_from_hex,\n ...
[ [ "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tarod13/DRIM
[ "110e5514acaf240cd321bb225105e257fca340a7" ]
[ "gym/envs/hopper_multitask_v3.py" ]
[ "import numpy as np\nfrom gym.envs.mujoco import mujoco_env\nfrom gym import utils\n\n\nDEFAULT_CAMERA_CONFIG = {\n 'trackbodyid': 2,\n 'distance': 3.0,\n 'lookat': np.array((0.0, 0.0, 1.15)),\n 'elevation': -20.0,\n}\n\n\nclass HopperEnv(mujoco_env.MujocoEnv, utils.EzPickle):\n def __init__(self,\n ...
[ [ "numpy.square", "numpy.abs", "numpy.logical_and", "numpy.min", "numpy.sign", "numpy.concatenate", "numpy.array", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isabella232/heldout-influence-estimation
[ "634527bf7ca6630e6fe66867347747e2e04bc780", "634527bf7ca6630e6fe66867347747e2e04bc780" ]
[ "libdata/indexed_tfrecords.py", "tools/imagenet-tfrecords-builder/build_dataset.py" ]
[ "# Lint as: python3\n# Copyright 2020 Google LLC\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ [ "tensorflow.constant", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.cast", "tensorflow.io.parse_single_example", "tensorflow.equal", "tensorflow.io.FixedLenFeature", "tensorflow.data.Options" ], [ "tensorflow.io.TFRecordWriter", "tensorflow.train.Int64List", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
SGevorg/aim-deploy
[ "45bc4321a2d0a4d1016f3ea7ee721f982225bd44" ]
[ "aim/sdk/objects/image.py" ]
[ "import logging\nimport os.path\n\nfrom PIL import (\n Image as PILImage,\n ImageSequence as PILImageSequence\n)\n\nfrom io import BytesIO\nfrom itertools import chain, repeat\nfrom typing import List\nimport numpy as np\n\nfrom aim.sdk.num_utils import inst_has_typename\nfrom aim.storage.object import Custom...
[ [ "tensorflow.math.scalar_mul", "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
doliveralg/trains
[ "c99d3f36ba621153ff3c35859b8b6c946cdbc80b" ]
[ "trains/utilities/seed.py" ]
[ "import sys\nimport random\n\ntry:\n import numpy as np\nexcept Exception:\n np = None\ntry:\n import cv2\nexcept Exception:\n cv2 = None\n\n\ndef make_deterministic(seed=1337, cudnn_deterministic=False):\n \"\"\"\n Ensure deterministic behavior across PyTorch using the provided random seed.\n ...
[ [ "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Prokofeva/Deoxyribozyme_data_proc
[ "34959eb014bc02e9c051791f1d4496745186f9ba" ]
[ "single_plot.py" ]
[ "#!/usr/bin/env python\n\nimport matplotlib.pyplot as plt\nfrom scipy import interpolate\nimport numpy as np\n\n# data loading\nsh1 = np.loadtxt('data/data_1h_short.txt')\nlo1 = np.loadtxt('data/data_1h_long.txt')\nsh1r = np.loadtxt('data/data_1h_short_robot.txt')\nlo1r = np.loadtxt('data/data_1h_long_robot.txt')\n...
[ [ "numpy.polyfit", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.full", "numpy.std", "numpy.mean", "matplotlib.pyplot.show", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dks28/deepGP_approxEP
[ "c540225094ef44fecd66bdd58efe4d9d21f60d8b" ]
[ "theano/tests/test_toy_1D.py" ]
[ "import math\nimport numpy as np\nimport sys\nimport theano\nsys.path.append('../code/')\nimport AEPDGP_net\nimport matplotlib.pyplot as plt\nimport time\n\n#print 'Theano version: ' + theano.__version__ + ', base compile dir: ' + theano.config.base_compiledir\n# theano.config.compute_test_value = 'warn'\ntheano.co...
[ [ "numpy.log", "numpy.sqrt", "numpy.random.seed", "numpy.linspace", "numpy.reshape", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.mean", "numpy.random.randn", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
telegraphic/turbo_seti
[ "3c17b78177633b9c1814bebe45eaf06e96141648" ]
[ "turbo_seti/findoppler/data_handler.py" ]
[ "#!/usr/bin/env python\n\nimport os\nimport numpy as np\nimport math\nfrom pkg_resources import resource_filename\nfrom blimpy import Waterfall\nfrom blimpy.io import sigproc\nimport h5py\n\nimport logging\nlogger = logging.getLogger(__name__)\n\n#For debugging\n#import cProfile\n#import pdb;# pdb.set_trace()\n\nSI...
[ [ "numpy.log2", "numpy.abs", "numpy.squeeze", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rosinality/vision-transformers-pytorch
[ "b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f" ]
[ "models/vit.py" ]
[ "import math\r\nfrom typing import Union, Tuple\r\n\r\nimport torch\r\nfrom torch import nn\r\nfrom torch.nn import functional as F\r\nfrom tensorfn.config import config_model\r\nfrom pydantic import StrictInt, StrictFloat, StrictBool\r\n\r\nfrom .layer import DropPath, PositionwiseFeedForward, tuple2\r\n\r\n\r\nLa...
[ [ "torch.nn.functional.normalize", "torch.nn.Sequential", "torch.nn.Dropout", "torch.softmax", "torch.linspace", "torch.nn.GELU", "torch.nn.BatchNorm1d", "torch.zeros", "torch.cat", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.tensor", "torch.nn.Linear", "t...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
neonbjb/mmsr
[ "2706a84f15613e9dcd48e2ba927e7779046cf681", "2706a84f15613e9dcd48e2ba927e7779046cf681" ]
[ "codes/data/full_image_dataset.py", "codes/scripts/extract_subimages_with_ref.py" ]
[ "import random\nimport numpy as np\nimport cv2\nimport torch\nimport torch.utils.data as data\nimport data.util as util\nfrom PIL import Image, ImageOps\nfrom io import BytesIO\nimport torchvision.transforms.functional as F\n\n\n# Reads full-quality images and pulls tiles from them. Also extracts LR renderings of t...
[ [ "torch.randn_like", "numpy.expand_dims", "torch.cat", "numpy.ascontiguousarray", "torch.tensor", "numpy.ones", "numpy.random.normal", "numpy.transpose", "numpy.zeros", "numpy.sum" ], [ "numpy.ascontiguousarray", "numpy.arange", "numpy.append", "torch.uti...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
savchoa/My_solutions_dlcourse.ai
[ "ba80607a353d836adca6d9e7acd12cf3c06670c6", "ba80607a353d836adca6d9e7acd12cf3c06670c6" ]
[ "assignments/assignment3/gradient_check.py", "assignments/assignment3/trainer.py" ]
[ "import numpy as np\n\n\ndef check_gradient(f, x, delta=1e-5, tol=1e-4):\n \"\"\"\n Checks the implementation of analytical gradient by comparing\n it to numerical gradient using two-point formula\n\n Arguments:\n f: function that receives x and computes value and gradient\n x: np array, initi...
[ [ "numpy.ones_like", "numpy.nditer", "numpy.random.randn", "numpy.sum", "numpy.isclose" ], [ "numpy.arange", "numpy.random.shuffle", "numpy.zeros_like", "numpy.mean", "numpy.array_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HCLIMcom/RCAT
[ "71700000d0f33ec4cfc7d54609c01102a5e62b50", "71700000d0f33ec4cfc7d54609c01102a5e62b50" ]
[ "rcat/plot/colors.py", "rcat/stats/climateindex.py" ]
[ "\"\"\"\nThis module provides access to predefined (Matplotlib) or self-produced\ncolors and color maps.\n\n@author Petter Lind\n@date 2015-05-18\n\"\"\"\n\nimport sys\nfrom matplotlib import colors\nimport matplotlib.pyplot as plt\nimport palettable\n\n# Self-produced colormaps\n#\nprct_diff = [\"#006400\", \"#3...
[ [ "matplotlib.colors.ListedColormap", "matplotlib.pyplot.cm.get_cmap" ], [ "numpy.isnan", "numpy.array", "numpy.apply_along_axis", "numpy.percentile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PG642/multi-sample-factory
[ "2c2bdc698a194a9779161357be40fe9265b55661", "2c2bdc698a194a9779161357be40fe9265b55661" ]
[ "multi_sample_factory/envs/dmlab/dmlab_gym.py", "multi_sample_factory/algorithms/appo/model.py" ]
[ "import os\nimport time\nimport random\nimport shutil\nfrom os.path import join\n\nimport cv2\nimport deepmind_lab\nimport gym\nimport numpy as np\n\nfrom multi_sample_factory.envs.dmlab import dmlab_level_cache\nfrom multi_sample_factory.envs.dmlab.dmlab30 import DMLAB_INSTRUCTIONS, DMLAB_MAX_INSTRUCTION_LEN, DMLA...
[ [ "numpy.array", "numpy.zeros", "numpy.random.RandomState" ], [ "torch.nn.Linear", "torch.nn.init.xavier_uniform_", "torch.nn.init.orthogonal_", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
khushi-411/cupy
[ "b5221a478c800c5e60eef65545467de9eb00c0d9" ]
[ "tests/cupy_tests/core_tests/test_function.py" ]
[ "import unittest\nimport pytest\n\nimport numpy\n\nimport cupy\nfrom cupy._core import core\nfrom cupy.cuda import compiler\nfrom cupy.cuda import runtime\nfrom cupy import testing\n\n\ndef _compile_func(kernel_name, code):\n # workaround for hipRTC\n extra_source = core._get_header_source() if runtime.is_hip...
[ [ "numpy.arange", "numpy.dtype", "numpy.random.rand", "numpy.float64", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
3fred3/Pega_Visao
[ "fdc1be48ee6ea0c8773ad459b99046a289f4ed63" ]
[ "Exemplos Python OpenCV/Seção 1/Ep 6 - contours.py" ]
[ "#pylint:disable=no-member\n\nimport cv2 as cv\nimport numpy as np\n\nimg = cv.imread('Exemplos Python OpenCV/Resources/Photos/cats.jpg')\ncv.imshow('Cats', img)\n\nblank = np.zeros(img.shape, dtype='uint8')\ncv.imshow('Blank', blank)\n\ngray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) # colocando em preto-branco\ncv.ims...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
liuyanyi/mmdetection
[ "d2003536af6f08cb9bd7a75e0444eef03ace4bb3", "d2003536af6f08cb9bd7a75e0444eef03ace4bb3" ]
[ "mmdet/core/bbox/transforms_rotated.py", "mmdet/models/roi_heads/rotated/standard_roi_head.py" ]
[ "import copy\nimport math\n\nimport cv2\nimport numpy as np\nimport torch\n\n\ndef cal_line_length(point1, point2):\n return math.sqrt(math.pow(point1[0] - point2[0], 2) + math.pow(point1[1] - point2[1], 2))\n\n\ndef TuplePoly2Poly(poly):\n outpoly = [poly[0][0], poly[0][1],\n poly[1][0], poly[1...
[ [ "torch.max", "numpy.min", "numpy.reshape", "torch.cat", "torch.sin", "torch.min", "torch.argmin", "numpy.cos", "torch.zeros_like", "numpy.sin", "numpy.concatenate", "numpy.arctan2", "numpy.max", "torch.reshape", "numpy.array", "numpy.zeros", "tor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hiroyasu-tyk/streamlit_kofu
[ "3f796ee083f1138822aedeade0e6adca90ae1414" ]
[ "yamanashi_ble_heatmap.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\nimport streamlit as st\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport requests\r\nfrom datetime import datetime as dt, timedelta, time\r\nimport pydeck as pdk\r\n# import sys\r\n\r\n# sys.path.append(\"./\")\r\nfrom functions4kofu import *\r\nfrom matplotlib impo...
[ [ "pandas.merge", "pandas.to_datetime", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
MonoHaru/Deep-Learning-from-Scratch_2
[ "e7dd6e7c82a34fadfa17331c2934f5f9ae2c3ec3" ]
[ "CH01/train_custom_loop.py" ]
[ "# import sys\r\n# sys.path.append('..')\r\nimport numpy as np\r\nfrom common.optimizer import SGD\r\nfrom dataset import spiral\r\nimport matplotlib.pyplot as plt\r\nfrom CH01.two_layer_net import TwoLayerNet\r\n\r\n# 1) 하이퍼파라미터 설정\r\nmax_epoch = 300\r\nbatch_size = 30\r\nhidden_size = 10\r\nlearning_rate = 1.0\r\...
[ [ "matplotlib.pyplot.contourf", "matplotlib.pyplot.scatter", "numpy.arange", "numpy.argmax", "numpy.random.permutation", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MOHAMEDELDAKDOUKY/SFA3D
[ "fa3e952a13e6e6e0d291fd70fbe07b1d492d722a" ]
[ "sfa/test.py" ]
[ "\"\"\"\n# -*- coding: utf-8 -*-\n-----------------------------------------------------------------------------------\n# Author: Nguyen Mau Dung\n# DoC: 2020.08.17\n# email: nguyenmaudung93.kstn@gmail.com\n-----------------------------------------------------------------------------------\n# Description: Testing sc...
[ [ "torch.no_grad", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mxposed/CellBender
[ "20bab467408d6822874dd6dadbd9c368b580721f" ]
[ "examples/remove_background/generate_tiny_10x_pbmc.py" ]
[ "#!/usr/bin/env python\n\nimport urllib.request\nimport sys\nimport tarfile\nimport os\nimport numpy as np\nfrom scipy.io import mmread, mmwrite\nimport pandas as pd\nimport operator\nimport shutil\n\ndataset_name = \"pbmc4k (CellRanger 2.1.0, v2 Chemistry)\"\ndataset_url = \"http://cf.10xgenomics.com/samples/cell-...
[ [ "pandas.read_csv", "numpy.asarray", "scipy.io.mmread", "numpy.random.RandomState", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2...
macabdul9/BloomNet
[ "e9be8688b4516fbfe77fa6ecb561386a08218875" ]
[ "models/hyfi/dicts.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n\nimport torch\nfrom . import constants\nfrom .constants import COARSE, FINE\n\n\nclass Dict:\n \"\"\"\n Object that keeps a mapping between labels and ids. It also keeps the frequency of each term.\n \"\"\"\n\n def __init__(self, data=None, lower=False):\n ...
[ [ "torch.sort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening
[ "dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6", "dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6" ]
[ "PYSEQM/test/test6/plot.py", "PYSEQM/test/test5.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport sys\ntry:\n fn=sys.argv[1]\nexcept:\n fn='log.dat'\nd=np.loadtxt(fn)\n##index, distance, energy, force\n\nt=np.argmin(d[:,2])\nprint(d[t,1])\n\n\nt=np.argmin(np.abs(d[:,3]))\nprint(d[t,1])\n\n#-0.122\n\ndx = d[1,1]-d[0,1]\n\nx1 = d[1:-1,1]\nf1 = -(d...
[ [ "matplotlib.pyplot.legend", "numpy.abs", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.argmin", "numpy.zeros_like", "matplotlib.pyplot.show", "numpy.loadtxt", "matplotlib.pyplot.figure" ], [ "torch.set_default_dtype", "torch.tensor", "torch.cuda.i...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rasmusbruckner/adaptivelearning_analysis
[ "48da672bffefe8811d2522f4ff1857ff6e02cf8e" ]
[ "al_figure_1.py" ]
[ "\"\"\" Figure 1\n\n 1. Load data and compute performance\n 2. Compute average learning rates\n 3. Run statistical tests\n 4. Prepare figure\n 5. Plot task trial schematic\n 6. Plot block example and model computations\n 7. Plot performance and average learning rates\n 8. Add subplot labels ...
[ [ "matplotlib.pyplot.Subplot", "matplotlib.gridspec.GridSpecFromSubplotSpec", "numpy.linspace", "numpy.unique", "pandas.DataFrame", "numpy.full", "matplotlib.pyplot.savefig", "matplotlib.gridspec.GridSpec", "pandas.read_pickle", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
cekees/proteus
[ "11d8749e04f0950f090d1a406243539a868be642" ]
[ "proteus/tests/post_processing/import_modules/bdm_tests_template.py" ]
[ "from builtins import range\nfrom builtins import object\nfrom proteus import iproteus as ip\nfrom proteus import default_p as p\nfrom proteus import default_n as n\nfrom proteus import default_s,default_so\nimport numpy\nimport proteus as pr\nfrom importlib import reload\nreload(p)\nreload(n)\n\np.nd = 2\np.name =...
[ [ "numpy.reshape", "numpy.dot", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rsbyrne/thesis
[ "44689b1d06c5b08fd44054313d7a6148b0e44a24" ]
[ "production/ms98repro.py" ]
[ "################################################################################\n\n\nimport sys\nimport os\nimport math\nimport itertools\n\nimport numpy as np\n\nimport planetengine\nimport everest\n\nfrom campaign import get_job, get_logger, ExhaustedError, EXHAUSTEDCODE\n\n\nCAMPAIGNNAME, LOGPATH, COUNTER, *SL...
[ [ "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AaronGrainer/tfx-pipeline
[ "3708836b947616ef4dd982265d61f380ac745bff" ]
[ "models/taxi/model_estimator.py" ]
[ "from absl import logging\r\nimport tensorflow as tf\r\nimport tensorflow_model_analysis as tfma\r\nimport tensorflow_transform as tft\r\nfrom tensorflow_transform.tf_metadata import schema_utils\r\n\r\nfrom tensorflow_metadata.proto.v0 import schema_pb2\r\nfrom . import features\r\nfrom tfx.utils import io_utils\r...
[ [ "tensorflow.estimator.export.build_parsing_serving_input_receiver_fn", "tensorflow.data.experimental.make_batched_features_dataset", "tensorflow.compat.v1.data.make_one_shot_iterator", "tensorflow.data.TFRecordDataset", "tensorflow.feature_column.categorical_column_with_identity", "tensorf...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bdevans/DPE
[ "91630e25d8fa930333ed6c9abbceeb924b76b1ad" ]
[ "scripts/plot_figures.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 17 18:04:57 2018\n\nGenerate manuscript figures.\n\n@author: ben\n\"\"\"\n\nimport os\nimport time\nimport warnings\nimport json\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport ...
[ [ "pandas.concat", "matplotlib.ticker.MultipleLocator", "numpy.linspace", "numpy.random.default_rng", "numpy.isclose", "matplotlib.pyplot.subplots", "pandas.DataFrame", "numpy.ones", "numpy.seterr", "numpy.std", "numpy.mean", "numpy.iinfo", "matplotlib.pyplot.Grid...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
ReubenJ/fltk-testbed
[ "8b18ba0638af1e1d905343e9a52fbf522fc8303f" ]
[ "fltk/launch.py" ]
[ "import logging\nimport os\nfrom argparse import Namespace\nfrom multiprocessing.pool import ThreadPool\n\nimport torch.distributed as dist\nfrom kubernetes import config\n\nfrom fltk.client import Client\nfrom fltk.extractor import download_datasets\nfrom fltk.orchestrator import Orchestrator\nfrom fltk.util.clust...
[ [ "torch.distributed.get_rank", "torch.distributed.get_world_size", "torch.distributed.is_available", "torch.distributed.init_process_group" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shamith09/corona-bay
[ "3bc6dd1a1b8de0893b202954a15331fd8a947d26" ]
[ "ml-lung-scan/trainer.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\r\nimport numpy as np\r\nimport pandas as pd\r\nimport tensorflow as tf\r\nimport tensorflowjs as tfjs\r\nimport os\r\nfrom PIL import Image\r\nroot = \"C:\\\\Users\\\\Rinki\\\\Documents\\\\Corona\\\\\"\r\n\r\npd.options.display.max...
[ [ "tensorflow.keras.layers.Dense", "numpy.set_printoptions", "tensorflow.keras.regularizers.l2", "tensorflow.keras.losses.BinaryCrossentropy", "pandas.DataFrame", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Flatten", "numpy.array", "tensorflow.keras.models.Sequen...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [ "2.2" ] } ]
orabhan/twip
[ "5c0411d2acfbe5b421841072814c9152591c03f7" ]
[ "docs/notebooks/02 Data -- Exploration.py" ]
[ "\n# coding: utf-8\n\n# In[1]:\n\nfrom __future__ import division, print_function, absolute_import\nfrom past.builtins import basestring\n\nimport matplotlib\nget_ipython().magic(u'matplotlib inline')\nfrom IPython.display import display, HTML \n\nimport os\nfrom decimal import Decimal\nfrom traceback import print_...
[ [ "pandas.set_option" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JohnYKiyo/coco_trial
[ "341435c063bd2150305c7691f394b3c5a108a468" ]
[ "solver/scipy_fmin.py" ]
[ "import numpy as np\nfrom numpy.random import rand\nfrom scipy.optimize import fmin\n#y_best = float('inf')\nx_best = np.zeros(0)\nx_list = []\n#y_list = []\n\ndef solve(objective, \n x0, \n lower_bounds,\n upper_bounds, \n dim, \n eval_constraints, \n max_evals...
[ [ "scipy.optimize.fmin", "numpy.zeros", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
lgh-cn/XLearning-kerberos
[ "749b8a9e90140f0825709b71ffba128e9e55b098" ]
[ "examples/tensorflow/demo.py" ]
[ "import argparse\nimport sys\nimport os\nimport json\nimport numpy as np\nimport tensorflow as tf\nimport time\n\nsys.path.append(os.getcwd())\nfrom dataDeal import oneHot\nfrom dataDeal import trainData\n\nFLAGS = None\n\ndef main(_):\n # cluster specification\n FLAGS.task_index = int(os.environ[\"TF_INDEX\"])\n...
[ [ "tensorflow.zeros", "tensorflow.GPUOptions", "tensorflow.summary.scalar", "tensorflow.ConfigProto", "tensorflow.name_scope", "tensorflow.train.Saver", "tensorflow.app.run", "tensorflow.matmul", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
Wanff/PathomiR
[ "04b5c187e6c36dd3a4388b90591eed3418fbed9c" ]
[ "prediction.py" ]
[ "from re import M\nfrom sklearn.ensemble import AdaBoostClassifier\nfrom sklearn.linear_model import LogisticRegression\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import confusion_matrix\nimport pandas as pd\nimport numpy as np\nfrom sklearn.metrics import roc_auc_score, precision...
[ [ "sklearn.metrics.roc_auc_score", "matplotlib.pyplot.legend", "numpy.asarray", "sklearn.metrics.confusion_matrix", "sklearn.model_selection.KFold", "matplotlib.pyplot.plot", "numpy.mean", "pandas.read_csv", "sklearn.model_selection.StratifiedKFold", "matplotlib.pyplot.ylim",...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
hackathonismb/Adding-protein-ligand-interactions-descriptors
[ "fb42cee7c97a87587f36f3fc70c30bfb3fe602cf" ]
[ "task_2/Protein_Ligand_Interactions-common-residues.py" ]
[ "#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n# In[59]:\n\n\nimport json\nimport pandas as pd\nimport sys, getopt\n\n\n# In[60]:\n\n\n\ndef run(file1, file2, output): \n print(file1)\n with open(file1, 'r') as j:\n lig1= json.load(j)\n with open(file2, 'r') as json2:\n lig2= json.load(js...
[ [ "pandas.concat", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
Alaya-in-Matrix/pymoo
[ "02d6e7085f5fe88dbd56b2a9f5173abe20c54caf" ]
[ "pymoo/model/problem.py" ]
[ "import multiprocessing\nimport warnings\nfrom abc import abstractmethod\nfrom multiprocessing.pool import ThreadPool\n\nimport autograd\nimport autograd.numpy as anp\nimport numpy as np\n\nfrom pymoo.problems.gradient import run_and_trace, calc_jacobian\nfrom pymoo.util.misc import at_least_2d_array\n\n\nclass Pro...
[ [ "numpy.abs", "numpy.min", "numpy.isnan", "numpy.eye", "numpy.ones", "numpy.concatenate", "numpy.atleast_2d", "numpy.max", "numpy.shape", "numpy.column_stack", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ngdangha/Deep3D
[ "cdd987de0f918f7875e80d2f253056b0245c8346" ]
[ "networks.py" ]
[ "import tensorflow as tf \r\nfrom tensorflow.contrib.slim.nets import resnet_v1\r\nslim = tf.contrib.slim\r\nfrom inception_resnet_v1 import inception_resnet_v1\r\n###############################################################################################\r\n#Define R-Net and Perceptual-Net for 3D face reconstr...
[ [ "tensorflow.clip_by_value", "tensorflow.concat", "tensorflow.contrib.slim.nets.resnet_v1.resnet_arg_scope", "tensorflow.contrib.slim.nets.resnet_v1.resnet_v1_50", "tensorflow.zeros_initializer", "tensorflow.reshape", "tensorflow.cast", "tensorflow.squeeze" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
alexjcohen/Capstone
[ "b69d812387247867b2650499f0117f411d0414c1" ]
[ "Code/train_fasterRCNN_distort.py" ]
[ "#%%\n# Load packages\nimport torch\nimport torchvision\nfrom torchvision import transforms\nfrom data_loaders import TrainImageLoader, AddBlur, AddNoise, TrainImageLoaderResize, Rescale\nfrom torch.utils.data import DataLoader, Subset\nfrom tqdm import tqdm\nimport warnings\nimport numpy as np\nimport os\nimport a...
[ [ "torch.LongTensor", "numpy.random.seed", "torch.manual_seed", "torch.utils.data.DataLoader", "numpy.nanmean", "torch.cuda.is_available", "torch.optim.SGD", "torch.utils.data.Subset", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oist/ecsu-pyevolver
[ "5dec9eae82e2a74a4f7a9159393a2f7a03107c89" ]
[ "pyevolver/phaseplot/phaseplot_test.py" ]
[ "# phaseplots.py - examples of phase portraits\n# RMM, 24 July 2011\n#\n# This file contains examples of phase portraits pulled from \"Feedback\n# Systems\" by Astrom and Murray (Princeton University Press, 2008).\n\nimport os\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom control.phaseplot import pha...
[ [ "matplotlib.pyplot.title", "numpy.linspace", "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.clf", "matplotlib.pyplot.close", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.figure"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
violetweir/PaddleDetection
[ "d7383ad99c69e03f984ead52cc645d17f4729837", "d7383ad99c69e03f984ead52cc645d17f4729837" ]
[ "ppdet/data/transform/batch_operators.py", "ppdet/modeling/necks/centernet_fpn.py" ]
[ "# Copyright (c) 2020 PaddlePaddle 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 re...
[ [ "numpy.split", "numpy.expand_dims", "numpy.minimum", "numpy.sqrt", "numpy.asarray", "numpy.concatenate", "numpy.max", "scipy.ndimage.measurements.center_of_mass", "numpy.clip", "numpy.reshape", "numpy.arange", "numpy.stack", "numpy.ceil", "numpy.zeros", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "0.15", "1.4", "0.16", "1.0", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "0.10", "0.17", "1.3" ], "tensorflow": [...
getumen/oml
[ "f4ec7fd3f04ff528353c0475c9330fe1ed3b63f9" ]
[ "examples/cnn.py" ]
[ "from __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\nfrom __future__ import generators\nfrom __future__ import division\n\nimport numpy as np\n\nfrom sklearn.preprocessing import maxabs_scale\nfrom oml.models.nn import NN\nfrom oml.models.regulariz...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "numpy.random.shuffle", "matplotlib.pyplot.subplot", "sklearn.datasets.fetch_mldata", "sklearn.preprocessing.maxabs_scale" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
riccardocadei/GraphML-Contest-2019-Oracle-PoliMI
[ "d7d4ce1d91298e7e7f71138bc82836687c80c5b4" ]
[ "gat/training.py" ]
[ "import torch\nfrom sklearn import metrics\nimport utils\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n\n'''\nWE TRAIN OUR MODEL IN BATCHES AND USING CUDA.\n\n'''\n\ndef train(model, train_loader):\n model.to(device)\n loss_op = torch.nn.BCEWithLogitsLoss()\n optimizer = torch.o...
[ [ "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.cuda.is_available", "sklearn.metrics.f1_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dominik-schwabe/emnlp19-moverscore
[ "44324d9d31d04aa5003fd85949da5c3e6bb9130f" ]
[ "moverscore/_moverscore.py" ]
[ "import inspect\nimport logging\nimport os\nimport string\nfrom pathlib import Path\n\nfrom collections import defaultdict\nimport numpy as np\nimport torch\nfrom pyemd import emd\nfrom torch import nn\n\nfrom pytorch_pretrained_bert import BertModel, BertTokenizer\nfrom pytorch_pretrained_bert.modeling import Bert...
[ [ "torch.nn.Dropout", "numpy.log", "torch.norm", "torch.max", "torch.cat", "torch.min", "torch.zeros_like", "torch.nn.Linear", "torch.no_grad", "torch.stack", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mesmacosta/datacatalog-fileset-enricher
[ "0792632fc181b13696f89ef3335da4e2ce1dca4a" ]
[ "tests/datacatalog_fileset_enricher/gcs_storage_filter_test.py" ]
[ "import pandas as pd\n\nfrom unittest import TestCase\nfrom unittest.mock import patch\n\nfrom datacatalog_fileset_enricher.gcs_storage_filter import StorageFilter\n\n\n@patch('datacatalog_fileset_enricher.gcs_storage_client_helper.StorageClientHelper.__init__',\n lambda self, *args: None)\nclass StorageFilte...
[ [ "pandas.Timestamp.utcnow" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SebGue/SciDataTool
[ "88c9e3e3fe9a974798932009734501ce88a9c5ef" ]
[ "SciDataTool/Methods/DataND/get_harmonics.py" ]
[ "# -*- coding: utf-8 -*-\nfrom numpy import (\n argsort,\n negative,\n meshgrid,\n)\n\n\ndef get_harmonics(self, N_harm, *args, unit=\"SI\", is_norm=False, is_flat=False):\n \"\"\"Returns the complex Fourier Transform of the field, using conversions and symmetries if needed.\n Parameters\n -------...
[ [ "numpy.negative", "numpy.meshgrid" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sjtumultiagent/on-policy-main
[ "5b9750569059576c555534490272dd1e7d45e5bb" ]
[ "onpolicy/envs/env_wrappers.py" ]
[ "\"\"\"\nModified from OpenAI Baselines code to work with multi-agent envs\n\"\"\"\nimport numpy as np\nimport torch\nfrom multiprocessing import Process, Pipe\nfrom abc import ABC, abstractmethod\nfrom onpolicy.utils.util import tile_images\n\nclass CloudpickleWrapper(object):\n \"\"\"\n Uses cloudpickle to ...
[ [ "numpy.all", "numpy.array", "numpy.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maxxie114/Basic_ML_Research
[ "2507ea4bb0055a56a787fb4b7eb0349c85c6a890" ]
[ "classification/logistic_regression/scratch_implementation/logistic_regression.py" ]
[ "# This is an implementation from scratch of the logistic regression\n\n# Algorithm of logistic regression\n# The main goal of logistic regression is to find the best coefficients, and intercept\n# to make the prediction accurate\nimport numpy as np\nfrom exam import hours_studied, passed_exam\n\n# For some reason ...
[ [ "numpy.dot", "numpy.log", "numpy.array", "numpy.exp", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wlawler45/kinetics
[ "a607096f051c7721a7f2eac73a875366eaefef15" ]
[ "kinetics/ua_and_sa/sampling.py" ]
[ "from SALib.sample import latin, saltelli\nimport numpy as np\n\ndef parse_samples(samples, parameter_names, species_names):\n \"\"\"\n Takes a list of samples generated by salib and converts this to a list of tuples of dictionaries which can update the Model class.\n\n Samples are created using the releve...
[ [ "numpy.log", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MiCigo/pandas_tutorial
[ "5526a075acf8e08c1e89dc0385a731ac9145299b" ]
[ "practice/practice-4.py" ]
[ "'''\n@Description: code\n@Author: MiCi\n@Date: 2020-03-14 14:30:18\n@LastEditTime: 2020-03-14 15:23:28\n@LastEditors: MiCi\n'''\n\nimport pandas as pd\nimport numpy as np\n\n\nclass Practice4(object):\n\n def __init__(self):\n return\n\n def exercise(self):\n path = './data/US_Crime_Rates_1960_...
[ [ "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
jennyzhang0215/dgl
[ "8049411c31425c5cbb93f492dedd5ebb4f9468d5" ]
[ "examples/mxnet/gcmc/datasets.py" ]
[ "import os\nimport io\nimport numpy as np\nfrom mxnet.gluon.utils import check_sha1\nfrom graph import HeterGraph, CSRMat\nfrom zipfile import ZipFile\nimport warnings\nimport gluonnlp as nlp\nimport logging\nimport pandas as pd\nimport re\nfrom mxgraph.utils import logging_config\nimport scipy.sparse as sp\n\ntry:...
[ [ "pandas.concat", "pandas.read_csv", "numpy.unique", "numpy.arange", "numpy.ceil", "numpy.random.permutation", "numpy.array", "numpy.random.RandomState", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
comeeasy/VOneNet_FGSM_MNIST
[ "39ebe4d7a3ec9eb42a57655d3b01967a0a86d919" ]
[ "train.py" ]
[ "import torch\nimport torch.optim as optim\nimport torch.nn as nn\nimport torch.utils.tensorboard as tensorboard\nfrom torchvision import datasets\n\nimport vonenet.vonenet as vonenet\nimport vonenet.back_ends as back_ends\n\nimport data\nfrom tqdm import tqdm\nimport sys\nimport logging\nimport argparse\nimport ti...
[ [ "torch.nn.CrossEntropyLoss", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rachmadaniHaryono/MoeFlow
[ "ffc13bd756fd2fa329597a5740d696402040b1a5" ]
[ "src/moeflow/classify.py" ]
[ "# -*- coding: utf-8 -*-\nimport logging\nimport tensorflow as tf\n\n\ndef read_tensor_from_image_file(file_name, input_height=299, input_width=299,\n input_mean=0, input_std=255):\n input_name = \"file_reader\"\n # output_name = \"normalized\"\n file_reader = tf.read_file(f...
[ [ "tensorflow.image.resize_bilinear", "tensorflow.read_file", "tensorflow.cast", "tensorflow.expand_dims", "tensorflow.subtract", "tensorflow.Session", "tensorflow.image.decode_jpeg" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
tuanvu216/machine-learning-ipython-notebooks
[ "efc45b02420e5b6853b7f82ff37481ee971abde7" ]
[ "books/python-machine-learning-book/code/ch01/perceptron_2.py" ]
[ "import numpy as np\n\nclass Perceptron(object):\n \"\"\"Perceptron classifier.\n\n Parameters\n ------------\n eta : float\n Learning rate (between 0.0 and 1.0)\n n_iter : int\n Passes over the training dataset.\n shuffle : bool (default: True)\n Shuffles training data every ...
[ [ "numpy.dot", "numpy.zeros", "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pexure/DivideMix
[ "eda3704e66bf2b057c919b2f5841fffabf6e621a" ]
[ "Train_cifar_init_same.py" ]
[ "from __future__ import print_function\nimport sys\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torch.backends.cudnn as cudnn\nimport random\nimport os\nimport argparse\nimport numpy as np\nfrom PreResNet import *\nfrom sklearn.mixture import GaussianMix...
[ [ "torch.mean", "torch.max", "torch.zeros", "torch.load", "torch.cat", "torch.no_grad", "torch.cuda.manual_seed_all", "torch.save", "torch.nn.CrossEntropyLoss", "torch.softmax", "numpy.random.beta", "torch.ones", "numpy.clip", "torch.log", "torch.stack", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
codyly/PatchmatchNet
[ "18fbea563c083e7904c28da16330845b81f1dba5" ]
[ "datasets/tanks.py" ]
[ "from torch.utils.data import Dataset\nfrom datasets.data_io import *\nimport os\nimport numpy as np\nimport cv2\nfrom collections import defaultdict\nfrom PIL import Image\nimport torch\nfrom torchvision import transforms as T\nimport math\n\nclass MVSDataset(Dataset):\n def __init__(self, datapath, split='inte...
[ [ "numpy.array", "numpy.matmul", "numpy.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
reddigari/pybaseball
[ "2d878cf3505ce0a5e657694ae967d6275dc3c211", "2d878cf3505ce0a5e657694ae967d6275dc3c211" ]
[ "tests/pybaseball/test_team_pitching.py", "pybaseball/datasources/html_table_processor.py" ]
[ "from typing import Callable\n\nimport pandas as pd\nimport pytest\nimport requests\n\nfrom pybaseball.team_pitching import team_pitching\n\n\n@pytest.fixture()\ndef sample_html(get_data_file_contents: Callable) -> str:\n return get_data_file_contents('team_pitching.html')\n\n\n@pytest.fixture()\ndef sample_proc...
[ [ "pandas.testing.assert_frame_equal" ], [ "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "p...
MehnaazAsad/ECO_Globular_Clusters
[ "7250c6165c0fbd46cabbd798e44a220cfb337adc", "7250c6165c0fbd46cabbd798e44a220cfb337adc" ]
[ "src/data/main/coadd_add.py", "src/data/main/BUNIT_check.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Aug 29 21:05:26 2017\n\n@author: asadm2\n\"\"\"\n\n### DESCRIPTION\n#This script excludes all coadds that were found to be 100% blank from the\n#text file that swarp.py's percent_blank function outputs before adding\n#the coadds to make a comb...
[ [ "pandas.read_csv", "pandas.to_numeric" ], [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1...
uva-hydroinformatics-lab/hr_db_scripts
[ "eafb13378ca5fb17439003fd4f055ba2b362a8da" ]
[ "insert_wu_data.py" ]
[ "import pandas as pd\nfrom main_db_script import append_non_duplicates\n\n\n# add wind direction data to database\nrawdf = pd.read_csv('../wu/norf_data.csv')\nrawdf.columns = rawdf.columns.str.strip()\nsiteid = 19\nvarid = 6\nqcid = 0\ndf = pd.DataFrame()\ndf['Datetime'] = rawdf['EST']\ndf['SiteID'] = siteid\ndf['V...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ArkadiyD/MacroNASBenchmark
[ "e24b3a5d91765218351cd733c67f142030700d2a" ]
[ "src/models.py" ]
[ "import torch.nn as nn\nimport numpy as np\nfrom cells import InvertedResidual, ConvBNReLU\n\nclass Identity(nn.Module):\n '''\n Identity cell\n '''\n def __init__(self, *args, **kwargs):\n super().__init__()\n def forward(self, x):\n return x\n\nclass MultipleChoiceBlock(nn.Module):\n ...
[ [ "torch.nn.Sequential", "torch.nn.ModuleList", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
1Zero64/IndAna
[ "cc2042e21fa70659b3f044a78f3df291ae0f9343" ]
[ "MachineLearning/SARIMAX/5 - SARIMA.py" ]
[ "# https://towardsdatascience.com/time-series-forecasting-with-sarima-in-python-cda5b793977b\n\nfrom statsmodels.graphics.tsaplots import plot_pacf\nfrom statsmodels.graphics.tsaplots import plot_acf\nfrom statsmodels.tsa.statespace.sarimax import SARIMAX\nfrom statsmodels.tsa.holtwinters import ExponentialSmoothin...
[ [ "pandas.Timestamp", "pandas.read_json" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
kornholi/arrow
[ "d6caca311356d557507b8d03526655f8184fa16c" ]
[ "python/pyarrow/tests/test_types.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.int64", "numpy.bool_", "numpy.float64" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cesko-digital/audiozpravy
[ "62a53934ac9ae58816cab82a532e7d1456ee4899" ]
[ "backend/classes/recommender.py" ]
[ "import pytz\nfrom datetime import datetime\nfrom typing import Dict, List\nimport pandas as pd\nimport numpy as np\nfrom classes.metrics import calculate_frecency, calculate_age_in_secs\nfrom classes.trend_watcher import TrendWatcher\nfrom classes import MetricEnum\nARTICLE_PROPS = [\"title\", \"link\", \"summary\...
[ [ "numpy.zeros", "numpy.isin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
luckywilliam111/hsipl_algo
[ "c70433731c2acc5b14f3d91e768348716e873518" ]
[ "build/lib/hsipl_algo/MNF.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun May 16 20:45:45 2021\n\n@author: WEN\n\"\"\"\n\nimport numpy as np\nimport collections\n\nclass LinearTransform:\n def __init__(self, A, **kwargs):\n\n self._pre = kwargs.get('pre', None)\n self._post = kwargs.get('post', None)\n A = np.array(...
[ [ "numpy.dot", "numpy.sqrt", "numpy.cumsum", "numpy.zeros_like", "numpy.linalg.eig", "numpy.diff", "numpy.zeros", "numpy.log", "numpy.min", "numpy.linalg.inv", "numpy.cov", "numpy.linalg.eigh", "numpy.equal", "numpy.argsort", "numpy.not_equal", "numpy....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wiso/uproot4
[ "b1cf6e6b48e75dcd2e1f0c30668fb8583fe0382d" ]
[ "uproot/model.py" ]
[ "# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE\n\n\"\"\"\nThis module defines utilities for modeling C++ objects as Python objects and the\n:doc:`uproot.model.Model` class, which is the superclass of all objects that\nare read from ROOT files.\n\nThe :doc:`uproot.model.Versione...
[ [ "numpy.dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
paulswartz/gtfstk
[ "24d3be3226eedc65abb8fecf4232ef236bb8d431" ]
[ "tests/test_stop_times.py" ]
[ "import pandas as pd\nimport numpy as np\n\nfrom .context import (\n gtfstk,\n slow,\n HAS_GEOPANDAS,\n DATA_DIR,\n sample,\n cairns,\n cairns_dates,\n cairns_trip_stats,\n)\nfrom gtfstk import *\n\n\ndef test_get_stop_times():\n feed = cairns.copy()\n date = cairns_dates[0]\n f = g...
[ [ "pandas.isnull" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
Henry-E/neural-complexity
[ "f0c5770d039605aee521042e1504888fa35f3c80" ]
[ "model.py" ]
[ "import torch.nn as nn\nimport torch\n\nclass RNNModel(nn.Module):\n \"\"\"Container module with an encoder, a recurrent module, and a decoder.\"\"\"\n\n def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False):\n super(RNNModel, self).__init__()\n self.drop = nn...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.RNN", "torch.nn.Embedding" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ChensonVan/Code-Playground
[ "1d3deffd896370532482998a09392c7f96747c19" ]
[ "tensor_fm/tensor_fm.py" ]
[ "import tensorflow as tf\nfrom sklearn.base import BaseEstimator, RegressorMixin, ClassifierMixin\nfrom sklearn.preprocessing import LabelBinarizer\nfrom tensorflow.keras.losses import MSE, binary_crossentropy\n\nfrom sklearn import utils\nfrom sklearn.utils.validation import (check_is_fitted, FLOAT_DTYPES, column_...
[ [ "sklearn.utils.validation.check_is_fitted", "sklearn.utils.check_X_y", "tensorflow.transpose", "tensorflow.zeros", "tensorflow.pow", "tensorflow.reduce_sum", "sklearn.utils.validation.column_or_1d", "tensorflow.cast", "sklearn.utils.check_array", "tensorflow.abs", "tens...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "2.9", "2.5", "2.8", "2.10" ] } ]
hdolfen/AeroSandbox
[ "4c48690e31f5f2006937352a63d653fe268c42c3", "4c48690e31f5f2006937352a63d653fe268c42c3" ]
[ "aerosandbox/structures/beams.py", "aerosandbox/optimization/opti.py" ]
[ "import casadi as cas\nimport numpy as np\nfrom aerosandbox.geometry import *\n\nclass TubeBeam1(AeroSandboxObject):\n\n def __init__(self,\n opti, # type: cas.Opti\n length,\n points_per_point_load=100,\n E=228e9, # Pa\n isotropic...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "numpy.arctan", "matplotlib.pyplot.subplots", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yisitu/tensorflow
[ "03a4c807f8124e7ec9be56e28172f8930fae69db" ]
[ "tensorflow/python/keras/engine/training_utils_v1.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...
[ [ "numpy.expand_dims", "numpy.asarray", "tensorflow.python.keras.utils.generic_utils.to_list", "tensorflow.python.keras.backend.placeholder", "tensorflow.python.keras.metrics.MeanMetricWrapper", "tensorflow.python.keras.backend.reshape", "tensorflow.python.data.ops.dataset_ops.make_one_s...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
EVA4-RS-Group/Phase2
[ "7c551e3894979cc425dd51baeddbfa5a51b7878d" ]
[ "S9_NeuralEmbedding/NeuralEmbedding-Deployment/handler.py" ]
[ "\"\"\"Doc string placeholder\n\"\"\"\ntry:\n import unzip_requirements\nexcept ImportError:\n pass\n\nimport boto3\nimport os\nimport io\nimport json\nimport base64\nimport copy\nimport numpy as np\nimport pickle\nimport torch\nimport torchtext\nfrom torchtext import data\n\n#from requests_toolbelt.multipart...
[ [ "torch.LongTensor", "torch.jit.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vdods/vorpy
[ "68b6525ae43d99f451cf85ce254ffb0311521320" ]
[ "tests/symplectic_integration/test_nonseparable_hamiltonian.py" ]
[ "import itertools\nimport numpy as np\nimport os\nfrom .hamiltons_equations import deviation_form\nfrom .kepler_nd import KeplerNd\nfrom .pendulum_nd import PendulumNd\nfrom .results import Results\nimport scipy.integrate\nimport sys\nimport vorpy.symplectic_integration\n\nTEST_ARTIFACTS_DIR = 'test_artifacts/sympl...
[ [ "numpy.square", "numpy.allclose", "numpy.abs", "numpy.arange", "numpy.full", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SebastianMacaluso/ClusterTrellis
[ "138632a4ca9948453edf1bde772a7ad3f50f39f9" ]
[ "src/ClusterTrellis/trellis_node_complex.py" ]
[ "\nimport numpy as np\nimport logging\nfrom scipy.special import logsumexp, softmax\n\nfrom .utils import get_logger\nlogger = get_logger(level=logging.WARNING)\n\n\nclass TrellisNode:\n \"\"\"Class to define the nodes of the trellis and the node splitting likelihood \"\"\"\n\n def __init__(self,\n ...
[ [ "numpy.asarray", "numpy.real", "numpy.absolute", "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PolarizedLightFieldMicroscopy/napari-LF
[ "b8b16e21424a1fc3a3fdd7f79099aa252480d75a", "b8b16e21424a1fc3a3fdd7f79099aa252480d75a" ]
[ "src/napari_lf/lfa/lfcalibrate.py", "src/napari_lf/lfa/lflib/solvers/mrnsd.py" ]
[ "# calibrate.py\n#\n# Usage: calibrate.py <calibration_dir>\n#\n# This script re-runs the calibration from a set of calibration images\n# captured by the uScope GUI. This script is mostly useful for\n# debugging the calibration routines offline (i.e. away from the\n# microscope), but can be used to update old cali...
[ [ "numpy.ones" ], [ "numpy.dot", "numpy.spacing", "numpy.sqrt", "numpy.nonzero", "numpy.min", "numpy.linalg.norm", "numpy.ones", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Blackbird002/Learning-TensorFlow
[ "cfa7509ad295ee69ad307ebec5c8a4487dfaae5a" ]
[ "CatsAndDogs/UsingModel/testModel.py" ]
[ "import cv2\nimport tensorflow as tf\nimport tkinter as tk\nfrom tkinter import filedialog\nfrom tkinter import messagebox\n \ncategories = [\"Dog\", \"Cat\"]\nimgSize = 128\n\nroot = tk.Tk()\nroot.withdraw()\n\ndef showIns():\n messagebox.showinfo(\"Cat and Dog recognizer\", \"Please select an image of a cat...
[ [ "tensorflow.keras.models.load_model" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
CQCL/qiskit-terra
[ "259c10580d22122e739ed466d306dcd5adb2027f" ]
[ "qiskit/tools/visualization/interactive/_iplot_histogram.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"\nHistogram visualization\n\"\"\"\nfrom string import Template\nfrom collections import Counter\nimport sys...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
adithyaur99/haystack
[ "6db9e7eed48520d7e8aeb061a3cc1d1a4b542ab0" ]
[ "haystack/eval.py" ]
[ "from typing import List, Tuple, Dict, Any, Optional\nimport logging\nfrom transformers import AutoConfig\nfrom sentence_transformers import SentenceTransformer, CrossEncoder\nfrom sklearn.metrics.pairwise import cosine_similarity\nimport numpy as np\n\nfrom haystack import MultiLabel, Label, BaseComponent, Documen...
[ [ "numpy.max", "sklearn.metrics.pairwise.cosine_similarity" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ABorrel/molecular-descriptors
[ "cdc08c7242e929ecf4dcb362331c7226127c3589" ]
[ "Desc1D2D/moreaubroto.py" ]
[ "from rdkit import Chem\nfrom .AtomProperty import GetRelativeAtomicProperty\n\nimport numpy\n\n\ndef getMBautocorelation(mol, lag=1, propertylabel='m'):\n \"\"\"\n #################################################################\n Calculation of Moreau-Broto autocorrelation descriptors based on \n dif...
[ [ "numpy.log" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
stanfordmlgroup/chexaid
[ "d815afbdfdea63cd3aa9151f1f8a1093b7c02412" ]
[ "dummy/create_dummy_imgs.py" ]
[ "import numpy as np\nfrom PIL import Image\n\nif __name__ == '__main__':\n for i in range(128):\n imarray = np.random.rand(320, 320) * 255\n im = Image.fromarray(imarray.astype('uint8')).convert('L')\n im.save('dummy' + str(i) + '.jpeg')\n \n" ]
[ [ "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
giaccone/exposure
[ "968545c98eeb00c5d65b11026d29779f7b459009" ]
[ "demo/demo_icnirp_limit.py" ]
[ "# load modules\nimport matplotlib.pylab as plt\nfrom exposure.icnirp import icnirp_limit\nimport numpy as np\nplt.ion()\n\n# set frequency range\nfreq = np.logspace(0,7,1001)\nB98o = icnirp_limit(freq, '1998', 'occupational', 'B')\nB98p = icnirp_limit(freq, '1998', 'public', 'B')\nB10o = icnirp_limit(freq, '2010',...
[ [ "matplotlib.pylab.tight_layout", "matplotlib.pylab.yticks", "matplotlib.pylab.grid", "numpy.logspace", "matplotlib.pylab.xticks", "matplotlib.pylab.figure", "matplotlib.pylab.ylabel", "matplotlib.pylab.legend", "matplotlib.pylab.loglog", "matplotlib.pylab.xlabel", "matp...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ltiao/HpBandSter
[ "e521a02453b9f584156110cb73fbc7469a3d4de7" ]
[ "hpbandster/optimizers/config_generators/bohb.py" ]
[ "import logging\nfrom copy import deepcopy\nimport traceback\n\n\nimport ConfigSpace\nimport ConfigSpace.hyperparameters\nimport ConfigSpace.util\nimport numpy as np\nimport scipy.stats as sps\nimport scipy.optimize as spo\nimport statsmodels.api as sm\n\nfrom hpbandster.core.base_config_generator import base_confi...
[ [ "numpy.isfinite", "numpy.clip", "numpy.random.choice", "numpy.empty_like", "numpy.min", "numpy.isnan", "numpy.rint", "numpy.copy", "numpy.any", "numpy.random.rand", "numpy.argsort", "numpy.array", "scipy.stats.truncnorm.rvs", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scortexio/gil_load
[ "8d59862b2fb5e2fcacadbbdd5d28e7fdadc91992" ]
[ "example.py" ]
[ "import numpy as np\nimport threading\nimport gil_load\n\nN_THREADS = 4\nNPTS = 4096\n\ngil_load.init()\n\ndef do_some_work():\n for i in range(2):\n x = np.random.randn(NPTS, NPTS)\n x[:] = np.fft.fft2(x).real\n\ngil_load.start()\n\nthreads = []\nfor i in range(N_THREADS):\n thread = threading....
[ [ "numpy.fft.fft2", "numpy.random.randn" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
linbo0518/CSE-6363-Machine-Learning
[ "29eef2629748af8af6116ea7f9c5c51e7190cdaf" ]
[ "Quizzes/Computer Quiz 2/Question 4/knn.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom utils import distance\n\n\nclass KNN:\n def __init__(self, k_neighbors=5):\n self._k_neighbors = k_neighbors\n self._input_db = None\n self._target_db = None\n\n def fit(self, inputs, targets):\n assert len(inputs) == len(targets)\n ...
[ [ "numpy.argsort", "numpy.array", "numpy.bincount", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KITMILTU/Adversarial_time-to-event
[ "bbe5766f2e4bfeb5d43932a2cbc189ee5b8656b7" ]
[ "utils/metrics.py" ]
[ "import matplotlib as mpl\n\nmpl.use('Agg')\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n\nseed = 31415\nnp.random.seed(seed)\n\nfontsize = 18\nSMALL_SIZE = 8\nMEDIUM_SIZE = 10\nBIGGER_SIZE = 12\n\nplt.rc('font', size=MEDIUM_SIZE) # controls default text sizes\nplt.rc('axes', titles...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.boxplot", "matplotlib.pyplot.axvline", "numpy.random.seed", "matplotlib.pyplot.title", "matplotlib.use", "matplotlib.pyplot.rc", "matplotlib.pyplot.yscale", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.mean"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
daekeun-ml/sm-huggingface-kornlp
[ "b2c086a1ad512c05ed4195e9a9cde3e7a595bd39" ]
[ "lab_2_serving/src/inference_nsmc.py" ]
[ "import json\nimport sys\nimport logging\nimport torch\nfrom torch import nn\nfrom transformers import ElectraConfig\nfrom transformers import ElectraModel, AutoTokenizer, ElectraTokenizer, ElectraForSequenceClassification\n\nlogging.basicConfig(\n level=logging.INFO, \n format='[{%(filename)s:%(lineno)d} %(l...
[ [ "torch.nn.Softmax", "torch.max", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shreshthtuli/AlphaGoZero
[ "63b24d4cdf69b2dc8377e0ac4abbeceb1678e992" ]
[ "alphago_zero_sim-master/utils_5/mcts.py" ]
[ "import numpy as np\nimport random\nfrom .constants import *\nfrom copy import deepcopy\nfrom sys import maxsize\nfrom scipy.special import softmax\nimport time\nimport warnings\nfrom math import sqrt\nwarnings.simplefilter(\"ignore\")\n\nall_moves = np.arange(BOARD_SIZE ** 2 + 1)\n\ndh_group = [(None, None), ((np....
[ [ "numpy.random.choice", "numpy.arange", "numpy.full", "numpy.max", "numpy.copy", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zerohd4869/HIN-SR
[ "f677f9d11b5f91c3f390b1896d4e6f5fefc69069" ]
[ "generate_reward_review.py" ]
[ "from __future__ import absolute_import\n\nimport argparse\nimport gc\nimport logging\nimport os\nimport random\nfrom io import open\nfrom itertools import cycle\n\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom sklearn.metrics import f1_score, recall_score, precision_score\nfrom torch.utils.data impor...
[ [ "torch.utils.data.DataLoader", "numpy.concatenate", "torch.no_grad", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "sklearn.metrics.f1_score", "pandas.read_csv", "torch.distributed.init_process_group", "torch.utils.data.distributed.DistributedSamp...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
geosensing/allocator
[ "9abf59260991fb74a7e9e295f66f97cc89579637" ]
[ "allocator/distance_matrix.py" ]
[ "\"\"\"\nDistance Matrix\n\"\"\"\n\nimport os\nimport math\nimport time\n\nimport numpy as np\nimport requests\nimport googlemaps\nimport utm\n\nfrom haversine import haversine\n\n\nMAX_DISTANCE_MATRIX_SIZE = 100\n\n\ndef pairwise_distances(X, Y=None):\n \"\"\"Pairwise euclidean distance calculation\n \"\"\"\...
[ [ "numpy.concatenate", "numpy.array", "numpy.array_split", "numpy.apply_along_axis" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isacasini/SNV_Xia_et_al_2020
[ "d729b68e37babf9d30941683af6723aad65319f7" ]
[ "Program_Final/main.py" ]
[ "# This is the main file that call all other files in the Base Editing program.\n\nfrom read_txt import *\nfrom complement import *\nfrom position_PAM import *\nfrom all_editable import *\n# from collections import Counter\nfrom check_CDS import *\nfrom AA_dict import *\n# import numpy as np\nfrom heatmap import *\...
[ [ "pandas.concat", "pandas.DataFrame", "pandas.ExcelWriter", "pandas.set_option", "pandas.DataFrame.from_dict" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
rhiswell/freeflow-rdma-bench
[ "12327715f814ca52d5ea185a0a38d1ed23d1afe3", "12327715f814ca52d5ea185a0a38d1ed23d1afe3" ]
[ "benchmarks/lf.py", "benchmarks/output/lat_cdf.py" ]
[ "#!/usr/local/env python3\n\nimport matplotlib.pyplot as plt\n\n#FILES = ('host_ib_send_lat_U.log', 'ff_ib_send_lat_U.log')\n#FILES = ('host_ib_send_lat_U.log', )\n#FILES = ('ff_ib_send_lat_U.log', )\nFILES = ('ff_lowCPU_ib_send_lat_U1.log', )\n#LABELS = ('HOST', 'FF')\n#LABELS = ('FF', )\nLABELS = ('FF_lowCPU', )\...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.xlabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]