repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Yu-Nie/Yolo-v2-pytorch
[ "da18482b0d53ef4a99c88bde599927408c819127" ]
[ "train_coco.py" ]
[ "\"\"\"\n@author: Viet Nguyen <nhviet1009@gmail.com>\n\"\"\"\nimport os\nimport argparse\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nfrom src.coco_dataset import COCODataset\nfrom src.utils import *\nfrom src.loss import YoloLoss\nfrom src.yolo_net import Yolo\nfrom tensorboardX import SummaryW...
[ [ "torch.utils.data.DataLoader" ] ]
yuanqidu/IDGL
[ "64d2d73289ca0f6dcab966062d4cb15844236b37", "64d2d73289ca0f6dcab966062d4cb15844236b37" ]
[ "src/core/model.py", "src/core/layers/scalable_graphlearn.py" ]
[ "import os\nimport random\nimport numpy as np\nfrom collections import Counter\nfrom sklearn.metrics import r2_score\n\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\nimport torch.nn.functional as F\n\nfrom .models.graph_clf import GraphCl...
[ [ "torch.optim.Adam", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.Tensor", "torch.load", "torch.sum", "torch.from_numpy", "torch.nn.utils.clip_grad_norm_", "torch.set_grad_enabled", "torch.optim.SGD", "torch.optim.Adamax" ], [ "torch.nn.functional.normalize",...
mylovage/czsc
[ "21c68c8451e951fd8f3c242c4c4f52dac5cb6283" ]
[ "test/test_ta.py" ]
[ "# coding: utf-8\nimport os\nimport pandas as pd\nimport numpy as np\nimport czsc\n\ncur_path = os.path.split(os.path.realpath(__file__))[0]\nfile_kline = os.path.join(cur_path, \"data/000001.SH_D.csv\")\nkline = pd.read_csv(file_kline, encoding=\"utf-8\")\nkline.loc[:, \"dt\"] = pd.to_datetime(kline.dt)\nbars = kl...
[ [ "numpy.array", "pandas.read_csv", "pandas.to_datetime" ] ]
netanelbarel/improvedCvat
[ "ff2894d3b3757a5e080d3130d6875cfd14201bf5" ]
[ "cvat/apps/engine/task.py" ]
[ "# Copyright (C) 2018 Intel Corporation\r\n#\r\n# SPDX-License-Identifier: MIT\r\n\r\nimport os\r\nimport sys\r\nimport rq\r\nimport shlex\r\nimport shutil\r\nimport tempfile\r\nimport requests\r\nimport re\r\nimport xml.etree.ElementTree as ET\r\nfrom threading import Thread\r\nfrom io import BytesIO\r\nfrom PIL i...
[ [ "numpy.nditer" ] ]
gagan3012/metrics
[ "5a2388ccaa97cc3608b1fa28879f77436434a6d6", "5a2388ccaa97cc3608b1fa28879f77436434a6d6" ]
[ "tests/wrappers/test_bootstrapping.py", "integrations/test_lightning.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.randint", "numpy.allclose", "torch.cat", "torch.randn", "numpy.quantile", "torch.tensor", "numpy.std", "numpy.mean" ], [ "torch.optim.lr_scheduler.StepLR", "torch.nn.Linear", "torch.tensor" ] ]
idk3/Cirq
[ "1f82a72bda689895753e9a32c8b991fd5057854b" ]
[ "cirq/contrib/acquaintance/gates_test.py" ]
[ "# Copyright 2018 The Cirq Developers\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 applicable law o...
[ [ "numpy.random.poisson" ] ]
mwsssxu/tutorials
[ "e2742ea7171e3829ea628bac483e8787be60bbd3" ]
[ "sklearnTUT/sk10_cross_validation3.py" ]
[ "# View more python learning tutorial on my Youtube and Youku channel!!!\n\n# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg\n# Youku video tutorial: http://i.youku.com/pythontutorial\n\n\"\"\"\nPlease note, this code is only for python 3+. If you are using python 2+, please modify...
[ [ "matplotlib.pyplot.legend", "numpy.logspace", "matplotlib.pyplot.plot", "numpy.mean", "sklearn.datasets.load_digits", "sklearn.svm.SVC", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
rykiprince/Mission-to-Mars
[ "ef800c7d5b1c5a4b4dcd51e371bf0be0e2513ed4" ]
[ "Mission_to_Mars_Challenge.py" ]
[ "# Import Splinter and BeautifulSoup\nfrom splinter import Browser\nfrom bs4 import BeautifulSoup as soup\nfrom webdriver_manager.chrome import ChromeDriverManager\n\nimport pandas as pd\n\n\nexecutable_path = {'executable_path': ChromeDriverManager().install()}\nbrowser = Browser('chrome',**executable_path, headle...
[ [ "pandas.read_html" ] ]
S-Eggers/GraphMask
[ "9e431a541279801ec46a5b38ed57b2033f795240" ]
[ "code/problems/qa/qa_model.py" ]
[ "import scipy\nfrom torch.nn import Dropout, CrossEntropyLoss\n\nfrom code.abstract.abstract_torch_module import AbstractTorchModule\nimport torch\nimport numpy as np\n\nfrom code.gnns.qa_gnn import QaGNN\nfrom code.utils.evaluation.choice_model_output import ChoiceModelOutput\nfrom code.utils.torch_utils.xavier_li...
[ [ "numpy.expand_dims", "torch.max", "torch.cat", "torch.FloatTensor", "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.softmax", "numpy.pad", "numpy.clip", "numpy.stack", "torch.arange", "numpy.zeros", "torch.ones_like", "torch.LongTensor", "numpy.n...
JinLi97/recommender-system-dev-workshop-code
[ "e2673360f3dfaa561f35fa4d50b8726bc46cd80d" ]
[ "src/offline/movie/recall-batch/service_impl.py" ]
[ "import logging\nimport numpy as np\nimport json\nimport itertools\n\nlogging.basicConfig(level=logging.INFO)\n\n\nclass ServiceImpl:\n\n def __init__(self,\n recall_per_news_id=10,\n similar_entity_threshold=20,\n recall_threshold=2.0,\n recall_mer...
[ [ "numpy.ascontiguousarray" ] ]
Tubbz-alt/deep_learning_final
[ "d187c7125170f56c4744c1ba2bdca948c08fe108" ]
[ "models.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Implements SRGAN models: https://arxiv.org/abs/1609.04802\n\nTODO:\n\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\ndef swish(x):\n return x * F.sigmoid(x)\n\nclass FeatureExtractor(nn.Module):\n def __ini...
[ [ "torch.nn.functional.sigmoid", "torch.nn.Conv2d", "torch.nn.PixelShuffle", "torch.nn.BatchNorm2d" ] ]
act65/mri-reconstruction
[ "2dcf30e10c37a482f1aab2524c5966d03eb72085" ]
[ "scripts/train_bernoulliae.py" ]
[ "import tensorflow as tf\nimport src.bernoulliae as bernoulliae\nimport src.utils as utils\n\nimport os\nimport argparse\n\ndef argumentparser():\n parser = argparse.ArgumentParser(description='Train an SparseAE')\n parser.add_argument('--batch_size', type=int, default=50,\n help='Batch...
[ [ "tensorflow.summary.FileWriter", "tensorflow.nn.sigmoid", "tensorflow.reduce_mean", "tensorflow.shape", "tensorflow.summary.image", "tensorflow.global_variables", "tensorflow.placeholder", "tensorflow.train.get_or_create_global_step", "tensorflow.global_variables_initializer", ...
MarshallKrakauer/DecisionTree
[ "67a0623376a11bc43d94c045519a382b5e46915a" ]
[ "RandomForest.py" ]
[ "from collections import defaultdict\nfrom ClassificationTree import ClassificationTree\nfrom RegressionTree import RegressionTree\nfrom MultiClassTree import MultiClassTree\nfrom AbstractDecisionTree import print_breadth_first, get_dataframe, get_multi_class_dataframe\nimport random\nimport numpy as np\n\nclass Ra...
[ [ "numpy.round", "numpy.mean" ] ]
stopyun-jirong/igrf
[ "951ad3414b2b89e0121faec02e3e194b0e745428" ]
[ "src/igrf/base.py" ]
[ "import xarray\nfrom datetime import datetime\nimport numpy as np\nimport subprocess\nimport shutil\nimport os\nfrom pathlib import Path\nimport importlib.resources\n\nfrom .utils import mag_vector2incl_decl, datetime2yeardec\n\n\ndef cmake(setup_file: Path):\n \"\"\"\n attempt to build using CMake\n \"\"\...
[ [ "numpy.atleast_1d", "numpy.empty_like", "numpy.empty" ] ]
CRIPAC-DIG/K-GHRM
[ "5d73ed701b7753ee402ecfc1dbc4b20c578a4656" ]
[ "Data/ent2vec.py" ]
[ "from wikipedia2vec import Wikipedia2Vec\nimport pickle\nimport numpy as np\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--dataset', default='robust04', help='dataset name: robust04/clueweb09')\nargs = parser.parse_args()\n\ndef save_obj(obj, name):\n with open(name + '.pkl', 'wb'...
[ [ "numpy.random.randn" ] ]
FloydHsiu/Multi-focus-Image-Fusion-Using-Encoder-Decoder-Network
[ "996583e1db60ff1f7e8fc9383e0f0785773f2f54" ]
[ "train.py" ]
[ "import tensorflow as tf\nfrom data import parseDataset\nimport model\nimport datetime\nfrom os import path\nimport tqdm\nimport argparse\n\n\n@tf.function(experimental_relax_shapes=True)\ndef convertData(A, B, label):\n A = A / 255.0\n B = B / 255.0\n A = A * 2.0 - 1.0\n B = B * 2.0 - 1.0\n label = ...
[ [ "tensorflow.io.decode_jpeg", "tensorflow.reduce_sum", "tensorflow.distribute.cluster_resolver.TPUClusterResolver", "tensorflow.summary.scalar", "tensorflow.data.TFRecordDataset", "tensorflow.tpu.experimental.initialize_tpu_system", "tensorflow.summary.image", "tensorflow.squeeze", ...
William-prog/airflow
[ "b2e3e8c0718142d4cb0387f46cd77c15b67cc1e9" ]
[ "tests/core.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# 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...
[ [ "numpy.testing.assert_array_almost_equal" ] ]
Mhaiyang/iccv
[ "04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb", "04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb" ]
[ "utils/pascal.py", "utils/compute_overlap.py" ]
[ "\"\"\"\n @Time : 203/10/19 15:31\n @Author : TaylorMei\n @Email : mhy845879017@gmail.com\n \n @Project : iccv\n @File : pascal.py\n @Function:\n \n\"\"\"\nimport os\nimport numpy as np\nimport skimage.io\n\ninput_path = \"/home/iccd/data/MSRA10K/PASCAL-S/masks/\"\noutput_path = \"/home/iccd/data/MSRA10K/P...
[ [ "numpy.max", "numpy.where" ], [ "matplotlib.pyplot.yticks", "numpy.min", "matplotlib.pyplot.subplots", "numpy.max", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "numpy.zeros", "numpy.where" ] ]
spencerkent/vision-transform-codes
[ "63258ce698e436ee3ce29def75c89337759fb98b", "63258ce698e436ee3ce29def75c89337759fb98b", "63258ce698e436ee3ce29def75c89337759fb98b", "63258ce698e436ee3ce29def75c89337759fb98b" ]
[ "vision_transform_codes/tests/sparse_coding_2.py", "vision_transform_codes/training/ica.py", "vision_transform_codes/utils/image_processing.py", "vision_transform_codes/dict_update_rules/convolutional/sc_cheap_quadratic_descent.py" ]
[ "\"\"\"\nTest: Sparse coding, fully connected, fista, cheap qaudratic descent\n\"\"\"\nimport _set_the_path\n\nimport math\nimport pickle\nimport torch\n\nfrom training.sparse_coding import train_dictionary\nfrom utils.dataset_generation import OneOutputDset\nfrom utils import defaults\n\nRUN_IDENTIFIER = '_testing...
[ [ "torch.device", "torch.randn", "torch.from_numpy" ], [ "torch.mm", "numpy.min", "numpy.max", "numpy.mean", "torch.utils.tensorboard.SummaryWriter", "matplotlib.pyplot.close" ], [ "numpy.dot", "numpy.sqrt", "numpy.max", "numpy.mean", "numpy.var", ...
spacemig/satellite-attitude-simulator
[ "77ad4e05a4e8076aa1e5077023d0ee293ccc4530", "77ad4e05a4e8076aa1e5077023d0ee293ccc4530", "77ad4e05a4e8076aa1e5077023d0ee293ccc4530" ]
[ "thirdparty/pyorbital/orbital.py", "modules/attitude.py", "adcs_sim.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2011, 2012, 2013, 2014, 2015.\n\n# Author(s):\n\n# Esben S. Nielsen <esn@dmi.dk>\n# Adam Dybbroe <adam.dybbroe@smhi.se>\n# Martin Raspaud <martin.raspaud@smhi.se>\n\n# This program is free software: you can redistribute it and/or modify\n# it ...
[ [ "numpy.sqrt", "numpy.arctan", "numpy.rad2deg", "numpy.arctan2", "numpy.any", "numpy.where", "numpy.fmod", "numpy.arcsin", "numpy.sin", "numpy.ceil", "numpy.argmax", "numpy.timedelta64", "numpy.deg2rad", "numpy.floor", "numpy.errstate", "numpy.array",...
mattkjames7/groundmag
[ "38d66aaad8ad68bae8a42805fde3e92c3180aa84" ]
[ "groundmag/PlotPolarization.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport wavespec as ws\nfrom .Spectrogram3D import Spectrogram3D\nfrom .GetStationInfo import GetStationInfo\n\ndef PlotPolarization(Station,Date,wind,slip,ut=None,high=None,low=None,Freq=None,comps=['x','y'],Threshold=0.0,Method='FFT',WindowFunction=None,Param=N...
[ [ "numpy.float32" ] ]
futureseadev/Off-policy-off-line-ranking-evaluation
[ "3f67ed48a759e3ab8788c05f1c31232a4d6e2fd1" ]
[ "src/data_synthesis.py" ]
[ "import pandas as pd\nimport numpy as np\n\n\ndef create_context_vector():\n def parse_line_with_slash(line):\n split_line = line.split()\n return split_line[0], split_line[1].split('|')\n\n descriptionid_tokensid = []\n purchasedkeywordid_tokensid = []\n queryid_tokensid = []\n titleid...
[ [ "numpy.zeros", "pandas.DataFrame" ] ]
RobinRojowiec/stopword-collection
[ "4fa3665aa9e0e1e34d9d44afc3bf7ee2cb0da5ed" ]
[ "analyze.py" ]
[ "\"\"\"\n\nIDE: PyCharm\nProject: corpus-analysis\nAuthor: Robin\nFilename: analyze\nDate: 13.01.2020\n\n\"\"\"\nimport spacy\n\nfrom util import load_dict\nfrom paths import DIAGRAMS, DICTS\nimport re\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport math\nfrom tqdm import tqdm\n\n# analyze quality\nnlp...
[ [ "matplotlib.pyplot.title", "numpy.median", "matplotlib.pyplot.clf", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel" ] ]
avmehta/frcnntest
[ "1f2cd9b68af942ef3b9b78ec97ce2ff496c546ee" ]
[ "tf_frcnn/lib/layer_utils/generate_anchors.py" ]
[ "# --------------------------------------------------------\n# Faster R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick and Sean Bell\n# --------------------------------------------------------\nfrom __future__ import absolute_import\nfrom ...
[ [ "numpy.hstack", "numpy.sqrt", "numpy.arange", "numpy.round", "numpy.array" ] ]
CarlosHernandezP/BCN-20k
[ "73630c7420d10002f84642e222a77846f0d59161" ]
[ "modelling/model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torchvision.models as models\nfrom efficientnet_pytorch import EfficientNet\n\nclass CEEffNet(nn.Module):\n \"\"\"encoder + classifier\"\"\"\n def __init__(self, num_classes=2, model_name='effb0'):\n super(CEEffNet, self).__init__()\n\n self.encoder =...
[ [ "torch.nn.Dropout", "torch.nn.Identity", "torch.nn.ReLU", "torch.nn.Sigmoid" ] ]
zoubaihan/SEGCN
[ "3d5b60e09018b162bcad6f91a11512cd815765cc" ]
[ "segcn/layers.py" ]
[ "import math\n\nimport torch\n\nfrom torch.nn.parameter import Parameter\nfrom torch.nn.modules.module import Module\n\n\nclass SparseMM(torch.autograd.Function):\n \"\"\"\n Sparse x dense matrix multiplication with autograd support.\n\n Implementation by Soumith Chintala:\n https://discuss.pytorch.org/...
[ [ "torch.mm", "torch.FloatTensor" ] ]
hassanobeid1994/tr_b_causal_2020
[ "1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5" ]
[ "src/causal2020/observables/distfit.py" ]
[ "\"\"\"\nFunctions used in the fitting of distributions\nto variables to be simulated.\n\"\"\"\nfrom collections import defaultdict\n\nimport numpy as np\nimport pandas as pd\nfrom fitter import Fitter\n\n# Functions to replace code within\n# DistNodeNoParent\n# Function for checking length\n\n\ndef is_unique(var_v...
[ [ "numpy.array", "numpy.bincount" ] ]
jphacks/D_2003
[ "60a5684d549862e85bdf758069518702d9925a48", "60a5684d549862e85bdf758069518702d9925a48", "60a5684d549862e85bdf758069518702d9925a48", "60a5684d549862e85bdf758069518702d9925a48", "60a5684d549862e85bdf758069518702d9925a48", "60a5684d549862e85bdf758069518702d9925a48" ]
[ "YOLO/.history/pytorch-yolo-v3/video_demo_20201105153325.py", "YOLO/.history/pytorch-yolo-v3/video_demo_v1_20201106032031.py", "YOLO/.history/pytorch-yolo-v3/video_demo_20201105145255.py", "YOLO/.history/pytorch-yolo-v3/video_demo_20201105151709.py", "YOLO/.history/pytorch-yolo-v3/video_demo_v1_202011060036...
[ "from __future__ import division\nimport time\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport numpy as np\nimport cv2\nfrom util import *\nfrom darknet import Darknet\nfrom preprocess import prep_image, inp_to_image\nimport pandas as pd\nimport random\nimport argparse\nimport pickl...
[ [ "torch.from_numpy", "torch.cuda.is_available", "numpy.float32", "numpy.zeros", "torch.autograd.Variable" ], [ "numpy.split", "torch.from_numpy", "numpy.append", "numpy.float32", "torch.cuda.is_available", "numpy.array", "numpy.zeros", "torch.autograd.Variabl...
XHChen0528/Pytorch-Project-Template
[ "3615fd90eb5ae2eb098b591204f1da087ab1179b" ]
[ "related_scripts/test_dataloader_hdf5.py" ]
[ "#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n#############################################################\n# File: test_dataloader_hdf5.py.py\n# Created Date: Tuesday January 12th 2021\n# Author: Chen Xuanhong\n# Email: chenxuanhongzju@outlook.com\n# Last Modified: Wednesday, 13th January 2021 10:39:00 am\n# ...
[ [ "torch.from_numpy" ] ]
B-DE/ChatbotMachine
[ "ec5668411c037fe1f0b265f21114b944dc9ba169" ]
[ "kochat/utils/visualizer.py" ]
[ "\"\"\"\n@auther Hyunwoong\n@since {6/23/2020}\n@see : https://github.com/gusdnd852\n\"\"\"\nimport itertools\nimport os\nimport re\n\nimport numpy as np\nimport pandas as pd\nimport six\nfrom matplotlib import pyplot as plt\nfrom pandas import DataFrame\nfrom sklearn.decomposition import IncrementalPCA\nfrom torch...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "sklearn.decomposition.IncrementalPCA", "matplotlib.pyplot.get_cmap", "pandas.DataFrame", "matplotlib.pyplot.tight_layout", "numpy.arange", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "numpy.array", "mat...
thirono/basil
[ "99052482d9334dd1f5598eb2d2fb4d5399a32291" ]
[ "basil/HL/sitcp_fifo.py" ]
[ "#\n# ------------------------------------------------------------\n# Copyright (c) All rights reserved\n# SiLab, Institute of Physics, University of Bonn\n# ------------------------------------------------------------\n#\nimport struct\nimport array\n\nimport numpy as np\n\nfrom basil.HL.HardwareLayer import Hardw...
[ [ "numpy.dtype" ] ]
glennhickey/CharlieSandbox
[ "2949f8357433a6219abf192f899ab50e2c8edaba", "2949f8357433a6219abf192f899ab50e2c8edaba" ]
[ "brca_exchange_cooccurrence_analysis/extract_roh_regions_stats.py", "brca_exchange_cooccurrence_analysis/extract_roh_region_distributions.plot.py" ]
[ "import matplotlib\nmatplotlib.use('Agg')\nimport vcf, argparse, sys\nimport numpy as np\nimport pandas as pd\nimport math\nfrom scipy.stats import chisquare\nfrom collections import defaultdict\nimport matplotlib.pyplot\nimport ast\n\ndef parse_args():\n \"\"\" \n Description:\n function 'parse_args' ...
[ [ "matplotlib.use" ], [ "matplotlib.pyplot.close", "matplotlib.use", "matplotlib.pyplot.subplots", "pandas.DataFrame" ] ]
orico/DeepMoji
[ "db1bdbd95e299c3fdbef9981e352cea79528b7b4" ]
[ "deepmoji/create_vocab.py" ]
[ "from __future__ import print_function, division\n\nimport glob\nimport json\nimport numpy as np\nimport uuid\nfrom .filter_utils import is_special_token\nfrom .word_generator import WordGenerator\nfrom collections import defaultdict, OrderedDict\nfrom .global_variables import SPECIAL_TOKENS, VOCAB_PATH\nfrom copy ...
[ [ "numpy.load", "numpy.savez_compressed" ] ]
RElbers/strotss-pytorch
[ "0c2550d713d9b17711fba3f7f9621d1d7768a5eb" ]
[ "imgs/make_table.py" ]
[ "from math import ceil, floor\nfrom pathlib import Path\n\nimport cv2\nimport numpy as np\n\nfrom util import load, save\n\n\n\ndef pad_square(img):\n h, w, c = img.shape\n size = max(h, w)\n pad_h = size - h\n pad_w = size - w\n\n img = np.pad(img, ((floor(pad_h / 2), ceil(pad_h / 2)),\n ...
[ [ "numpy.hstack", "numpy.ones_like", "numpy.pad", "numpy.vstack" ] ]
facebbook/jina
[ "e8079af3d58f1de0f51f8aef6cdf1eb3d87a9873" ]
[ "tests/integration/evaluation/rank/test_evaluation.py" ]
[ "import os\n\nimport numpy as np\n\nfrom jina import Document\nfrom jina.flow import Flow\n\nfrom tests import validate_callback\n\n\ndef test_evaluation(tmpdir, mocker):\n os.environ['JINA_TEST_RANKING_EVALUATION'] = str(tmpdir)\n\n def index_documents():\n \"\"\"Index Documents:\n doc: tag__id...
[ [ "numpy.array" ] ]
yousszr/Dji-TelloPy-PoseEstimation-FaceTracking
[ "40ba58c307ea081a6ddef470ca2557b48df33680", "40ba58c307ea081a6ddef470ca2557b48df33680" ]
[ "src/videos.py", "src/facetracking.py" ]
[ "import cv2;\nimport imutils\nimport numpy as np\n\nface_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml');\nnet = cv2.dnn.readNetFromCaffe('deploy.prototxt.txt', 'res10_300x300_ssd_iter_140000.caffemodel')\nvideo = cv2.VideoCapture(0);\n\nwhile True:\n check, frame = video.read();\n \"\"...
[ [ "numpy.array" ], [ "numpy.clip" ] ]
danielsuo/toy_flood
[ "471d3c4091d86d4a00fbf910937d4e60fdaf79a1", "471d3c4091d86d4a00fbf910937d4e60fdaf79a1" ]
[ "skgaip/tspdb/tspdb/tests/test_module_local.py", "skgaip/tspdb/tspdb/src/algorithms/pymf/sivm_search.py" ]
[ "\nimport numpy as np\nfrom tspdb.src.pindex.predict import get_prediction_range, get_prediction\nfrom tspdb.src.pindex.pindex_managment import TSPI, load_pindex\nfrom tspdb.src.pindex.pindex_utils import index_ts_mapper\nimport time\nimport timeit\nimport pandas as pd\nfrom tspdb.src.hdf_util import read_data\nfr...
[ [ "numpy.square", "scipy.stats.norm.ppf", "pandas.read_csv", "sklearn.metrics.r2_score", "numpy.random.random", "numpy.arange", "numpy.median", "pandas.DataFrame", "numpy.ones", "numpy.random.normal", "numpy.mean", "pandas.date_range", "numpy.array", "numpy.ze...
readthedocs-assistant/pangeo-pyinterp
[ "e9dc18445dce36638d5a90f64c8e2f1b53164f90", "e9dc18445dce36638d5a90f64c8e2f1b53164f90" ]
[ "src/pyinterp/tests/core/test_trivariate.py", "src/pyinterp/grid.py" ]
[ "# Copyright (c) 2022 CNES\n#\n# All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\nimport os\nimport pickle\nimport pytest\nimport netCDF4\ntry:\n import matplotlib.pyplot\n import matplotlib.colors\n HAVE_PLT = True\nexcept ImportErr...
[ [ "numpy.ma.fix_invalid", "numpy.arange", "numpy.all", "numpy.meshgrid", "numpy.flip" ], [ "numpy.flip" ] ]
johnnykoo84/DS-Unit-3-Sprint-2-SQL-and-Databases
[ "484de1902b3785b68a0f598ca75e32d67e6ba09a" ]
[ "module2-sql-for-analysis/insert_titanic.py" ]
[ "import os\nimport pandas as pd\nimport psycopg2\nfrom psycopg2 import extras\nfrom dotenv import load_dotenv\nimport numpy as np\nload_dotenv()\nprint(__file__)\npsycopg2.extensions.register_adapter(np.int64, psycopg2._psycopg.AsIs)\n\n# load csv to dataframe\nCSV_FILE_PATH = os.path.join(os.path.dirname(__file__)...
[ [ "pandas.read_csv" ] ]
rougier/VSOM
[ "78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa", "78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa" ]
[ "attic/vsom.py", "attic/vsom-spatial.py" ]
[ "# -----------------------------------------------------------------------------\n# VSOM (Voronoidal Self Organized Map)\n# Copyright (c) 2019 Nicolas P. Rougier\n#\n# Distributed under the terms of the BSD License.\n# -----------------------------------------------------------------------------\nimport sys\nimport...
[ [ "matplotlib.patheffects.Normal", "numpy.sqrt", "numpy.linspace", "scipy.interpolate.griddata", "matplotlib.cm.get_cmap", "numpy.exp", "matplotlib.offsetbox.AnnotationBbox", "numpy.copy", "numpy.zeros", "numpy.random.mtrand.RandomState", "matplotlib.offsetbox.OffsetImage...
fanyizhe/aws-reserved-instance-expiration-notification
[ "018c37f7d547937f6390b5184756d199338ba7d6" ]
[ "src/ri_expiration.py" ]
[ "# Copyright <2019> Amazon.com, Inc. or its affiliates. All Rights Reserved.\n# SPDX-License-Identifier: Apache-2.0\n\nimport json\nimport boto3\nfrom botocore.exceptions import ClientError\nfrom multiprocessing import Process\nfrom dateutil import relativedelta\nfrom datetime import date, datetime, timedelta\nimpo...
[ [ "pandas.to_timedelta", "pandas.to_datetime", "pandas.DataFrame", "pandas.ExcelWriter" ] ]
diam045/chainer-chemistry
[ "aedd64049e7b2480a59c44b186171296ea69e55e", "aedd64049e7b2480a59c44b186171296ea69e55e", "aedd64049e7b2480a59c44b186171296ea69e55e" ]
[ "tests/models_tests/test_relgcn.py", "tests/models_tests/test_relgat.py", "examples/qm9/predict_qm9.py" ]
[ "from chainer import cuda\nfrom chainer import gradient_check\nimport numpy\nimport pytest\n\nfrom chainer_chemistry.config import MAX_ATOMIC_NUM\nfrom chainer_chemistry.models.relgcn import RelGCN\nfrom chainer_chemistry.models.relgcn import rescale_adj\nfrom chainer_chemistry.utils.permutation import permute_adj\...
[ [ "numpy.allclose", "numpy.random.seed", "numpy.ones", "numpy.random.permutation", "numpy.random.uniform", "numpy.random.randint" ], [ "numpy.allclose", "numpy.random.seed", "numpy.random.permutation", "numpy.random.uniform", "numpy.random.randint" ], [ "matpl...
grantseiter/Tax-Brain
[ "180063a193ff8cb0b56349878110066b012dde6d" ]
[ "cs-config/cs_config/helpers.py" ]
[ "\"\"\"\nFunctions used to help tax-brain configure to COMP\n\"\"\"\nimport os\nimport inspect\nimport time\nimport copy\nimport hashlib\nimport gzip\nimport copy\nfrom pathlib import Path\nimport warnings\n\nimport pandas as pd\nimport numpy as np\nfrom collections import defaultdict\nfrom taxbrain.report_utils im...
[ [ "pandas.concat", "pandas.read_csv", "numpy.random.seed", "numpy.random.choice", "pandas.Index", "numpy.ones", "numpy.iinfo", "numpy.where", "numpy.isclose" ] ]
nickgerend/Downtown
[ "165d3143ac69fd661050b73c3580e1221da981f8" ]
[ "linework.py" ]
[ "# Written by: Nick Gerend, @dataoutsider\n# Viz: \"Downtown\", enjoy!\n\nimport matplotlib.pyplot as plt\n\n#region Functions\n\ndef line_slope_intercept(x1, y1, x2, y2):\n m = (y2 - y1) / (x2 - x1)\n b = y1 - m * x1\n return m, b # y = mx + b\n\ndef two_lines_intercept(m1, b1, m2, b2):\n x = (b2 - b1)...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.scatter" ] ]
grburgess/gammapy
[ "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d1", "609e460698caca7223afeef5e71826c7b32728d...
[ "gammapy/scripts/tests/test_image_fit.py", "gammapy/detect/tests/test_lima.py", "gammapy/image/tests/test_catalog.py", "gammapy/utils/coordinates/celestial.py", "gammapy/utils/tests/test_energy.py", "gammapy/data/tests/test_obs_stats.py", "docs/tutorials/flux_point/residuals_images.py", "gammapy/detec...
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport json\nfrom numpy.testing.utils import assert_allclose\nfrom astropy.stats import gaussian_sigma_to_fwhm\nfrom astropy.tests.helper import pytest\nfrom ...utils...
[ [ "numpy.testing.utils.assert_allclose" ], [ "numpy.isnan", "numpy.testing.utils.assert_allclose" ], [ "numpy.testing.assert_allclose" ], [ "numpy.radians", "numpy.arcsin", "numpy.empty_like", "numpy.degrees", "numpy.arccos", "numpy.cos", "numpy.sin", "num...
owennewo/kfserving
[ "89f73c87525b8e06ea799f69f2979c4ad272fcb3", "89f73c87525b8e06ea799f69f2979c4ad272fcb3", "6aa83398ab03bfae822f36772757097bcb98b6ed", "6aa83398ab03bfae822f36772757097bcb98b6ed", "89f73c87525b8e06ea799f69f2979c4ad272fcb3", "89f73c87525b8e06ea799f69f2979c4ad272fcb3", "89f73c87525b8e06ea799f69f2979c4ad272fcb...
[ "vendor/github.com/tensorflow/tensorflow/tensorflow/python/ops/linalg/linear_operator_kronecker.py", "docs/samples/explanation/alibi/alibi_helper.py", "vendor/github.com/tensorflow/tensorflow/tensorflow/contrib/distribute/python/examples/simple_estimator_example.py", "vendor/github.com/tensorflow/tensorflow/t...
[ "# 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.array_ops.transpose", "tensorflow.python.ops.check_ops.assert_proper_iterable", "tensorflow.python.ops.array_ops.rank", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.linalg.linalg_impl.adjoint", "tensorflow.python.ops.array_ops.concat...
dshahrokhian/handtracking
[ "1003bd5e7a087952f777f04420d0c9785c549bb7" ]
[ "detect_multi_threaded.py" ]
[ "from utils import detector_utils as detector_utils \nimport cv2\nimport tensorflow as tf\nimport multiprocessing\nfrom multiprocessing import Queue, Pool\nimport time\nfrom utils.detector_utils import WebcamVideoStream\nimport datetime\nimport argparse\n\n\nframe_processed = 0\nscore_thresh = 0.2\n\n# Create a wor...
[ [ "tensorflow.Session" ] ]
tmoopenn/atari-representation-learning
[ "bd5628f77fb4ff421077e74200ebd7b386b87f7c" ]
[ "atariari/methods/utils.py" ]
[ "import argparse\nimport copy\nimport os\nimport subprocess\n\nimport torch\nimport numpy as np\nfrom sklearn.metrics import f1_score as compute_f1_score\nfrom a2c_ppo_acktr.envs import make_vec_envs\nfrom a2c_ppo_acktr.utils import get_vec_normalize\nfrom collections import defaultdict\n\n# methods that need encod...
[ [ "numpy.random.seed", "torch.zeros", "numpy.clip", "torch.manual_seed", "torch.eq", "torch.from_numpy", "numpy.ones", "torch.FloatTensor", "torch.no_grad", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "numpy.mean", "numpy.random.randint", "sklearn...
crmauceri/dataset_loaders
[ "542401b1a9a1ca98a15b4e529a3e78f9d0f91f52" ]
[ "dataloaders/plots.py" ]
[ "from PIL import Image, ImageDraw, ImageFont\nimport torch, random\nfrom dataloaders.utils import xywh2xyxy\n\n## Modified from https://github.com/ultralytics/yolov5/utils/plots.py under GNU License\ndef plot_bboxes(images, targets, fname='images.jpg', names=None, max_size=640, max_subplots=16, colors=None):\n #...
[ [ "torch.utils.data.DataLoader", "numpy.ceil", "numpy.max", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
Loptt/pong-autoencoder
[ "c5123bb2466f644f7513d807044e11a4a17aae22" ]
[ "latent_tests/generate_latent_dataset.py" ]
[ "import os\r\nos.add_dll_directory(\r\n \"C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v11.4\\\\bin\")\r\n\r\nimport tensorflow as tf\r\nfrom keras.preprocessing.image import load_img\r\nfrom keras.preprocessing.image import img_to_array\r\nfrom keras.models import load_model\r\nimport matplotl...
[ [ "tensorflow.math.argmax", "tensorflow.concat", "tensorflow.constant" ] ]
JosephineRabbit/TAL_attention
[ "d04ef6ecf4b67a41e4c672f39e811327faf31951" ]
[ "gtad_GA_NL_4_train.py" ]
[ "import os\nimport torch\nimport torch.nn.parallel\nimport torch.optim as optim\nfrom torch import autograd\nimport numpy as np\n\nfrom gtad_lib import opts\nfrom gtad_lib.model_GA_NL_4 import GTAD\nfrom gtad_lib.dataset import VideoDataSet\nfrom gtad_lib.loss_function import get_mask, gtad_loss_func # subgraph_lo...
[ [ "torch.optim.Adam", "torch.cuda.manual_seed", "torch.load", "numpy.random.seed", "torch.manual_seed", "torch.no_grad", "torch.save", "torch.cuda.manual_seed_all", "torch.device", "torch.autograd.detect_anomaly", "torch.optim.lr_scheduler.StepLR" ] ]
L-Zhe/SDISS
[ "0ee3f8614f4d92a3c916d04457784dbdffac8a06" ]
[ "generate.py" ]
[ "import torch\nimport Constants\nfrom Preprocess import translate2word, restore2Ori\nfrom Parameter import device, maxLen\n\ndef generator(model, testData, SrcOriPath, index2word, DictPath, search_method, beam_size):\n model.eval()\n translate = lambda outputs: [translate2word(seq, index2word) f...
[ [ "torch.no_grad", "torch.cat" ] ]
tpopordanoska/confidence-intervals
[ "6b9325093fdfd9dd903a56d6832e472427a4a24f" ]
[ "cieg/experiments/methods/pmatrix.py" ]
[ "import os\n\nimport numpy as np\nimport torch\n\n\ndef pmatrix_bounds(eigvals_lower, eigvals_upper, eigvects_lower, eigvects_upper, sigma, eig):\n inv_eigvals_lower, inv_eigvals_upper = get_inverse_eigenvalue_bounds(eigvals_lower, eigvals_upper)\n p = eig.eigenvalues.size()[0]\n lower_bound, upper_bound =...
[ [ "torch.min", "torch.zeros_like" ] ]
tranduytrung/rgbd-classification
[ "156d829200c4592867af5ade85e8642afbe8580e", "156d829200c4592867af5ade85e8642afbe8580e" ]
[ "train.py", "models/rgbnet.py" ]
[ "import os, json, glob, copy, argparse, shutil\nimport torch\nimport torchvision\nimport numpy as np\nimport PIL.Image\nfrom datetime import datetime\nfrom config import get_train_config\nfrom models import DepthNet, RGBNet, RGBDNet\nimport augmentation\nimport loaders\nfrom tensorboardX import SummaryWriter\nfrom ...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.utils.data.DataLoader", "torch.sum", "numpy.save", "numpy.argmax", "torch.set_grad_enabled", "torch.cuda.is_available", "torch.optim.lr_scheduler.StepLR" ], [ "torch.nn.Linear", "torch.nn.Dropout" ] ]
UpStride/tutorial
[ "cbb8f78c4f70855031ca340b6a18befeded3e7d6" ]
[ "quaternion-transformers/train_and_eval.py" ]
[ "import logging\nimport sys\nimport os\nimport time\nimport datetime\nimport numpy as np\nimport tensorflow as tf\n\nfrom tabulate import tabulate\n\nfrom data_loading.dataset import dataset_factory\nfrom networks.optimization import OptimizationManager, \\\n loss_function, accuracy...
[ [ "tensorflow.train.CheckpointManager", "tensorflow.train.Checkpoint", "numpy.sum", "tensorflow.keras.metrics.Mean", "tensorflow.summary.create_file_writer" ] ]
marchirschvogel/ambit
[ "9c21852d2c7c562b7accdd34025fc6b829eb1d3e", "9c21852d2c7c562b7accdd34025fc6b829eb1d3e" ]
[ "modules/flow0d/cardiovascular0D.py", "testing/solid_flow0d_monolithicdirect2field_flux_syspulcap_3Dheart_iterative.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) 2019-2022, Dr.-Ing. Marc Hirschvogel\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\nimport sys, time\nimport numpy as np\nimport sympy as sp\n\nfrom mpiroutine...
[ [ "numpy.isclose" ], [ "numpy.zeros", "numpy.cos" ] ]
sophiaas/alphacsc
[ "402b8f6c8ee4ba9c86e9da0e2073d900cf8da207", "402b8f6c8ee4ba9c86e9da0e2073d900cf8da207" ]
[ "alphacsc/other/sporco/examples/scripts/tv/tvl2den_clr.py", "alphacsc/other/sporco/sporco/admm/cbpdntv.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# This file is part of the SPORCO package. Details of the copyright\n# and user license can be found in the 'LICENSE.txt' file distributed\n# with the package.\n\n\"\"\"\nColour ℓ2-TV Denoising\n======================\n\nThis example demonstrates the use of class :cl...
[ [ "numpy.random.normal", "numpy.vstack", "numpy.random.seed" ], [ "numpy.swapaxes", "numpy.product", "numpy.conj", "numpy.sqrt", "numpy.asarray", "numpy.concatenate", "numpy.sum" ] ]
francoispichard/covid_twitter_bert_imbalanced
[ "c122a85bdcd16b051179146397ee94f3e0c597c0" ]
[ "utils/misc.py" ]
[ "import logging\nimport json\nimport os\nimport argparse\nimport tensorflow as tf\nimport numpy as np\nfrom contextlib import contextmanager\nimport fcntl\n\n\nlogger = logging.getLogger(__name__)\n\ndef save_to_json(data, f_name):\n with tf.io.gfile.GFile(f_name, 'w') as writer:\n writer.write(json.dumps...
[ [ "tensorflow.io.gfile.GFile" ] ]
cemkaraoguz/UFLDLTutorial
[ "4046b7d23642b3af3522af2ef1fce4b79fd9af7e" ]
[ "common/Visualization.py" ]
[ "''' UFL_Visualization.py\n\t\n\tMethods for visualization\n\t\n\tAuthor: Cem Karaoguz\n\tDate: 19.02.2015\n\tVersion: 1.0\n'''\n\nimport os, struct, sys\nimport numpy as np\nimport pylab as pl\n\ndef displayNetwork(A, kernelWidth=-1, kernelHeight=-1, opt_normalize=True, opt_graycolor=True, cols=-1, opt_colmajor=Fa...
[ [ "numpy.sqrt", "numpy.abs", "numpy.min", "numpy.reshape", "numpy.ones", "numpy.ceil", "numpy.shape", "numpy.mean", "numpy.mod", "numpy.zeros" ] ]
latimerb/sonata
[ "ed14cce11e01c920f722216ae338c16297ebd919" ]
[ "examples/300_cells/build_network.py" ]
[ "import os\nimport numpy as np\n\nfrom bmtk.builder import NetworkBuilder\nfrom bmtk.builder.bionet import SWCReader\nfrom bmtk.utils.io.spike_trains import PoissonSpikesGenerator\nfrom bmtk.builder.aux.node_params import positions_columinar, xiter_random\n\nbuild_recurrent_edges = True\n\nprint('Building internal ...
[ [ "numpy.random.uniform", "numpy.random.randint" ] ]
PonderaLab/estrategia-control-covid
[ "dfeb311b42baf9aa0b7652ed1472b7fd78335f82" ]
[ "coupled_dynamics/ext_params.py" ]
[ "import numpy as np\nfrom helper_functions import *\n# from arenas_params import pg, ξ, kg\n\ndef get_ext_params( n_ig, s_i, R_ij, pg, one_minus_pg, ξ, kg ):\n\n # number of patches\n try:\n NP = np.array(n_ig).shape[0]\n except:\n NP = 1\n\n # effective population given the mobility param...
[ [ "numpy.array", "numpy.transpose" ] ]
phy-ml/neural-solver
[ "4f5f5e8ab84fa2f6d759f8278683c6a70b16caec" ]
[ "NET_Solver/geometry/meshgen.py" ]
[ "import numpy as np\r\nfrom geometry import Annulus_Boundary\r\nfrom utils import Plot_Grid\r\nimport torch\r\nfrom geometry import *\r\nfrom utils import *\r\n\r\n\r\nclass EllipticGrid(Annulus_Boundary):\r\n def __init__(self, r_outer, r_inner, eccentricity, cg, rg, h):\r\n super().__init__(r_outer, r_i...
[ [ "numpy.abs", "numpy.linspace", "numpy.ones", "numpy.meshgrid", "numpy.zeros" ] ]
voodoohop/magenta
[ "23c9bc51038643c2c7365aac9abcca430e8cccc1" ]
[ "magenta/music/sequences_lib.py" ]
[ "# Copyright 2019 The Magenta 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 required by applicable law o...
[ [ "numpy.ones_like", "numpy.logical_and", "numpy.arange", "tensorflow.logging.warn", "numpy.ones", "numpy.logical_or", "numpy.zeros_like", "numpy.interp", "numpy.array", "numpy.zeros" ] ]
TACC/GravIT
[ "0a79dc74036c11669075198e01b30a92a8150693" ]
[ "pygvt/cosmology_plus.py" ]
[ "#\n# cosmology_plus.py\n#\n# read and render the first two levels of the cosmology plus\n# enzo dataset. There are actually 5 levels of refinement\n# but the first two levels contain 37 grids. \n#\n# This script is rough. It is only intended to test the python\n# wrappers for amr grids. \n# to run this from inside...
[ [ "numpy.ravel", "numpy.array", "numpy.identity", "numpy.finfo" ] ]
Rick-960123/centermask-mdf-master
[ "72147e8aae673fcaf4103ee90a6a6b73863e7fa1" ]
[ "maskrcnn_benchmark/modeling/roi_heads/mask_head/inference.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport numpy as np\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\nfrom maskrcnn_benchmark.structures.bounding_box import BoxList\n\n\n# TODO check if want to return a single BoxList or a composite\n# object\nclass Mas...
[ [ "torch.cat", "torch.zeros", "torch.zeros_like", "torch.nn.functional.interpolate", "torch.arange", "torch.stack", "numpy.array" ] ]
soniaai/pyAudioAnalysis
[ "47414c324114a9064d30637fdf1e508f12a7387e" ]
[ "pyAudioAnalysis/audacityAnnotation2WAVs.py" ]
[ "import glob\nimport os\nfrom . import audioBasicIO\nimport sys\nimport csv\nimport scipy.io.wavfile as wavfile\n\n\ndef annotation2files(wavFile, csvFile):\n '''\n Break an audio stream to segments of interest, \n defined by a csv file\n \n - wavFile: path to input wavfile\n ...
[ [ "scipy.io.wavfile.write" ] ]
tonyman1008/RADAR
[ "b2fc944230c2fd445528a9827eea42e1a94957b8", "b2fc944230c2fd445528a9827eea42e1a94957b8" ]
[ "data/syn_vases/scripts/generate_synvase.py", "render_animation.py" ]
[ "import math\nimport numpy as np\nfrom PIL import Image\nimport cv2\nimport os\nfrom glob import glob\nimport torch\nimport torchvision\nimport neural_renderer as nr\n\n\nEPS = 1e-7\n\n\ndef get_renderer(world_ori=[0,0,1], image_size=128, fov=30, renderer_min_depth=0.1, renderer_max_depth=10, fill_back=True, device...
[ [ "torch.nn.functional.normalize", "torch.linspace", "torch.cat", "torch.zeros", "torch.zeros_like", "torch.inverse", "torch.matmul", "torch.FloatTensor", "torch.rand", "torch.arange", "torch.stack", "numpy.array", "torch.meshgrid" ], [ "torch.linspace", ...
boaryang/quantum
[ "ef3a34341d997d485a7e43335a8ed61a8e7c6ea6" ]
[ "tensorflow_quantum/core/serialize/serializer.py" ]
[ "# Copyright 2020 The TensorFlow Quantum 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# Unl...
[ [ "numpy.round" ] ]
alazarchuk/scipy
[ "7124fc982ea9b0ea961c65db550c0703abcb9bfd" ]
[ "scipy/signal/tests/test_windows.py" ]
[ "import pickle\n\nimport numpy as np\nfrom numpy import array\nfrom numpy.testing import (assert_array_almost_equal, assert_array_equal,\n assert_allclose,\n assert_equal, assert_, assert_array_less,\n suppress_warnings)\nfrom pytest impo...
[ [ "scipy.signal.windows.general_cosine", "scipy.signal.windows.boxcar", "scipy.signal.windows.bohman", "scipy.signal.windows.flattop", "scipy.signal.windows.parzen", "numpy.ones_like", "numpy.testing.suppress_warnings", "numpy.arange", "scipy.signal.windows.gaussian", "scipy....
Liambeguin/git-pandas
[ "e56b817b1d66b8296d1d5e703d5db0e181d25899" ]
[ "gitpandas/project.py" ]
[ "\"\"\"\n.. module:: projectdirectory\n :platform: Unix, Windows\n :synopsis: A module for examining collections of git repositories as a whole\n\n.. moduleauthor:: Will McGinnis <will@pedalwrencher.com>\n\n\n\"\"\"\n\nimport math\nimport sys\nimport os\nimport numpy as np\nimport pandas as pd\nimport requests\...
[ [ "pandas.merge", "pandas.DataFrame" ] ]
Guillemdb/fragile
[ "ea8203508752e76b80495cfe057985268564bf4a" ]
[ "fragile/optimize/env.py" ]
[ "from typing import Callable, Dict, Tuple, Union\n\nimport judo\nfrom judo import Backend, Bounds, tensor, typing\nimport numpy\nfrom scipy.optimize import Bounds as ScipyBounds\nfrom scipy.optimize import minimize\n\nfrom fragile.core.env import Environment\nfrom fragile.core.states import StatesEnv, StatesModel\n...
[ [ "scipy.optimize.minimize" ] ]
avivt/pytorch-a2c-ppo-acktr-gail
[ "ea18861b7d09bfb7c9ca2fda37ef08204969036c" ]
[ "grad_tools/mediangrad.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport pdb\nimport numpy as np\nimport copy\nimport random\n\n\nclass MedianGrad():\n def __init__(self, optimizer, noise_ratio=1.0):\n self._optim = optimizer\n self._noise_ratio = noise_ratio\n ...
[ [ "torch.nn.MSELoss", "torch.ones_like", "numpy.maximum", "numpy.minimum", "torch.manual_seed", "torch.randn", "torch.median", "torch.zeros_like", "torch.nn.Linear", "torch.rand", "numpy.prod", "torch.stack", "torch.nn.L1Loss" ] ]
I-Doctor/fix_train
[ "3ddd812cd9d6c3dd14ffa059841078f033c48856" ]
[ "code/model/module/test_qq.py" ]
[ "import torch\nimport numpy as np\nimport h5py\nimport matplotlib.ticker as ticker\nimport matplotlib.pyplot as plt\nfrom quantize_functions import Quantize_A\n\nprefix = '../../../checkpoint/fix_experiment/imgnet/log_quantize_20200926_12-32-39/checkpoint_'\nepochnum = '28'\nmannum = 4\n\ndef plotexp(data, epoch, m...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.legend", "numpy.abs", "torch.Tensor", "numpy.arange", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.append", "matplotlib.ticker.MaxNLocator", "matplotlib.pyplot.xlabel", "numpy.a...
tnakaicode/python-cfd
[ "174176bdcb1c31e021fefd8fd54e2b3dd898dc62" ]
[ "lessons_src/13_Step_10.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n# # Text provided under a Creative Commons Attribution license, CC-BY. All code is made available under the FSF-approved BSD-3 license. (c) Lorena A. Barba, Gilbert F. Forsyth 2017. Thanks to NSF for support via CAREER award #1149784.\n# [@LorenaABarba](https://twitter.com...
[ [ "numpy.linspace", "numpy.meshgrid", "numpy.zeros", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
My-UIT-Students/VIPUsingFPGA
[ "e4afadb8def58f0c956c5399a6e9003a15ec43e8" ]
[ "CNNs/lenet/main.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torch.backends.cudnn as cudnn\nfrom lenet import *\nWEIGHT_PATH = './weights/'\ndevice = 'cuda' if torch.cuda.is_available() else 'cpu'\n\nnet = LeNet(WEIGHT_PATH)\n\nif device == 'cuda':\n net = torch.nn.D...
[ [ "torch.randn", "torch.nn.DataParallel", "torch.cuda.is_available", "torch.load" ] ]
puyamirkarimi/quantum-walks
[ "eb41146cc22e32b2f4d5a6119cc892f45062764c", "eb41146cc22e32b2f4d5a6119cc892f45062764c", "eb41146cc22e32b2f4d5a6119cc892f45062764c", "eb41146cc22e32b2f4d5a6119cc892f45062764c" ]
[ "Max2SAT_quantum/plot_av_inf_time_prob_n.py", "Max2SAT/mixsat_runner.py", "Max2SAT/mixsat_runtime_plot_compare.py", "Max2SAT_quantum/opt_gamma_vs_p_infty.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef plot_graph(x, y, fit):\n plt.figure()\n plt.scatter(x, y)\n if fit is not None:\n plt.plot(x, fit, '--')\n plt.tick_params(direction='in', top=True, right=True)\n plt.xlim(5, 9)\n plt.ylim(2, 16)\n plt.xticks(range(5, 10, 1))\...
[ [ "numpy.exp2", "numpy.log2", "numpy.sqrt", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplot.yscale", "matplotlib.pyplot.rc", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.ylabel", "numpy.mean", "matplotlib.pyplot.xlab...
syybata/tf_dqn_fx
[ "71061f0c0bb15d647a13d3e2c0d549a5c2d1780a" ]
[ "tensorboard_sample.py" ]
[ "import tensorflow as tf\n\ncross_entropy = tf.placeholder(tf.float32)\n\n# sessionの用意\nsess = tf.Session()\ntf.global_variables_initializer().run(session=sess)\n#sess.run(tf.global_variables_initializer())\n\n# summaryの設定\ntf.summary.scalar('cross_entropy', cross_entropy)\nsummaries = tf.summary.merge_all()\ntrain...
[ [ "tensorflow.summary.FileWriter", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.summary.merge_all", "tensorflow.Session", "tensorflow.summary.scalar" ] ]
JoseAlanis/supplementary_dpx_tt
[ "2b5a94c35753dc9dbf51357c840a87380e40fe3c", "2b5a94c35753dc9dbf51357c840a87380e40fe3c", "2b5a94c35753dc9dbf51357c840a87380e40fe3c" ]
[ "bads.py", "mvpa_stats.py", "15_plot_mvpa_results.py" ]
[ "\"\"\"\n=================\nFind bad channels\n=================\n\nMethods for finding bad (e.g., noisy) channels in EEG data.\n\nAuthors: José C. García Alanis <alanis.jcg@gmail.com>\n\nLicense: BSD (3-clause)\n\"\"\"\nimport warnings\n\nimport numpy as np\nfrom scipy.stats import median_abs_deviation as mad\n\nf...
[ [ "numpy.diag", "numpy.nanmedian", "numpy.abs", "numpy.asarray", "numpy.arange", "numpy.squeeze", "numpy.quantile", "numpy.argwhere", "numpy.ones", "scipy.stats.median_abs_deviation", "numpy.std", "numpy.logical_or", "numpy.mean", "numpy.transpose" ], [ ...
dnnspark/bulletwrapper
[ "3d034ee27ccf1613e84bd0beaae345eb4cbb9f91" ]
[ "bulletwrapper/hooks/box_packing/pack_box.py" ]
[ "import numpy as np\nfrom bulletwrapper.util.object_loader import OBJFile\n\nclass Block():\n '''\n This class represent a 2D rectangle associated with a top-down view of a cuboid.\n Each cuboid gives rise to 6 sides * 4 orientation = 24 axis-aligned blocks.\n The rectangle is represented by its width a...
[ [ "numpy.dot", "numpy.expand_dims", "numpy.logical_and", "numpy.random.choice", "numpy.min", "numpy.cos", "numpy.sin", "numpy.max", "numpy.cross", "numpy.array" ] ]
ShegnkaiWu/IoU-aware-single-stage-object-detector-for-accurate-localization
[ "67b8955eb59137590dbadc6aac45529ae9459e4a", "67b8955eb59137590dbadc6aac45529ae9459e4a" ]
[ "mmdet/models/bbox_heads/convfc_bbox_head.py", "mmdet/models/anchor_heads/retina_head.py" ]
[ "import torch.nn as nn\n\nfrom .bbox_head import BBoxHead\nfrom ..registry import HEADS\nfrom ..utils import ConvModule\n\n\n@HEADS.register_module\nclass ConvFCBBoxHead(BBoxHead):\n \"\"\"More general bbox head, with shared conv and fc layers and two optional\n separated branches.\n\n ...
[ [ "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Linear", "torch.nn.init.xavier_uniform_", "torch.nn.ReLU" ], [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.ModuleList" ] ]
chrfla/sec-filings-nlp
[ "dd296b4e7734e8bc682ba115b6f5f68a4e55c992" ]
[ "09_LDA_all_years.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n####### Import packages #########\n\nfrom pprint import pprint\nimport pickle\nfrom wordcloud import WordCloud\nimport matplotlib.pyplot as plt\nimport gensim\nimport gensim.corpora as corpora\nfrom gensim.utils import simple_preprocess\nfrom gensim.models import LdaMultic...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure" ] ]
minhnhatphan/CenterTrack
[ "f459601c8843018ba791fa78931ad291e108092a" ]
[ "src/tools/convert_mot_det_to_results.py" ]
[ "import json\nimport numpy as np\nimport os\nfrom collections import defaultdict\nsplit = 'train'\n\nDET_PATH = '../../data/mot17/train'\nANN_PATH = '../../data/mot17/annotations/{}.json'.format(split)\nOUT_DIR = '../../data/mot17/results/'\nOUT_PATH = OUT_DIR + '{}_det.json'.format(split)\n\nif __name__ == '__main...
[ [ "numpy.loadtxt" ] ]
FeiYuejiao/NLP_Pretrain
[ "7aa4693c31a7bba9b90f401d2586ef154dd7fb81" ]
[ "model/densenet.py" ]
[ "'''DenseNet in PyTorch.'''\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Bottleneck(nn.Module):\n def __init__(self, in_planes, growth_rate):\n super(Bottleneck, self).__init__()\n self.bn1 = nn.BatchNorm2d(in_planes)\n self.conv1 = nn.Conv2...
[ [ "torch.nn.Sequential", "torch.cat", "torch.randn", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.BatchNorm2d" ] ]
SoftwareDev/mat-plot-lib
[ "abaf94859d5ef6e653a4d8a7ce2c59cea1724a57", "255a79b106c98c1904489afe6a754e4d943179d6", "a429c415bdb6e54ccfe004a48fdc034ea8e9d329", "a429c415bdb6e54ccfe004a48fdc034ea8e9d329", "255a79b106c98c1904489afe6a754e4d943179d6", "a429c415bdb6e54ccfe004a48fdc034ea8e9d329" ]
[ "lib/matplotlib/colors.py", "examples/units/bar_unit_demo.py", "lib/matplotlib/patches.py", "lib/matplotlib/bezier.py", "examples/api/demo_affine_image.py", "lib/matplotlib/lines.py" ]
[ "\"\"\"\nA module for converting numbers or color arguments to *RGB* or *RGBA*\n\n*RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the\nrange 0-1.\n\nThis module includes functions and classes for color specification\nconversions, and for mapping numbers to colors in a 1-D array of colors called\na...
[ [ "numpy.linspace", "numpy.__version__.split", "numpy.asarray", "numpy.arctan2", "numpy.round", "numpy.alltrue", "numpy.zeros_like", "numpy.searchsorted", "numpy.ma.power", "numpy.ma.array", "numpy.ma.max", "numpy.exp", "numpy.where", "numpy.ma.getmask", "...
brobeson/vta
[ "01bc98137bab7171c9fe69770090ab01b2b10ae6" ]
[ "vta/loss/loss.py" ]
[ "\"\"\"The entry module for the vta loss command.\"\"\"\n\nimport argparse\nimport json\n\nimport matplotlib.pyplot as plt\nimport numpy\nimport scipy.interpolate\nimport sklearn.linear_model\n\nimport vta.loss.data\n\n\ndef main(arguments, configuration):\n \"\"\"Runs the vta loss command.\n\n This is the ma...
[ [ "numpy.array", "matplotlib.pyplot.show", "numpy.isfinite", "matplotlib.pyplot.figure" ] ]
wrld/PRoGAN
[ "ef28d4b91b76dd7f9e7d466b007826491bce5080" ]
[ "phase_correlation/phase_corr.py" ]
[ "import sys\nimport os\nsys.path.append(os.path.abspath(\"..\"))\n\nimport cv2\nimport math\nimport torch\nimport kornia\nimport numpy as np\nimport torch.nn as nn\nfrom numpy.fft import fft2, ifft2, fftshift\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torchvision import transforms, ...
[ [ "torch.linspace", "numpy.sqrt", "numpy.linspace", "numpy.abs", "torch.sqrt", "torch.einsum", "torch.from_numpy", "numpy.cos", "torch.rfft", "torch.FloatTensor", "torch.ifft" ] ]
Ptrskay3/pandas
[ "eca60680df2d4b7973d9e5b8252b7b9be3f96c3c" ]
[ "pandas/core/window/rolling.py" ]
[ "\"\"\"\nProvide a generic structure to support window functions,\nsimilar to how we have a Groupby object.\n\"\"\"\nfrom datetime import timedelta\nfrom functools import partial\nimport inspect\nfrom textwrap import dedent\nfrom typing import (\n TYPE_CHECKING,\n Callable,\n Dict,\n List,\n Optional...
[ [ "pandas.Series", "scipy.signal.get_window", "numpy.asarray", "pandas.core.window.indexers.FixedWindowIndexer", "numpy.concatenate", "pandas.core.window.indexers.GroupbyRollingIndexer", "pandas.compat.numpy.function.validate_rolling_func", "numpy.where", "pandas.util._decorators...
kowshikthopalli/MULDENS
[ "e2d5f8ec51024c5bdda6d1fcde4a96a3f31e6930" ]
[ "domainbed/scripts/dson.py" ]
[ "import argparse\nimport collections\nimport json\nimport os\nimport random\nimport sys\nimport time\nimport uuid\n#sys.path.append('/home/kowshik/infoDG')\nimport numpy as np\nimport PIL\nimport torch\nimport torchvision\nimport torch.utils.data\nimport torch.nn as nn\n\n\n\n\nclass OptimizedNorm2d(nn.Module):\n ...
[ [ "torch.autograd.Variable", "torch.nn.Softmax", "torch.ones", "torch.zeros" ] ]
takumak/tuna
[ "a50d1d34c9917d73f02257bcffcf7cc6bf582747" ]
[ "src/interpolation.py" ]
[ "import numpy as np\n\nfrom settingobj import SettingObj\nfrom settingitems import *\nfrom commonwidgets import *\n\n\n\n__all__ = ['InterpLinear', 'InterpBSpline',\n 'InterpCubicSpline', 'InterpBarycentric',\n 'InterpKrogh', 'InterpPchip', 'InterpAkima']\n\n\n\nclass InterpBase(SettingObj):\n ...
[ [ "scipy.interpolate.splrep", "numpy.linspace", "scipy.interpolate.splev", "numpy.concatenate", "numpy.full", "scipy.interpolate.interp1d" ] ]
eleflea/tvm
[ "d199243d8907b2d8062dd9c20b69dcb9765a970f", "d199243d8907b2d8062dd9c20b69dcb9765a970f", "d199243d8907b2d8062dd9c20b69dcb9765a970f", "d199243d8907b2d8062dd9c20b69dcb9765a970f" ]
[ "tutorials/frontend/from_tflite.py", "tutorials/language/extern_op.py", "tests/python/unittest/test_auto_scheduler_layout_rewrite.py", "tests/python/unittest/test_link_params.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...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "numpy.asarray", "numpy.squeeze", "numpy.argmax", "matplotlib.pyplot.show" ], [ "numpy.random.uniform", "numpy.zeros" ], [ "numpy.array" ], [ "numpy.testing.assert_equal", "numpy.ndarray", "numpy.prod", ...
Semih-Kurt/scvi-tools
[ "1bea2af8cc99e11d55a6925f09d978de5f6994fb", "1bea2af8cc99e11d55a6925f09d978de5f6994fb", "1bea2af8cc99e11d55a6925f09d978de5f6994fb", "1bea2af8cc99e11d55a6925f09d978de5f6994fb" ]
[ "tests/external/test_cellassign.py", "scvi/model/_totalvi.py", "tests/external/test_gimvi.py", "scvi/data/_built_in_data/_seqfish.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom scvi.data import synthetic_iid\nfrom scvi.external import CellAssign\n\n\ndef test_cellassign(save_path):\n adata = synthetic_iid(\n n_labels=5,\n )\n adata.obs[\"size_factor\"] = adata.X.sum(1)\n CellAssign.setup_anndata(\n adata,\n ...
[ [ "numpy.random.randint" ], [ "torch.mean", "numpy.sqrt", "torch.distributions.Gamma", "torch.cat", "numpy.asarray", "pandas.DataFrame", "numpy.concatenate", "torch.no_grad", "numpy.mean", "scipy.stats.spearmanr", "numpy.square", "numpy.unique", "numpy.ara...
xiaowu0162/mobilenet_compression
[ "a04fa087ac84b0918fb49ef77bf8439d02cbcf1f" ]
[ "old_code/utils.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport torch\nfrom torch.utils.data import Dataset\nimport torchvision.transforms as transforms\nimport numpy as np\nfrom nni.compression.pytorch.utils.counter import count_flops_params\n\nfrom mobilenet import MobileNet\nfrom ...
[ [ "torch.load", "torch.from_numpy", "torch.nn.Linear", "torch.rand", "numpy.load", "torch.hub.load" ] ]
LindgeW/AT4MTL
[ "8fe0f142f830b7f2cb170ffe53ec535ca5bb3eab" ]
[ "modules/grl.py" ]
[ "import torch\n\n\n# Gradient Reversal Layer\nclass GRLayer(torch.autograd.Function):\n @staticmethod\n def forward(ctx, x, lmbd=0.01):\n ctx.lmbd = torch.tensor(lmbd)\n return x.reshape_as(x)\n\n @staticmethod\n # 输入为forward输出的梯度\n def backward(ctx, grad_output):\n grad_input = ...
[ [ "torch.tensor" ] ]
akobiisr/wetectron
[ "9973eb4f1716fbc5f46b41a7f93fb1f1c78bc8c7" ]
[ "wetectron/modeling/rpn/retinanet/inference.py" ]
[ "import torch\n\nfrom ..inference import RPNPostProcessor\nfrom ..utils import permute_and_flatten\n\nfrom wetectron.modeling.box_coder import BoxCoder\nfrom wetectron.modeling.utils import cat\nfrom wetectron.structures.bounding_box import BoxList\nfrom wetectron.structures.boxlist_ops import cat_boxlist\nfrom wet...
[ [ "torch.nonzero", "torch.full" ] ]
tjbanks/bmtk
[ "52fee3b230ceb14a666c46f57f2031c38f1ac5b1", "52fee3b230ceb14a666c46f57f2031c38f1ac5b1", "52fee3b230ceb14a666c46f57f2031c38f1ac5b1", "52fee3b230ceb14a666c46f57f2031c38f1ac5b1" ]
[ "bmtk/tests/utils/reports/spike_trains/test_file_writers.py", "bmtk/tests/utils/reports/spike_trains/create_files.py", "bmtk/simulator/filternet/lgnmodel/transferfunction.py", "bmtk/simulator/bionet/gids.py" ]
[ "import os\nimport pytest\nimport numpy as np\nimport pandas as pd\nimport h5py\n\nfrom bmtk.utils.reports.spike_trains import SpikeTrains, sort_order, pop_na\nfrom bmtk.utils.reports.spike_trains import write_csv\nfrom bmtk.utils.reports.spike_trains import write_sonata\n\n\ndef load_spike_trains(file_path):\n ...
[ [ "pandas.read_csv", "numpy.diff" ], [ "pandas.read_csv", "numpy.uint64", "pandas.Series" ], [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ], [ "numpy.array", "numpy.searchsorted" ] ]
joaofonseca9/mimic3-benchmarks-TBI_edit
[ "21533b011433272b06d970fa47fe1c8cbfeb5351" ]
[ "mimic3benchmark/preprocessing.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport re\n\nfrom pandas import DataFrame, Series\n\nfrom mimic3benchmark.util import dataframe_from_csv\n\n###############################\n# Non-time series preprocessing\n###############################\n\ng_map...
[ [ "numpy.round", "numpy.zeros", "numpy.sum", "pandas.DataFrame" ] ]
zhangqianhui/FUNIT_tensorflow
[ "16ea70e881d4aa2d38cd44c0fcb60f4ed821a24d" ]
[ "FUNIT.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom tfLib.ops import *\nfrom tfLib.loss import *\nfrom Dataset import save_images\nimport os\nimport numpy as np\nimport PyLib.const as con\n\ncon.EPS = 1e-7\nclass FSUGAN(object):\n\n # build mode...
[ [ "numpy.mod", "numpy.concatenate" ] ]
author9779/paper9779
[ "b544f60733794ff2dd344627f8ec0d87fe087266" ]
[ "defaults/wrappers.py" ]
[ "from .models import *\nfrom .datasets import *\nfrom utils._utils import *\n\nimport torch.distributed as dist\nfrom torch.nn.parallel import DistributedDataParallel as DDP\nfrom torch.utils.data.distributed import DistributedSampler as DS\n\nclass DefaultWrapper:\n \"\"\"Class that wraps everything.\n\n Mod...
[ [ "torch.nn.parallel.DistributedDataParallel", "torch.utils.data.distributed.DistributedSampler" ] ]
jeford/mdprop
[ "e79b70343f559cbf586f09234122c2f43b4d867c", "e79b70343f559cbf586f09234122c2f43b4d867c", "e79b70343f559cbf586f09234122c2f43b4d867c" ]
[ "examples/kepler/kepler_exp_timestep.py", "examples/prinz/timestep_map.py", "examples/joukowsky/joukowsky.py" ]
[ "#!/usr/bin/env python\nimport numpy as np\n\nimport mdprop\n\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\n\npot = mdprop.potential.Kepler(1.0)\nmasses = np.array([1.0])\nX, V = pot.init_cond(0.8)\nsymbols = ['X']\n\nstate = {\n 'X': X,\n 'V': V,\n 'symbols': symbols,\n ...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.use", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.array" ], [ "matplotlib.use", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.fi...
VictorAtPL/Speech_Commands_Recognition_Bi_LSTM_with_Tensorflow_2
[ "d8ed6052baa8289c9856ee3582979c6203f94009" ]
[ "models/baseline_bilstm_bigger_2_dense_bigger.py" ]
[ "import tensorflow as tf\n\nfrom AbstractModel import AbstractModel\nfrom common import get_input_fn_and_steps_per_epoch, load_sets_count, mel_spectrogram_unlabeled_parser\nfrom constants import TFRECORDS_SAVE_PATH\n\nfrom models.baseline import Model as Baseline\n\n\nclass Model(Baseline):\n\n def get_model(sel...
[ [ "tensorflow.keras.Input", "tensorflow.keras.Model" ] ]