repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
coolhimanshu-verma/evidently
[ "b4c5c282eabf4710343f342bb8aad8daf2f143a0" ]
[ "evidently/analyzers/data_drift_analyzer.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nfrom evidently.analyzers.base_analyzer import Analyzer\nimport pandas as pd\nfrom pandas.api.types import is_numeric_dtype\nimport numpy as np\n\nfrom scipy.stats import ks_2samp, chisquare, norm\n\ndef proportions_diff_z_stat_ind(ref, curr):\n n1 = len(ref)\n n2 = l...
[ [ "scipy.stats.ks_2samp", "numpy.abs", "scipy.stats.norm.cdf", "numpy.sqrt", "numpy.isfinite", "pandas.api.types.is_numeric_dtype", "scipy.stats.chisquare" ] ]
gbloss/6.0001-ps0
[ "668a22743878ae54eeaec36be6ec89a9541b8d1f" ]
[ "ps0.py" ]
[ "from numpy import log2\n\ndef sanitized_input(prompt, input_type=None, input_min=None, input_max=None):\n if input_min is not None and input_max is not None and input_max < input_min:\n raise ValueError(\"Minimum must be less than or equal to the maximum.\")\n while True:\n user_input = input(p...
[ [ "numpy.log2" ] ]
mrakitin/SRW-gui
[ "9c603d5a407dfa36ba92e8646d1a57151de825ed" ]
[ "uti_plot.py" ]
[ "#############################################################################\n# Simple 1D & 2D plotting utilities package (/ \"wrapper\" of featured scientific plotting libraries).\n# Currently uses matplotlib, but may support other libraries in the future.\n# v 0.01\n#############################################...
[ [ "numpy.linspace", "matplotlib.use", "matplotlib.pyplot.ioff", "numpy.array", "matplotlib.pyplot.show", "numpy.loadtxt", "matplotlib.pyplot.figure" ] ]
tianqitheodorejiang/MRImageGBM
[ "8b7931c76ac655652ccc4210992cde78da46f3a8", "8b7931c76ac655652ccc4210992cde78da46f3a8", "8b7931c76ac655652ccc4210992cde78da46f3a8", "8b7931c76ac655652ccc4210992cde78da46f3a8", "8b7931c76ac655652ccc4210992cde78da46f3a8" ]
[ "all code (python source) p3/Database load for tumor treatment evaluation with voxelmorph overlaying actual.py", "all code (python source) p1/brain mask 13.py", "all code (python source) p2/brain seg model testing.py", "all code (python source) p1/precise brain mask.py", "all code (python source) p1/Using t...
[ "\"\"\"\r\nExample script to register two volumes with VoxelMorph models\r\n\r\nPlease make sure to use trained models appropriately. \r\nLet's say we have a model trained to register subject (moving) to atlas (fixed)\r\nOne could run:\r\n\r\npython register.py --gpu 0 /path/to/test_vol.nii.gz /path/to/atlas_norm.n...
[ [ "tensorflow.ConfigProto", "tensorflow.device", "tensorflow.Session" ], [ "tensorflow.keras.models.load_model", "numpy.squeeze", "numpy.round", "numpy.max", "scipy.ndimage.interpolation.zoom", "numpy.where", "numpy.unique", "scipy.ndimage.generate_binary_structure", ...
Darkoon/CapsNet-vs-CNN
[ "2f50e49d687a97c420d9a41454dd4482be676c33" ]
[ "capsnet/singledigitcapsule/mnist_capsulenet.py" ]
[ "\"\"\"\nKeras implementation of CapsNet in Hinton's paper Dynamic Routing Between Capsules.\nThe current version maybe only works for TensorFlow backend. Actually it will be straightforward to re-write to TF code.\nAdopting to other backends should be easy, but I have not tested this. \n\nUsage:\n python cap...
[ [ "numpy.expand_dims", "tensorflow.reduce_sum", "matplotlib.pyplot.imread", "tensorflow.keras.callbacks.LearningRateScheduler", "numpy.concatenate", "tensorflow.keras.regularizers.l2", "numpy.copy", "numpy.argmax", "tensorflow.keras.backend.set_image_data_format", "tensorflow...
broadinstitute/adapt
[ "ae0346dbd8c77fa9bcefbec5358cc750b146474d" ]
[ "adapt/prepare/cluster.py" ]
[ "\"\"\"Functions for clustering sequences before input.\n\nThis includes computing a distance matrix using MinHash, and\nclustering that matrix.\n\"\"\"\n\nfrom collections import defaultdict\nfrom collections import OrderedDict\nimport logging\nimport operator\n\nimport numpy as np\nfrom scipy.cluster import hiera...
[ [ "scipy.cluster.hierarchy.linkage", "numpy.exp", "numpy.zeros", "scipy.cluster.hierarchy.fcluster" ] ]
jimpassmore/imagepy
[ "a814bf8a763f9ce427569f3ef5e5188746cc50eb", "a814bf8a763f9ce427569f3ef5e5188746cc50eb" ]
[ "imagepy/imageplus.py", "imagepy/menus/Process/Filters/classic_plgs.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import print_function\nimport numpy as np\nfrom .core.manager import WindowsManager, ColorManager\n\ndef get_img_type(imgs):\n if imgs[0].ndim==3:return 'rgb'\n if imgs[0].dtype == np.uint8:return '8-bit'\n if imgs[0].dtype == np.int16:return '16-bit...
[ [ "numpy.zeros", "scipy.misc.imread", "numpy.clip" ], [ "scipy.ndimage.prewitt", "scipy.ndimage.gaussian_filter", "numpy.abs", "numpy.multiply", "scipy.ndimage.laplace", "scipy.ndimage.minimum_filter", "scipy.ndimage.median_filter", "scipy.ndimage.sobel", "scipy.n...
jeremyjliu/spark
[ "5154b7b409d1c39240f25ab32ce35b75ed54a2fa" ]
[ "python/pyspark/sql/dataframe.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "pandas.DataFrame.from_records" ] ]
Alicegaz/kaldi
[ "7249cc0dd31dce480456b697b6389feeb74c74ab" ]
[ "egs/wsj/s5/steps/tfrnnlm/lstm_fast.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n# Copyright (C) 2017 Intellisist, Inc. (Author: Hainan Xu)\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# ...
[ [ "tensorflow.device", "tensorflow.concat", "tensorflow.reduce_sum", "tensorflow.stack", "numpy.exp", "tensorflow.summary.scalar", "tensorflow.Graph", "tensorflow.Variable", "tensorflow.random_uniform_initializer", "tensorflow.gradients", "tensorflow.name_scope", "ten...
azeme1/retinaface-tf2
[ "09fe0957be6afce62001198e7c1931543d85b9b9" ]
[ "train.py" ]
[ "from absl import app, flags, logging\nfrom absl.flags import FLAGS\nimport os\nimport tensorflow as tf\n\nfrom modules.models import RetinaFaceModelOriginal as RetinaFaceModel\nfrom modules.lr_scheduler import MultiStepWarmUpLR\nfrom modules.losses import MultiBoxLoss\nfrom modules.anchor import prior_box\nfrom mo...
[ [ "tensorflow.train.CheckpointManager", "tensorflow.Variable", "tensorflow.reduce_sum", "tensorflow.keras.optimizers.SGD", "tensorflow.get_logger", "tensorflow.GradientTape", "tensorflow.summary.scalar", "tensorflow.summary.create_file_writer" ] ]
abidikhairi/embedding_with_lrw
[ "8152b3e4b61b197857d1293d5a50bff118804109" ]
[ "node2vec_experiment.py" ]
[ "import argparse\nimport logging\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score\nfrom sklearn.linear_model import LogisticRegression\nfrom gensim.models import Word2Vec, KeyedVectors\n\nfrom utils import load_data\n\nlogging.basicConfig(format='...
[ [ "numpy.mean", "sklearn.model_selection.train_test_split", "sklearn.linear_model.LogisticRegression" ] ]
micmelesse/tensor2tensor
[ "93d34d69092f86b203f0f0a8230fcd9ecbe9086f" ]
[ "tensor2tensor/layers/vq_discrete.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Tensor2Tensor 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 requir...
[ [ "tensorflow.random_uniform", "tensorflow.concat", "tensorflow.control_dependencies", "tensorflow.zeros", "tensorflow.colocate_with", "tensorflow.reduce_sum", "tensorflow.to_int32", "tensorflow.python.training.moving_averages.assign_moving_average", "tensorflow.stop_gradient", ...
ahmedhussein89/CarND-Advanced-Lane-Lines
[ "65f6998e325ae992b76a45fba9a1926a89a14183" ]
[ "threshold.py" ]
[ "import cv2\nimport numpy as np\nimport matplotlib.image as mpimg\n\n\ndef abs_sobel_thresh(img, orient='x', sobel_kernel=3, thresh=(0, 255)):\n # Apply the following steps to img\n # 1) Convert to grayscale\n gray_image = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)\n gray_image = cv2.GaussianBlur(gray_image,...
[ [ "numpy.absolute", "numpy.sqrt", "numpy.arctan2", "numpy.max", "numpy.zeros_like" ] ]
PawelPamula/ReCirq
[ "79a351310cd98f67524a9df0c4ef9f300bf9eea4" ]
[ "recirq/quantum_chess/controlled_iswap_test.py" ]
[ "# Copyright 2020 Google\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 or agreed to i...
[ [ "numpy.set_printoptions" ] ]
stevezheng23/sequence_labeling_tf
[ "05fcbec15e359e3db86af6c3798c13be8a6c58ee" ]
[ "sequence_labeling/sequence_labeling_run.py" ]
[ "import argparse\nimport os.path\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.python import debug as tf_debug\n\nfrom util.default_util import *\nfrom util.param_util import *\nfrom util.model_util import *\nfrom util.eval_util import *\nfrom util.debug_logger import *\nfrom util.t...
[ [ "tensorflow.gfile.Exists", "tensorflow.global_variables_initializer", "tensorflow.gfile.MakeDirs", "tensorflow.Session", "tensorflow.python.debug.LocalCLIDebugWrapperSession", "tensorflow.tables_initializer" ] ]
Matthew-Hiebing/Automatic-Unemployment
[ "ddd2eeac87f22347810e0da50d4115cf3f9eb7c4" ]
[ "Payment_Request.py" ]
[ "import pandas as pd\nimport numpy as np\nimport time\nimport yaml\nimport datetime\nfrom selenium import webdriver\nfrom selenium.webdriver.common.keys import Keys\nfrom selenium.webdriver.support.ui import WebDriverWait as wait\nfrom selenium.webdriver.support import expected_conditions as EC\n\n#----------------...
[ [ "pandas.read_excel", "pandas.DataFrame" ] ]
Kyzarok/SNNProject
[ "14b555e221dbdd5100cb4f6333e49030423462ea" ]
[ "brian2/input/spikegeneratorgroup.py" ]
[ "'''\nModule defining `SpikeGeneratorGroup`.\n'''\nimport numpy as np\n\nfrom brian2.core.functions import timestep\nfrom brian2.utils.logger import get_logger\nfrom brian2.core.spikesource import SpikeSource\nfrom brian2.units.fundamentalunits import check_units, Unit, Quantity\nfrom brian2.units.allunits import s...
[ [ "numpy.abs", "numpy.nonzero", "numpy.min", "numpy.asarray", "numpy.lexsort", "numpy.finfo", "numpy.round", "numpy.max", "numpy.diff", "numpy.iinfo" ] ]
jtraver/dev
[ "c7cd2181594510a8fa27e7325566ed2d79371624" ]
[ "python3/matplotlib/plot1.py" ]
[ "#!/usr/bin/env python3\n#!/usr/bin/python\n\n# https://en.wikipedia.org/wiki/Matplotlib\n\nimport numpy\nimport matplotlib.pyplot as plt\n\nfrom numpy.random import rand\n\na = rand(100)\nb = rand(100)\nplt.scatter(a, b)\nplt.show()\n" ]
[ [ "matplotlib.pyplot.show", "numpy.random.rand", "matplotlib.pyplot.scatter" ] ]
mccarthyryanc/laspy
[ "8bc16f3c91b7ae514923fe197e68904f3def179c" ]
[ "tests/test_common.py" ]
[ "from pathlib import Path\n\nimport numpy as np\nimport pytest\n\nimport laspy\nfrom laspy.lib import write_then_read_again\nfrom . import conftest\n\nsimple_las = conftest.SIMPLE_LAS_FILE_PATH\nsimple_laz = conftest.SIMPLE_LAZ_FILE_PATH\nvegetation1_3_las = conftest.VEGETATION1_3_LAS_FILE_PATH\ntest1_4_las = conft...
[ [ "numpy.all", "numpy.array", "numpy.alltrue", "numpy.allclose" ] ]
nariaki3551/flopt
[ "681d2f98824a52bb95de73676823d7ae59c6a013" ]
[ "flopt/solvers/scipy_searches/scipy_search.py" ]
[ "from time import time\n\nfrom scipy import optimize as scipy_optimize\nimport numpy as np\n\nfrom flopt.solvers.base import BaseSearch\nfrom flopt.solvers.solver_utils import (\n during_solver_message,\n)\nfrom flopt.env import setup_logger\nfrom flopt.expression import Const\nfrom flopt.solution import Solutio...
[ [ "scipy.optimize.NonlinearConstraint", "scipy.optimize.Bounds", "scipy.optimize.minimize" ] ]
jinbeizame007/planet_pybullet
[ "9b648355fd70a1aade837d835ccc5e33133ae39a" ]
[ "planet/tools/overshooting.py" ]
[ "# Copyright 2019 The PlaNet 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 require...
[ [ "tensorflow.convert_to_tensor", "tensorflow.nn.dynamic_rnn", "tensorflow.concat", "tensorflow.range", "tensorflow.shape", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.reshape", "tensorflow.zeros_like", "numpy.prod", "numpy.array", "tensorflow.sequence_mas...
CPJKU/cyolo_score_following
[ "4b34947a9b7cc19a139ce3768eac6079aaff5cfe" ]
[ "cyolo_score_following/dataset.py" ]
[ "\nimport glob\nimport os\nimport random\nimport torch\nimport torchvision\n\nimport numpy as np\n\n\nfrom cyolo_score_following.utils.data_utils import load_sequences, SAMPLE_RATE, FPS, FRAME_SIZE, HOP_SIZE\nfrom cyolo_score_following.utils.dist_utils import is_main_process\nfrom cyolo_score_following.utils.genera...
[ [ "numpy.asarray", "numpy.stack", "numpy.concatenate", "numpy.copy", "torch.set_grad_enabled", "numpy.mean", "torch.FloatTensor", "torch.device", "numpy.roll", "torch.as_tensor" ] ]
guanghaoyin/Camera-ScreenSR
[ "565075787f34ee5e778ad9fc9511cd960171deb8" ]
[ "Train_DURCAN_withGAN.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nfrom torch.autograd import Variable\r\nimport Data.utils as utils\r\nimport Loss\r\nfrom Loss import tv_loss\r\nimport Model\r\nfrom Model.Net import DURCAN\r\nfrom Data.option import args\r\nfrom importlib import import_module\r\nfrom Data.dataloader import MSDataLoader\r\...
[ [ "torch.manual_seed", "torch.cuda.empty_cache", "torch.nn.BCELoss", "torch.no_grad", "torch.device" ] ]
harish-kamath/pytorch-soft-actor-critic
[ "88373d6c67fbc40cd752882d887cff07fc7b189c" ]
[ "main.py" ]
[ "import argparse\nimport datetime\nimport gym\nimport numpy as np\nimport itertools\nimport torch\nfrom .sac import SAC\nfrom torch.utils.tensorboard import SummaryWriter\nfrom .replay_memory import ReplayMemory\nimport random\n\ndevice = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n\ndef cre...
[ [ "torch.from_numpy", "torch.cuda.is_available" ] ]
pinkerltm/datacube-ui
[ "325d404a994d49c23922e7de10c7ab244b78500b" ]
[ "apps/dc_algorithm/utils.py" ]
[ "import matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nimport numpy as np\nfrom collections import Iterable\n\n\ndef create_2d_plot(path, dates=None, datasets=None, data_labels=None, style='', titles=None, vertical=True):\n \"\"\"Create a 2d image and save it to disk\n\n Args:\n ...
[ [ "matplotlib.use", "matplotlib.pyplot.figure" ] ]
chaneyddtt/UDA-Animal-Pose
[ "f1ebfda860a2585c60fe86ce1632e910ac97ebc5" ]
[ "train/train_refinenet_mt.py" ]
[ "from __future__ import print_function, absolute_import\n\nimport argparse\nimport time\nimport random\n\nimport torch\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim\n\nimport _init_paths\nfrom pose import Bar\nfrom pose.utils.logger import Logger\nfrom pose.utils.evaluation imp...
[ [ "torch.max", "torch.load", "torch.utils.data.DataLoader", "torch.zeros_like", "torch.tensor", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.nn.functional.grid_sample", "torch.cuda.is_available", "torch.where", "torch.nn.DataParallel", "numpy.exp", "torch...
cscyuge/medlane
[ "f830cfdb48dac11e447e47cca3f72c106e0e9fe6" ]
[ "Bert/Seq2seq_old.py" ]
[ "import random\n\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\n\nimport torch\nimport numpy as np\nPAD, CLS = '[PAD]', '[CLS]'\nSEP = '[SEP]'\n\nclass Attention(nn.Module):\n r\"\"\"\n Applies an attention mechanism on the output features from the decoder.\n\n ...
[ [ "torch.nn.Dropout", "torch.LongTensor", "torch.cat", "torch.nn.Embedding", "torch.nn.Linear", "torch.bmm", "torch.cuda.is_available", "numpy.array" ] ]
jadalilleboe/skyportal
[ "501b7a09e239f03213499df297620c6a8a214cd9" ]
[ "skyportal/handlers/api/internal/plot.py" ]
[ "from baselayer.app.access import auth_or_token\nfrom baselayer.app.env import load_env\nfrom ...base import BaseHandler\nfrom .... import plot\nfrom ....models import ClassicalAssignment, Obj, Telescope\n\nimport numpy as np\nfrom astropy import time as ap_time\nimport astropy.units as u\nimport pandas as pd\nimpo...
[ [ "numpy.linspace", "pandas.DataFrame" ] ]
00why00/yolov3-tf2
[ "9f1a08cb8e8d6897a4552568b2ae16a32e4fd7ee" ]
[ "yolov3/dataset.py" ]
[ "import tensorflow as tf\nfrom absl.flags import FLAGS\n\n\n# 将模型转换为易于部署且高性能的 TensorFlow 图模型\n@tf.function\ndef transform_targets_for_output(y_true, grid_size, anchor_idxs):\n \"\"\"\n 对 label 的 shape 进行转换\n 原始shape (N, boxes, (x1, y1, x2, y2, class, best_anchor))\n 目标shape (N, grid, grid, anchors, [x1,...
[ [ "tensorflow.convert_to_tensor", "tensorflow.concat", "tensorflow.cast", "tensorflow.minimum", "tensorflow.equal", "tensorflow.data.Dataset.list_files", "tensorflow.pad", "tensorflow.where", "tensorflow.lookup.TextFileInitializer", "tensorflow.io.VarLenFeature", "tensorf...
BlakeHan01/hacknyu-22
[ "3140e72635f0d31f58378232efae4ce3f3ca2f3b" ]
[ "prediction.py" ]
[ "import pandas as pd\nimport numpy as np\nimport datetime as dt\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\n# suppress warning\nimport warnings\nwarnings.filterwarnings('ignore')\nimport statsmodels.formula.api as smf\nimport statsmodels.api as sm\nfrom statsmodels.tsa...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "pandas.to_datetime", "matplotlib.pyplot.title", "scipy.stats.normaltest", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.rcParams.update", "matplotlib.pyplot.show" ] ]
Lotayou/meta-transfer-learning
[ "c4f74e3ae3a29058f2559634412d9a1bd8a4362a" ]
[ "tensorflow/utils/misc.py" ]
[ "##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n## Created by: Yaoyao Liu\n## Modified from: https://github.com/cbfinn/maml\n## Tianjin University\n## liuyaoyao@tju.edu.cn\n## Copyright (c) 2019\n##\n## This source code is licensed under the MIT-style license found in the\n## LICENSE f...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "numpy.reshape", "tensorflow.maximum", "matplotlib.pyplot.imread", "tensorflow.reshape", "tensorflow.contrib.layers.python.layers.batch_norm", "numpy.max", "numpy.copy", "numpy.argmin", "tensorflow.square", "tensorflow....
donmezkutay/visjobs
[ "fc42865ef790d309372c6057f1719211376b87a6" ]
[ "visjobs/datas/get_MODEL.py" ]
[ "# -*- coding: utf-8 -*-\n#!/usr/bin/env python\n# coding: utf-8\nimport xarray as xr\nfrom datetime import datetime,timedelta\nimport numpy as np\n\n\n#learn if the latest wanted or the desired date from user?\ndef pick_data(year=None, month=None, day=None, hour=None, latest=False, model='GFS', hourly=False, resol...
[ [ "numpy.array", "numpy.multiply" ] ]
Arminkhayati/pySenti4SD
[ "f48838b61dfc3dc3a78cdbfbb7675cc365a0ba87" ]
[ "python/core/classification.py" ]
[ "import os\nimport csv\nimport glob\nfrom multiprocessing import Pool\nfrom collections import OrderedDict\n\nimport numpy as np\nimport pandas as pd\nfrom joblib import Parallel, delayed\nfrom sklearn.preprocessing import LabelEncoder\n\nfrom utils.csv_utils import CsvUtils\nfrom utils.csv_formatter import CsvForm...
[ [ "sklearn.preprocessing.LabelEncoder", "numpy.array", "pandas.read_csv" ] ]
UNIVR-RTI/NeuralRTI
[ "8540cc31528c2dd1da19ee34349ba12f2f0a5d59" ]
[ "train.py" ]
[ "\n\nfrom keras import backend as K\nimport keras\nimport numpy as np\nimport relighting_model as rm\nimport glob\nimport tensorflow as tf\nimport os, errno\nimport computeaph as caph\nimport time\nimport gc\nimport cv2\nimport tensorflowjs as tfjs\nimport argparse\nimport json\nkeras.layers.BatchNormalization(axis...
[ [ "numpy.amax", "tensorflow.compat.v1.ConfigProto", "numpy.amin", "tensorflow.compat.v1.keras.backend.set_session", "numpy.save", "tensorflow.compat.v1.Session", "numpy.shape", "numpy.zeros" ] ]
LBNL-ETA/G36SavingsCalculator
[ "14ca4cfa38b3d223f406200be4cbe60942aad6f2" ]
[ "process/mat_to_csv_small.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThis script can be used to convert a .mat simulation result file into a\n.csv file with a subset of model variables, as defined in the \"outputs\" list.\n\nThe .csv file is saved in the same directory as the .mat file, and is based\non the case, climate, and scenario.\n\n\"\"\"\n\n...
[ [ "pandas.concat", "pandas.DataFrame" ] ]
arp95/robot_target_tracking
[ "662f2559893866c73717874ad8e2e5cfee78c731" ]
[ "code/envs/robot_target_tracking_env_sensors.py" ]
[ "\"\"\"\nOpenAI Gym environment with robots and targets\n\nEnvironment source code: https://github.com/ksengin/active-target-localization/blob/master/target_localization/envs/tracking_waypoints_env.py\nModifications: Modified the existing environment with number of robots > 1 and the targets moving case\n\"\"\"\n\n...
[ [ "torch.abs", "matplotlib.pyplot.contourf", "numpy.sqrt", "numpy.linspace", "torch.zeros", "torch.sin", "matplotlib.pyplot.plot", "numpy.random.randn", "torch.cuda.is_available", "torch.norm", "torch.randn", "numpy.eye", "numpy.matmul", "torch.tensor", "n...
VIDA-NYU/alphad3m
[ "db40193a448300d87442c451f9da17fa5cb845fd" ]
[ "alphad3m/alphad3m/metalearning/dataset_profiler.py" ]
[ "import logging\nimport pandas as pd\nimport datamart_profiler\nfrom metalearn import Metafeatures\n\nlogger = logging.getLogger(__name__)\n\n\ndef extract_metafeatures(dataset_path, target_column):\n data = pd.read_csv(dataset_path)\n Y = data[target_column]\n Y = pd.Series([str(i) for i in Y], name=targe...
[ [ "pandas.read_csv" ] ]
StevenGrove/TreeFilter-Torch
[ "46f36024f4522056fb9a3edf90c94f0a86a1352b" ]
[ "model/cityscapes/cityscapes.fcn_32d.R101_v1c.extra/config.py" ]
[ "# encoding: utf-8\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os.path as osp\nimport sys\nimport time\nimport numpy as np\nfrom easydict import EasyDict as edict\nimport argparse\n\nC = edict()\nconfig = C\ncfg = C\n\nC.seed = 304\n\n\...
[ [ "numpy.array" ] ]
mfkasim1/pytorch
[ "cf7a0e5af49958c86522fbb556f0aa54077d72fa", "cf7a0e5af49958c86522fbb556f0aa54077d72fa" ]
[ "test/test_datapipe.py", "torch/fx/passes/net_min_base.py" ]
[ "import itertools\nimport os\nimport pickle\nimport random\nimport tempfile\nimport warnings\nimport tarfile\nimport zipfile\nimport numpy as np\nfrom PIL import Image\nfrom unittest import skipIf\n\nimport torch\nimport torch.nn as nn\nfrom torch.testing._internal.common_utils import (TestCase, run_tests)\nfrom to...
[ [ "torch.utils.data._typing.issubtype", "torch.set_default_dtype", "torch.utils.data._typing.issubinstance", "torch.utils.data.DataLoader", "torch.utils.data.datapipes.utils.decoder.imagehandler", "torch.tensor", "torch.utils.data.datapipes.iter.ListDirFiles", "torch.utils.data.datap...
Forbu/fourier_neural_operator
[ "a70ab4bf177b565373e2d8128054e4da2233660d" ]
[ "fourier_neural_operator/fourier_2d_time.py" ]
[ "\"\"\"\n@author: Zongyi Li\nThis file is the Fourier Neural Operator for 2D problem such as the Navier-Stokes equation discussed in Section 5.3 in the [paper](https://arxiv.org/pdf/2010.08895.pdf),\nwhich uses a recurrent structure to propagates in time.\n\"\"\"\n\n\nimport torch\nimport numpy as np\nimport torch....
[ [ "numpy.linspace", "torch.cat", "torch.einsum", "torch.nn.Conv2d", "torch.nn.Linear", "torch.fft.rfft2", "torch.nn.functional.gelu", "torch.rand", "torch.nn.BatchNorm2d" ] ]
nelhage/pytorch
[ "873255c6d95342d144e9d1b633c16410844b934e" ]
[ "torch/fx/experimental/const_fold.py" ]
[ "import operator\nimport re\nfrom typing import Dict, Set, List, Optional, Union\n\nimport torch.fx\nfrom torch.fx.passes.split_module import split_module\n\n\ndef _make_tuple(x):\n \"\"\"\n Helper to convert x into a one item tuple if it's not a tuple already.\n \"\"\"\n return x if isinstance(x, tuple...
[ [ "torch.fx.passes.split_module.split_module" ] ]
Ramprasad-Group/PSP
[ "6f0df0a052898c8f44a58ef9ab0578731455c4a3" ]
[ "psp/ChainBuilder.py" ]
[ "import numpy as np\nimport pandas as pd\nimport psp.PSP_lib as bd\nfrom openbabel import openbabel as ob\nimport os\nimport shutil\nimport time\nimport multiprocessing\nfrom joblib import Parallel, delayed\nimport psp.output_lib as lib\nfrom tqdm import tqdm\n\nobConversion = ob.OBConversion()\nobConversion.SetInA...
[ [ "numpy.round", "numpy.arange", "pandas.DataFrame" ] ]
vksriharsha/CQA
[ "50021cca2d1d0833a0300bea20fd259dc4871fad" ]
[ "compute_metrics.py" ]
[ "import argparse\nimport json\nimport os\nimport shutil\nimport sys\nfrom collections import defaultdict\n\nimport configs.config_template as CONFIG\nimport torch\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--expt_name', required=True, type=str)\nparser.add_argument('--data_root', default='data', ty...
[ [ "torch.load" ] ]
LMMV/MolModMT
[ "5725d6d5627b07edcbbd5e55318345a136b28c35" ]
[ "molmodmt/utils/math.py" ]
[ "import numpy as _np\n\nclass serialized_lists():\n\n self.values = None\n self.starts = None\n self.n_values = None\n self.n_lists = None\n\n def __init__ (list_of_lists, fortran=False, dtype=None):\n\n self.values= _np.concatenate(list_of_lists)\n\n self.starts= []\n jj = 0\n ...
[ [ "numpy.concatenate", "numpy.astype", "numpy.asfortranarray", "numpy.array" ] ]
hengxyz/facenet_class_wise_triplet_loss_pub
[ "ba93e3016006616310decd7e55d554d06ccb0c22" ]
[ "src/train_BP.py" ]
[ "\"\"\"Functions for building the face recognition network.\n\"\"\"\n# MIT License\n# \n# Copyright (c) 2016 David Sandberg\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software withou...
[ [ "tensorflow.train.AdagradOptimizer", "tensorflow.control_dependencies", "tensorflow.train.RMSPropOptimizer", "tensorflow.get_collection", "tensorflow.train.AdadeltaOptimizer", "tensorflow.train.ExponentialMovingAverage", "tensorflow.clip_by_global_norm", "tensorflow.train.MomentumO...
bobenxia/Centripetal-SGD
[ "e33350464504085a641a2a969d3c06e3d5cc4765" ]
[ "data/imagenet_data.py" ]
[ "import torch\nimport torchvision.transforms as transforms\nfrom data.dataset_util import DataIterator\nimport os\nimport torchvision.datasets as datasets\n\nIMGNET_TRAIN_DIR = 'imagenet_data'\n\nclass ImgnetStdTrainData(object):\n\n def __init__(self, distributed, batch_size_per_gpu, img_size=224):\n nor...
[ [ "torch.utils.data.DataLoader", "torch.utils.data.distributed.DistributedSampler" ] ]
ali-bahjati/incubator-superset
[ "c76993ac47e607062a951186ebb28cdc46f2e8eb" ]
[ "superset/views/core.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...
[ [ "pandas.DataFrame.from_records" ] ]
b8739/dashApp
[ "fdfb116cb6f6c2674aab307b554404e69b66018b" ]
[ "unused/logic.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Feb 23 14:40:14 2022\n\n@author: s\n\"\"\"\n\n##### 2022-02-15 : BIOGAS PLANT MODEL #####\n\n\nimport os\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom datetime import datetime, timedelta, date\n\nfrom sklearn.m...
[ [ "sklearn.ensemble.RandomForestRegressor", "pandas.read_excel", "pandas.to_datetime", "sklearn.metrics.r2_score", "pandas.Series", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "matplotlib.pyplot.plot", "numpy.where", "matplotlib.pyplot.gca", "matplotlib.pypl...
nihilistsumo/Blackbox_clustering
[ "9257890fb9a945115f249988c9e863654d23551c" ]
[ "experiments/ng20_eval.py" ]
[ "import argparse\nimport pickle\nimport torch\nfrom model.BBCluster import CustomSentenceTransformer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.cluster import AgglomerativeClustering\nfrom sklearn.metrics import adjusted_rand_score, adjusted_mutual_info_score, normalized_mutual_info_...
[ [ "scipy.stats.ttest_rel", "torch.norm", "torch.from_numpy", "sklearn.metrics.normalized_mutual_info_score", "sklearn.metrics.adjusted_mutual_info_score", "torch.nn.Tanh", "sklearn.metrics.cluster._supervised.check_clusterings", "numpy.int64", "sklearn.metrics.cluster.contingency...
novyantsp/DeBERTa
[ "919cf8146480daa6c39ed8b1afaeb0d5f7775b14" ]
[ "DeBERTa/apps/train.py" ]
[ "# Copyright (c) Microsoft, Inc. 2020\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n#\n# Author: penhe@microsoft.com\n# Date: 01/25/2020\n#\n\n\"\"\"DeBERTa finetuning runner.\"\"\"\n\nimport os\nfrom collections import OrderedDict,...
[ [ "torch.cuda.synchronize", "numpy.random.seed", "torch.cat", "torch.manual_seed", "torch.distributed.all_gather", "torch.utils.data.DataLoader", "torch.zeros_like", "torch.distributed.is_initialized", "numpy.copy", "numpy.append", "torch.no_grad", "numpy.savetxt", ...
dabana/sklearn-jobs
[ "daeaf2827ce0be707b280ec64ecfe852e29409a5" ]
[ "examples/plot_classifier.py" ]
[ "\"\"\"\n============================\nPlotting Template Classifier\n============================\n\nAn example plot of :class:`skljobs.template.TemplateClassifier`\n\"\"\"\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom skljobs import TemplateClassifier\n\nX = [[0, 0], [1, 1]]\ny = [0, 1]\nclf = Te...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "numpy.random.RandomState", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
suyashtn/OpenFOAM-custom-scripts
[ "73bdd17f11868ebe313d69b5cf717ad6458d2b40" ]
[ "src/bin/spanwiseAvg/get_spanwise_avg.py" ]
[ "import numpy as np\nimport os\nfrom tqdm import tqdm\nfrom scipy.interpolate import griddata\nfrom scipy.interpolate import InterpolatedUnivariateSpline\n\n__all__ = ['get_yplus', 'get_spanwise_avg']\n\ndef complete_array(data, ycoord):\n try:\n nCols = data.shape[1]\n data = np.insert(data, 0, 0,...
[ [ "numpy.square", "numpy.sqrt", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.unique", "numpy.append", "numpy.mean", "numpy.insert", "scipy.interpolate.griddata", "numpy.meshgrid", "numpy.zeros" ] ]
1Harshini/empress
[ "8ccd57b70207d2877cde11755d7e789c61313d0c" ]
[ "empress/taxonomy_utils.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2016-2020, empress development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file LICENSE, distributed with this software.\n# -------------------------------------...
[ [ "pandas.concat" ] ]
longodj/T-CVAE-MolGen
[ "adfea2c51466970aab6d15c3e875bc80430c08f6" ]
[ "src/models/modules/jtnn_enc.py" ]
[ "import torch\nimport torch.nn as nn\nfrom utils.cuda import GRUUpdate, cuda, move_dgl_to_cuda\nfrom dgl import batch, bfs_edges_generator\nimport dgl.function as DGLF\nimport numpy as np\n\nMAX_NB = 8\n\ndef level_order(forest, roots):\n try:\n edges = bfs_edges_generator(forest, roots)\n _, leave...
[ [ "torch.nn.Module.__init__", "torch.cat", "numpy.cumsum", "torch.nn.Embedding", "torch.cuda.FloatTensor", "torch.nn.Linear" ] ]
eth-sri/guiding-synthesizers
[ "3622b80eb3bf633be65036dc47e4ed7b98c3fce8" ]
[ "guidesyn/core/models/EnsembleRnnCnn.py" ]
[ "\"\"\"\nCopyright 2019 Software Reliability Lab, ETH Zurich\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable la...
[ [ "torch.nn.LSTM", "torch.cat", "torch.nn.functional.dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.init.xavier_uniform_" ] ]
sanghyun-son/srwarp
[ "d7cc08db5ba5ec9103f1813f76d1da825afe1a5b", "d7cc08db5ba5ec9103f1813f76d1da825afe1a5b" ]
[ "src/data/sr/demo.py", "src/model/sr/rdn_f.py" ]
[ "from data import common\nfrom data.sr import dataclass\nimport numpy as np\nfrom PIL import Image\n\n_parent_class = dataclass.SRData\n\n\nclass Demo(_parent_class):\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n @staticmethod\n def get_kwargs(cfg, train=False):\n ...
[ [ "numpy.array" ], [ "torch.nn.Sequential", "torch.cat", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.PixelShuffle", "torch.nn.ReLU" ] ]
dujiangsu/FasterTransformer
[ "0648b8839be02eafba1cdba511a41b4fd13e2c9e" ]
[ "bert-quantization/bert-tf-quantization/fused_layer_norm.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n# Copyright (c) 2018, NVIDIA CORPORATION. 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 ...
[ [ "tensorflow.shape", "tensorflow.python.ops.nn.fused_batch_norm", "tensorflow.contrib.layers.python.layers.utils.get_variable_collections", "tensorflow.python.ops.init_ops.zeros_initializer", "tensorflow.python.ops.array_ops.reshape", "tensorflow.python.ops.init_ops.ones_initializer", "...
lfunderburk/Effective-Instructions
[ "ce40f890fb8623ff1ec9c3e9e1190505cbd1e6db" ]
[ "instruction_env/Lib/site-packages/pandas/io/parquet.py" ]
[ "\"\"\" parquet compat \"\"\"\n\nfrom typing import Any, Dict, Optional\nfrom warnings import catch_warnings\n\nfrom pandas.compat._optional import import_optional_dependency\nfrom pandas.errors import AbstractMethodError\n\nfrom pandas import DataFrame, get_option\n\nfrom pandas.io.common import get_filepath_or_bu...
[ [ "pandas.io.common.is_s3_url", "pandas.io.s3.get_file_and_filesystem", "pandas.errors.AbstractMethodError", "pandas.compat._optional.import_optional_dependency", "pandas.io.common.get_filepath_or_buffer", "pandas.get_option", "pandas.io.common.is_gcs_url" ] ]
iMeleon/CRNN-for-train-in-COLAB
[ "db1b932b243d96c72cd4ed2e2f22c5e6172832eb" ]
[ "train.py" ]
[ "import os\nimport glob\nimport torch\nimport numpy as np\n\nimport albumentations\nfrom sklearn import preprocessing\nfrom sklearn import model_selection\nfrom sklearn import metrics\n\nimport config\nimport dataset\nimport engine\nfrom model import CaptchaModel\n\n\nfrom torch import nn\n\n\ndef remove_duplicates...
[ [ "torch.softmax", "torch.optim.lr_scheduler.ReduceLROnPlateau", "sklearn.metrics.accuracy_score", "torch.utils.data.DataLoader", "sklearn.model_selection.train_test_split", "numpy.save", "sklearn.preprocessing.LabelEncoder", "numpy.array", "torch.argmax" ] ]
sx-aurora-dev/weld
[ "80cb8ad4bf14f6daf1b33fe18d34784bd185ae75" ]
[ "python/numpy-0.1.0/weldnumpy/tests/test_multid.py" ]
[ "import numpy as np\nimport py.test\nimport random\nfrom weldnumpy import *\nimport weldnumpy as wn\nfrom test_utils import *\n\n'''\nNeed to add a bunch of _real_shape invariance based tests.\n'''\n\ndef diagonal(ary, offset=0):\n \"\"\"\n from bohrium guys.\n \"\"\"\n if ary.ndim != 2:\n raise ...
[ [ "numpy.log", "numpy.sqrt", "numpy.allclose", "numpy.array_equal", "numpy.transpose", "numpy.sum" ] ]
Ankit-Mehra/perceptron_package
[ "4c37acae9f918cdbac16c024d4822f8c3505004d" ]
[ "src/simple_perceptron/perceptron.py" ]
[ "import os\nimport joblib\nimport numpy as np\nimport logging\n\n#Percpetron Class\nclass Perceptron:\n def __init__(self,eta:float=None,epochs:int=None):\n self.weights = np.random.randn(3)*1e-4 # initialize the weights with small random values \n training = (eta is not None) and (epochs is not No...
[ [ "numpy.dot", "numpy.where", "numpy.sum", "numpy.random.randn" ] ]
LegenDong/IQIYI_VID_FACE_2019
[ "258ff9282206e7b7074ed9ada5ef928bc9305ec6" ]
[ "models/losses.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 2019/4/21 13:59\n# @Author : LegenDong\n# @User : legendong\n# @File : losses.py\n# @Software: PyCharm\nimport torch\nimport torch.nn as nn\n\n__all__ = ['FocalLoss', ]\n\n\nclass FocalLoss(nn.Module):\n def __init__(self, gamma=0, eps=1e-7):\n super(FocalLoss...
[ [ "torch.exp", "torch.mean", "torch.nn.CrossEntropyLoss" ] ]
RitwickGhosh/Compressed_CNN_Radiology_Image
[ "f082e7b78ab86097e00cde7efe2d1a78482ac5c7" ]
[ "XNORnet/XNORNetLayer.py" ]
[ "import keras.backend as K\nfrom keras.layers import Convolution2D\nfrom keras.engine import InputSpec\nimport numpy as np\n\nfrom CustomOps.customOps import passthroughSign\n\nclass XNORNetConv2D(Convolution2D):\n \"\"\"2D 'XNORNet' convolution layer (e.g. spatial convolution over images).\n\n This is an imp...
[ [ "numpy.abs", "numpy.multiply", "numpy.ones", "numpy.sign", "numpy.broadcast_to", "numpy.sum" ] ]
os-climate/sostrades-value-assessment
[ "ec93df566ef557f2342f6b21db9a0ba3b6097900" ]
[ "value_assessment/tests/l0_test_manufacturer_vb.py" ]
[ "'''\r\nCopyright 2022 Airbus SAS\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or ...
[ [ "pandas.DataFrame" ] ]
thibautlouis/psplay
[ "f54e0b88149f1fbb4cc66bb66e916a96b4cea2c7" ]
[ "psplay/tests/test_ps_tools.py" ]
[ "import ps_tools\nimport time\nimport pylab as plt, numpy as np\n\nmap0_info = {\"name\": \"split0_IQU.fits\", \"data_type\": \"IQU\", \"id\": \"split0\", \"cal\": None}\nmap1_info = {\"name\": \"split1_IQU.fits\", \"data_type\": \"IQU\", \"id\": \"split1\", \"cal\": None}\n\nsource_mask = {\"name\": \"source_mask....
[ [ "numpy.diag", "numpy.loadtxt" ] ]
piyushpathak03/Copy-move-Image-forgery-detection-
[ "000a78bdfc785c0a1bfb50b3e98b942e9334e6d7" ]
[ "fine_tune_last_layers_resnet.py" ]
[ "import numpy as np\r\nfrom keras.applications.resnet50 import ResNet50\r\nfrom keras.models import load_model\r\nfrom keras.models import Sequential\r\nfrom keras.layers import Dense, Flatten, Dropout\r\nfrom keras import optimizers\r\n\r\n\r\ndef main():\r\n\tx_train=np.load('train_data/x_train.npy')\r\n\tx_cv=np...
[ [ "numpy.load" ] ]
ksivasan/PytorchTutorialExamples
[ "5997f17de52b6b6a005e0419c3f9369f83d5f66f" ]
[ "pytorch/binaryclassification.py" ]
[ "# pytorch mlp for binary classification\nfrom numpy import vstack\nfrom pandas import read_csv\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.metrics import accuracy_score\nfrom torch.utils.data import Dataset\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data import random_split\nfrom ...
[ [ "pandas.read_csv", "torch.Tensor", "torch.utils.data.DataLoader", "torch.nn.BCELoss", "matplotlib.pyplot.plot", "torch.nn.Linear", "torch.utils.data.random_split", "torch.nn.init.kaiming_uniform_", "torch.nn.Sigmoid", "torch.nn.init.xavier_uniform_", "torch.nn.ReLU", ...
lucaskingjade/RNNTutorial
[ "b641e50014b56bb8e0f8762c76f1178a9a7c911f", "b641e50014b56bb8e0f8762c76f1178a9a7c911f" ]
[ "rnntutor/lib/python2.7/site-packages/theano/sandbox/gpuarray/tests/test_elemwise.py", "rnntutor/lib/python2.7/site-packages/theano/sandbox/cuda/opt_util.py" ]
[ "import theano\nfrom theano import scalar, gof\nfrom theano.compat.python2x import all, any\nfrom theano.tests.unittest_tools import SkipTest\n\nfrom theano.tensor.tests.test_elemwise import (test_Broadcast, test_DimShuffle,\n test_CAReduce, T_reduce_dtype)\n\nfrom thea...
[ [ "numpy.random.rand" ], [ "numpy.asarray" ] ]
HoloClean/RecordFusion
[ "4094cd9e6c779584b9dbed6f3ae68eb11b13e2b2" ]
[ "repair/featurize/freqfeatfusion_old.py" ]
[ "import torch\nfrom dataset import AuxTables\nfrom .featurizer import Featurizer\nfrom functools import partial\n\n\n#GM\n\nclass FreqFeaturizerFusion_old(Featurizer):\n def specific_setup(self):\n self.name = 'FreqSignal_old'\n self.all_attrs = self.ds.get_attributes()\n self.all_attrs.remo...
[ [ "torch.cat", "torch.zeros" ] ]
amandatta16/NN
[ "b2d78fe90623a93c0803dbbd3b4fa1495c50dbc0" ]
[ "utils.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport h5py\n\n\ndef sigmoid(Z):\n \"\"\"\n Implements the sigmoid activation in numpy\n\n Arguments:\n Z -- numpy array of any shape\n\n Returns:\n A -- output of sigmoid(z), same shape as Z\n cache -- returns Z as well, useful during backp...
[ [ "numpy.dot", "numpy.log", "numpy.maximum", "numpy.sqrt", "numpy.random.seed", "numpy.squeeze", "numpy.divide", "matplotlib.pyplot.subplot", "numpy.random.randn", "numpy.where", "matplotlib.pyplot.axis", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.s...
haganta-g/glass_frog_design
[ "06a0e3d3a67d53c5f0bf4fd51e50e7cac58397b7" ]
[ "scripts/fin.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nimport pint\n\nureg = pint.UnitRegistry()\n\ndef si(v):\n return v.to_base_units().m\n\nclass Fin:\n # for a single fin, accurate if using 3 or 4 fins\n def __init__(self, root_chord, tip_chord, span, tube_diameter, mid_chord_sweep):\n\n self.c...
[ [ "matplotlib.pyplot.gca", "numpy.sqrt", "numpy.arctan", "numpy.cos", "matplotlib.pyplot.plot", "numpy.tan", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
iiSeymour/pyfse
[ "191ee958a0b6b2cb4e233d2c8b71c22abfd01ac7" ]
[ "tests/fse_tests.py" ]
[ "import numpy as np\nfrom unittest import TestCase, main\nfrom numpy.testing import assert_array_equal\n\nfrom fse import fse_encode, fse_decode, huf_encode, huf_decode\n\n\nclass Tests:\n \"\"\" Base test functions for all encoding/decoding functions \"\"\"\n def test_decode(self):\n \"\"\" S1: simple...
[ [ "numpy.testing.assert_array_equal", "numpy.array", "numpy.random.randint" ] ]
JWKennington/CourseNR
[ "c0f62c0e129fd44c3b1c006fce62e4528e59cd8b" ]
[ "nrpsu/hw1/problem_2.py" ]
[ "\"\"\"This script uses the analytical solutions for the Oppenheimer-Snyder\nmodel of spherical dust collapse to plot geodesics \"\"\"\n\nimport numpy\nimport plotly.graph_objects as go\n\n\ndef star_rad(conf_time: float, rad_0: float) -> float:\n \"\"\"Surface of star radial coordinate in conformal time\"\"\"\n...
[ [ "numpy.sqrt", "numpy.arange", "numpy.cos", "numpy.sin", "numpy.array" ] ]
MatteoArm/tensorflow
[ "a39ac9de5fdbbb00c7e9b6896c49ed29c2ce2e15" ]
[ "tensorflow/python/keras/engine/functional_test.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.keras.engine.sequential.Sequential", "tensorflow.python.keras.layers.Lambda", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.constant", "tensorflow.python.keras.layers.Dense", "tensorflow.python.ops.state_ops.assign_add", "te...
joel-shor/addons
[ "27bbb3dd6bb8394a3793ef7a123ed730951f41e4", "de99c6dd904c475c5c95726911f4aac447c13361", "b59f0e89ca09837808331be1eee8ae8df8eb9355" ]
[ "tensorflow_addons/activations/hardshrink_test.py", "tensorflow_addons/text/crf_test.py", "tensorflow_addons/losses/focal_loss.py" ]
[ "# Copyright 2019 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.convert_to_tensor", "tensorflow.constant", "numpy.random.seed", "tensorflow.test.main", "tensorflow.ones", "tensorflow.test.compute_gradient", "numpy.random.uniform", "tensorflow.GradientTape" ], [ "tensorflow.constant", "tensorflow.random.uniform", "ten...
narutowang/indrnn
[ "434e1200b5e742a0eac92bed661c69e97b8b8711" ]
[ "ptb/ptb_word_lm.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.device", "tensorflow.concat", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.zeros", "tensorflow.reduce_sum", "numpy.exp", "tensorflow.summary.scalar", "tensorflow.Graph", "tensorflow.Variable", "tensorflow.random_uniform_initializer", ...
bennorth/python-xml-serdes
[ "fb1c44e1630bdbf1fc0ae97a51fb5adac498ffc0" ]
[ "tests/test_intrusive.py" ]
[ "from __future__ import print_function\n\nimport pytest\n\nfrom xmlserdes import XMLSerializable, XMLSerializableNamedTuple\nfrom xmlserdes.utils import str_from_xml_elt\nfrom xmlserdes.errors import XMLSerDesError, XMLSerDesWrongChildrenError\n\n\nfrom collections import OrderedDict\nimport numpy as np\nfrom lxml ...
[ [ "numpy.arange", "numpy.array" ] ]
dhall1995/Hi_C_GNN
[ "e185df3c30cbd67e8860289f5877a91ad0a68181" ]
[ "GrapHiC/utils/parse_cooler.py" ]
[ "from typing import Dict, List, Tuple, Optional\n\nfrom cooler import Cooler\nimport numpy as np\n\n\ndef parse_cooler(\n cooler_file: str, \n regions: Dict[str, np.ndarray]\n) -> Tuple[Cooler, List[np.ndarray]]:\n # Load cooler\n c = Cooler(cooler_file)\n\n # Fetch relevant bin_ids from the cooler f...
[ [ "numpy.array", "numpy.where", "numpy.diff" ] ]
ftnext/atmaCup10-paintings-likes
[ "ef152d761eb5bd4abfa6c9c24e9b14adf86b5a6c" ]
[ "word2vec.py" ]
[ "\"\"\"object_id, nameの形式のCSVについて、object_idごとに固定長のベクトル表現を作る\"\"\"\n\nimport argparse\nimport hashlib\nimport os\nimport pickle\nimport re\nfrom collections import defaultdict\nfrom itertools import combinations\nfrom pathlib import Path\n\nimport numpy as np\nfrom gensim.models import word2vec\nfrom tqdm import tqd...
[ [ "numpy.mean" ] ]
leandreeberhard/model_stacking
[ "40fc62b838638efec559386c88bbf780d16fe4db" ]
[ "knn_fit.py" ]
[ "########################################\n# KNN classifier\n########################################\nfrom sklearn.neighbors import KNeighborsClassifier\n\nX_train, X_test, y_train, y_test = train_test_split(train_data, train_labels, test_size=0.3)\n\nknn_fitter = KNeighborsClassifier(n_neighbors=5, weights='unifo...
[ [ "sklearn.neighbors.KNeighborsClassifier" ] ]
Matt711/cudf
[ "4c9ef5161268e2486938546deef00f7fc84c9a95" ]
[ "python/cudf/cudf/tests/test_applymap.py" ]
[ "# Copyright (c) 2018-2021, NVIDIA CORPORATION.\n\nfrom itertools import product\nfrom math import floor\n\nimport numpy as np\nimport pytest\n\nfrom cudf import Series\nfrom cudf.testing import _utils as utils\n\n\n@pytest.mark.parametrize(\n \"nelem,masked\", list(product([2, 10, 100, 1000], [True, False]))\n)...
[ [ "numpy.random.random", "numpy.random.seed", "numpy.round", "numpy.testing.assert_array_equal", "numpy.array", "numpy.testing.assert_array_almost_equal" ] ]
sealneaward/uoit-machine-learning
[ "e80c3b5ad95bd152ad487454e8c0a61e702ebcfc" ]
[ "tutorials/scraping/package/reference/utils.py" ]
[ "# import libraries\nimport pandas as pd\nimport re\nimport math\n\nPLAYER_RE = r'([A-Z].\\s)\\w+'\n\ndef _minute(play):\n \"\"\"\n Get int of minute (out of 48) that it occurs in\n \"\"\"\n minute = (12 - int(play['TIME'].split(':')[0])) + ((int(play['QUARTER']) - 1) * 12) - 1\n return minute\n\n\n#...
[ [ "pandas.read_html", "pandas.isnull", "pandas.DataFrame" ] ]
kimcando/PyTorch-BayesianCNN
[ "ddc4c10c9e5cb33df2e0eaa97bb3ea6991b0081e" ]
[ "layers/BBB_MCMF_LRT/BBBConv.py" ]
[ "import sys\nsys.path.append(\"..\")\n\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import Parameter\n\nimport utils\nfrom metrics import calculate_kl as KL_DIV\nimport config_bayesian as cfg\nfrom ..misc import ModuleWrapper\n\n\nclass BBBConv2d(ModuleWrapper):\...
[ [ "torch.Tensor", "torch.sqrt", "torch.nn.functional.conv2d", "torch.exp", "torch.cuda.is_available" ] ]
kbardool/CarND-Advanced-Lane-Lines
[ "2c3a0b4c1623c4e303b3833c166627a56c260d71" ]
[ "common/plots.py" ]
[ "import numpy as np\nimport matplotlib.image as mpimg\nimport matplotlib.pyplot as plt\n\n\ndef plot_1(pl, legend = 'best', size=(15,7)):\n plt.figure(figsize=size)\n ax = plt.gca()\n min_x = min(pl.imgUndistStats['RGB'])\n max_x = max(pl.imgUndistStats['RGB'])\n len_x = len(pl.imgUndistStats['RGB'])...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.legend", "matplotlib.pyplot.axhline", "matplotlib.pyplot.axvline", "numpy.clip", "matplotlib.pyplot.ylim", "matplotlib.pyplot.hlines", "matplotlib.pyplot.axhspan", "matplotlib.pyplot.text", "numpy.array", "matplotlib.pyplot.fi...
Nikhil-Wani/Intelligent-Safety-Driving-Vechicle
[ "6c96a49735291c9a71176eabb3df13b4cb1670a5", "6c96a49735291c9a71176eabb3df13b4cb1670a5" ]
[ "Game codes/exp4.py", "Game codes/exp6.py" ]
[ "import numpy as np\r\nfrom PIL import ImageGrab\r\nimport cv2\r\nimport time\r\nfrom directkeys import ReleaseKey, PressKey, W, A, S, D\r\nimport pyautogui\r\n\r\n\r\ndef draw_lines(img, lines):\r\n try:\r\n for line in lines:\r\n coords = line[0]\r\n cv2.line(img, (coords[0],coords...
[ [ "numpy.array", "numpy.zeros_like" ], [ "numpy.linalg.lstsq", "numpy.array", "numpy.zeros_like" ] ]
kirtan2605/Coursework_Codes
[ "3455496e8ec0ae3a576cb3fc3b2ed01a055149c5" ]
[ "AS2101_Labwork/4.Submissions/Task 5/gs_orth.py" ]
[ "import numpy as np\nimport math\n\ndef normalize(column):\n \"\"\"\n this function takes a array and normalizes it\n\n input : array\n\n output : normalized array\n \"\"\"\n sq_sum = 0\n for ele in column:\n sq_sum = sq_sum + (ele*ele)\n norm_column = column/math.sqrt(sq_sum)\n\n ...
[ [ "numpy.dot", "numpy.array" ] ]
xia-huang-411303/EasyRec
[ "7b2050dddc0bfec9e551e2199a36414a3ee82588" ]
[ "easy_rec/python/layers/dnn.py" ]
[ "# -*- encoding:utf-8 -*-\n# Copyright (c) Alibaba, Inc. and its affiliates.\nimport logging\n\nimport tensorflow as tf\n\nfrom easy_rec.python.utils.load_class import load_by_path\n\nif tf.__version__ >= '2.0':\n tf = tf.compat.v1\n\n\nclass DNN:\n\n def __init__(self, dnn_config, l2_reg, name='dnn', is_training...
[ [ "tensorflow.layers.batch_normalization", "tensorflow.layers.dense", "tensorflow.nn.dropout" ] ]
yxxxxx38324/YOLOX
[ "dd1f99ce228b0c5ad0c5b309c072c9df134ce1ae" ]
[ "tools/train.py" ]
[ "#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# Copyright (c) Megvii, Inc. and its affiliates.\nimport pdb\nimport argparse\nimport random\nimport warnings\nfrom loguru import logger\n\nimport torch\nimport torch.backends.cudnn as cudnn\n\nfrom yolox.core import Trainer, launch\nfrom yolox.exp import get_exp\n\n...
[ [ "torch.manual_seed", "torch.cuda.device_count" ] ]
MaxBasov/IML.HUJI
[ "2e2982876f9b13ecd204170246a13356d67273f5" ]
[ "IMLearn/learners/regressors/polynomial_fitting.py" ]
[ "from __future__ import annotations\nfrom typing import NoReturn\nfrom . import LinearRegression\nfrom ...base import BaseEstimator\nimport numpy as np\n\n\nclass PolynomialFitting(BaseEstimator):\n \"\"\"\n Polynomial Fitting using Least Squares estimation\n \"\"\"\n def __init__(self, k: int) -> Polyn...
[ [ "numpy.vander" ] ]
h-mayorquin/camp_india_2016
[ "a8bf8db7778c39c7ca959a7f876c1aa85f2cae8b" ]
[ "project3_sustained_activity/neuron_model.py" ]
[ "import numpy as np\nfrom brian2 import *\nimport seaborn as sns\nsns.set(font_scale=2.0)\n\nN = 1\n\n# Neuron Parameters\ng_l = 0.05 * msiemens / cm2\nCm = 1.0 * ufarad / cm2 # Specific membrane capacitance\nE_l = -60 * mV # Resting potential\nV_t = -50 * mV # Threshold\ntau_w = 600 * ms # Adaptation time con...
[ [ "numpy.arange", "numpy.array" ] ]
flabby1976/Strava-local-heatmap
[ "89163b6b4b2a6573607001864f24e867efadc50c" ]
[ "strava_local_heatmap.py" ]
[ "# Copyright (c) 2018 Remi Salmon\r\n# \r\n# Permission is hereby granted, free of charge, to any person obtaining a copy\r\n# of this software and associated documentation files (the \"Software\"), to deal\r\n# in the Software without restriction, including without limitation the rights\r\n# to use, copy, modify, ...
[ [ "matplotlib.pyplot.imsave", "numpy.radians", "scipy.ndimage.gaussian_filter", "numpy.logical_and", "matplotlib.pyplot.imread", "numpy.degrees", "matplotlib.pyplot.get_cmap", "numpy.dstack", "numpy.sinh", "numpy.round", "numpy.tan", "numpy.cos", "numpy.array", ...
QianWanghhu/predict_uq
[ "9d2e9c0a9cddef901ef89985497fa94eb36c4c03" ]
[ "src/gp_build.py" ]
[ "#!/usr/bin/env python\nfrom multiprocessing import Pool\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\nfrom functools import partial\nimport copy\nimport pandas as pd\nimport pickle\n\nfrom scipy import stats\n# from scipy.optimize import root\nfrom scipy.optimize import bisect\n\nfrom sklearn.ga...
[ [ "pandas.concat", "pandas.read_csv", "numpy.abs", "numpy.asarray", "numpy.arange", "numpy.mod", "numpy.cumsum", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.ones", "numpy.where", "numpy.exp", "numpy.load", "sklearn.gaussian_process.kernel...
Lichang000net/Landslide-classification
[ "1c23251face31b913aca3c3e1cd31555fe77adf8" ]
[ "utils.py" ]
[ "import numpy as np\r\n\r\ndef calculate_all_prediction(confMatrix):\r\n '''\r\n 计算总精度:对角线上所有值除以总数\r\n '''\r\n total_sum = confMatrix.sum()\r\n correct_sum = (np.diag(confMatrix)).sum()\r\n prediction = float(correct_sum) / float(total_sum)\r\n return prediction" ]
[ [ "numpy.diag" ] ]
litian96/fair-federated-learning
[ "f09797113147b5ae66eb0348e93f575d5d63baed" ]
[ "flearn/trainers/qffedavg.py" ]
[ "import numpy as np\nfrom tqdm import trange, tqdm\nimport tensorflow as tf\n\nfrom .fedbase import BaseFedarated\nfrom flearn.utils.tf_utils import process_grad, cosine_sim, softmax, norm_grad\nfrom flearn.utils.model_utils import batch_data, gen_batch, gen_epoch\n\n\nclass Server(BaseFedarated):\n def __init__...
[ [ "numpy.float_power", "numpy.asarray", "numpy.ones", "tensorflow.train.GradientDescentOptimizer", "numpy.array" ] ]
qutang/arus
[ "ee422bbadc72635037944359d00475f698e8fc61" ]
[ "arus/models/splitter.py" ]
[ "from sklearn.model_selection import TimeSeriesSplit\n\n\nclass TimeSeriesEpisodeSplit:\n def __init__(self, fcs_df, fs_names, task_name, n_split=5):\n self.fs_names = fs_names\n self.task_name = task_name\n self.episodes = fcs_df.groupby(task_name)\n self.spliters = {}\n self....
[ [ "sklearn.model_selection.TimeSeriesSplit" ] ]
saustinp/3D-CG
[ "8d3e161674273649af1f23b2a0e1d5100971477a" ]
[ "master/pascalindex.py" ]
[ "import numpy as np\n\ndef pascalindex2d(k):\n \"\"\"\n The purpose of this function is to prepare a set of combinations of m and n for the creation of the Jacobi polynomials that satisfy (m+n)<=k.\n k: int, max order of the Jacobi polynomial desired\n\n Returns: array of (ncomb x 2), where each row cor...
[ [ "numpy.fliplr", "numpy.arange", "numpy.concatenate", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
flekschas/PerceptualSimilarity
[ "3cfaf54a3f3edf55df4ed85a37bbe96321c6d094" ]
[ "models/dist_model.py" ]
[ "\nfrom __future__ import absolute_import\n\nimport numpy as np\nimport torch\nimport os\nfrom collections import OrderedDict\nfrom torch.autograd import Variable\nfrom .base_model import BaseModel\nfrom scipy.ndimage import zoom\nfrom tqdm import tqdm\n\nfrom . import networks_basic as networks\nimport models as u...
[ [ "torch.optim.Adam", "torch.mean", "torch.clamp", "torch.load", "scipy.ndimage.zoom", "numpy.cumsum", "numpy.mean", "numpy.argsort", "torch.nn.DataParallel", "numpy.array", "numpy.sum", "torch.autograd.Variable" ] ]
tin6150/urbansim
[ "0db75668ada0005352b7c7e0a405265f78ccadd7" ]
[ "urbansim/urbanchoice/tests/test_mnl.py" ]
[ "\"\"\"\nTest data and results for this are generated\nby the R script at data/mnl_tests.R.\n\n\"\"\"\nfrom __future__ import division\n\nimport os.path\n\nimport numpy as np\nimport numpy.testing as npt\nimport pandas as pd\nimport pytest\nfrom patsy import dmatrix\n\nfrom .. import mnl\n\n\n@pytest.fixture\ndef n...
[ [ "pandas.concat", "pandas.read_csv", "pandas.Series", "numpy.tile", "pandas.DataFrame", "numpy.testing.assert_allclose", "numpy.array" ] ]
TimS70/WebET_Analysis
[ "32fc2e1b70c2dad5637ee1614a6a651bc8d458b4" ]
[ "utils/rearrange.py" ]
[ "import numpy as np\n\n\ndef pivot_outcome_by_factor(data, factor, outcome):\n if len(data) > len(data['run_id'].unique()):\n outcomes_by_factor = data.groupby(\n ['run_id', factor],\n as_index=False)[outcome].mean()\n else:\n outcomes_by_factor = data[\n np.appe...
[ [ "numpy.append" ] ]
CorcovadoMing/box-convolutions
[ "9ef77b9ad4d2bab48327b4227a3847ae87da629d" ]
[ "examples/Cityscapes/convnet-runtime-benchmark.py" ]
[ "\"\"\"\n The script I use for benchmarking.\n \n Architectures are optimized for inference as if they were deployed in\n production: BatchNorms and Dropouts are absorbed, \"void\" class is removed.\n \n I managed to fully reproduce Torch7 runtimes from the paper for ENet\n and ERFNet; however,...
[ [ "torch.nn.Sequential", "torch.cuda.synchronize", "torch.manual_seed", "torch.no_grad", "torch.set_num_threads", "torch.rand" ] ]