repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
kamata1729/visualize-pytorch | [
"ec1b3fe0952c5db187a5d4875cd1539a1b7a1270"
] | [
"src/guidedBackProp.py"
] | [
"import cv2\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.nn import functional as F\n\nclass GuidedBackProp():\n def __init__(self, model, use_cuda):\n self.model = model.eval()\n self.use_cuda = use_cuda\n if self.use_cuda:\n self.model = self.model.cuda()... | [
[
"numpy.maximum",
"numpy.uint8",
"torch.sum",
"torch.from_numpy",
"numpy.transpose",
"torch.clamp"
]
] |
pansiyuan123/im2recipe-Pytorch | [
"e0563cc909a3763b0548d1a8efca7e8175273ebc"
] | [
"scripts/proc.py"
] | [
"from scipy.misc import imread, imresize\r\nimport numpy as np\r\ndef detect_ingrs(recipe, vocab):\r\n #去重\r\n try:\r\n ingr_names = [ingr['text'] for ingr in recipe['ingredients'] if ingr['text']]\r\n except:\r\n ingr_names = []\r\n print (\"Could not load ingredients! Moving on...\")... | [
[
"scipy.misc.imresize",
"numpy.zeros",
"scipy.misc.imread"
]
] |
tobiasjj/cellular-nanoscience | [
"a165dc7ee62964bb82b1fc736d2ab03a01894ebf",
"a165dc7ee62964bb82b1fc736d2ab03a01894ebf",
"a165dc7ee62964bb82b1fc736d2ab03a01894ebf"
] | [
"functions/functions/force_extension.py",
"functions/functions/binning.py",
"functions/functions/helpers.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# force_extension, functions to work with and show force extension curves\n# Copyright 2019 Tobias Jachowski\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... | [
[
"numpy.expand_dims",
"numpy.sqrt",
"numpy.linalg.norm",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.gcf",
"numpy.round",
"numpy.concatenate",
"numpy.array"
],
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.concatenate",
"numpy.ndim",
"numpy.std",
"n... |
TaoweiZhang/MegEngine | [
"bd3c4a05274f69dacca6097d8cbadbb34c7cc2e4",
"bd3c4a05274f69dacca6097d8cbadbb34c7cc2e4"
] | [
"imperative/python/test/unit/utils/test_module_stats.py",
"imperative/python/test/unit/traced_module/test_modification.py"
] | [
"import collections\nimport math\nfrom copy import deepcopy\n\nimport numpy as np\nimport pytest\n\nimport megengine as mge\nimport megengine.functional as F\nimport megengine.hub as hub\nimport megengine.module as M\nfrom megengine.core._trace_option import use_symbolic_shape\nfrom megengine.utils.module_stats imp... | [
[
"numpy.random.random",
"numpy.prod"
],
[
"numpy.testing.assert_raises"
]
] |
calebh94/ml-hv-grid-pub | [
"492fc267f22a3390211035bbd8ff41557139820b"
] | [
"train_xcept.py"
] | [
"\"\"\"\ntrain_xcept.py\n\nTrain the Xception network to classify HV pylons\n\"\"\"\nimport os\nfrom os import path as op\nfrom functools import partial\nfrom datetime import datetime as dt\nimport pickle\nimport pprint\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import Model\nfrom kera... | [
[
"numpy.sum",
"numpy.min"
]
] |
Gamrix/pytorch | [
"b5b158a6c6de94dfb983b447fa33fea062358844",
"b5b158a6c6de94dfb983b447fa33fea062358844"
] | [
"test/onnx/test_pytorch_onnx_onnxruntime.py",
"test/package/test_misc.py"
] | [
"import unittest\nimport onnxruntime\nimport torch\n\nimport numpy as np\nimport io\nimport itertools\nimport copy\nimport os\nimport random\n\nfrom torch.nn.utils import rnn as rnn_utils\nfrom model_defs.lstm_flattening_result import (LstmFlatteningResultWithSeqLength,\n ... | [
[
"torch.fmod",
"torch.randint",
"torch.max",
"torch.zeros",
"torch.nn.GRU",
"torch.narrow",
"torch.multinomial",
"torch.numel",
"torch.where",
"torch.topk",
"torch.device",
"numpy.where",
"torch.pow",
"torch.nn.EmbeddingBag",
"torch.outer",
"torch.sqr... |
CALFEM/calfem-py | [
"26d4082ca6b907c48ad814733c733ae30a959657",
"26d4082ca6b907c48ad814733c733ae30a959657",
"26d4082ca6b907c48ad814733c733ae30a959657"
] | [
"calfem/_export.py",
"examples/exs_flw_diff2.py",
"examples/exv4.py"
] | [
"import pickle\nimport scipy.io\nimport numpy as np\n\n'''\nHandle reading and writing of geometry and generated mesh from the program\n'''\n\n\ndef loadGeometry(name):\n with open(name, 'rb') as file:\n test = pickle.load(file)\n return test\n\n\ndef saveGeometry(g, name=\"Untitled\"):\n if not nam... | [
[
"numpy.asarray",
"numpy.append",
"numpy.size"
],
[
"numpy.array",
"numpy.zeros"
],
[
"numpy.sqrt",
"numpy.linalg.eig",
"numpy.size",
"numpy.average",
"numpy.zeros"
]
] |
langner/mahotas | [
"1840b629fab325e7fb700f90cf2b662ff35e4205",
"1840b629fab325e7fb700f90cf2b662ff35e4205",
"1840b629fab325e7fb700f90cf2b662ff35e4205"
] | [
"mahotas/tests/test_center_of_mass.py",
"mahotas/tests/test_freeimage.py",
"mahotas/thin.py"
] | [
"import numpy as np\nfrom scipy import ndimage\nimport mahotas.center_of_mass\n\nnp.random.seed(2321)\ndef _mean_out(img, axis):\n if len(img.shape) == 2: return img.mean(1-axis)\n if axis == 0:\n return _mean_out(img.mean(1), 0)\n return _mean_out(img.mean(0), axis - 1)\n\ndef slow_center_of_mass(i... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.arange",
"scipy.ndimage.center_of_mass",
"numpy.random.rand",
"numpy.array",
"numpy.zeros"
],
[
"numpy.all",
"numpy.arange",
"numpy.zeros"
],
[
"numpy.empty",
"numpy.zeros_like",
"numpy.zeros"
]
] |
wjh720/pymarl | [
"9392407568d440c4808a1c7c98ddf1ef52e0c009"
] | [
"src/modules/mixers/point_like.py"
] | [
"import torch as th\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\n\nclass PointLikeMixer(nn.Module):\n def __init__(self, args):\n super(PointLikeMixer, self).__init__()\n\n self.args = args\n self.n_agents = args.n_agents\n self.n_groups = args.mixing... | [
[
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.bmm",
"numpy.prod"
]
] |
DustinAngerhofer/muzero-general-1 | [
"aab58da92f5793fdfd6850af6a1028d7e31fd234"
] | [
"games/twentyone.py"
] | [
"\"\"\"\nThis is a very simple form of twenty one. Ace only counts as value 1 not 1 or\n11 for simplicity. This means that there is no such thing as a natural or two\ncard 21. This is a good example of showing how it can provide a good solution\nto even luck based games.\n\"\"\"\n\nimport datetime\nimport os\nfrom ... | [
[
"torch.cuda.is_available",
"numpy.full"
]
] |
hebamohsen04/sqlalchemy-challenge | [
"d084705436c60a6fda0dc211c9668ed90f66882f"
] | [
"app.py"
] | [
"import numpy as np\n\nimport sqlalchemy\nfrom sqlalchemy.ext.automap import automap_base\nfrom sqlalchemy.orm import Session\nfrom sqlalchemy import create_engine, func\n\nimport datetime as dt \n\nfrom flask import Flask, jsonify\n\nengine = create_engine(\"sqlite:///Resources/hawaii.sqlite\")\n\n# reflect an exi... | [
[
"numpy.ravel"
]
] |
nsavinov/gym-vizdoom | [
"f098f297aeff79875c59861478c54e7727588bf7"
] | [
"gym_vizdoom/envs/constants.py"
] | [
"from os import path as osp\nimport numpy as np\n\n# vizdoom\nMAP_NAME_TEMPLATE = 'map%02d'\nMOVE_FORWARD = [0, 0, 0, 1, 0, 0, 0]\nMOVE_BACKWARD = [0, 0, 0, 0, 1, 0, 0]\nMOVE_LEFT = [1, 0, 0, 0, 0, 0, 0]\nMOVE_RIGHT = [0, 1, 0, 0, 0, 0, 0]\nSTAY_IDLE = [0, 0, 0, 0, 0, 0, 0]\nTURN_LEFT = [0, 0, 0, 0, 0, 1, 0]\nTURN_... | [
[
"numpy.zeros"
]
] |
tombury182/ews_functions | [
"1c2569a4671dee4a6cd29d5681f6a280469b3210"
] | [
"ewstools/helpers.py"
] | [
"#################################################################################################################\n# ewstools\n# Description: Python package for computing, analysing and visualising \n# early warning signals (EWS) in time-series data\n# Author: Thomas M Bury\n# Web: http://www.math.uwaterloo.ca/~tb... | [
[
"pandas.concat",
"numpy.sqrt",
"pandas.Series",
"numpy.isnan",
"numpy.linalg.eig",
"numpy.linalg.inv",
"numpy.cos",
"pandas.DataFrame",
"numpy.array",
"numpy.exp",
"scipy.signal.welch"
]
] |
TarekAloui/pytorchfi | [
"29915e158941a21fc786e6a59c958ec751a59167"
] | [
"test/unit_tests/test_weight_fi.py"
] | [
"import torch\nfrom pytorchfi.core import fault_injection as pfi_core\n\nfrom .util_test import helper_setUp_CIFAR10_same\n\n\nclass TestWeightFIcpu:\n \"\"\"\n Testing focuses on weight perturbations.\n \"\"\"\n\n def setup_class(self):\n torch.manual_seed(0)\n\n self.BATCH_SIZE = 1\n ... | [
[
"torch.manual_seed",
"torch.no_grad"
]
] |
Licht-T/vision | [
"052edcecef3eb0ae9fe9e4b256fa2a488f9f395b"
] | [
"torchvision/ops/roi_pool.py"
] | [
"import torch\nfrom torch import nn, Tensor\n\nfrom torch.nn.modules.utils import _pair\nfrom torch.jit.annotations import List, BroadcastingList2\n\nfrom torchvision.extension import _assert_has_ops\nfrom ._utils import convert_boxes_to_roi_format, check_roi_boxes_shape\n\n\ndef roi_pool(\n input: Tensor,\n ... | [
[
"torch.ops.torchvision.roi_pool",
"torch.nn.modules.utils._pair"
]
] |
mariodmtrv/models | [
"006ed77052b56bbd60965a833dc54ce9dbda39db"
] | [
"research/deeplab/datasets/data_generator.py"
] | [
"# Lint as: python2, python3\n# Copyright 2018 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/L... | [
[
"tensorflow.logging.warning",
"tensorflow.constant",
"tensorflow.FixedLenFeature",
"tensorflow.data.TFRecordDataset",
"tensorflow.image.decode_png",
"tensorflow.expand_dims",
"tensorflow.image.is_jpeg",
"tensorflow.gfile.Glob",
"tensorflow.parse_single_example",
"tensorflow... |
jvstinian/Python-Reinforcement-Learning-Projects | [
"6c97c68351fc4af426cb5c3583d75aebfabac8aa"
] | [
"Chapter04/dpg.py"
] | [
"'''\nCreated on Apr 12, 2018\n\n@author: ywz\n'''\nimport numpy, os\nimport tensorflow as tf\nfrom replay_memory import ReplayMemory\nfrom optimizer import Optimizer\nfrom actor_critic_net import ActorCriticNet\n\n\nclass DPG:\n \n def __init__(self, config, task, directory, callback=None, summary_writer=Non... | [
[
"numpy.expand_dims",
"tensorflow.summary.scalar",
"tensorflow.placeholder",
"tensorflow.summary.merge_all"
]
] |
slowy07/pythonApps | [
"f90b8823f939b98f7bf1dea7ed35fe6e22e2f730"
] | [
"pythonProject/face_landmark/train.py"
] | [
"from imutils import face_utils\nimport dlib\nimport cv2\nimport numpy as np\n\n\npre_trained_model = 'classifier/shape_predictor_68_face_landmarks.dat'\ndetector = dlib.get_frontal_face_detector()\npredictor = dlib.shape_predictor(pre_trained_model)\n\nvideo = cv2.VideoCapture('video/somi.mp4')\n\nwhile video.read... | [
[
"numpy.zeros_like",
"numpy.zeros"
]
] |
TexasInstruments/vision | [
"abaf29de0798e8e8d3f996dc272cd3c515562695"
] | [
"references/edgeailite/engine/train_pixel2pixel.py"
] | [
"# Copyright (c) 2018-2021, Texas Instruments\n# All Rights Reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list ... | [
[
"torch.max",
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.nn.functional.interpolate",
"torch.onnx.export",
"torch.jit.trace",
"numpy.arange",
"torch.rand",
"torch.optim.SGD",
"torch.utils.data.sampler.RandomSampler",
"torch.optim.Adam",
"... |
tedzhouhk/GCNP | [
"3b0646450620419dc6e2de457fc8f1afcbf03754"
] | [
"GNN/graph_samplers.py"
] | [
"from GNN.globals import *\r\nimport numpy as np\r\nimport scipy.sparse\r\nimport abc\r\nimport time\r\nimport math\r\nimport pdb\r\nfrom math import ceil\r\nimport GNN.cython_sampler as cy\r\n\r\n\r\nclass graph_sampler:\r\n __metaclass__ = abc.ABCMeta\r\n def __init__(self,adj_train,node_train,size_subgraph... | [
[
"numpy.zeros",
"numpy.unique"
]
] |
malarinv/seq2seq-keyphrase-pytorch | [
"14350477867bbaafe285d6ac0e7a814f4cda1bdf"
] | [
"evaluate.py"
] | [
"import json\nimport math\nimport logging\nimport string\n\nimport nltk\nimport scipy\nimport torch\nfrom nltk.stem.porter import *\nimport numpy as np\nfrom collections import Counter\n\nimport os\n\nfrom torch.autograd import Variable\n\nimport config\nimport pykp\nfrom utils import Progbar\nfrom pykp.metric.bleu... | [
[
"torch.LongTensor",
"numpy.asarray",
"numpy.ones",
"numpy.max",
"numpy.mean",
"torch.cuda.is_available",
"numpy.average",
"numpy.sum"
]
] |
choderalab/autonomous-molecular-design | [
"8536382c3006d0270a4ca544cf6de1a67beea954"
] | [
"scripts/simpleaddscenariocolab.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"SimpleADDScenarioColab.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1yBHXw30_rc1E3NI6g8NsvbZ54_t1DMXX\n\nRetrieve/Import Necessary Packages\n\"\"\"\n\nimport sys\nsys.path.append('/usr/local/lib/python3.... | [
[
"pandas.concat",
"pandas.read_csv",
"numpy.absolute",
"numpy.random.seed",
"pandas.DataFrame",
"numpy.where"
]
] |
jasmainak/mne-python | [
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa2",
"039cb1bf52770019bd48ac028795af0861792fa... | [
"mne/io/proj.py",
"mne/channels/channels.py",
"tutorials/plot_mne_dspm_source_localization.py",
"mne/io/array/tests/test_array.py",
"mne/time_frequency/tests/test_tfr.py",
"mne/decoding/tests/test_ems.py",
"mne/stats/tests/test_cluster_level.py"
] | [
"# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Matti Hamalainen <msh@nmr.mgh.harvard.edu>\n# Denis Engemann <denis.engemann@gmail.com>\n# Teon Brooks <teon.brooks@gmail.com>\n#\n# License: BSD (3-clause)\n\nfrom copy import deepcopy\nfrom itertools import coun... | [
[
"numpy.dot",
"scipy.linalg.svd",
"numpy.unique",
"numpy.eye",
"numpy.ones",
"numpy.all",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.abs",
"numpy.unique",
"numpy.asarray",
"scipy.spatial.Delaunay",
"scipy.io.loadmat",
"scipy.sparse.csr_matr... |
Mootjee/IMM | [
"9bd9c9c12118a3e0d67ce5afa954dda8a5814e00"
] | [
"generate.py"
] | [
"import keras\nfrom keras.applications.inception_v3 import InceptionV3\nfrom keras.applications.mobilenetv2 import MobileNetV2\nfrom keras import backend as K\n\nfrom keras.preprocessing.image import ImageDataGenerator\n\nfrom keras.preprocessing import image\nimport numpy as np\n\nimport magenta.music as mm\nfrom ... | [
[
"pandas.read_csv",
"numpy.linalg.norm",
"numpy.concatenate",
"numpy.random.randn",
"sklearn.decomposition.PCA"
]
] |
hmaschke/pandapower-1 | [
"2e93969050d3d468ce57f73d358e97fabc6e5141",
"2e93969050d3d468ce57f73d358e97fabc6e5141",
"2e93969050d3d468ce57f73d358e97fabc6e5141",
"2e93969050d3d468ce57f73d358e97fabc6e5141",
"2e93969050d3d468ce57f73d358e97fabc6e5141"
] | [
"pandapower/plotting/plotly/get_colors.py",
"pandapower/create.py",
"pandapower/test/consistency_checks.py",
"pandapower/converter/pypower/from_ppc.py",
"pandapower/estimation/state_estimation.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport sys\nimport numpy as np\ntry:\n import matplotlib.pyplot as plt\n import matplotlib.cm as cm\n import m... | [
[
"matplotlib.colors.to_rgb",
"numpy.linspace",
"matplotlib.colors.to_rgba",
"matplotlib.pyplot.get_cmap",
"matplotlib.colors.Normalize",
"matplotlib.cm.get_cmap"
],
[
"pandas.concat",
"pandas.notnull",
"pandas.Series",
"pandas.isnull",
"numpy.isnan",
"numpy.arang... |
kkorhone/Infinite_Borehole_Field | [
"2a08aa48a9943ea824759006ccb30701ac143d75"
] | [
"temp.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\n\nTg = 16.0\nq = 0.090\n\nh = np.array([10, 50, 100, 500])\nk = np.array([1, 3, 0.5, 4])\nI = np.array([0, 1, 2, 3])\n\ndef T(l, z):\n return Tg + sum(q/k[:l]*h[:l]) - sum(q/k[l]*h[:l]) - q/k[l]*z\n\nz1 = 0\nfor l in range(len(h)):\n z2 = z1 - h[l]\n z ... | [
[
"numpy.array",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.show",
"numpy.linspace"
]
] |
Clement-W/Neural.NET | [
"78e5206c541b63ae0aba764d87c2910a351f3efb"
] | [
"dataset/generate_dataset.py"
] | [
"import sklearn.datasets as dt\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nseed = 1\n# Create dataset\n\"\"\"\nx_data,y_data = dt.make_classification(n_samples=1000,\n n_features=2,\n n_repeated=0,\n ... | [
[
"matplotlib.pyplot.savefig",
"sklearn.datasets.make_circles",
"numpy.savetxt",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
dmitry-vorobiev/kaggle-global-wheat-detection | [
"adf75b73f5955848488477c361c66f1b0510b2bb"
] | [
"src/nms/cluster_nms.py"
] | [
"import torch\nfrom torch import Tensor\n\nEPS = torch.tensor(1e-8)\n\n\n@torch.jit.script\ndef dist_iou_ab(box_a: Tensor, box_b: Tensor, eps=EPS):\n \"\"\"\n Args:\n box_a: tensor of shape [batch_size, boxes_a, 4]\n box_b: tensor of shape [batch_size, boxes_b, 4]\n gamma: float\n ... | [
[
"torch.max",
"torch.min",
"torch.zeros_like",
"torch.tensor",
"torch.clamp_min_",
"torch.prod",
"torch.pow"
]
] |
Vedant-S/AI_Project | [
"e5fba10990901ee29b72db9e4932e6d1c72d3673"
] | [
"Hand_Skeleton/handPoseDetector.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Apr 2 15:06:04 2020\n\n@author: KIIT\n\"\"\"\n\n\nimport cv2\nimport time\nimport numpy as np\n\n\nprotoFile = \"pose_deploy.prototxt\"\nweightsFile = \"pose_iter_102000.caffemodel\"\nnPoints = 22\nPOSE_PAIRS = [ [0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9]... | [
[
"numpy.copy"
]
] |
pascal-vecsei/netket | [
"fc96a828e1ac71a7ecd16b4b178ca689e1871958",
"fc96a828e1ac71a7ecd16b4b178ca689e1871958",
"3985355234183e3f5a5a97d542a6240d490dcda2"
] | [
"test/operator/test_fermions.py",
"Examples/Fermions/fermi_hubbard.py",
"netket/operator/_local_operator_helpers.py"
] | [
"import netket as nk\nimport numpy as np\nimport netket.experimental as nkx\nfrom netket.experimental.operator._fermions_2nd import _convert_terms_to_spin_blocks\nfrom netket.experimental.operator.fermion import destroy, create, number\n\nimport pytest\n\nop_ferm = {}\nhi = nkx.hilbert.SpinOrbitalFermions(3)\nop_fe... | [
[
"numpy.allclose",
"numpy.array_equal",
"numpy.promote_types",
"numpy.identity",
"numpy.array",
"numpy.zeros"
],
[
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"nu... |
SultanOrazbayev/networkx | [
"5be9755636fa4da71da2e28f8467336d3c0164a7",
"5be9755636fa4da71da2e28f8467336d3c0164a7"
] | [
"networkx/algorithms/node_classification/utils.py",
"examples/algorithms/plot_subgraphs.py"
] | [
"def _get_label_info(G, label_name):\n \"\"\"Get and return information of labels from the input graph\n\n Parameters\n ----------\n G : Network X graph\n label_name : string\n Name of the target label\n\n Returns\n ----------\n labels : numpy array, shape = [n_labeled_samples, 2]\n ... | [
[
"numpy.array"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure"
]
] |
mremilien/ICP | [
"671c600acc75a4126216cfc11c67d44ccfac037f"
] | [
"src/part5.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\n\"\"\"this is for the part 5 of CourseWork 1.\"\"\"\r\n\r\n__author__ = 'Chengkun Li'\r\n\r\nimport sys\r\nimport os\r\n\r\nimport open3d as o3d\r\nimport numpy as np\r\nimport trimesh\r\n\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nimport tools.baseICP\r\nimport tools... | [
[
"numpy.array",
"matplotlib.pyplot.show",
"numpy.vstack",
"matplotlib.pyplot.figure"
]
] |
WongLynn/vnpy_Amerlin-1.1.20 | [
"d701d8f12c29cc33f58ea025920b0c7240f74f82"
] | [
"vnpy/trader/utils/NVAnalysis.py"
] | [
"# encoding=utf-8\n'''\n净值分析工具\n提供:净值分析、净值合并分析、相关性分析\n'''\nimport copy\nfrom functools import reduce\n\nimport pandas as pd\nimport numpy as np\n\n\ndef getWeight(nvDf_dict, weightMethod=\"equal\"):\n result = {}\n if weightMethod == \"equal\":\n result = {name: 1 for name in nvDf_dict.keys()}\n eli... | [
[
"numpy.corrcoef",
"pandas.to_datetime",
"numpy.sqrt"
]
] |
yiming1012/koalas | [
"326a11c43bb30cb07063e5baf4dab21b4ec90b9d"
] | [
"databricks/koalas/namespace.py"
] | [
"#\n# Copyright (C) 2019 Databricks, 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 applicable la... | [
[
"pandas.notna",
"pandas.read_clipboard",
"pandas.read_excel",
"pandas.to_datetime",
"pandas.isnull",
"pandas.read_html"
]
] |
gatechzhu/wiggle | [
"664c1909ae768456e662e249fb51c5899334fc3b"
] | [
"wiggle/wiggle.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\n\n\ndef insert_zeros(trace, tt=None):\n \"\"\"Insert zero locations in data trace and tt vector based on linear fit\"\"\"\n\n if tt is None:\n tt = np.arange(len(trace))\n\n # Find zeros\n zc_idx = np.where(np.diff(np.signbit(trace)))[0]\n ... | [
[
"matplotlib.pyplot.gca",
"numpy.split",
"numpy.signbit",
"numpy.arange",
"numpy.std",
"numpy.random.randn",
"numpy.diff",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
thejeshgn/data | [
"945af2e1269b914ff1e3169880169161f4137a58",
"945af2e1269b914ff1e3169880169161f4137a58"
] | [
"scripts/biomedical/proteinAtlas/parse_protein_atlas.py",
"scripts/us_bls/cpi/generate_csv_mcf.py"
] | [
"# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"pandas.read_csv",
"pandas.Series"
],
[
"pandas.DataFrame"
]
] |
sharky5102/fbmatrix | [
"6558e1b249d94908d92a6475b07ebf9beae776a1"
] | [
"geometry/tree.py"
] | [
"import geometry\nimport math\nimport OpenGL.GL as gl\nimport json\nimport numpy as np\n\nclass tree(geometry.base):\n lampsize = 1/50\n\n vertex_code = \"\"\"\n uniform mat4 modelview;\n uniform mat4 projection;\n \n in highp vec3 position;\n in highp float id;\n\n o... | [
[
"numpy.zeros"
]
] |
universewill/pytorch-CycleGAN-and-pix2pix | [
"3a5db404d8d2e0112b63445c4d35fc70f32ce194"
] | [
"data/base_dataset.py"
] | [
"\"\"\"This module implements an abstract base class (ABC) 'BaseDataset' for datasets.\n\nIt also includes common transformation functions (e.g., get_transform, __scale_width), which can be later used in subclasses.\n\"\"\"\nimport random\nimport numpy as np\nimport torch.utils.data as data\nfrom PIL import Image\n... | [
[
"numpy.maximum"
]
] |
sebpuetz/ffp | [
"76649e5206a262afde3d7c1db41798cc5447ae89"
] | [
"tests/test_storage.py"
] | [
"import contextlib\nimport os\n\nimport ffp\nimport ffp.io\nimport numpy as np\nimport pytest\nimport tempfile\n\n\ndef test_read_array(tests_root, vocab_array_tuple):\n with pytest.raises(TypeError):\n ffp.storage.load_storage(None)\n with pytest.raises(ffp.io.FinalfusionFormatError):\n ffp.sto... | [
[
"numpy.allclose",
"numpy.arange",
"numpy.linalg.norm",
"numpy.random.random_sample",
"numpy.zeros_like",
"numpy.zeros",
"numpy.vstack",
"numpy.random.randint"
]
] |
ddelange/ML-automator | [
"02b47af2498d4e736138a770f2129cba8b6dd3c8"
] | [
"mlautomator/objectives/regressor_objectives.py"
] | [
"# Standard Python Library imports\nimport time\nimport numpy as np\nimport pandas as pd\nfrom sklearn.neighbors import KNeighborsRegressor\nfrom sklearn.model_selection import (StratifiedKFold, RepeatedKFold, KFold, cross_val_score)\nfrom sklearn.linear_model import SGDRegressor, LogisticRegression\nfrom sklearn.e... | [
[
"sklearn.ensemble.RandomForestRegressor",
"sklearn.model_selection.RepeatedKFold",
"sklearn.model_selection.cross_val_score",
"sklearn.linear_model.SGDRegressor",
"sklearn.neighbors.KNeighborsRegressor",
"sklearn.svm.SVR",
"sklearn.feature_selection.SelectKBest"
]
] |
NicolasHug/pygbm | [
"7891113aa074a0c33705b2d454b6609b3544eaf2"
] | [
"tests/test_binning.py"
] | [
"import numpy as np\nfrom numpy.testing import assert_array_equal, assert_allclose\nimport pytest\n\nfrom pygbm.binning import BinMapper, _find_binning_thresholds, _map_to_bins\n\n\nDATA = np.random.RandomState(42).normal(\n loc=[0, 10], scale=[1, 0.01], size=(int(1e6), 2)\n).astype(np.float32)\n\n\ndef test_fin... | [
[
"numpy.linspace",
"numpy.unique",
"numpy.arange",
"numpy.sort",
"numpy.all",
"numpy.testing.assert_array_equal",
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.random.RandomState",
"numpy.testing.assert_array_almost_equal"
]
] |
shibing624/rater | [
"8437dea8baf0137ab3c07dd19c5f2bb8c15b4435",
"8437dea8baf0137ab3c07dd19c5f2bb8c15b4435",
"8437dea8baf0137ab3c07dd19c5f2bb8c15b4435"
] | [
"examples/flen_demo.py",
"examples/agnn_demo.py",
"rater/models/ctr/pnn.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@author:XuMing(xuming624@qq.com)\n@description: \n\"\"\"\n\nimport os\nimport sys\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import TensorDataset\n\nsys.path.append(\"..\")\nfrom rater.datasets.criteo import Criteo\nfrom rater.models.ctr.flen import FLEN\... | [
[
"torch.LongTensor",
"torch.Tensor",
"torch.nn.BCELoss",
"torch.utils.data.dataset.TensorDataset",
"torch.cuda.is_available"
],
[
"numpy.random.seed",
"torch.cuda.manual_seed",
"torch.nn.functional.nll_loss",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.aut... |
IshanBaliyan/DEEP-TFM_with_cGAN | [
"8d711c025367031197e5b8c7c768fc9fbea406ce"
] | [
"Scripts_Python/Bead2_20200620/CGAN/train.py"
] | [
"from __future__ import print_function\nimport argparse\nimport os\nfrom math import log10\nimport numpy as np\nimport sys\nimport os\nimport random\nfrom glob import glob\nfrom PIL import Image\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.autograd import Variable\nfr... | [
[
"torch.nn.MSELoss",
"torch.cat",
"torch.utils.data.DataLoader",
"numpy.dtype",
"torch.nn.BCELoss",
"torch.autograd.Variable",
"numpy.max",
"torch.exp",
"torch.FloatTensor",
"torch.no_grad",
"torch.nn.L1Loss",
"numpy.divide",
"torch.save"
]
] |
inyukwo1/qgm_decoder | [
"70e60afec140ec3e2ee04f980a384e1cf28d761c"
] | [
"commons/embeddings/word_embedding.py"
] | [
"import os\nimport json\nimport pickle\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport numpy as np\nfrom pytorch_pretrained_bert import BertTokenizer\nfrom commons.embeddings.graph_utils import *\nfrom datasets.schema import Schema\nfrom typing import List\n\n\n\nclass WordEmbeddin... | [
[
"torch.LongTensor",
"torch.from_numpy",
"torch.tensor",
"numpy.load",
"numpy.array",
"numpy.zeros",
"torch.autograd.Variable"
]
] |
kylebarron/dask | [
"8663c6b7813fbdcaaa85d4fdde04ff42b1bb6ed0"
] | [
"dask/array/utils.py"
] | [
"import difflib\nimport functools\nimport math\nimport numbers\nimport os\nimport warnings\n\nimport numpy as np\nfrom tlz import frequencies, concat\n\nfrom .core import Array\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import has_keyword, ignoring, is_arraylike\n\ntry:\n AxisError = np.AxisError... | [
[
"numpy.ones_like",
"numpy.allclose",
"numpy.isnan",
"numpy.empty_like",
"numpy.full",
"numpy.full_like",
"numpy.ones",
"numpy.zeros_like",
"numpy.isscalar",
"numpy.errstate",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.empty"
]
] |
epfl-lts2/spikexplore | [
"05c5ff1aa1cca3f77126c0de9a1b6b9360813afd"
] | [
"spikexplore/graph.py"
] | [
"import pandas as pd\nimport networkx as nx\nimport numpy as np\nimport json\nimport logging\nfrom .helpers import combine_dicts\nfrom datetime import datetime, timedelta\nimport community\nfrom tqdm import tqdm\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef convert_to_json(edge_df):\n \"\"\"\n Check if c... | [
[
"numpy.std",
"numpy.mean",
"pandas.DataFrame"
]
] |
yyj2013/RIR-Generator | [
"cbb219582585db1c17c72a913fc97c0ba9087cca"
] | [
"example_1.py"
] | [
"import numpy as np\nimport rirgenerator as RG\nimport matplotlib.pyplot as plt\n\nc = 340\t\t\t\t\t# Sound velocity (m/s)\nfs = 16000\t\t\t\t# Sample frequency (samples/s)\nr = [2,1.5,2]\t\t\t# Receiver position [x y z] (m)\ns = [2,3.5,2]\t\t\t# Source position [x y z] (m)\nL = [5,4,6]\t\t\t\t# Room dimensions [x ... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] |
duartecosta1/first_repository | [
"6e31c8499c9d723ac876c9796c990de4a962174b",
"6e31c8499c9d723ac876c9796c990de4a962174b"
] | [
"histogram.py",
"find_days_above_percentile.py"
] | [
"import xarray\nfrom scipy.stats import norm\nimport numpy as np\nimport matplotlib.mlab as mlab\nimport matplotlib.pyplot as plt\n\nlist_indices = ['tasmax']\nindices = list_indices[0]\n\nexp = ['CTL_E0', '121GPsc_E0']\nexp1 = '121GPsc_E0' \n\nfor i,ind in enumerate(exp): ... | [
[
"matplotlib.pyplot.legend",
"numpy.meshgrid",
"numpy.arange",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.suptitle",
"matplotlib.mlab.normpdf",
"matplotlib.pyplot.show"
],
[
"numpy.a... |
LightForm-group/matflow-defdap | [
"563dd75c11b2eeba6fa76c9bf5b33ec549837d2f"
] | [
"matflow_defdap/snippets/get_EBSD_image.py"
] | [
"import numpy as np\nfrom defdap.quat import Quat\nfrom scipy.stats import mode\nfrom scipy.ndimage import zoom\n\nfrom matflow_defdap import main_func\n\n\n@main_func\ndef get_EBSD_image(EbsdMap, scaling_factor):\n\n # Construct an array of Euler angles\n grain_quats = np.empty((len(EbsdMap), 4))\n\n # Tr... | [
[
"scipy.ndimage.zoom",
"numpy.copy",
"numpy.count_nonzero",
"scipy.stats.mode",
"numpy.array",
"numpy.where"
]
] |
JankaSvK/thesis | [
"c440ab8242b058f580fdf9d5a1d00708a1696561"
] | [
"program/program/GUI.py"
] | [
"import functools\nimport random\nimport threading\nimport tkinter as tk\nimport tkinter.scrolledtext as tkst\n\nimport cv2\nimport numpy as np\nfrom PIL import Image, ImageTk\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg\nfrom matplotlib.figure import Figure\nfrom mpl_toolkits.mplot3d import Axe... | [
[
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg",
"numpy.linalg.norm",
"matplotlib.figure.Figure"
]
] |
maitreygram/DiNO | [
"468f5a474b20cc8ffd6299d1e8a8652ba2212ef0",
"468f5a474b20cc8ffd6299d1e8a8652ba2212ef0"
] | [
"full_test.py",
"affinity_helper.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by ... | [
[
"torch.mm",
"torch.max",
"torch.cat",
"torch.zeros",
"numpy.asarray",
"numpy.arange",
"torch.from_numpy",
"numpy.atleast_3d",
"torch.no_grad",
"torch.nn.functional.interpolate",
"torch.stack",
"torch.hub.load"
],
[
"torch.nn.functional.normalize",
"torch... |
rwiuff/QuantumTransport | [
"5367ca2130b7cf82fefd4e2e7c1565e25ba68093",
"5367ca2130b7cf82fefd4e2e7c1565e25ba68093"
] | [
"Listings/BuckyBall.py",
"scripts/Tanos_libs/lib_bc.py"
] | [
"# -------------------------------------------------------------------- #\n# #\n# Python script for calculating the bandstructure of C60 #\n# #\n# This ... | [
[
"matplotlib.pyplot.imshow",
"numpy.round",
"matplotlib.pyplot.axes",
"numpy.where",
"matplotlib.pyplot.gca",
"numpy.linalg.eig",
"numpy.subtract",
"matplotlib.pyplot.subplots_adjust",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.append",
"numpy.identity",
"... |
balamurali-m/Ridge-Lasso | [
"6d8cc5dac8e403223ffaf81a7886ed23490a154e"
] | [
"Lasso Regression.py"
] | [
"\"\"\"\r\nLasso Regression\r\nAuthor: Balamurali M\r\n\"\"\"\r\n\r\nimport numpy as np\r\nfrom sklearn.linear_model import LinearRegression\r\nfrom sklearn.metrics import mean_squared_error\r\nfrom sklearn import linear_model\r\nimport warnings\r\nwarnings.filterwarnings('ignore')\r\n\r\n#Generating matrix with ex... | [
[
"sklearn.metrics.mean_squared_error",
"sklearn.linear_model.LinearRegression",
"sklearn.linear_model.Lasso",
"numpy.random.randint"
]
] |
gcfntnu/single-cell | [
"d81372ea42ef372b585ae29927c4798f62259832"
] | [
"rules/quant/scripts/convert_scanpy.py"
] | [
"#!/usr/bin/env python\n\nimport warnings\nwarnings.filterwarnings(\"ignore\", message=\"numpy.dtype size changed\")\n\nimport sys\nimport os\nimport argparse\nimport re\n\nimport scanpy as sc\nimport pandas as pd\nimport numpy as np\nimport anndata\nimport scvelo as sv\n\nGENOME = {'homo_sapiens': 'GRCh38',\n ... | [
[
"numpy.array",
"pandas.read_csv",
"numpy.sum"
]
] |
elensar92/DETR | [
"ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623"
] | [
"models/simple_backbone.py"
] | [
"import tensorflow as tf\nimport tensorflow.keras as keras\n\nclass Residual(keras.layers.Layer) : \n def __init__(self, filters = 32, strides = 1, use_1x1_conv=True) :\n super(Residual, self).__init__()\n self.use_1x1_conv = use_1x1_conv\n self.conv1 = keras.layers.Conv2D(filters, padding =... | [
[
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.GlobalAveragePooling2D",
"tensorflow.keras.layers.Dense",
"tensorflow.random.uniform",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.activations.relu",
"tensorflow.keras.layers... |
weikang9009/segregation | [
"403cc63772545f688308692d446c289ed2e7f99a",
"403cc63772545f688308692d446c289ed2e7f99a",
"403cc63772545f688308692d446c289ed2e7f99a"
] | [
"segregation/tests/test_distance_decay_exposure.py",
"segregation/tests/test_multi_gini_seg.py",
"segregation/tests/test_local_multi_local_simpson_concentration.py"
] | [
"import unittest\nfrom libpysal.examples import load_example\nimport geopandas as gpd\nimport numpy as np\nfrom segregation.spatial import DistanceDecayExposure\n\n\nclass Distance_Decay_Exposure_Tester(unittest.TestCase):\n def test_Distance_Decay_Exposure(self):\n s_map = gpd.read_file(load_example(\"Sa... | [
[
"numpy.testing.assert_almost_equal"
],
[
"numpy.testing.assert_almost_equal"
],
[
"numpy.array"
]
] |
viniciusguigo/kairos_minerl_basalt | [
"8f76e1d293dbcf62653ed3f7f326bd090a0af6f0"
] | [
"kairos_minerl/src/kairos_minerl/gail_wrapper.py"
] | [
"import numpy as np\nimport gym\n\n#*******************************************************************\n# FIND CAVE TASK\n#*******************************************************************\n# custom action wrapper for complete GAIL agent for MineRL\nclass ActionShaping_FindCave(gym.ActionWrapper):\n def __i... | [
[
"numpy.zeros"
]
] |
soloist-v/yi | [
"d7c04fe6266441d2629ba35f69c9fc659a52b370"
] | [
"yi/core/functional.py"
] | [
"import numpy as np\n\n\ndef get_im2col_indices(x_shape, field_height=3, field_width=3, padding=1, stride=1):\n # First figure out what the size of the output should be\n N, C, H, W = x_shape\n assert (H + 2 * padding - field_height) % stride == 0\n assert (W + 2 * padding - field_height) % stride == 0\... | [
[
"numpy.arange",
"numpy.zeros",
"numpy.tile",
"numpy.pad"
]
] |
linsats/GRAC_Discrete | [
"33f7917cc23e50bb3326b6d94a7957ff2fe419f7"
] | [
"main.py"
] | [
"import numpy as np\nimport torch\nimport gym\nimport argparse\nimport os\nimport cv2\nimport imageio\nfrom skimage.color import rgb2gray\n\nimport datetime\nimport utils\n\nfrom torch.utils.tensorboard import SummaryWriter\n\ndef eval_policy(policy, env_name, seed, eval_episodes=10):\n eval_env = gym.make(env_nam... | [
[
"numpy.array",
"torch.utils.tensorboard.SummaryWriter",
"numpy.random.randint"
]
] |
onwebbe/pyFaceRecognize | [
"10f38d57542991f23957affea78763febf6f2980"
] | [
"start.py"
] | [
"import faceRecorgnize.cropFaces as cropFaces\nimport faceRecorgnize.faceRecorgnize as faceRecorgnize\nimport utils.ImageUtils as ImageUtils\nimport utils.Constants as Constants\nimport utils.FaceUtils as FaceUtils\nimport cv2 as cv\nimport os\nimport numpy as np\nimport db.FaceData as FaceData\n\nrawImageRootPath ... | [
[
"numpy.array",
"numpy.save"
]
] |
JohnGBaker/ptmcmc | [
"a8878d6a79019fa5e2144a0b5fb88c04d4659e7e"
] | [
"python/covar.py"
] | [
"# -*- coding: utf-8 -*-\n#This code is adaped from\n# https://github.com/dfm/corner.py\n# git hash 5c2cd63 on May 25\n# Modifications by John Baker NASA-GSFC (2016-18)\n#Copyright (c) 2013-2016 Daniel Foreman-Mackey\n#All rights reserved.\n#\n#Redistribution and use in source and binary forms, with or without\n#m... | [
[
"numpy.diag",
"numpy.asarray",
"numpy.cumsum",
"numpy.max",
"numpy.any",
"numpy.where",
"matplotlib.pyplot.gca",
"numpy.arange",
"numpy.atleast_1d",
"numpy.diff",
"numpy.interp",
"matplotlib.colors.colorConverter.to_rgba",
"matplotlib.ticker.ScalarFormatter",
... |
alipay/Parameter_Inference_Efficient_PIE | [
"660add7705432a526aa3335fff3d8cf1c7d015a4",
"660add7705432a526aa3335fff3d8cf1c7d015a4"
] | [
"entity_typing/src/data_processer.py",
"candidate/cat.py"
] | [
"import os\nimport re\nimport pickle\nimport random\nimport pylab\nimport os.path as osp\nimport numpy as np\nfrom collections import defaultdict\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom scipy.sparse import coo_matrix\nfrom utils import count_all_paths_with_mp, count_paths, get_path_dict_a... | [
[
"numpy.random.choice",
"numpy.arange",
"numpy.stack",
"numpy.random.shuffle",
"numpy.concatenate",
"numpy.load",
"numpy.array"
],
[
"numpy.concatenate",
"numpy.load",
"numpy.save"
]
] |
usc-isi-i2/dsbox-ta2 | [
"85e0e8f5bbda052fa77cb98f4eef1f4b50909fd2"
] | [
"python/dsbox/template/template_files/loaded/RegressionWithSelection.py"
] | [
"from dsbox.template.template import DSBoxTemplate \nfrom d3m.metadata.problem import TaskKeyword \nfrom dsbox.template.template_steps import TemplateSteps \nfrom dsbox.schema import SpecializedProblem \nimport typing \nimport numpy as np # type: ignore \nclass RegressionWithSelection(DSBoxTemplate):\n def __in... | [
[
"numpy.logspace"
]
] |
iwan933/wavenet-lstm-timeseries | [
"2be7f9384b72d3acd03c22272e187bc431040295"
] | [
"model/lstm.py"
] | [
"import tensorflow as tf\nimport kerastuner as kt\n\nfrom sacred import Experiment\n\nfrom model.training import sharpe_loss, fit\nfrom util.data import load_data, preprocess, split_train_test_validation, make_dataset, create_full_datasets\n\nex = Experiment()\n\n\n@ex.config\ndef config():\n data_dir = 'data'\n... | [
[
"tensorflow.optimizers.Adam",
"tensorflow.keras.regularizers.l1",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.keras.layers.LSTM"
]
] |
joseignaciorc/fastparquet | [
"38922d599e18aa082b7a5f14bfdc42b86fbcea52"
] | [
"fastparquet/test/test_api.py"
] | [
"# -*- coding: utf-8 -*-\nimport io\nimport os\nimport subprocess\nimport sys\nfrom distutils.version import LooseVersion\n\nimport numpy as np\nimport pandas as pd\ntry:\n from pandas.tslib import Timestamp\nexcept ImportError:\n from pandas import Timestamp\nimport pytest\n\nfrom .util import tempdir\nimpor... | [
[
"pandas.to_datetime",
"numpy.random.choice",
"numpy.arange",
"pandas.util.testing.makeMixedDataFrame",
"pandas.DataFrame",
"pandas.testing.assert_frame_equal",
"numpy.random.rand",
"numpy.array",
"pandas.Timestamp",
"numpy.random.randint"
]
] |
dhmlee/rafamultilayerperceptron | [
"0af5759e95cbfc730d0b733d65b87a6186e49fcc"
] | [
"neuralnet.py"
] | [
"import numpy as np\nfrom scipy.special import expit\nfrom constants import *\n\nclass NeuralNetMLP(object):\n\tdef __init__(self, layers, random_state=None):\n\t\t\"\"\" Initialise the layers as list(input_layer, ...hidden_layers..., output_layer) \"\"\"\n\t\tnp.random.seed(random_state)\n\t\tself.num_layers = len... | [
[
"numpy.dot",
"numpy.zeroes",
"numpy.log",
"numpy.sqrt",
"numpy.random.seed",
"scipy.special.expit",
"numpy.sign",
"numpy.random.randn",
"numpy.zeros",
"numpy.sum"
]
] |
Abhis-123/Mallmetering | [
"720c66c9f2f3c767eb798daaa86f9d71cee13122"
] | [
"backend/Superadmin/views.py"
] | [
"from rest_framework import status\nfrom uuid import uuid4\nimport datetime;\nimport csv\n# Create your views here.\nfrom rest_framework.decorators import api_view\nfrom datetime import datetime\nfrom django.utils.encoding import smart_str\nfrom rest_framework import generics\nfrom rest_framework import generics\n... | [
[
"pandas.DataFrame",
"numpy.random.choice"
]
] |
nathangeology/cyclist_dataset | [
"44ad4a3765e86cba934bfdbfb151a788eddfbead",
"44ad4a3765e86cba934bfdbfb151a788eddfbead"
] | [
"data_science_layer/reporting/pred_vs_actual.py",
"data_science_layer/sampling/up_sampler.py"
] | [
"from data_science_layer.reporting.abstract_report import AbstractReport\nfrom data_science_layer.pipeline.abstract_pipline import AbstractPipeline\nimport matplotlib.pyplot as plt\nimport pkg_resources\n\n\nclass ActualVsPredictionPlot(AbstractReport):\n\n sub_folder = 'reports'\n\n def report(self, pipeline... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.ylabel"
],
[
"pandas.Series",
"pandas.DataFrame"
]
] |
fjwillemsen/BayesianOptimization-autotuning | [
"9af48014079a98e05324cb9d67cb8660aaf26c28"
] | [
"cached_data_used/convolution.py"
] | [
"#!/usr/bin/env python\nimport sys\n\nimport numpy\nimport logging\nimport kernel_tuner\nfrom collections import OrderedDict\nimport gc\n\n\ndef tune(device_name, strategy=\"bayes_opt_GPyTorch_lean\", strategy_options=None, verbose=True, quiet=False, simulation_mode=True):\n\n #input dimensions and data\n ima... | [
[
"numpy.prod"
]
] |
rgevrey/portfolio-management-and-risk-tools | [
"2bdb3ddb168b4ca973ab73b412cb4c77afbc0859"
] | [
"src/risk_kit.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nfrom scipy.stats import norm\r\nimport pdb as pdb\r\nimport os\r\n\r\n# Last updated on 5/01/2022 19:08\r\n\r\n#######\r\n# Data Extraction\r\n#######\r\n\r\ndef path_data():\r\n # Path parsing to make it work across computers\r\n path_directory = os.path.dirname(... | [
[
"scipy.stats.norm.ppf",
"numpy.dot",
"pandas.to_datetime",
"numpy.minimum",
"pandas.Series",
"numpy.sqrt",
"numpy.linspace",
"pandas.DataFrame",
"numpy.exp",
"pandas.read_csv",
"numpy.less",
"numpy.arange",
"numpy.empty_like",
"matplotlib.pyplot.subplots_adj... |
jaseweir/tensor2tensor | [
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28dd",
"2a33b152d7835af66a6d20afe7961751047e28d... | [
"tensor2tensor/data_generators/gym_env_test.py",
"tensor2tensor/utils/multistep_with_adamoptimizer.py",
"tensor2tensor/data_generators/wikisum/get_references_commoncrawl.py",
"tensor2tensor/models/resnet_test.py",
"tensor2tensor/bin/t2t_translate_all.py",
"tensor2tensor/data_generators/audio_test.py",
"... | [
"# coding=utf-8\n# Copyright 2021 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.compat.v1.train.Example.FromString",
"numpy.random.seed",
"tensorflow.compat.v1.test.main",
"numpy.min",
"numpy.max",
"tensorflow.compat.v1.test.get_temp_dir",
"tensorflow.compat.v1.python_io.tf_record_iterator"
],
[
"tensorflow.compat.v1.assign_sub",
"tensorflo... |
rlouf/socio-spatial-stratification | [
"0b6229248882253548efed2442fd04d69cb617e4"
] | [
"bin/plot_neighbourhoods.py"
] | [
"\"\"\"plot_neighbourhoods.py\n\nPlot the neighbourhoods of all classes for the city specified as an input with the following color codes\n* Black: where the class is over-represented (with 99% CI)\n* Light grey: where the class is 'normally' represented\n* White: where the class is under-represented\n\"\"\"\nimpor... | [
[
"matplotlib.pylab.show",
"matplotlib.pylab.figure"
]
] |
hchaudhari73/ga-learner-dsmp-repo | [
"42c0bf7b4bbeef10d187c74c8803b1fdca5d2cdd",
"42c0bf7b4bbeef10d187c74c8803b1fdca5d2cdd"
] | [
"Car-insurance-claim/code.py",
"leading_club/code.py"
] | [
"# --------------\nimport pandas as pd \nfrom sklearn.model_selection import train_test_split\n\ndf = pd.read_csv(path)\nprint(df.head())\nprint(df.info())\ncolumns = [\"INCOME\", \"HOME_VAL\",'BLUEBOOK','OLDCLAIM','CLM_AMT']\nfor col in columns:\n df[col] = df[col].map(lambda x: str(x).replace(\"$\",\"\").repla... | [
[
"pandas.read_csv",
"sklearn.linear_model.LogisticRegression",
"sklearn.model_selection.train_test_split",
"sklearn.preprocessing.StandardScaler",
"sklearn.preprocessing.LabelEncoder",
"sklearn.metrics.accuracy_score"
],
[
"pandas.read_csv",
"matplotlib.pyplot.show"
]
] |
FawwazMayda/car-defect-mask | [
"1f2287e470e9b28f0d871dd607dc6fffe9d3babf"
] | [
"samples/balloon/balloon.py"
] | [
"\"\"\"\nMask R-CNN\nTrain on the toy Balloon dataset and implement color splash effect.\n\nCopyright (c) 2018 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\n------------------------------------------------------------\n\nUsage: import the module (see Jupyte... | [
[
"numpy.where",
"numpy.sum",
"numpy.ones"
]
] |
KIZI/pyIDS | [
"76ad9d9b2bc12630ae1a36cb8f96103a5e5bbfce",
"76ad9d9b2bc12630ae1a36cb8f96103a5e5bbfce",
"76ad9d9b2bc12630ae1a36cb8f96103a5e5bbfce",
"76ad9d9b2bc12630ae1a36cb8f96103a5e5bbfce"
] | [
"pyids/model_selection/coordinate_ascent.py",
"scripts/use_case/thesis/testing_xml.py",
"scripts/use_case/thesis/test_coordinate_ascent_effeciency_auc_interpretability_distance_euclidean.py",
"pyids/data_structures/ids_rule.py"
] | [
"from .param_space_optimizer import ParameterSpaceOptimizer\nfrom typing import Tuple, Dict, List\nimport pandas as pd\n\ndef _ternary_search(func, left, right, absolute_precision, debug=False):\n \"\"\"\n taken from wikipedia article on ternary search\n \"\"\"\n \n while True:\n if abs(right ... | [
[
"pandas.DataFrame"
],
[
"pandas.read_csv"
],
[
"pandas.read_csv",
"numpy.linalg.norm",
"pandas.DataFrame"
],
[
"numpy.logical_not",
"sklearn.metrics.f1_score",
"numpy.logical_and",
"numpy.where",
"numpy.sum"
]
] |
akashrajkn/sparse-distributions | [
"961447fef7307905cf3d8a32ac31d5473c6c1f20"
] | [
"mixture.py"
] | [
"import torch\nfrom torch.distributions.uniform import Uniform\nfrom torch.distributions.utils import broadcast_all\nfrom torch.distributions.kl import register_kl, kl_divergence\nimport torch.nn.functional as F\n\n\nEPS = 1e-5\n\n\nclass MixtureD0C01(torch.distributions.Distribution):\n \n def __init__(self,... | [
[
"torch.Size",
"torch.sigmoid",
"torch.ones",
"torch.distributions.kl.register_kl",
"torch.zeros",
"torch.distributions.kl.kl_divergence",
"torch.nn.functional.logsigmoid",
"torch.zeros_like",
"torch.where",
"torch.nn.functional.softplus"
]
] |
supersunpower/exchange_calendars | [
"306d99a1204f2625c2ff0d795a8f8cb1dfd0d03a"
] | [
"exchange_calendars/us_holidays.py"
] | [
"\"\"\"\nUS Holidays\n\nMany historical holidays were derived from the pdf at\netc/NYSE-Historical-Closings.pdf. Originally posted at\nhttp://s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf # noqa\n\nThese were originally added in\nhttps://github.com/rsheftel/pandas_market_calendars/pull/30\n\"\"\... | [
[
"pandas.tseries.offsets.Day",
"pandas.Timestamp"
]
] |
Soapy-Salted-Fish-King/DIM | [
"bac4765a8126746675f517c7bfa1b04b88044d51",
"bac4765a8126746675f517c7bfa1b04b88044d51"
] | [
"cortex_DIM/functions/gradient_penalty.py",
"cortex_DIM/nn_modules/convnet.py"
] | [
"'''Gradient penalty functions.\n\n'''\n\nimport torch\nfrom torch import autograd\n\n\ndef contrastive_gradient_penalty(network, input, penalty_amount=1.):\n \"\"\"Contrastive gradient penalty.\n\n This is essentially the loss introduced by Mescheder et al 2018.\n\n Args:\n network: Network to appl... | [
[
"torch.set_grad_enabled",
"torch.ones_like"
],
[
"torch.nn.Linear",
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.ConvTranspose2d"
]
] |
tenghehan/reid_without_id | [
"d1d0ff273b1ef19fc6da8cbbf210527779b37455",
"d1d0ff273b1ef19fc6da8cbbf210527779b37455"
] | [
"fastreid/modeling/losses/triplet_loss.py",
"fastreid/data/build.py"
] | [
"# encoding: utf-8\n\"\"\"\n@author: liaoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport torch\nimport torch.nn.functional as F\n\nfrom fastreid.utils import comm\nfrom fastreid.layers import GatherLayer\nfrom .utils import concat_all_gather, euclidean_dist, normalize\n\n\ndef softmax_weights(dist, ma... | [
[
"torch.max",
"torch.nn.functional.margin_ranking_loss",
"torch.sum",
"torch.nn.functional.soft_margin_loss",
"torch.exp"
],
[
"torch.utils.data.DataLoader",
"torch.utils.data.sampler.BatchSampler",
"torch.utils.data.BatchSampler",
"torch.tensor"
]
] |
zuimeiyujianni/MobileStyleGAN.pytorch | [
"2d18a80bed6be3ec0eec703cc9be50616f2401ee"
] | [
"core/model_zoo.py"
] | [
"import json\nimport torch\nfrom core.utils import download_ckpt\n\ndef model_zoo(name, zoo_path=\"configs/model_zoo.json\"):\n zoo = json.load(open(zoo_path))\n if name in zoo:\n ckpt = download_ckpt(**zoo[name])\n else:\n ckpt = torch.load(name, map_location=\"cpu\")\n return ckpt\n"
] | [
[
"torch.load"
]
] |
taruninani/SudokuSolver | [
"66ca33bb6ce4bce59128ebd1b6f16fa704a8e5f1",
"66ca33bb6ce4bce59128ebd1b6f16fa704a8e5f1",
"66ca33bb6ce4bce59128ebd1b6f16fa704a8e5f1"
] | [
"SudokuSolver.py",
"Examples/hardClassic.py",
"SudokuBoard.py"
] | [
"from SudokuSolver.Logger import Logger, LOGLEVEL\nfrom SudokuSolver.SudokuBoard import SudokuBoard\nimport numpy as np\n\nclass SudokuSolver(object):\n logger: Logger\n board: SudokuBoard\n\n def log(self,string):\n \"\"\"\n Logger\n Parameters\n ----------\n string\n\n ... | [
[
"numpy.where",
"numpy.any"
],
[
"numpy.array"
],
[
"numpy.unique",
"numpy.setdiff1d",
"numpy.array",
"numpy.zeros",
"numpy.where"
]
] |
csbhagav/allennlp | [
"4c99f8e82f7fd70c86652109bfca5282d470e981"
] | [
"allennlp/tests/models/semantic_parsing/wikitables/wikitables_mml_semantic_parser_test.py"
] | [
"# pylint: disable=invalid-name,no-self-use,protected-access\nfrom collections import namedtuple\nimport os\nimport pytest\n\nfrom flaky import flaky\nfrom numpy.testing import assert_almost_equal\nimport torch\n\nfrom allennlp.common.testing import ModelTestCase\nfrom allennlp.training.metrics.wikitables_accuracy ... | [
[
"torch.LongTensor",
"torch.FloatTensor"
]
] |
juierror/mace | [
"a2bcf2c98b410f75d38f2291585b0ad11b36d068"
] | [
"tools/sh_commands.py"
] | [
"# Copyright 2018 The MACE 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 required b... | [
[
"numpy.array",
"numpy.fromfile"
]
] |
CHUNYUWANG/imu-human-pose-pytorch | [
"f4813336571789f46eabdfb520e7ed5b20ac04ea"
] | [
"lib/multiviews/totalcapture_body.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n\nimport numpy as np\n\n\nclass HumanBody(object):\n\n def __init__(self):\n self.skeleton = self.get_skeleton()\n self.skeleton_sorted_by_level = self.sort_skeleton_by_level(\n self.skeleton)\n self.imu_e... | [
[
"numpy.argsort",
"numpy.zeros"
]
] |
ibrahiminfinite/dart | [
"495c82120c836005f2d136d4a50c8cc997fb879b"
] | [
"python/tests/unit/collision/test_collision.py"
] | [
"import platform\nimport pytest\nimport dartpy as dart\nimport numpy as np\n\n\ndef collision_groups_tester(cd):\n size = [1, 1, 1]\n pos1 = [0, 0, 0]\n pos2 = [0.5, 0, 0]\n\n simple_frame1 = dart.dynamics.SimpleFrame()\n simple_frame2 = dart.dynamics.SimpleFrame()\n\n sphere1 = dart.dynamics.Sphe... | [
[
"numpy.isclose",
"numpy.zeros",
"numpy.ones"
]
] |
arthur-e/pyl4c | [
"97e1225c8b70ed9b21edc9e54ee66c78a02cded8"
] | [
"pyl4c/apps/l4c/extensions/damm.py"
] | [
"r'''\nThe Dual Arrhenius Michaelis-Menten (DAMM) soil decomposition model (from\nDavidson et al. 2012).\n\n$$\nR_H = V_{\\mathrm{max}}\\, \\frac{S_X}{K_{M_S} + S_X} \\frac{O_2}{K_{M_{O_2}} + O_2}\n$$\n\nNOTE: The only term in the equation that is not unitless (either intrinsically\nor because the units cancel out)... | [
[
"numpy.multiply",
"numpy.power",
"numpy.add",
"numpy.array",
"numpy.zeros",
"numpy.where"
]
] |
svenschultze/Colab-Live-Figures | [
"fe70ac089eb30f4ccda0996128c3fe13654567f0"
] | [
"live/gif.py"
] | [
"import ffmpeg\nimport cv2\nimport uuid\nimport os\nimport base64\nimport numpy as np\n\ndef save_video_to_file(file, vid, fps):\n writer = cv2.VideoWriter(file.name, cv2.VideoWriter_fourcc('M','J','P','G'), fps, (vid.shape[2], vid.shape[1]))\n for img in vid:\n writer.write(np.flip(img, axis=2))\n ... | [
[
"numpy.flip"
]
] |
MyMiDiII/bmstu-aa | [
"d08612e31ccd85f1b07ca9143b5806296198030a"
] | [
"lab07/src/main.py"
] | [
"import matplotlib.pyplot as plt\n\nfrom colored import fg, attr\n\nfrom dictionary import Dictionary\n\nfrom utils import *\nfrom experiments import getTimes, getComps\n\nDATADIR = './data/'\nFULL_COMB_SEARCH = 1\nBIN_SEARCH = 2\nSEGM_SEARCH = 3\n\ndef printInfo():\n print(\"Сравнение алгоритмов поиска в словар... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.get_current_fig_manager",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
cvillacampa/dgps_pep | [
"30ce21fd68f3af7b9cdb4d2a267e95c568c3ac93"
] | [
"utils.py"
] | [
"import os\n\nimport numpy as np\nimport psutil\n\n\ndef calculate_ETA(last_epoch_times, current_iteration, max_iterations):\n \"\"\"Calculates remaining training time in seconds\n\n Args:\n last_epoch_times (list/deque): Running time of last epochs\n current_iteration (int): current iteration n... | [
[
"numpy.mean"
]
] |
clairekope/SALSA | [
"b6d525f4a147b6983f1d6835a42c1fe7b87cf406"
] | [
"salsa/absorber_extractor.py"
] | [
"import yt\nimport trident\nimport numpy as np\nimport pandas as pd\n\nfrom spectacle.fitting import LineFinder1D\nfrom numpy.linalg import norm\nimport astropy.units as u\nfrom astropy.table import QTable\n\nfrom yt.data_objects.static_output import \\\n Dataset\n\nfrom salsa.utils.functions import ion_p_num\n... | [
[
"numpy.ma.masked_greater_equal",
"numpy.sqrt",
"numpy.linalg.norm",
"numpy.round",
"numpy.max",
"numpy.log10",
"numpy.ma.masked_array",
"numpy.where",
"numpy.sum",
"numpy.empty"
]
] |
RUB-SysSec/WaveFake | [
"d52d51b9ccdb0cec3f484e84b228791f06b955be"
] | [
"tests/test_dataset.py"
] | [
"\"\"\"Test cases for datahandling.\"\"\"\nimport unittest\n\nimport torch\nfrom dfadetect.datasets import AudioDataset\nfrom dfadetect.utils import find_wav_files\n\nfrom tests.utils import REAL_PATH, load_real, load_special\n\n\nclass TestAudioDataset(unittest.TestCase):\n\n def test_loading_audio(self):\n ... | [
[
"torch.allclose"
]
] |
sergiuionescu/gym-agents | [
"c65b786a148a868c9ee922dca1cb592604e7e828"
] | [
"agents/DiffAgent.py"
] | [
"import numpy as np\n\nfrom agents import DiffAgentBase\n\n\nclass DiffAgent(DiffAgentBase.DiffAgentBase):\n\n def prediction(self, observation):\n self.diff = []\n self.noise_reduction = []\n for dimension in self.space.spaces:\n self.diff.append(np.random.randint(0, dimension.n)... | [
[
"numpy.random.randint"
]
] |
beenje/taurus_pyqtgraph | [
"2b29d81b0af35ea64a5ac4dfd7773d2d22af497e"
] | [
"taurus_pyqtgraph/dateaxisitem.py"
] | [
"#!/usr/bin/env python\n\n#############################################################################\n##\n# This file is part of Taurus\n##\n# http://taurus-scada.org\n##\n# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain\n##\n# Taurus is free software: you can redistribute it and/or modify\n# it unde... | [
[
"numpy.ceil"
]
] |
RunxinXu/GIT | [
"3f91743656ae65c49bbfbe11a7ed8152a8b0bc20"
] | [
"dee/dee_helper.py"
] | [
"# Code Reference: (https://github.com/dolphin-zs/Doc2EDAG)\n\nimport logging\nimport os\nimport re\nfrom collections import defaultdict, Counter\nimport numpy as np\nimport torch\n\nfrom .dee_metric import measure_event_table_filling\nfrom .event_type import event_type2event_class, BaseEvent, event_type_fields_lis... | [
[
"numpy.mean",
"torch.tensor"
]
] |
Vikas-kum/incubator-mxnet | [
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf",
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf",
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf",
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf",
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf",
"ba02bf2fe2da423caa59ddb3fd5e433b90b730bf"
] | [
"tests/python/unittest/test_contrib_svrg_optimizer.py",
"tests/python/unittest/test_contrib_svrg_module.py",
"example/rnn/word_lm/data.py",
"example/sparse/wide_deep/data.py",
"benchmark/python/control_flow/rnn.py",
"example/neural-style/end_to_end/data_processing.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.array",
"numpy.random.randint"
],
[
"numpy.array",
"numpy.random.randint"
],
[
"numpy.zeros"
],
[
"numpy.array"
],
[
"numpy.std",
"numpy.mean"
],
[
"numpy.asarray",
"numpy.swapaxes",
"numpy.resize",
"numpy.clip"
]
] |
mfkiwl/depthy | [
"2a1f4f8abe59cdfae09a219eb12412453f1edca3"
] | [
"depthy/lightfield/structure_tensor.py"
] | [
"import numpy as np\nfrom scipy.ndimage import gaussian_filter, convolve\n\n\ndef local_structure_tensor(img: np.ndarray,\n si: float = 0.8,\n so: float = 1.6,\n slope_method: str = 'eigen',\n grad_method: str = ... | [
[
"scipy.ndimage.gaussian_filter",
"numpy.sqrt",
"numpy.gradient",
"scipy.ndimage.convolve",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros"
]
] |
KyungB/sc2_team_classifier | [
"fe49c2973b1e3feb4c7c56f5cf89438e3d5b2450"
] | [
"kmean.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Apr 22 12:22:46 2019\n\n@author: KY-Coffee\n\"\"\"\n\nfrom sklearn.cluster import KMeans\nimport matplotlib.pyplot as plt\n\ndef plot_KMeans(k_data,n=14, title=\"\", margins=True):\n model = KMeans(n)\n model.fit(k_data[0])\n \n y_kmeans = model.predict(k... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.scatter",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.figure"
]
] |
aroldanm/PartnerPlayBot | [
"758a5b010e22c72186c19de1510276a10894f829"
] | [
"Robot/AIModule.py"
] | [
"import operator\nimport numpy as np\nfrom VC import VCModule\nfrom time import sleep\n\nclass AIModule():\n vc = None\n \n def __init__(self):\n print(\"init aimodule\")\n self.vc = VCModule()\n \n#################################################################################\n# MÉTODOS... | [
[
"numpy.copy"
]
] |
konnase/DI-engine | [
"f803499cad191e9277b10e194132d74757bcfc8e",
"f803499cad191e9277b10e194132d74757bcfc8e",
"f803499cad191e9277b10e194132d74757bcfc8e",
"f803499cad191e9277b10e194132d74757bcfc8e",
"f803499cad191e9277b10e194132d74757bcfc8e",
"f803499cad191e9277b10e194132d74757bcfc8e"
] | [
"dizoo/classic_control/cartpole/envs/test_cartpole_env.py",
"dizoo/multiagent_particle/envs/particle_env.py",
"dizoo/pomdp/envs/atari_env.py",
"dizoo/pybullet/envs/pybullet_env.py",
"ding/utils/log_helper.py",
"ding/entry/application_entry.py"
] | [
"import pytest\nimport numpy as np\nfrom dizoo.classic_control.cartpole.envs import CartPoleEnv\n\n\n@pytest.mark.unittest\nclass TestCartPoleEnv:\n\n def test_naive(self):\n env = CartPoleEnv({})\n env.seed(314, dynamic_seed=False)\n assert env._seed == 314\n obs = env.reset()\n ... | [
[
"numpy.random.seed",
"numpy.random.randint"
],
[
"numpy.random.choice",
"numpy.ones",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
],
[
"numpy.random.seed",
"numpy.random.randint"
],
[
"numpy.float64",
"numpy.random.seed",
"numpy.random.randint"
]... |
jonasdegrave/peptideClassifier | [
"8abadbc1f34514105791189374ef56d73576e7b4"
] | [
"archive/legacyCode.py"
] | [
"import xlsxwriter\nimport os\nimport re\nimport pandas as pd\nfrom bs4 import BeautifulSoup\nimport urllib3\nimport matplotlib.pyplot as plt\n\n#import requests\n#import glob\n#import numpy as np\n\n#import xml.etree.ElementTree as ET\n#import urllib.request\n#from collections import Counter\n#from bioservices imp... | [
[
"pandas.read_excel",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.close",
"matplotlib.pyplot.pie",
"matplotlib.pyplot.show"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.