repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
xyabc/laygo_public | [
"869e11682ed9c4c6eb147876088db0199ce09a24"
] | [
"GridLayoutGeneratorHelper.py"
] | [
"#!/usr/bin/python\n########################################################################################################################\n#\n# Copyright (c) 2014, Regents of the University of California\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification... | [
[
"numpy.array"
]
] |
DalhousieAI/pytorch-minimize | [
"0fa4a3fdd4fd396ef82c3fdb3bd7880644462b91"
] | [
"tests/test_pytorch_minimize.py"
] | [
"from __future__ import print_function\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom pytorch_minimize.optim import MinimizeWrapper\nimport numpy as np\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.... | [
[
"sklearn.datasets.make_classification",
"numpy.random.seed",
"torch.nn.functional.log_softmax",
"torch.nn.functional.nll_loss",
"torch.manual_seed",
"sklearn.model_selection.train_test_split",
"torch.from_numpy",
"torch.nn.Linear",
"torch.cuda.is_available",
"torch.device"
... |
sandysa/Environment_Shaping_NSE | [
"29db4ae6302cc8c6f546fae22ff7eea2588db94f",
"29db4ae6302cc8c6f546fae22ff7eea2588db94f"
] | [
"src/shaping_multiple_actors.py",
"src/plotresults.py"
] | [
"########################################################################################\r\n# Author: Sandhya Saisubramanian\r\n# Description: Implements environment shaping and actor-designer coordination\r\n# \t\t\t for driving domain (multiple actor setting)\r\n################################################... | [
[
"numpy.array",
"sklearn.ensemble.RandomForestClassifier"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.yticks",
"numpy.array",
"matplotlib.pyplot.ylabel"... |
ayansengupta17/agents | [
"c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a",
"c727141f67051b86d2564c4bd5fbc080623bfe19",
"c727141f67051b86d2564c4bd5fbc080623bfe19",
"c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a",
"c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a"
] | [
"tf_agents/policies/tf_policy.py",
"tf_agents/environments/batched_py_environment_test.py",
"tf_agents/policies/actor_policy_test.py",
"tf_agents/networks/encoding_network_test.py",
"tf_agents/policies/policy_saver.py"
] | [
"# coding=utf-8\n# Copyright 2018 The TF-Agents 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 b... | [
[
"tensorflow.constant",
"tensorflow.shape",
"tensorflow.compat.dimension_value",
"tensorflow.no_op",
"tensorflow.nest.flatten",
"tensorflow.nest.map_structure"
],
[
"numpy.array",
"numpy.random.RandomState",
"tensorflow.test.main"
],
[
"tensorflow.constant",
"ten... |
multimodallearning/weight-estimation-under-cover | [
"d79ef9f9e66ebcc20bdce0b20297f2e902c1de67"
] | [
"models/unet3d_cnn3d_e2e.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom models.cnn3d import CNN3D\n\n\nclass UNet3D_CNN3D(nn.Module):\n def __init__(self, cfg):\n super(UNet3D_CNN3D, self).__init__()\n\n self.down1a = nn.Sequential(nn.Conv3d(in_channels=1, out_channels=32, kernel_size=3, stride... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.nn.ConvTranspose3d",
"torch.nn.MaxPool3d",
"torch.nn.Conv3d",
"torch.nn.ReLU",
"torch.nn.BatchNorm3d"
]
] |
TianchengShu/pydata-revised | [
"df6382f1e5f54aeb15cbd8122533adfdd569efbc"
] | [
"examples/cprof_example.py"
] | [
"import numpy as np\nfrom numpy.linalg import eigvals\n\ndef run_experiment(niter=100):\n K = 100\n results = []\n for _ in range(niter):\n mat = np.random.randn(K, K)\n max_eigenvalue = np.abs(eigvals(mat)).max()\n results.append(max_eigenvalue)\n return results\nsome_results = run... | [
[
"numpy.max",
"numpy.linalg.eigvals",
"numpy.random.randn"
]
] |
SeokjaeLIM/DSLR-release | [
"861429482faf50ee3d6570948af8c48df1fc7f43"
] | [
"test.py"
] | [
"#from Python\nimport time\nimport csv\nimport os\nimport math\nimport numpy as np\nimport sys\nfrom shutil import copyfile\n\n#from Pytorch\nimport torch\nimport torchvision\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torchvision import datasets\nfrom torchvis... | [
[
"torch.mean",
"torch.abs",
"torch.cuda.synchronize",
"torch.load",
"torch.set_grad_enabled",
"torch.no_grad",
"torch.cuda.is_available",
"torch.nn.DataParallel",
"torch.autograd.Variable"
]
] |
huhuhang/yolov3 | [
"6c254b3f453c394046381e1c00cb0908b8f97b3a"
] | [
"yolo_layer.py"
] | [
"import math\nimport numpy as np\nimport sys\nimport time\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .utils import bbox_iou, multi_bbox_ious\n\n\nclass YoloLayer(nn.Module):\n def __init__(self, anchors, stride, num_classes): \n super().__init__()\n self.anchors, ... | [
[
"torch.nn.Softmax",
"torch.sigmoid",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.max",
"torch.linspace",
"torch.zeros",
"torch.exp",
"torch.FloatTensor",
"torch.device",
"numpy.array",
"torch.nn.MSELoss"
]
] |
sositon/IML.HUJI | [
"aaf32089d0ccf4212e33d306bab6ac19b6275e8d"
] | [
"IMLearn/learners/regressors/linear_regression.py"
] | [
"from __future__ import annotations\nfrom typing import NoReturn\nfrom ...base import BaseEstimator\nimport numpy as np\nfrom numpy.linalg import pinv\nfrom ...metrics.loss_functions import mean_square_error\n\n\nclass LinearRegression(BaseEstimator):\n \"\"\"\n Linear Regression Estimator\n\n Solving Ordi... | [
[
"numpy.linalg.pinv",
"numpy.ones_like"
]
] |
Cam2337/RecycleNet-DCGAN | [
"a6691d1e3e03e286192a1791fd323bd2f442ad9f"
] | [
"src/train.py"
] | [
"#!/usr/bin/env python3\n\"\"\"Training module for DCGAN.\"\"\"\n\nimport argparse\nimport logging\nlogging.root.setLevel(logging.INFO)\nimport os\nfrom typing import Any, Dict, List, Tuple\n\nimport model\nimport utils\nimport math\nimport numpy as np\nimport torch\nimport torch.cuda\nimport torch.nn as nn\nimport... | [
[
"torch.full",
"torch.load",
"torch.randn",
"torch.utils.data.DataLoader",
"torch.nn.BCELoss",
"torch.mul",
"torch.no_grad",
"torch.device"
]
] |
hertzsprung/seamless-wave-uq | [
"10a9b2e18d11cf3f4e711a90523f85758e5fb531"
] | [
"swepc.python/swepc/test/topography.py"
] | [
"import numpy as np\nimport sys\n\nclass Bump:\n def __init__(self, a_mean, a_stddev, halfWidth):\n self.a_mean = a_mean\n self.a_stddev = a_stddev\n self.halfWidth = halfWidth\n\n def z0(self, x):\n return self.a_mean*(1/np.cosh(np.pi/self.halfWidth*x))**2\n\n def z1(self, x):\... | [
[
"numpy.random.normal",
"numpy.array",
"numpy.cosh"
]
] |
shubham-shinde/Machine-Learning | [
"e49863c49171fd8b44f72f37112a744ea63df228"
] | [
"naive bias/naive.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Nov 13 16:50:52 2018\n\n@author: shubham\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n#import the data\ndataset = pd.read_csv('cancer.csv')\n#index location = iloc\n#dataset is a 2d matrix\n#select all... | [
[
"pandas.read_csv",
"sklearn.naive_bayes.GaussianNB"
]
] |
LukasHedegaard/domain-adaptation-datasets | [
"44f6ae66743b4a855644a770093e34cf0ede9ce3"
] | [
"tests/datasetops/testing_utils.py"
] | [
"from pathlib import Path\nfrom typing import NamedTuple\nfrom datasetops.loaders import Loader\nimport numpy as np\n\n\nclass DatasetPaths(NamedTuple):\n FOLDER_DATA: str = \"folder_dataset_class_data/amazon/back_pack\"\n FOLDER_CLASS_DATA: str = \"folder_dataset_class_data/amazon\"\n FOLDER_DATASET_CLASS... | [
[
"numpy.arange"
]
] |
jiangwei221/pointnet.pytorch | [
"a6cf0f2bf49355e2e81ef3f22ab87c500a7db6a7"
] | [
"train_segmentation.py"
] | [
"from __future__ import print_function\nimport argparse\nimport os\nimport random\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torch.utils.data\nimport torchvision.datasets as dset\nimport torchvision.tr... | [
[
"torch.autograd.Variable",
"torch.manual_seed",
"torch.nn.functional.nll_loss",
"torch.load"
]
] |
OMS-NetZero/FAIR | [
"1d89c23096ae583c06581b1a2e1cb59f1aa44e13"
] | [
"fair/forcing/aerosols.py"
] | [
"from __future__ import division\n\nimport numpy as np\nfrom ..constants import molwt\nfrom ..RCPs import rcp45\n\nr45e = rcp45.Emissions\n\ndef Stevens(emissions, stevens_params=np.array([0.001875, 0.634, 60.]),\n ref_isSO2=True, E_pi=0):\n \"\"\"Calculates aerosol forcing based on Stevens (2015) that relate... | [
[
"numpy.log",
"numpy.array",
"numpy.zeros",
"numpy.column_stack"
]
] |
MarcFig/python-control | [
"bad993e49155b11fb0aff1abc1cb12a92545d2c0",
"bad993e49155b11fb0aff1abc1cb12a92545d2c0",
"bad993e49155b11fb0aff1abc1cb12a92545d2c0"
] | [
"control/lti.py",
"control/bdalg.py",
"control/modelsimp.py"
] | [
"\"\"\"lti.py\n\nThe lti module contains the LTI parent class to the child classes StateSpace\nand TransferFunction. It is designed for use in the python-control library.\n\nRoutines in this module:\n\nLTI.__init__\nisdtime()\nisctime()\ntimebase()\ntimebaseEqual()\n\"\"\"\n\nimport numpy as np\nfrom numpy import ... | [
[
"numpy.log",
"numpy.absolute",
"numpy.real"
],
[
"scipy.zeros",
"scipy.array",
"scipy.matrix"
],
[
"numpy.matrix",
"numpy.dot",
"numpy.hstack",
"numpy.linalg.eigvals",
"numpy.sqrt",
"numpy.linalg.matrix_rank",
"numpy.fliplr",
"numpy.linalg.eig",
... |
scentini/tensorflow | [
"204ed332c0886a0e0ab10b22ba8d67b97e1c83c4",
"169124c0c9630b719e7f0e55722c38c7ecd6c5ac",
"169124c0c9630b719e7f0e55722c38c7ecd6c5ac",
"169124c0c9630b719e7f0e55722c38c7ecd6c5ac",
"169124c0c9630b719e7f0e55722c38c7ecd6c5ac",
"169124c0c9630b719e7f0e55722c38c7ecd6c5ac"
] | [
"tensorflow/python/ops/math_grad.py",
"tensorflow/python/distribute/one_device_strategy.py",
"tensorflow/python/ops/gradients_util.py",
"tensorflow/python/distribute/saved_model_test_base.py",
"tensorflow/python/ops/linalg_grad.py",
"tensorflow/python/distribute/cluster_resolver/cluster_resolver.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.python.ops.math_ops.imag",
"tensorflow.python.ops.math_ops.log",
"tensorflow.python.ops.math_ops.subtract",
"numpy.sqrt",
"tensorflow.python.compat.compat.forward_compatible",
"tensorflow.python.eager.context.context",
"tensorflow.python.ops.math_ops.real",
"tensorflow.... |
Borrk/DeepLearning-Engine | [
"54f6cdb8a76e76d9f439f8562652f545e4dbc02e"
] | [
"source/engine/steps/prepare.py"
] | [
"from engine.steps.IStep import IStep\nfrom sklearn.preprocessing import LabelBinarizer\nimport numpy as np\nimport os\n\nclass step_prepare(IStep):\n \"\"\"Calculate or parse the config file to determine the count of classess\"\"\"\n def __init__(self, output_channel, name=None ):\n super().__init__(s... | [
[
"numpy.array",
"sklearn.preprocessing.LabelBinarizer"
]
] |
AllenChen1998/QueryNet | [
"1ab74d7f4cc9d25af30abe0631581cf7be81a07f",
"1ab74d7f4cc9d25af30abe0631581cf7be81a07f",
"1ab74d7f4cc9d25af30abe0631581cf7be81a07f"
] | [
"models/cifar/pyramidnet.py",
"models/cifar/gdas/lib/nas/SE_Module.py",
"models/cifar/gdas/lib/datasets/LanguageDataset.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport math\r\n\r\n__all__ = ['pyramidnet272']\r\n\r\n\r\ndef conv3x3(in_planes, out_planes, stride=1):\r\n \"3x3 convolution with padding\"\r\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,\r\n padding=1, bias=False)\r\n\r\... | [
[
"torch.nn.ZeroPad2d",
"torch.nn.Sequential",
"torch.zeros",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.nn.Sigmoid"
],
[
"torch.LongTenso... |
mscroggs/bemplot | [
"5ab1ae9f87d4d7d99251e682bdf48cefd0821fc3"
] | [
"generic.py"
] | [
"def plot_slice(evaluator, plot_type='squared', x=None, y=None, z=None,\n n=(151,151), extent=(-5,5,-5,5), cmap='coolwarm', filename=None, title=None,\n show=None, interior=None, mesh=None, **kwargs):\n import numpy as np\n if show is None:\n show = filename==None\n\n if ... | [
[
"matplotlib.pyplot.title",
"numpy.linalg.norm",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.colorbar",
"numpy.real",
"matplotlib.pyplot.clf",
"numpy.cross",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.sum",
"matplotlib.... |
yucheng20170406/Paddle | [
"e543af14589e2311ae2f3f6c9887b537d2048666"
] | [
"python/paddle/fluid/tests/unittests/op_test.py"
] | [
"# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.random.get_state",
"numpy.abs",
"numpy.random.seed",
"numpy.allclose",
"numpy.max",
"numpy.random.set_state",
"numpy.argmax",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros"
]
] |
CopperWasp/CNNField | [
"41d0af17c8be6c0dcb3c701926ebdd6221584e05",
"41d0af17c8be6c0dcb3c701926ebdd6221584e05"
] | [
"os_clf_pool.py",
"os_main.py"
] | [
"import os_clf as clf\nimport numpy as np\nfrom sklearn.linear_model import SGDClassifier\n\n# SGD\nimg_dim = 230400\n\nclass pool:\n def __init__(self):\n self.classifiers = {}\n self.errors = {}\n self.occurrences = {}\n \n \n def add_classifier(self, new_class, index):\n ... | [
[
"numpy.sign",
"sklearn.linear_model.SGDClassifier",
"numpy.ones"
],
[
"torch.from_numpy",
"numpy.transpose"
]
] |
parquette/ParFrame | [
"0522aa6afdf529b3e91505b70e918f1500aae886"
] | [
"oss_src/unity/python/sframe/test/test_graph.py"
] | [
"'''\nCopyright (C) 2015 Dato, Inc.\nAll rights reserved.\n\nThis software may be modified and distributed under the terms\nof the BSD license. See the LICENSE file for details.\n'''\n# from nose import with_setup\nfrom ..data_structures.sgraph import SGraph, Vertex, Edge, load_graph\nfrom ..data_structures.sframe ... | [
[
"pandas.DataFrame.from_records",
"pandas.util.testing.assert_frame_equal",
"pandas.DataFrame"
]
] |
goncamateus/pytorch-soft-actor-critic | [
"a810f2d2fc087521d0fcc020dac6268d8a121dee"
] | [
"original_her.py"
] | [
"import argparse\nimport datetime\nimport itertools\n\nimport gym\nimport numpy as np\nimport torch\nfrom torch.utils.tensorboard import SummaryWriter\n\nimport gym_line_follower\nimport wandb\nfrom replay_memory import ReplayGMemory, ReplayMemory\nfrom sac import SAC\n\nparser = argparse.ArgumentParser(description... | [
[
"numpy.concatenate",
"torch.manual_seed",
"numpy.random.seed"
]
] |
yifanc96/LearnViT | [
"ab50b7c269ceb95c9321045d5ffc193b492de768"
] | [
"models/my_networks/ViT_Attn_MLP_separate.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nmodified from https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/vision_transformer.py\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom functools import partial\nfrom collections import OrderedDict\... | [
[
"torch.nn.Dropout",
"torch.linspace",
"torch.ones",
"torch.cat",
"torch.zeros",
"torch.nn.init.constant_",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.init.ones_",
"torch.nn.init.xavier_uniform_",
"torch.jit.is_scripting",
"torch.nn.functi... |
vladmandic/tf-cnn-classification | [
"af6c9cfe3edc4455d40430ed87a5a77f8ebc3548"
] | [
"src/predict.py"
] | [
"import tensorflow as tf\nimport sys\nfrom configuration import save_model_dir, test_image_dir\nfrom prepare_data import load_and_preprocess_image\nfrom train import get_model\n\n\ndef get_single_picture_prediction(model, picture_dir):\n image_tensor = load_and_preprocess_image(tf.io.read_file(filename=picture_d... | [
[
"tensorflow.math.argmax",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.expand_dims",
"tensorflow.config.list_physical_devices",
"tensorflow.io.read_file"
]
] |
OFR-IIASA/ixmp | [
"8b68c61e4d9a794c725ca6ffa572fd9e36a65855",
"8b68c61e4d9a794c725ca6ffa572fd9e36a65855"
] | [
"ixmp/tests/core/test_platform.py",
"ixmp/core/scenario.py"
] | [
"\"\"\"Tests of :class:`ixmp.Platform`.\"\"\"\nimport logging\nimport re\nfrom sys import getrefcount\nfrom weakref import getweakrefcount\n\nimport pandas as pd\nimport pytest\nfrom pandas.testing import assert_frame_equal\nfrom pytest import raises\n\nimport ixmp\nfrom ixmp.backend import FIELDS\nfrom ixmp.testin... | [
[
"pandas.read_csv",
"pandas.testing.assert_frame_equal",
"pandas.DataFrame"
],
[
"pandas.DataFrame.from_dict"
]
] |
r-sendra/SpikeSwarmSim | [
"a5bd71cb93df0963588640c5d44b3891fa07457c"
] | [
"spike_swarm_sim/utils/decorators.py"
] | [
"import time\r\nimport logging \r\nfrom functools import wraps\r\nfrom collections import deque\r\nimport numpy as np\r\nfrom spike_swarm_sim.globals import global_states\r\n\r\ndef time_elapsed(func):\r\n \"\"\" Computes the amount of time that a function elapses.\r\n Only works in DEBUG mode.\r\n \"\"\"\... | [
[
"numpy.std",
"numpy.mean"
]
] |
natasasdj/Deep-SVDD-PyTorch | [
"0c9e0003acd4c3fe42505984c0d92b8dec46e9fc"
] | [
"src/utils/collect_results.py"
] | [
"import json\nimport numpy as np\n\n\nbase_path = '/Users/lukasruff/Repos/Deep-SVDD-PyTorch/log/mnist/test/mnist/soft_deepSVDD'\nn_exps = 3\nn_seeds = 3\n\nexps = range(n_exps)\nseeds = range(1, n_seeds)\n\nfor exp in exps:\n\n exp_folder = str(exp) + 'vsall'\n aucs = np.zeros(n_seeds, dtype=np.float32)\n\n ... | [
[
"numpy.std",
"numpy.zeros",
"numpy.mean"
]
] |
rpwils/data-analytics-tools | [
"ed68648b2a8698a473e656de4149c15dce64663f"
] | [
"data_analytics_tools/tests/conftest.py"
] | [
"import pytest\nimport pandas as pd\nimport os\nfrom distutils import dir_util\n\n\n@pytest.fixture()\ndef valid_df():\n check_data = [[\"jjety\", \"AB9960\", \"response1\", \"response2\", \"Sun Nov 19 23:59:59 2018\", pd.to_datetime(\"2018-11-20 00:00:00\")],\n [\"jjety\", \"AB9958\", \"response1\", \"resp... | [
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
Bob620/xraylarch | [
"f8d38e6122cc0e8c990b0f024db3b503a5fbf057"
] | [
"larch/xrd/cifdb.py"
] | [
"#!/usr/bin/env python\n'''\nbuild American Mineralogist Crystal Structure Databse (amcsd)\n'''\n\nimport os\nimport requests\n\nimport numpy as np\nimport six\n\nfrom itertools import groupby\nfrom distutils.version import StrictVersion\n\nimport larch\nfrom .xrd_fitting import peaklocater\nfrom .xrd_cif import cr... | [
[
"numpy.abs",
"numpy.min",
"numpy.arange",
"numpy.max",
"numpy.shape",
"numpy.array",
"numpy.sum"
]
] |
ChendiWang/MetaXcan | [
"1f0eb0660f9b2a0d25b7083a34e9418cd8ba9566"
] | [
"software/metax/misc/GWASAndModels.py"
] | [
"import logging\nimport os\nimport re\nimport pandas\n\nfrom .. import Constants\nfrom .. import PredictionModel\nfrom ..gwas import Utilities as GWASUtilities\n\ndef align_data_to_alleles(data, base, left_on, right_on):\n EA, NEA = Constants.EFFECT_ALLELE, Constants.NON_EFFECT_ALLELE\n EA_BASE, NEA_BASE = EA... | [
[
"pandas.merge"
]
] |
kukalbriiwa7/COMP511_CS231n | [
"1537e98cdca43fad906e56a22f48d884523414b0",
"1537e98cdca43fad906e56a22f48d884523414b0"
] | [
"assignment2/comp411/layers.py",
"assignment1/comp411/classifiers/linear_svm.py"
] | [
"from builtins import range\nimport numpy as np\n\n\ndef affine_forward(x, w, b):\n \"\"\"\n Computes the forward pass for an affine (fully-connected) layer.\n\n The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N\n examples, where each example x[i] has shape (d_1, ..., d_k). We will\... | [
[
"numpy.log",
"numpy.amax",
"numpy.maximum",
"numpy.pad",
"numpy.sum",
"numpy.random.seed",
"numpy.unravel_index",
"numpy.arange",
"numpy.concatenate",
"numpy.max",
"numpy.argmax",
"numpy.zeros_like",
"numpy.random.rand",
"numpy.prod",
"numpy.exp",
"n... |
joelyancey/neuroglancer | [
"5f267160167c65a3e5f285e5b74d32e7b0160a60"
] | [
"python/examples/flood_filling_simulation.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"Example of display interactive flood-filling \"inference\" results.\n\nshift+mousedown0 triggers the simulated flood filling to start with an initial\nseed at the mouse position. The computed mask values are displayed as an image,\nwhile the seed points chosen are displayed as point... | [
[
"numpy.array",
"numpy.minimum",
"numpy.any"
]
] |
kbdering/ncscli | [
"853055b390238111efb31cb466c857a5ea886896"
] | [
"examples/neoload/plotAgentMap.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nplots loadtest results produced by runBatchJMeter\n\"\"\"\n# standard library modules\nimport argparse\nimport csv\nimport json\nimport logging\nimport math\nimport os\nimport sys\nimport warnings\n# third-party modules\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimp... | [
[
"matplotlib.pyplot.ylim",
"numpy.cos",
"matplotlib.pyplot.savefig",
"numpy.sin",
"matplotlib.pyplot.xlim",
"matplotlib.rcParams.update",
"matplotlib.pyplot.Polygon",
"matplotlib.pyplot.figure"
]
] |
GeorgiyDemo/FA | [
"641a29d088904302f5f2164c9b3e1f1c813849ec",
"641a29d088904302f5f2164c9b3e1f1c813849ec",
"641a29d088904302f5f2164c9b3e1f1c813849ec",
"641a29d088904302f5f2164c9b3e1f1c813849ec"
] | [
"Course I/Алгоритмы Python/Part2/семинары/pract4/xlsx_module.py",
"Course I/Алгоритмы Python/Part2/семинары/pract5/task11.py",
"Course I/Алгоритмы Python/Part1/семинары/pract2/pract2.py",
"Course I/Алгоритмы Python/Part2/семинары/pract5/защита/computer_module.py"
] | [
"\"\"\"Модуль для формирования отчетов в файл MS Excel\"\"\"\n\nimport pandas as pd\n\nfrom task_module import UtilClass\n\n\nclass XlsxClass:\n OUT_XLSX_FILE = \"отчет.xlsx\"\n\n def __init__(self, obj_list):\n self.obj_list = obj_list\n self.processing()\n\n def transpose(self, l):\n ... | [
[
"pandas.DataFrame",
"pandas.ExcelWriter"
],
[
"numpy.arange",
"numpy.append",
"numpy.array"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure"
],
[
"numpy.arange",
"numpy.append",
"numpy.array"
]
] |
chackoge/ERNIE_Plus | [
"454518f28b39a6f37ad8dde4f3be15d4dccc6f61"
] | [
"P2_studies/theta_plus/Analysis/Mapping/get_rated_mcl_graclus_all_data.py"
] | [
"import pandas as pd\nfrom sqlalchemy import create_engine\nfrom sys import argv\n\nuser_name = argv[1]\npassword = arv[2]\nschema = \"theta_plus\"\nsql_scheme = 'postgresql://' + user_name + ':' + password + '@localhost:5432/ernie'\nengine = create_engine(sql_scheme)\n\n\nmain_table_query = \"\"\"\nSELECT er.exper... | [
[
"pandas.read_sql"
]
] |
datawhalechina/machine-learning-toy-code | [
"75a3438e1ad2681413b102c2f257c4e011e0e310"
] | [
"ml-with-sklearn/AdaBoost/AdaBoost.py"
] | [
"from sklearn.ensemble import AdaBoostClassifier\nfrom sklearn import datasets\nfrom sklearn.model_selection import train_test_split\nfrom sklearn import metrics\n\niris = datasets.load_iris()\nX = iris.data\ny = iris.target\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n\nprint(\"X_tr... | [
[
"sklearn.ensemble.AdaBoostClassifier",
"sklearn.datasets.load_iris",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.accuracy_score"
]
] |
YOGESH-TECH/analyzing-weather-dataset | [
"16ae97cb4d51a71808985368d17afeb94a901b56"
] | [
"code.py"
] | [
"# --------------\n#Importing the modules\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom scipy.stats import mode \r\n\r\n\r\n\r\n\r\n#Code for categorical variable\r\ndef categorical(df):\r\n \"\"\" Extract names of categorical column\r\n \r\n This function accepts a dataframe and returns categorical... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] |
ArthurFDLR/race-track-generator | [
"3fc5eea60c3ea2f451a8be51344fabafed06ffb5"
] | [
"src/get-tracks.py"
] | [
"\nimport numpy as np\nimport cv2\nfrom matplotlib import pyplot as plt\nimport json\nimport sys\nfrom json_encoder import NoIndent, MyEncoder\n\nclass TracksExtraction:\n\n def __init__(self, img_path:str, input_data_path:str, display_factor:float=1.0):\n self.display_factor = display_factor\n wit... | [
[
"numpy.array",
"numpy.absolute",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
]
] |
gviejo/ColdPlay | [
"0fdab7e84b084ab67c1f29dd29a0188a69287077"
] | [
"python/functions.py"
] | [
"import numpy as np\nfrom numba import jit\nimport pandas as pd\nimport neuroseries as nts\nimport sys, os\nimport scipy\nfrom scipy import signal\nfrom itertools import combinations\n\n'''\nUtilities functions\nFeel free to add your own\n'''\n\n\n#########################################################\n# CORRELA... | [
[
"numpy.imag",
"scipy.signal.find_peaks",
"pandas.Series",
"numpy.linspace",
"numpy.vstack",
"pandas.DataFrame",
"numpy.var",
"numpy.digitize",
"numpy.histogram",
"numpy.hstack",
"numpy.unique",
"numpy.arange",
"numpy.std",
"scipy.signal.butter",
"numpy.d... |
xiafanzeng/Raman-Spectroscopy | [
"ba0b8b7ad0d9b9487a7602b0a09a41d970f70598"
] | [
"api/classification/siamese/score.py"
] | [
"from keras.utils import Sequence\nimport numpy as np\nimport keras.backend as K\nfrom tqdm import tqdm\n\nfrom config import spectral_shape\n\n\nclass FeatureGen(Sequence):\n def __init__(self, train, data, batch_size=64, verbose=1):\n super(FeatureGen, self).__init__()\n self.data = data\n ... | [
[
"numpy.indices",
"numpy.triu_indices"
]
] |
sgsdxzy/ppdd | [
"abd53bc2fa873fe40f6128c3ff4e46e55e971cf0"
] | [
"fittools.py"
] | [
"import numpy as np\nimport numexpr as ne\nfrom scipy.optimize import curve_fit, brentq\nfrom scipy.interpolate import interp1d\n\nclass Guess(object):\n \"\"\"\n Container of guesses for fitting, used on initial fit guesses and learning.\n \"\"\"\n def __init__(self, peak_ratio = 0.2, sigma_x0 = 0.01, ... | [
[
"numpy.convolve",
"numpy.abs",
"numpy.arange",
"numpy.rint",
"numpy.max",
"numpy.argmax",
"scipy.optimize.brentq",
"numpy.sum"
]
] |
loganbyers/data-pre-processing | [
"bbed4a86752ab11575825ae05b6234d06b23ff68"
] | [
"foo_015a_global_hunger_index/foo_015a_global_hunger_index_processing.py"
] | [
"import os\nimport pandas as pd\nimport urllib.request\nimport tabula\nfrom carto.datasets import DatasetManager\nfrom carto.auth import APIKeyAuthClient\nimport boto3\nfrom botocore.exceptions import NoCredentialsError\nfrom zipfile import ZipFile\n\n# name of table on Carto where you want to upload data\n# this s... | [
[
"pandas.concat",
"pandas.notnull",
"pandas.melt",
"pandas.Series"
]
] |
anoff/skikitlearn | [
"cf3254ddf8d5b22183a171c8ac3f65bef8a89e32"
] | [
"lib/process.py"
] | [
"import gpxpy\nimport numpy as np\nfrom collections import namedtuple\n\ndef smooth(y, box_pts=11):\n box = np.ones(box_pts)/box_pts\n y_smooth = np.convolve(y, box, mode='same')\n return y_smooth\n\n# load file and concat all tracks/segments\ndef load_points(filename):\n Point = namedtuple(\"Point\", [... | [
[
"numpy.convolve",
"numpy.diff",
"numpy.ones"
]
] |
flandolfi/clockwork-rnn | [
"6d7d4fca128a1b344c291ed7a034e004973fa4da"
] | [
"cudnnrnn.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom keras.layers.cudnn_recurrent import _CuDNNRNN\nfrom keras import initializers\nfrom keras import regularizers\nfrom keras import constraints\n\nfrom collections import namedtuple\n\n\nclass CuDNNS... | [
[
"tensorflow.transpose",
"tensorflow.expand_dims"
]
] |
bhedayat/Neural-Nets | [
"6a3caea4121e9694be5853c972c8d0d18c2fa7aa"
] | [
"lstm.py"
] | [
"\n# coding: utf-8\n\n# In[1]:\n\nfrom __future__ import print_function\n\n\nimport numpy as np\nimport theano\nimport theano.tensor as T\nimport lasagne\nfrom process import load_data\n\n#x = T.tensor4()\n\n\nN_HIDDEN = 100\n\nLEARNING_RATE = .001\n\nGRAD_CLIP = 100\n\nNUM_EPOCHS = 20\n\nBATCH_SIZE = 200\n\nvocab_... | [
[
"numpy.random.get_state",
"numpy.random.shuffle",
"numpy.random.set_state",
"numpy.argmax",
"numpy.mean",
"numpy.zeros"
]
] |
BenjaminMey/nipype | [
"388f140fceaf55438a987e9cdfa2a8e995428afd",
"388f140fceaf55438a987e9cdfa2a8e995428afd"
] | [
"nipype/interfaces/freesurfer/preprocess.py",
"nipype/pipeline/plugins/base.py"
] | [
"# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Provides interfaces to various commands provided by FreeSurfer\n\"\"\"\nimport os\nimport os.path as op\nfrom glob import glob\nimport shutil\n\nimport numpy as np\nfro... | [
[
"numpy.genfromtxt"
],
[
"numpy.sum",
"numpy.all",
"numpy.any",
"numpy.zeros",
"numpy.isinf"
]
] |
pavanell/pyscf | [
"c0d19e499685e95dbf4c879539ad3a3ceb6934e2",
"c0d19e499685e95dbf4c879539ad3a3ceb6934e2",
"c0d19e499685e95dbf4c879539ad3a3ceb6934e2",
"c0d19e499685e95dbf4c879539ad3a3ceb6934e2"
] | [
"pyscf/hessian/rhf.py",
"pyscf/prop/magnetizability/rks.py",
"pyscf/fci/direct_spin1.py",
"pyscf/lib/misc.py"
] | [
"#!/usr/bin/env python\n# Copyright 2014-2019 The PySCF Developers. 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/LIC... | [
[
"numpy.dot",
"numpy.allclose",
"numpy.einsum",
"numpy.asarray",
"numpy.empty_like",
"numpy.linalg.norm",
"numpy.empty",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.empty_like",
"numpy.dot",
"numpy.zeros",
"numpy.einsum"
],
[
"numpy.dot",
"numpy.ein... |
zgyangleo/GeneralImageProcessing | [
"4fe3a7986095040fa1a741fd5e4728aaf9056b6e",
"4fe3a7986095040fa1a741fd5e4728aaf9056b6e"
] | [
"Category_11_20/code_py/emboss_filter.py",
"Category_11_20/code_py/different_filter.py"
] | [
"import cv2\nimport numpy as np\n\n# Gray scale\ndef BGR2GRAY(img):\n\tb = img[:, :, 0].copy()\n\tg = img[:, :, 1].copy()\n\tr = img[:, :, 2].copy()\n\n\t# Gray scale\n\tout = 0.2126 * r + 0.7152 * g + 0.0722 * b\n\tout = out.astype(np.uint8)\n\n\treturn out\n\n# emboss filter\ndef emboss_filter(img, K_size=3):\n\t... | [
[
"numpy.expand_dims",
"numpy.zeros",
"numpy.sum",
"numpy.clip"
],
[
"numpy.expand_dims",
"numpy.zeros",
"numpy.sum",
"numpy.clip"
]
] |
xxxsssyyy/DeepNER | [
"b8686d0605f1df88a3ac1885052bd2dbdc583204"
] | [
"layers/transformer.py"
] | [
"# encoding = utf8\n# this file is copy from: https://github.com/DongjunLee/transformer-tensorflow\nimport tensorflow as tf\n\nimport sys\nsys.path.append('../')\n\nfrom layers.attention import Attention\n\n\nclass FFN:\n \"\"\"FFN class (Position-wise Feed-Forward Networks)\"\"\"\n def __init__(self,\n ... | [
[
"tensorflow.identity",
"tensorflow.layers.dense",
"tensorflow.add",
"tensorflow.variable_scope",
"tensorflow.nn.dropout"
]
] |
selwyni/ottertune-1 | [
"2a096eb7572a46f14522c5ff758aa7970fba81db"
] | [
"server/analysis/constraints.py"
] | [
"#\n# OtterTune - constraints.py\n#\n# Copyright (c) 2017-18, Carnegie Mellon University Database Group\n#\n'''\nCreated on Sep 8, 2016\n\n@author: dvanaken\n'''\n\nimport copy\nimport numpy as np\n\n\nclass ParamConstraintHelper(object):\n\n @property\n def num_categorical_params(self):\n return self.... | [
[
"numpy.log2",
"numpy.isfinite",
"numpy.random.choice",
"numpy.arange",
"numpy.ones",
"numpy.logical_or",
"numpy.argmax",
"numpy.random.rand",
"numpy.random.binomial",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
abeja-inc/honk | [
"fd9c774e18fb4a8124e9d0dc5415ec2f422041d8"
] | [
"utils/model.py"
] | [
"import hashlib\nimport os\nimport random\nimport re\nfrom enum import Enum\n\nimport librosa\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom chainmap import ChainMap\nfrom torch import nn\nfrom torch.utils import data\n\nfrom .manage_audio import AudioPreprocessor\n\n\nclass SimpleCache(di... | [
[
"torch.mean",
"torch.abs",
"numpy.expand_dims",
"torch.load",
"torch.zeros",
"torch.cat",
"torch.no_grad",
"torch.nn.Dropout",
"numpy.pad",
"numpy.clip",
"torch.tensor",
"torch.nn.functional.relu",
"numpy.zeros",
"torch.normal",
"torch.nn.Conv2d",
"t... |
kirstenrichardson/rl-baselines-zoo | [
"fe7223f8b70fd384f8045690662332f5ae3bc350"
] | [
"enjoy.py"
] | [
"import os\nimport sys\nimport argparse\nimport pkg_resources\nimport importlib\nimport warnings\n\n# numpy warnings because of tensorflow\nwarnings.filterwarnings(\"ignore\", category=FutureWarning, module='tensorflow')\nwarnings.filterwarnings(\"ignore\", category=UserWarning, module='gym')\n\nimport gym\ntry:\n ... | [
[
"numpy.mean",
"numpy.clip"
]
] |
Koichi-Hatake/ImageNetDownloadScript | [
"5f50b8b18b1b5ad386e58da04936fb88b8703119"
] | [
"remove_err_img.py"
] | [
"#\n# Copyright (C) 2018 Koichi Hatakeyama\n# All rights reserved.\n#\n\n# This script remove following error type image files.\n# 1. Zero file size\n# 2. Flickr error image\n# 3. Invalid image\n# 4. Mono image\n\nimport argparse\nimport datetime\nimport hashlib\nimport numpy as np\nimport os\nimport re\nimport... | [
[
"numpy.array"
]
] |
zhizhangxian/AutoML | [
"839790e9e131f2788202326d87a9264020833122"
] | [
"modeling/deeplab.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom modeling.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d\nfrom modeling.aspp import build_aspp\nfrom modeling.decoder import build_decoder\nfrom modeling.backbone import build_backbone\n\n\nclass DeepLab(nn.Module):\n def __init_... | [
[
"torch.rand"
]
] |
yaojh01/Mastering-OpenCV-4-with-Python | [
"e8f83e314b8ed638edb6515967cfb24361b787af",
"e8f83e314b8ed638edb6515967cfb24361b787af",
"e8f83e314b8ed638edb6515967cfb24361b787af",
"e8f83e314b8ed638edb6515967cfb24361b787af",
"e8f83e314b8ed638edb6515967cfb24361b787af"
] | [
"Chapter10/01-chapter-content/svm_handwritten_digits_recognition_preprocessing_hog_c_gamma.py",
"Chapter07/01-chapter-content/thresholding_otsu.py",
"Chapter08/01-chapter-content/contours_hu_moments.py",
"Chapter10/01-chapter-content/k_means_color_quantization.py",
"Chapter07/01-chapter-content/thresholding... | [
"\"\"\"\nHandwritten digits recognition using SVM and HoG features and varying the number of\ntraining/testing images with pre-processing of the images. A grid-search on C and gamma is also carried out.\n\"\"\"\n\n# Import required packages:\nimport cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom col... | [
[
"numpy.array",
"matplotlib.pyplot.legend",
"numpy.split",
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.squeeze",
"numpy.vsplit",
"numpy.hsplit",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"numpy.float32",
"matplotlib.pyplot.xlabel",
"matplotli... |
JunHyungKang/SAROD_ICIP | [
"71585951f64dc1cc22ed72900eff81f747edec77"
] | [
"Baseline_yolov3/utils/rl_datasets.py"
] | [
"import glob\nimport random\nimport os\nimport sys\nimport numpy as np\nfrom PIL import Image\nimport torch\nimport torch.nn.functional as F\n\nfrom utils.augmentations import horisontal_flip\nfrom torch.utils.data import Dataset\nimport torchvision.transforms as transforms\n\n\ndef pad_to_square(img, pad_value):\n... | [
[
"numpy.random.random",
"numpy.abs",
"torch.cat",
"numpy.loadtxt",
"torch.nn.functional.interpolate",
"torch.nn.functional.pad"
]
] |
HaroldMurcia/FaceMaskDetector | [
"0e95ab127424f08caae22a5e55634755988cbd30"
] | [
"facemask_ori.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jul 22 15:56:47 2020\n\n@author: Karan\n\"\"\"\n\n\nimport numpy as np\nimport keras\nimport keras.backend as k\nfrom keras.layers import Conv2D,MaxPooling2D,SpatialDropout2D,Flatten,Dropout,Dense\nfrom keras.models import Sequential,load_model\nfrom keras.optimizers... | [
[
"numpy.expand_dims"
]
] |
Arka161/cnngeometric_pytorch | [
"3378914478aad391281b0feec1d7a2c945d0870e"
] | [
"train.py"
] | [
"from __future__ import print_function, division\nimport argparse\nimport os\nfrom glob import glob\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom model.cnn_geometric_model import CNNGeometric\nf... | [
[
"torch.cuda.manual_seed",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available",
"torch.rand",
"torch.device",
"torch.nn.MSELoss"
]
] |
crsanderford/brainrender | [
"a92dc3b08f743721521ae233f15b1814207bf08c"
] | [
"benchmark/bm_cells.py"
] | [
"from benchmark.timer import Timer\nfrom brainrender import Scene, actors\nimport numpy as np\nimport random\n\n# create N random cells coordinates\n\n\ndef get_n_random_points_in_region(region, N):\n \"\"\"\n Gets N random points inside (or on the surface) of a mes\n \"\"\"\n\n region_bounds = region.m... | [
[
"numpy.random.randint"
]
] |
zephyr-fun/human_body_prior | [
"35571fe16fddca39553398f6b3eb6d18a23c985b"
] | [
"src/human_body_prior/models/ik_engine.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG),\n# acting on behalf of its Max Planck Institute for Intelligent Systems and the\n# Max Planck Institute for Biological Cybernetics. All rights reserved.\n#\n# Max-Planck-Gesellschaft zur Förderung ... | [
[
"torch.optim.Adam",
"torch.nn.SmoothL1Loss",
"torch.isnan",
"numpy.random.seed",
"torch.zeros",
"numpy.all",
"torch.pow",
"numpy.sum"
]
] |
wenh06/OpenAttack | [
"56e3a96f6a4eeaf30b90a275685f37cc7e7b3c7c"
] | [
"OpenAttack/substitutes/dces.py"
] | [
"from .base import CharSubstitute\nfrom ..data_manager import DataManager\nimport numpy as np\n\n\ndisallowed = ['TAG', 'MALAYALAM', 'BAMUM', 'HIRAGANA', 'RUNIC', 'TAI', 'SUNDANESE', 'BATAK', 'LEPCHA', 'CHAM',\n 'TELUGU', 'DEVANGARAI', 'BUGINESE', 'MYANMAR', 'LINEAR', 'SYLOTI', 'PHAGS-PA', 'CHEROKEE',\... | [
[
"numpy.in1d",
"numpy.array",
"numpy.stack"
]
] |
tsura-crisaldo/qiskit-aqua | [
"2b4a70bb24a9170c3735124536dce1d7ffe4ed67"
] | [
"qiskit/aqua/operators/list_ops/summed_op.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\... | [
[
"numpy.sum"
]
] |
Geunwoo-Jeon/InvCompress | [
"be8e32d663bfad9adaf497e723c9d65b5a0f21ee",
"be8e32d663bfad9adaf497e723c9d65b5a0f21ee",
"be8e32d663bfad9adaf497e723c9d65b5a0f21ee",
"be8e32d663bfad9adaf497e723c9d65b5a0f21ee"
] | [
"codes/compressai/utils/bench/codecs.py",
"codes/tests/test_entropy_models.py",
"codes/compressai/models/ours.py",
"codes/quan/quantizer/ste_lsq.py"
] | [
"# Copyright 2020 InterDigital Communications, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.asarray",
"torch.mean",
"numpy.log10",
"numpy.fromfile"
],
[
"torch.jit.script",
"torch.all",
"torch.randint",
"torch.manual_seed",
"torch.round",
"torch.zeros_like",
"torch.rand",
"torch.allclose"
],
[
"torch.device",
"torch.nn.functional.pad... |
kacperkan/ucsgnet | [
"c13b204361e59c5b92a7983e929305e17a906b65",
"c13b204361e59c5b92a7983e929305e17a906b65"
] | [
"ucsgnet/ucsgnet/train_2d.py",
"ucsgnet/ucsgnet/net_2d.py"
] | [
"import argparse\nimport json\nimport os\n\nimport pytorch_lightning as pl\nimport torch\nfrom pytorch_lightning import Trainer\n\nfrom ucsgnet.callbacks import ModelCheckpoint\nfrom ucsgnet.loggers import TensorBoardLogger\nfrom ucsgnet.ucsgnet.net_2d import Net\n\nMAX_NB_EPOCHS = 251\n\n\ndef get_args() -> argpar... | [
[
"torch.cuda.is_available"
],
[
"numpy.prod",
"torch.tensor"
]
] |
Omekaago101/Intracranial-Hemorrhage-Classification | [
"4f53da3a3869be7b451edc558ef06c5c41083b4b",
"4f53da3a3869be7b451edc558ef06c5c41083b4b",
"4f53da3a3869be7b451edc558ef06c5c41083b4b"
] | [
"src/wavelet-FE/models/fwht.py",
"src/wavelet-FE/datasets/custom_dataset.py",
"src/wavelet-FE/models/levit.py"
] | [
"# Created by moritz (wolter@cs.uni-bonn.de)\nimport torch\nimport numpy as np\nfrom scipy.linalg import hadamard\n\n\ndef matmul_wht(x, h_mat=None, inverse=False):\n \"\"\"\n Welsh-Hadamard transform by matrix multiplication.\n @ param x: The sequence to be transformed [batchsize, seq_len].\n @ param i... | [
[
"numpy.log2",
"scipy.linalg.hadamard",
"numpy.power",
"torch.zeros",
"torch.tensor",
"torch.nn.functional.linear"
],
[
"numpy.max",
"numpy.zeros",
"torch.tensor"
],
[
"torch.nn.Softmax",
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.GELU",
"to... |
hebafer/models | [
"5dc6421f562ea447e501fa355a48a6ee89856a1d"
] | [
"runnables/binning.py"
] | [
"import argparse\nimport mars.dataframe as md\nimport os\nimport pandas as pd\nfrom bin.binning_calculator import calc_stats, calc_two_dim_binning_stats, get_cols_bin_boundaries\nfrom run_io.db_adapter import convertDSNToRfc1738\nfrom sqlalchemy import create_engine\n\n\ndef build_argument_parser():\n parser = a... | [
[
"pandas.read_sql_table"
]
] |
jucyai/red-panda | [
"a47c81cdf42c9c9e057432106c505ea415edccba"
] | [
"red_panda/aws/s3.py"
] | [
"import warnings\nfrom io import StringIO, BytesIO\nimport logging\n\nimport pandas as pd\nimport boto3\n\nfrom red_panda.pandas import PANDAS_TOCSV_KWARGS, PANDAS_READ_TABLE_KWARGS\nfrom red_panda.aws import (\n S3_PUT_KWARGS,\n S3_GET_KWARGS,\n S3_CREATE_BUCKET_KWARGS,\n)\nfrom red_panda.utils import fil... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
yuweijiang/HGL-pytorch | [
"d7a54fce83a5678777a02bc50176e7fa527d7f9f",
"80238500b96edf051d750670de7300168e456424"
] | [
"data/get_bert_embeddings/optimization.py",
"train.py"
] | [
"# coding=utf-8\r\n# Copyright 2018 The Google AI Language Team Authors.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE... | [
[
"tensorflow.train.polynomial_decay",
"tensorflow.multiply",
"tensorflow.constant",
"tensorflow.zeros_initializer",
"tensorflow.cast",
"tensorflow.gradients",
"tensorflow.train.get_or_create_global_step",
"tensorflow.contrib.tpu.CrossShardOptimizer",
"tensorflow.clip_by_global_n... |
naveen-chalasani/natural-language-processing-and-anomaly-detection | [
"6c6ea44f1966f7abe37c452d84dd24cffd572e1e"
] | [
"notebooks/sessions.py"
] | [
"import os \nimport re\nimport numpy as np \nimport pandas as pd\nfrom collections import OrderedDict\n\n# extract session info from log file and save the output in sessions.csv\n\ndef hdfs_sessions(log_file):\n \n session = 0\n sequence_in_session = 0\n block_id_list = list()\n session_info = Ordere... | [
[
"pandas.read_csv",
"pandas.DataFrame.from_dict"
]
] |
hadim/maskflow | [
"6a70725ba26c6e65189936fd5c242c5ab15d6952",
"6a70725ba26c6e65189936fd5c242c5ab15d6952"
] | [
"maskflow/tests/test_bbox.py",
"maskflow/mask.py"
] | [
"import numpy as np\nimport numpy.testing as npt\n\nimport maskflow\n\n\ndef test_from_masks():\n masks = []\n\n mask = np.zeros((128, 128), dtype=\"uint8\")\n mask[20:50, 80:90] = 1\n masks.append(mask)\n\n mask = np.zeros((128, 128), dtype=\"uint8\")\n mask[80:950, 50:80] = 1\n masks.append(mask)\n\n bbox... | [
[
"numpy.testing.assert_equal",
"numpy.zeros"
],
[
"numpy.pad",
"numpy.array_equal",
"numpy.asarray",
"numpy.arange",
"numpy.subtract",
"numpy.flip",
"numpy.sum",
"numpy.vstack"
]
] |
galaxy-captain/Deep-Learning | [
"06f0f931c750db6267148f27f48ab5c0eb02abaa"
] | [
"tensorflow_basic/examples/variable_1.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*\nimport tensorflow as tf\n\nstate = tf.Variable(0,name='counter')\nprint(state.name)\n\none = tf.constant(1)\n\nnew_value = tf.add(state,one)\nupdate = tf.assign(state,new_value)\n\ninit = tf.global_variables_initializer()\n\nwith tf.Session() as session:\n session.r... | [
[
"tensorflow.constant",
"tensorflow.Variable",
"tensorflow.assign",
"tensorflow.global_variables_initializer",
"tensorflow.add",
"tensorflow.Session"
]
] |
kumarak93/LinearConv | [
"2cd9945c769c16206fd380c6b23b76d44102805f"
] | [
"models/allconv_xcnn.py"
] | [
"import torch\nimport torchvision\nimport torchvision.transforms as transforms\n#import matplotlib.pyplot as plt\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport time\nfrom torchsummary import summary\nimport os\nimport math\nimport summ\n#from thop im... | [
[
"torch.mean",
"torch.abs",
"torch.load",
"torch.nn.functional.dropout",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.sum",
"torch.no_grad",
"torch.cuda.is_available",
"torch.pow",
"torch.nn.CrossEntropyLoss",
"torch.eye",
"torch.rand",
"torch.nn.Conv2d... |
MorganeAudrain/Calcium_new | [
"1af0ab4f70b91d1ca55c6053112c1744b1da1bd3",
"1af0ab4f70b91d1ca55c6053112c1744b1da1bd3"
] | [
"steps/source_extraction.py",
"steps/alignment.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport datetime\nimport data_base_manipulation as db\nimport analysis_files_manipulation as fm\n\nimport caiman as cm \nfrom caiman.source_extraction import cnmf\nfrom caiman.source_extraction.cnmf import params as params\n\nimport caiman.base.rois\nimport logging\n\nimport numpy as np \... | [
[
"numpy.load",
"numpy.save"
],
[
"numpy.array",
"numpy.min"
]
] |
raj713335/Data-Science-Hackathon-And-Competition | [
"09c41a4856e07f912cdfe3d50cb1c7faec3e708a"
] | [
"HACKER EARTH/Identify The Dance Form/Model_Predict.py"
] | [
"# Load the required Libraries\r\n\r\n\r\nimport tensorflow as tf\r\nimport matplotlib.image as img\r\nimport numpy as np\r\nfrom collections import defaultdict\r\nimport collections\r\nfrom shutil import copy\r\nfrom shutil import copytree, rmtree\r\nimport tensorflow.keras.backend as K\r\nfrom tensorflow.keras.mo... | [
[
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.imshow",
"numpy.expand_dims",
"tensorflow.test.gpu_device_name",
"tensorflow.keras.preprocessing.image.load_img",
"pandas.DataFrame",
"pandas.read_csv",
"numpy.clip",
"tensorflow.keras.backend.function",
"tensorflow.k... |
EraYaN/FletcherFiltering | [
"cc1f0955b5c543d6ee465197c2fc238f4b578f08"
] | [
"generate_data_tests.py"
] | [
"# Copyright (c) 2019 Erwin de Haan. 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 req... | [
[
"numpy.asarray"
]
] |
serhatataman/generate-bitbirds | [
"e571deaec06c8edb5eb783ca50662fd08dacce6b"
] | [
"single_image_creator.py"
] | [
"from PIL import Image\nimport numpy as np\n\nbg = (123, 209, 224)\nhr = (255, 171, 0)\nsk = (241, 194, 125)\njk = (121, 86, 156)\ney = (135, 181, 44)\nbd = (0, 0, 0)\nmt = (0, 0, 0)\neb = (255, 255, 255)\n\npixels_list = [\n [bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg, bg... | [
[
"numpy.array"
]
] |
Tharky/missing_data_imputation | [
"60048269d8c970298d892880f3370198fd50cbc4"
] | [
"imputation.py"
] | [
"import timeit\r\nimport numpy as np\r\nimport math\r\nfrom collections import Counter\r\n#############################\r\n# Initialization / Settings #\r\n#############################\r\nsep = ',' # Separator\r\nfileName = \"kddn\" # File name\r\nfileNameLoss = fileName+\".5loss\" # File name with lost data\r\... | [
[
"numpy.dot",
"numpy.array"
]
] |
adubowski/set-mlp-keras | [
"14d0e4cecdf8ebd7d9e3fc31d180c1c11f982a7b"
] | [
"SET-MLP-Keras-Weights-Mask/set_mlp_keras_cifar10.py"
] | [
"# Author: Decebal Constantin Mocanu et al.;\n# Proof of concept implementation of Sparse Evolutionary Training (SET) of Multi Layer Perceptron (MLP) on CIFAR10 using Keras and a mask over weights.\n# This implementation can be used to test SET in varying conditions, using the Keras framework versatility, e.g. vari... | [
[
"tensorflow.config.experimental.list_logical_devices",
"numpy.abs",
"tensorflow.config.experimental.set_memory_growth",
"numpy.asarray",
"tensorflow.config.experimental.list_physical_devices",
"numpy.std",
"numpy.mean",
"numpy.random.rand",
"tensorflow.compat.v1.reset_default_g... |
morrocoy/hsi | [
"da6a2923dff831e927aaea04ba657ddcb1b7e4eb",
"da6a2923dff831e927aaea04ba657ddcb1b7e4eb"
] | [
"hsi/gui/graphicsItems/BaseImagCtrlItem.py",
"hsi/core/hs_formats.py"
] | [
"import sys\nimport copy\n\nimport numpy as np\nimport pyqtgraph as pg\n\nfrom ...bindings.Qt import QtWidgets, QtCore\nfrom ...log import logmanager\nfrom ...misc import check_is_an_array, check_class\n\nfrom .ColorBarItem import ColorBarItem\nfrom .InfiniteLine import InfiniteLine\n\nlogger = logmanager.getLogger... | [
[
"numpy.array"
],
[
"numpy.log",
"numpy.expand_dims",
"numpy.abs",
"numpy.array",
"numpy.exp"
]
] |
xychen-ocn/lagtraj | [
"fbcae751faa7f9b9f9a72d20abf71bb92e007bdd"
] | [
"lagtraj/utils/gradient_calculation.py"
] | [
"import numpy as np\nimport xarray as xr\n\nfrom .. import njit\nfrom .geometry import lat_dist, lon_dist\n\n\n@njit\ndef _boundary_gradients(x_array, y_array, val_array):\n \"\"\"Numba function to calculate gradients, dismissing filtered points\"\"\"\n len_temp = np.shape(val_array)[0]\n len_levels = np.s... | [
[
"numpy.nanmax",
"numpy.hstack",
"numpy.isnan",
"numpy.nanmin",
"numpy.shape",
"numpy.meshgrid",
"numpy.empty"
]
] |
mcguires5/adversarial-robustness-toolbox | [
"f8b0552859eaf31c5b66e1d14d28b89178795ad0",
"f8b0552859eaf31c5b66e1d14d28b89178795ad0",
"f8b0552859eaf31c5b66e1d14d28b89178795ad0",
"f8b0552859eaf31c5b66e1d14d28b89178795ad0",
"f8b0552859eaf31c5b66e1d14d28b89178795ad0"
] | [
"art/attacks/evasion/pixel_threshold.py",
"tests/defences/preprocessor/test_spatial_smoothing.py",
"tests/defences/preprocessor/test_mp3_compression.py",
"tests/attacks/test_elastic_net.py",
"art/attacks/evasion/deepfool.py"
] | [
"# MIT License\n#\n# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limita... | [
[
"numpy.linspace",
"numpy.max",
"numpy.zeros_like",
"numpy.argmin",
"numpy.mean",
"numpy.where",
"scipy.optimize.OptimizeResult",
"numpy.clip",
"numpy.finfo",
"numpy.asfarray",
"numpy.size",
"scipy._lib._util.check_random_state",
"numpy.copy",
"numpy.std",
... |
hayman42/ft-bert-pyt | [
"860e5a0e80d834ae8f663c1e4ffe9d70359e7897"
] | [
"eval_diff.py"
] | [
"from typing import OrderedDict\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\nfrom modeling import BertForSequenceClassification, BertConfig\nfrom transformers import AutoTokenizer\nimport datasets\nfrom tqdm import tqdm\nfrom time import time\nfrom quantize import quantiz... | [
[
"torch.cuda.set_device",
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
]
] |
kansakitw/dragonpilotamd | [
"83295e6746e685b22e218bd0bd943df674e42a81"
] | [
"selfdrive/controls/lib/longitudinal_planner.py"
] | [
"#!/usr/bin/env python3\nimport math\nimport numpy as np\nfrom common.numpy_fast import interp\n\nimport cereal.messaging as messaging\nfrom cereal import log\nfrom common.realtime import DT_MDL\nfrom common.realtime import sec_since_boot\nfrom selfdrive.modeld.constants import T_IDXS\nfrom selfdrive.config import ... | [
[
"numpy.exp",
"numpy.zeros"
]
] |
sfjddrgrg/test | [
"92cea908acb4c700f8b2d74dd19ed12e78ede73a"
] | [
"assignments/2018/assignment1/cs231n/classifiers/linear_classifier.py"
] | [
"from __future__ import print_function\n\nimport numpy as np\nfrom cs231n.classifiers.linear_svm import *\nfrom cs231n.classifiers.softmax import *\n\nclass LinearClassifier(object):\n\n def __init__(self):\n self.W = None\n\n def train(self, X, y, learning_rate=1e-3, reg=1e-5, num_iters=100,\n batc... | [
[
"numpy.random.choice",
"numpy.max",
"numpy.argmax",
"numpy.random.randn",
"numpy.zeros"
]
] |
SamProell/yarppg | [
"9e3c43b502423562a5cb20c670a5cd878ed30c71"
] | [
"yarppg/rppg/rppg.py"
] | [
"from datetime import datetime\nimport pathlib\n\nimport cv2\nimport numpy as np\nimport pandas as pd\nfrom PyQt5.QtCore import pyqtSignal, QObject\n\nfrom yarppg.rppg.camera import Camera\n\n\ndef write_dataframe(path, df):\n path = pathlib.Path(path)\n if path.suffix.lower() == \".csv\":\n df.to_csv(... | [
[
"numpy.array",
"numpy.mean",
"numpy.cumsum",
"pandas.DataFrame"
]
] |
feimeng93/probabilistic-bvp-solver | [
"d6b38d4ff7b3ab6cf3003de30eb2f6eeb42c0beb"
] | [
"experiments/work_precision.py"
] | [
"\"\"\"Try out probsolve_bvp.\"\"\"\nimport time\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom probnum import diffeq, filtsmooth\nfrom probnum import random_variables as random_variables\nfrom probnum import random_variables, statespace\nfrom probnum._ra... | [
[
"numpy.arange",
"scipy.integrate.solve_bvp",
"numpy.linspace"
]
] |
weiliansong/cycle-consistent-vae | [
"d92f4cebcbe0a90bc2f3369853fec39084a11fa2"
] | [
"networks.py"
] | [
"import numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchvision import datasets\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\n\nfrom itertools import cycle\nfrom collections import OrderedDict\nfrom utils import reparameterize, transform... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.InstanceNorm2d",
"torch.nn.LeakyReLU",
"numpy.prod",
"torch.nn.ReLU",
"torch.autograd.Variable"
]
] |
autoplot/python | [
"5392e329bc69f3ac040c5f4932a13b0ab7a9615a"
] | [
"autoplot/autoplot.py"
] | [
"from __future__ import print_function\n\ndef version():\n return '0.3.9'\n\ndef printNoNewline(s):\n print(s, end=' ')\n \ndef javaaddpath(url='', jdwpPort=-1):\n '''Start up JVM, import JAR at URL, and import the paths starting with org \n into the Python namespace.\n com= jpype.JPackage('com'... | [
[
"numpy.timedelta64",
"numpy.array",
"numpy.datetime64"
]
] |
alexhenrie/numpy | [
"662f973ba58563b268d009e67806aa1150ca1cb2",
"662f973ba58563b268d009e67806aa1150ca1cb2"
] | [
"numpy/lib/utils.py",
"numpy/core/tests/test_dtype.py"
] | [
"import os\nimport sys\nimport textwrap\nimport types\nimport re\nimport warnings\n\nfrom numpy.core.numerictypes import issubclass_, issubsctype, issubdtype\nfrom numpy.core.overrides import set_module\nfrom numpy.core import ndarray, ufunc, asarray\nimport numpy as np\n\n__all__ = [\n 'issubclass_', 'issubscty... | [
[
"numpy.ma.isMaskedArray",
"numpy.isnan",
"numpy.core.overrides.set_module",
"numpy.core.asarray",
"numpy.moveaxis"
],
[
"numpy.can_cast",
"numpy.dtype",
"numpy.iinfo",
"numpy.testing.assert_equal",
"numpy.core._multiarray_tests.create_custom_field_dtype",
"numpy.uin... |
tmcgilchrist/ocaml-arrow | [
"627eac81cf6a4195a25fc300821ad9d51fd9cd40"
] | [
"bin/gen-parquet.py"
] | [
"import numpy as np\nimport pandas as pd\n\nnum_rows = 10**6\ndf = pd.DataFrame({\n 'x': range(num_rows),\n 'foo': ['foo'] * num_rows,\n 'bar': [f'barbar{d}' for d in range(num_rows)],\n})\n\nfor period in range(2, 21):\n df[f'baz{period}'] = [f'{d % period}-baz-periodic' for d in range(num_rows)]\n\ndf['x2'] =... | [
[
"numpy.cos",
"numpy.sin"
]
] |
TheWorstOne/numpy-formulas | [
"093657d4a23dfe82685595254aae50e0c6e46afb"
] | [
"ImpurityMeasures/entropy_c.py"
] | [
"import numpy as np\nfrom numpy.core.numeric import zeros_like\nimport pandas as pd\n\n# [TODO] This code was made in a hurry. \n# It can be improved, someday I will. Please excuse me\n\ndata = {\n \"a3\": [1.0, 6.0, 5.0, 4.0, 7.0, 3.0,8.0,7.0,5.0],\n \"class\": [\"CP\", \"CP\", \"CN\", \"CP\", \"CN\", \"CN\"... | [
[
"pandas.crosstab",
"numpy.array",
"numpy.zeros_like",
"pandas.DataFrame"
]
] |
brunnovicente/SeedKmeans | [
"2a71adb5f40c4fceb32fae40f03189e6773094bf"
] | [
"SEEDEDKmeans.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom sklearn.cluster import KMeans\n\nclass SKmeans:\n \n def __init__(self, n_grupos = 3):\n self.n_grupos = n_grupos\n \n def fit(self, L, U, y):\n sementes = self.gerarSementes(L, y)\n self.kmeans = KMeans(n_clusters = self.n_grupos, ... | [
[
"sklearn.cluster.KMeans",
"pandas.DataFrame"
]
] |
markxiao/APPFL | [
"2940f01695b84d8239368e5d1fc3133c7f7a05ae"
] | [
"appfl/protos/operator.py"
] | [
"import logging\nfrom collections import OrderedDict\nimport hydra\nfrom omegaconf import DictConfig\n\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch.nn import CrossEntropyLoss\nimport torchvision\nfrom torchvision.transforms import ToTensor\n\nimport numpy as np\nimport copy\n\nfrom appfl.misc.... | [
[
"numpy.reshape",
"numpy.frombuffer",
"torch.utils.data.DataLoader",
"torch.from_numpy"
]
] |
henrykrumb/paperscraper | [
"31abb49701b90bfb5107b46e82941068d242ec38"
] | [
"paperscraper/postprocessing.py"
] | [
"import logging\nimport sys\nfrom typing import List, Dict\n\nimport numpy as np\nimport pandas as pd\n\nlogging.basicConfig(stream=sys.stdout, level=logging.DEBUG)\nlogger = logging.getLogger(__name__)\n\n\ndef aggregate_paper(\n data: List[Dict[str, str]],\n start_year: int = 2016,\n bins_per_year: int =... | [
[
"numpy.floor",
"numpy.zeros",
"pandas.DataFrame",
"numpy.random.choice"
]
] |
chunchentu/MagNet | [
"72be5ebf7f3271b3b037c345ba457c93f5a01462",
"72be5ebf7f3271b3b037c345ba457c93f5a01462",
"5c80091dcf2b80d6d22af8e5e1b103218c36e889"
] | [
"setup_mnist.py",
"setup_face.py",
"defensive_models.py"
] | [
"## setup_mnist.py -- mnist data and model loading code\n##\n## Copyright (C) 2016, Nicholas Carlini <nicholas@carlini.com>.\n##\n## This program is licenced under the BSD 2-Clause licence,\n## contained in the LICENCE file in this directory.\n\n## Modified for MagNet's use.\n\n# from __future__ import print_functi... | [
[
"numpy.frombuffer",
"numpy.arange"
],
[
"numpy.concatenate",
"numpy.frombuffer",
"numpy.arange"
],
[
"numpy.shape",
"numpy.zeros_like",
"numpy.clip"
]
] |
delira-dev/vision_torch | [
"d944aa67d319bd63a2add5cb89e8308413943de6",
"d944aa67d319bd63a2add5cb89e8308413943de6",
"d944aa67d319bd63a2add5cb89e8308413943de6"
] | [
"deliravision/torch/models/gans/conditional/models.py",
"deliravision/torch/models/gans/coupled/cogan.py",
"tests/models/test_backbones_torch.py"
] | [
"import torch\nfrom functools import reduce\nfrom operator import mul\n\n\nclass Generator(torch.nn.Module):\n \"\"\"\n A very simple generator model to generate images of specific classes\n \"\"\"\n def __init__(self, n_classes, img_shape, latent_dim):\n \"\"\"\n\n Parameters\n ---... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.Embedding",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.LeakyReLU"
],
[
"torch.from_numpy"
],
[
"torch.cuda.synchronize",
"torch.cuda.empty_cache",
"torch.no_grad",
"torch.rand",
"torch.device"
]
] |
ye-zs/statsmodels | [
"19248ecae8c23c7ca8499ce6fb9cf19a931d7c7f"
] | [
"statsmodels/tsa/statespace/mlemodel.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nState Space Model\n\nAuthor: Chad Fulton\nLicense: Simplified-BSD\n\"\"\"\nimport contextlib\nimport warnings\n\nimport datetime as dt\nfrom types import SimpleNamespace\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import norm\n\nfrom statsmodels.tools.tools import pi... | [
[
"numpy.diag",
"numpy.dot",
"pandas.Series",
"numpy.linspace",
"numpy.linalg.matrix_rank",
"pandas.RangeIndex",
"numpy.random.multivariate_normal",
"numpy.issubdtype",
"numpy.asarray",
"pandas.DataFrame",
"numpy.round",
"numpy.concatenate",
"scipy.stats.gaussian_... |
zaydalameddine/NetflixStockProfile_2017 | [
"35f3faee7d349191b75dfe087a4f6d8272063971"
] | [
"Data + Script/script.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 26 15:43:43 2020\n\n@author: Zayd Alameddine\n\"\"\"\n\nfrom matplotlib import pyplot as plt\nimport pandas as pd\nimport seaborn as sns\n\nnetflix_stocks = pd.read_csv('NFLX.csv')\ndowjones_stocks = pd.read_csv('DJI.csv')\nnetflix_stocks_quarterly = pd.read_csv(... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.subplots_adjust",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.