repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
AbderrahimRezki/prep_unit_project | [
"ee389db4500ea65a3d15c265327dbbecc58a12ae"
] | [
"linear_algebra/curve_fitting.py"
] | [
"from scipy.optimize import curve_fit\n\ndef set_objective(x, a, b):\n \"\"\" return the objective function \"\"\"\n #To-Do set the objective equation\n return a * x + b\n\ndef get_result( x, y):\n \"\"\"Return optimal values for a and b for the equation y = a*x+b \"\"\"\n\n # curve fit\n estimati... | [
[
"scipy.optimize.curve_fit"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
RafLaf/Adversarial_classes | [
"7f49d5acd39a899e5ce88be8cd649a109c2801e8"
] | [
"s2m2.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom args import *\nfrom torch.nn.utils.weight_norm import WeightNorm\n\n\nimport random\n\nclass BasicBlockWRN(nn.Module):\n def __init__(self, in_planes, out_planes, stride, drop_rate):\n super(BasicBlockWRN, self).__init__()\n ... | [
[
"torch.nn.Sequential",
"torch.norm",
"torch.nn.functional.dropout",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.utils.weight_norm.WeightNorm.apply"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stdacore/SinglePathOneShot_MAML | [
"31e428fff16d1b2af30677af353442d2c62f3e71"
] | [
"src/Search/tester.py"
] | [
"import torch\n\nfrom imagenet_dataset import get_train_dataprovider, get_val_dataprovider\nimport tqdm\nfrom utils import get_parameters, CrossEntropyLabelSmooth\nfrom network import ShuffleNetV2_OneShot\nimport torch.nn as nn\nassert torch.cuda.is_available()\n\ntrain_dataprovider, val_dataprovider = None, None\n... | [
[
"torch.device",
"torch.no_grad",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lawRathod/Deep-Q-Learning-Agent | [
"bdb5d7965f3a862b3cc47ba9b8ad38ee01718209"
] | [
"train_worker.py"
] | [
"from envs.rover_lander_1 import rover_lander_1\nfrom envs.rover_lander_2 import rover_lander_2\nimport os\nimport random\nimport datetime\nimport requests\nfrom collections import deque\nimport numpy as np\nfrom tqdm.auto import tqdm\n\nimport tensorflow as tf\nfrom tensorflow.keras import Sequential, layers, opti... | [
[
"tensorflow.keras.models.load_model",
"numpy.random.random",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.Adam",
"numpy.prod",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
robfalck/AoC2018 | [
"9cc6a94d11d70ea11df4999df2fdf955cc5c155a"
] | [
"aoc2018/dec15/part1.py"
] | [
"\nimport numpy as np\nimport collections\nfrom operator import itemgetter\n\nnp.set_printoptions(linewidth=1024, edgeitems=1000)\n\ndelta = {'N': (-1, 0), 'W': (0, -1), 'E': (0, 1), 'S': (1, 0)}\ninv_delta = {v: k for k, v in delta.items()}\n\ndef distance(p1, p2):\n return np.array(p2) - np.array(p1)\n\ndef ma... | [
[
"numpy.set_printoptions",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fang1fan/m5-python-starter | [
"434bcd701c04707e5a5c3ed07ee51d0a66687dfc"
] | [
"attention.py"
] | [
"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport gc; import os\nimport torch\nfrom torch.nn import *\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport warnings\nwarnings.filterwarnings('ignore')\nimport pandas as pd\nimport numpy as... | [
[
"torch.nn.Dropout",
"torch.nn.functional.softmax",
"torch.ones",
"torch.cat",
"torch.zeros",
"torch.einsum",
"torch.nn.GRUCell",
"torch.tril",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.chunk",
"torch.triu",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
activityMonitoring/actipy | [
"b7c37ff65ea01851e5e934a646edbb4bef20efe4"
] | [
"actipy/reader.py"
] | [
"import os\nimport time\nimport struct\nimport shutil\nimport tempfile\nimport atexit\nimport zipfile\nimport gzip\nimport pathlib\nimport numpy as np\nimport pandas as pd\nimport jpype\n\nfrom actipy import processing\n\n\n__all__ = ['read_device', 'process']\n\n\ndef read_device(input_file,\n lowpa... | [
[
"numpy.load",
"pandas.Timedelta",
"pandas.DataFrame",
"numpy.ceil"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
russellw/ml | [
"afc51f763185c18fd659264a448ec4a155ee7f4d"
] | [
"expr_2hidden.py"
] | [
"import datetime\nimport logging\nimport math\nimport random\nimport sys\nimport time\n\nimport psutil\nimport skopt\nimport torch\nimport torch.nn as nn\n\nstart = time.time()\n\nprocess = psutil.Process()\nrandom.seed(0)\n\nlogger = logging.getLogger()\nlogger.addHandler(\n logging.FileHandler(datetime.datetim... | [
[
"torch.nn.Linear",
"torch.nn.MSELoss",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lewyan/tensorflow-nmt | [
"6f954c2713dbcf00778f4f303b5bac7968b7fb4b"
] | [
"nmt/nmt.py"
] | [
"# Copyright 2017 Google Inc. 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 by appl... | [
[
"tensorflow.gfile.Exists",
"tensorflow.gfile.MakeDirs",
"numpy.random.seed",
"tensorflow.app.run"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
piedrro/napari-akseg | [
"305cbeb23c60b0371829e0937340f0fe0d0540a7"
] | [
"src/napari_akseg/_widget.py"
] | [
"\"\"\"\nThis module is an example of a barebones QWidget plugin for napari\n\nIt implements the Widget specification.\nsee: https://napari.org/plugins/guides.html?#widgets\n\nReplace code below according to your needs.\n\"\"\"\n\n\nfrom qtpy.QtWidgets import (QWidget,QVBoxLayout,QTabWidget,QCheckBox,QLabel,QLineEd... | [
[
"numpy.expand_dims",
"numpy.unique",
"pandas.DataFrame",
"pandas.ExcelWriter",
"numpy.array",
"scipy.ndimage.shift",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.1... |
xcz011/numpy | [
"bc3c7176987a5017126abbc861458fe53cd099fc"
] | [
"numpy/polynomial/tests/test_polynomial.py"
] | [
"\"\"\"Tests for polynomial module.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nfrom functools import reduce\n\nimport numpy as np\nimport numpy.polynomial.polynomial as poly\nfrom numpy.testing import (\n assert_almost_equal, assert_raises, assert_equal, assert_,\n assert_a... | [
[
"numpy.dot",
"numpy.einsum",
"numpy.linspace",
"numpy.polynomial.polynomial.polyfit",
"numpy.polynomial.polynomial.polymulx",
"numpy.polynomial.polynomial.polyval2d",
"numpy.polynomial.polynomial.polygrid2d",
"numpy.polynomial.polynomial.polytrim",
"numpy.zeros_like",
"nump... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hhoppe/hhoppe-tools | [
"5a72a9bf5e2e3e6648cb60d0dbfad10b34110231"
] | [
"hhoppe_tools/__init__.py"
] | [
"#!/usr/bin/env python3\n\"\"\"Library of Python tools -- Hugues Hoppe.\n# pylint: disable=line-too-long\n\nUseful commands to test and polish this file:\n\nbash -c 'f=__init__.py; true && env python3 $f; env mypy --strict \"$f\"; autopep8 -a -a -a --max-line-length 80 --indent-size 2 --ignore E265 --diff \"$f\"; p... | [
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.issubdtype",
"numpy.isneginf",
"numpy.broadcast",
"numpy.zeros_like",
"numpy.any",
"numpy.iinfo",
"numpy.moveaxis",
"numpy.square",
"numpy.empty_like",
"numpy.full",
"numpy.atleast_1d",
"numpy.insert",
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Knowledge-Precipitation-Tribe/Neural-network | [
"eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8",
"eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8"
] | [
"code/singleVariableLinearRegression/HelperClass/TrainingHistory_1_0.py",
"code/NonLinearBinaryClassification/HelperClass2/TrainingHistory_2_1.py"
] | [
"# -*- coding: utf-8 -*-#\n'''\n# Name: TrainingHistory_1_0\n# Description: 记录训练过程中的训练历史\n# Author: super\n# Date: 2020/5/8\n'''\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LogNorm\n\n\"\"\"\nVersion 1.0\n- to record the history of training loss and w... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.f... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
oplatek/merlin | [
"df7e3494b0662fec3a2fbe4d51d056e80cc6b682"
] | [
"src/models/dnn_cm.py"
] | [
"###THEANO_FLAGS='cuda.root=/opt/cuda-5.0.35,mode=FAST_RUN,device=gpu0,floatX=float32,exception_verbosity=high' python dnn.py\n\"\"\"\n\"\"\"\nimport cPickle\nimport os\nimport sys\nimport time\n\nimport numpy# as np\nimport gnumpy as gnp\n\n#cudamat\n\n#import theano\n#import theano.tensor as T\n\nimport logging\n... | [
[
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kruppt/wtfml | [
"1c13fc3fa850fe30f32707cf75fadc500c872284"
] | [
"wtfml/engine/engine.py"
] | [
"import torch\nfrom tqdm import tqdm\nfrom ..utils import AverageMeter\n\ntry:\n import torch_xla.core.xla_model as xm\n import torch_xla.distributed.parallel_loader as pl\n _xla_available = True\nexcept ImportError:\n _xla_available = False\n\ntry:\n from apex import amp\n\n _apex_available = Tru... | [
[
"torch.set_grad_enabled",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Erikx3/2D_Pygame_Drone_Simulation | [
"e67fdf9d030a3e68448e521818f557622293284f"
] | [
"tools/line_intersect.py"
] | [
"import numpy as np\n\n# https://stackoverflow.com/questions/20677795/how-do-i-compute-the-intersection-point-of-two-lines\n\n\ndef line_intersection(line1, line2):\n \"\"\"\n\n :param line1: line defined by two points, e.g. [[1,1], [2,2]]\n :param line2: second line\n :return: point of intersection,\n ... | [
[
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ShubhangDesai/nn-micro-framework | [
"1d980e653ed480a17b7a4158de5638ee70b6ae40"
] | [
"krikos/nn/network.py"
] | [
"import numpy as np\n\nfrom krikos.nn.layer import BatchNorm, BatchNorm2d, Dropout\n\n\nclass Network(object):\n def __init__(self):\n super(Network, self).__init__()\n self.diff = (BatchNorm, BatchNorm2d, Dropout)\n\n def train(self, input, target):\n raise NotImplementedError\n\n def... | [
[
"numpy.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
celiolarcher/AUTOCVE | [
"b69e8d0a35d838a3ef5fd36516f9e4c61610ce53",
"b69e8d0a35d838a3ef5fd36516f9e4c61610ce53"
] | [
"util/scoring_handler.py",
"util/make_pipeline.py"
] | [
"from sklearn import metrics\n\ndef load_scoring(score_call):\n if isinstance(score_call,str):\n if score_call in metrics.SCORERS:\n score_call=metrics.get_scorer(score_call)\n else:\n raise Exception(\"Keyword isn't in metric.SCORES\")\n elif not callable(score_call):\n ... | [
[
"sklearn.metrics.get_scorer"
],
[
"sklearn.pipeline.make_pipeline",
"sklearn.ensemble.VotingClassifier"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
luziqing/CNN-for-ASI | [
"90b29f91c9ed98323d76628922d34cf94ea6a1bd"
] | [
"train.py"
] | [
"# Compatability Imports\nfrom __future__ import print_function\nfrom os.path import join\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom data import readSEGY, readLabels, get_slice\nfrom batch import get_random_batch\nfrom torch.autograd import Variable\nfrom torch.utils.data import Da... | [
[
"torch.nn.CrossEntropyLoss",
"torch.Tensor",
"torch.squeeze",
"torch.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xpersky/whatsthat | [
"2857a0e829d39fd591f90a3f7001f7ea78593556"
] | [
"app/views.py"
] | [
"import os\nimport cv2\nimport numpy as np\nfrom keras.models import load_model\nimport tensorflow as tf\nimport datetime\n\nfrom django.shortcuts import render\nfrom django.http import HttpResponse\nfrom django.http import JsonResponse\nfrom django.db.models import Count\nfrom django.db.models.functions import Tru... | [
[
"tensorflow.get_default_graph",
"numpy.expand_dims"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
amarufd/MLflowAndAWSSagemaker | [
"c90cfea48acb1d42422fc810b61063e01721e21a"
] | [
"cargando_dataset.py"
] | [
"import mlflow\nimport pandas as pd\nfrom datetime import datetime\nfrom sklearn.model_selection import train_test_split\n\n\ndef load_dataset_to_mlflow(path, sep, test_size=0.2, random_state=123):\n # carga el dataset\n data = pd.read_csv(path, sep=sep)\n\n # se procesa el dataset\n x,y = procesando_da... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
yukiTakezawa/GraphIsomorphismNetwork | [
"df6c907f90fb558062a619bd367f1cd863d7f96a"
] | [
"src/gnn.py"
] | [
"import numpy as np\nimport torch\nfrom molecule import *\nimport copy\n\nclass GraphIsomorphismNetwork:\n def __init__(self, node_dim, update_loop_size):\n self.node_dim = node_dim\n self.update_loop_size = update_loop_size\n self.eps = 0.0 #np.random.normal() # learnable parameter \n\n ... | [
[
"torch.mm",
"torch.zeros_like",
"torch.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AgentMaker/PAPC | [
"c9a0a284208a4cb508467ee3c9e683d802b868cc"
] | [
"PAPC/models/detect/pointpillars/libs/ops/sample_ops.py"
] | [
"import pathlib\nimport pickle\nimport time\nfrom functools import partial, reduce\n\nimport numpy as np\nfrom skimage import io as imgio\n\nfrom libs import preprocess as prep\nfrom libs.ops import box_np_ops\nfrom data import kitti_common as kitti\nimport copy\n\nfrom libs.tools.check import shape_mergeable\n\ncl... | [
[
"numpy.logical_not",
"numpy.abs",
"numpy.arange",
"numpy.stack",
"numpy.ones",
"numpy.concatenate",
"numpy.max",
"numpy.round",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wilsonyhlee/datasets | [
"0e87e1d053220e8ecddfa679bcd89a4c7bc5af62"
] | [
"src/datasets/search.py"
] | [
"import importlib.util\nimport os\nimport tempfile\nfrom pathlib import PurePath\nfrom typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Union\n\nimport numpy as np\nfrom tqdm.auto import tqdm\n\nfrom .utils.logging import WARNING, get_logger\n\n\nif TYPE_CHECKING:\n from .arrow_dataset import Datas... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fainall1618/transformer-xl-chinese | [
"d28fc131ed8d5453bbb107e4cb23073edc998e58"
] | [
"tf/data_utils_chinese.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport math\nimport os\nfrom functools import partial\n\nfrom collections import Counter, OrderedDict\nimport pickle\nimport json\nimport multiprocessing as mp\n\nimport numpy as np\n\nfrom absl import... | [
[
"tensorflow.FixedLenFeature",
"numpy.concatenate",
"numpy.mean",
"tensorflow.to_int32",
"numpy.where",
"tensorflow.train.Int64List",
"numpy.random.randint",
"tensorflow.compat.v1.app.run",
"tensorflow.sparse_to_dense",
"tensorflow.data.TFRecordDataset",
"numpy.std",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
igorvlnascimento/open-nre-plus | [
"6c994fe4e5d19734a34592fc630cedd0547ed989"
] | [
"opennre/encoder/distilbert_encoder.py"
] | [
"import logging\nimport torch\nimport torch.nn as nn\nfrom transformers import DistilBertTokenizer, DistilBertModel\nfrom .base_encoder import BaseEncoder\n\nclass DistilBertEncoder(nn.Module):\n def __init__(self, max_length, pretrain_path, blank_padding=True, mask_entity=False):\n \"\"\"\n Args:\... | [
[
"torch.tensor",
"torch.nn.Linear",
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jinxixiang/PC-TMB | [
"c6f2fc62629c7f026865774cdfb9d826464397ea"
] | [
"construct_graph.py"
] | [
"### System\nimport os, sys\nimport h5py\nfrom tqdm import tqdm\nimport numpy as np\nimport nmslib\nimport torch\n\n\nclass Hnsw:\n def __init__(self, space='cosinesimil', index_params=None,\n query_params=None, print_progress=True):\n self.space = space\n self.index_params = index_... | [
[
"numpy.array",
"numpy.stack",
"torch.Tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ekayen/rnng-pytorch | [
"4cdfcb62f18a214011a8ea4c034fbf9041ac6012"
] | [
"beam_search.py"
] | [
"import sys\nimport os\n\nimport argparse\nimport json\nimport random\nimport shutil\nimport copy\nfrom collections import OrderedDict\n\nimport torch\nfrom torch import cuda\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.nn.parameter import Parameter\nfrom tqdm import tqdm\n\nimport torch.... | [
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.cuda.empty_cache",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ripon1763/hdss_chakaria | [
"0b8484c14c3596defab6133860c598b23bb07a34"
] | [
"python/sav.py"
] | [
"import sys \nimport pandas as pd \nimport json\nimport os\nimport numpy as np\nimport pyreadstat\n\n\n#opening the json file\nf = open(sys.argv[1]+\".json\", \"r\")\nx=f.read()\n\n# parse x:\ndata = json.loads(x)\n\n# Creates DataFrame. \ndf = pd.DataFrame(data)\n\ndf = df.fillna(value=np.nan)\n\nf.close()\n ... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
EvenOldridge/NVTabular | [
"85333ae754c0512f7b213a4e98117a1501500dda"
] | [
"tests/unit/test_ops.py"
] | [
"#\n# Copyright (c) 2020, NVIDIA CORPORATION.\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 applicabl... | [
[
"numpy.asarray",
"pandas.DataFrame",
"numpy.all",
"pandas.api.types.is_integer_dtype",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
wanghh2000/yolov4-tf2 | [
"d91707f9ae79e04d62a630501a70b72e2fc99e0f"
] | [
"video.py"
] | [
"#-------------------------------------#\r\n# 调用摄像头检测\r\n#-------------------------------------#\r\nfrom yolo import YOLO\r\nfrom PIL import Image\r\nimport numpy as np\r\nimport cv2\r\nimport time\r\nimport tensorflow as tf\r\n\r\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\r\ntf.c... | [
[
"numpy.uint8",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.config.experimental.set_memory_growth"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dhaulagiri0/Mask_RCNN | [
"f352dcfdbc84cbb4266997f8781b91e84dff7f2b",
"f352dcfdbc84cbb4266997f8781b91e84dff7f2b"
] | [
"angio2020/data_processing.py",
"angio2020/interpolation.py"
] | [
"import cv2\nimport numpy as np\nimport matplotlib.cm as cm\nfrom matplotlib import pyplot as plt\nfrom pycocotools import mask as maskUtils\nfrom pathlib import Path\nimport json\n\n'''\nconverts a given mask image to run length encoding format (rle)\nrle itself is a dictionary containing:\n size: size of origi... | [
[
"numpy.asfortranarray"
],
[
"numpy.asarray",
"numpy.arange",
"scipy.interpolate.RectBivariateSpline"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
... |
PPOLYpubki/EF-Net | [
"f5ab2cb131fe38c2f21fadcd6f6ef0190d3d81d9"
] | [
"model/resnet.py"
] | [
"import math\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\ndef conv3x3(in_planes, out_planes, stride=1):\n \"\"\"3x3 convolution with padding\"\"\"\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,\n padding=1, bias=False)\n\n\nclass BasicBlock(nn.Modul... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ankitbarai507/Face-Recognition- | [
"f3b0179642aba7d9e27613ab80c4c73026c35869"
] | [
"train.py"
] | [
"import platform\nprint(platform.python_version())\nimport os\nfrom os.path import join, isdir\nfrom PIL import Image\n\nimport cv2\nimport numpy as np\n\nfrom detect import detect_faces, level_face\nimport config\n\ndef train_recognizer(db_folder, train_size=config.DEFAULT_FACE_SIZE, show_faces=False, force_train=... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
anCoderr/basicSelfDrivingCar | [
"faf91c5375f1a067bf00b785b6a5ce86c0a74b36"
] | [
"src/ai.py"
] | [
"# AI for Self Driving Car\n\n\nimport numpy as np\nimport random\nimport os\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.autograd as autograd\nfrom torch.autograd import Variable\n\n\n# Creating the basic architecture of the ANN\n\nclass Network(n... | [
[
"torch.Tensor",
"torch.cat",
"torch.load",
"torch.nn.Linear",
"torch.nn.functional.smooth_l1_loss",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zjdcts/CSAM-U-Net | [
"91fae3c6b4fc7247ba9ee2dc6e64b51da569bf2e"
] | [
"unet3d/models/pytorch/segmentation/unet.py"
] | [
"import torch\nfrom ..classification.myronenko import MyronenkoEncoder\nfrom ..classification.decoder import MirroredDecoder\nfrom ..autoencoder.variational import ConvolutionalAutoEncoder\n\n\nclass UNetEncoder(MyronenkoEncoder):\n def forward(self, x, y=None):\n outputs = list()\n for layer, down... | [
[
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
atentas/ennemi | [
"0f27c429139bc836e935583c0f9d4b8efafd7718"
] | [
"tests/integration/test_entropy_identities.py"
] | [
"# MIT License - Copyright Petri Laarne and contributors\n# See the LICENSE.md file included in this source code package\n\n\"\"\"Mathematical identities for entropy and mutual information.\"\"\"\n\nfrom ennemi import estimate_entropy, estimate_mi\nimport numpy as np\nimport unittest\n\nclass TestEntropyIdentities(... | [
[
"numpy.sum",
"numpy.random.default_rng",
"numpy.column_stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
amazon-research/BartGraphSumm | [
"162456fddaf32b3f9f44083b1cf180869b9db920"
] | [
"src/fairseq/fairseq/tasks/translation.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom argparse import Namespace\nimport json\nimport itertools\nimport logging\nimport os\n\nimport numpy as np\n\nfrom fairseq impor... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bruneli/statspy | [
"7bf07cdd25f7d5118f39fd5465853f4da9116c80"
] | [
"setup.py"
] | [
"#!/usr/bin/env python\n\nimport sys\nif sys.version_info[0] >= 3:\n import builtins\nelse:\n import __builtin__ as builtins\n\nDISTNAME = 'statspy'\nDESCRIPTION = 'Python module for statistics built on top of NumPy/SciPy'\nLONG_DESCRIPTION = open('README.rst').read()\nURL = 'http://bruneli.github.io/statspy/... | [
[
"numpy.distutils.misc_util.Configuration"
]
] | [
{
"matplotlib": [],
"numpy": [
"1.11",
"1.19",
"1.24",
"1.16",
"1.23",
"1.20",
"1.7",
"1.12",
"1.21",
"1.22",
"1.14",
"1.6",
"1.13",
"1.9",
"1.17",
"1.10",
"1.18",
"1.15",
"1.8"
],
"pand... |
apetkau/card-live-dashboard | [
"02a2f5a840bf2c1f66362f593e8319cc35a4b45b"
] | [
"card_live_dashboard/test/unit/service/test_TaxonomicParser.py"
] | [
"from typing import List, Dict, Optional\nimport pandas as pd\nfrom ete3 import NCBITaxa\n\nfrom card_live_dashboard.service.TaxonomicParser import TaxonomicParser\n\n\n# There's likely a way to use mock objects here instead of just creating a new class with the same methods\n# as NCBITaxa, but I couldn't figure ou... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Michalos88/dopamine | [
"2040da11d7de2fc304925c46d33f59af66759afa"
] | [
"dopamine/agents/implicit_quantile/implicit_quantile_agent.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Dopamine 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.concat",
"tensorflow.transpose",
"tensorflow.gather_nd",
"tensorflow.reduce_mean",
"tensorflow.shape",
"tensorflow.reduce_sum",
"tensorflow.range",
"tensorflow.reshape",
"tensorflow.control_dependencies",
"tensorflow.no_op",
"tensorflow.make_template",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
GW-Wang-thu/ORB-based-displacement-monitoring-system | [
"6dfc12487dbc27af5eb5a0ef72aa3958891c192e",
"6dfc12487dbc27af5eb5a0ef72aa3958891c192e"
] | [
"TDMS/OLD/pointdisp.py",
"TDMS/Preprocess.py"
] | [
"import cv2\r\nimport numpy as np\r\nfrom Matcher import ORB_matcher\r\n\r\nclass Pointmarker:\r\n\r\n def __init__(self, refimg, defimg, cameraid=0):\r\n self.refimg = refimg\r\n self.defimg = defimg\r\n # self.camera = cv2.VideoCapture(cameraid)\r\n self.refpoints = []\r\n se... | [
[
"numpy.round",
"numpy.zeros",
"numpy.ones"
],
[
"numpy.max",
"numpy.array",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PassengerAI/shared | [
"a30ffb43e957e8c62ed8e90d0902d85202528b21"
] | [
"paitypes/tests/unit/image/test_resizing.py"
] | [
"import pytest\nimport numpy as np\n\nfrom typing import List, Tuple\n\nfrom paitypes.geometry.bounding_box import BoundingBox\nfrom paitypes.geometry.Shape import Shape\n\nfrom paitypes.image import Image, BGRImage, GrayscaleImage\nfrom paitypes.image.resizing import (\n ImageResizingException,\n resize_imag... | [
[
"numpy.array_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ElanaPearl/ml-playground | [
"be0309c7546c267bda3bf4c970d55b7ec673b199"
] | [
"optimizers.py"
] | [
"from typing import Dict, List\n\nimport torch\nfrom torch.functional import Tensor\n\n\nclass Adam:\n def __init__(\n self,\n params: List[torch.nn.Parameter],\n lr=0.001,\n beta_1=0.9,\n beta_2=0.999,\n eps=10e-8,\n ):\n self.params = params\n self.lr ... | [
[
"torch.sqrt",
"torch.zeros_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wendazhou/jax | [
"d7894198a1ad0e54de42450c27ad5e715cb59aa1"
] | [
"tests/scipy_stats_test.py"
] | [
"# Copyright 2018 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 ... | [
[
"numpy.abs",
"numpy.clip",
"numpy.arange",
"numpy.ones",
"numpy.full",
"numpy.floor",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Gabo-Tor/Abadejo-Chess | [
"2880eca36ee5a5f5bc7b917a378e32d246ae3f50"
] | [
"create_database.py"
] | [
"from typing import Type\r\nimport chess\r\nimport chess.pgn\r\nimport numpy as np\r\n\r\n# we usea a PGN database from: https://database.lichess.org/\r\nDATABASE = r\"lichess_db_standard_rated_2015-05.pgn\"\r\n\r\ndef read():\r\n # Reads a lichess PGN dump and saves all anotated positions to a database file \r\n ... | [
[
"numpy.array",
"numpy.zeros",
"numpy.save",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
quilan78/MSC_project | [
"18c0298bca013a62c09752446f7c391a29f38618"
] | [
"Tensorflow_network/model.py"
] | [
"import tensorflow as tf\r\nimport numpy as np\r\nimport time\r\nimport sys\r\n#sys.path.append('/home/dwt17/MSc_project/neural_sum_1/code/Proxy_network/Commons/')\r\nsys.path.append('../Commons/')\r\nfrom read_data import *\r\nfrom vocab import *\r\nfrom treatedData import *\t\r\nfrom batch import *\r\nfrom bahdan... | [
[
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.minimum",
"tensorflow.nn.bidirectional_dynamic_rnn",
"tensorflow.train.AdamOptimizer",
"tensorflow.cumsum",
"tensorflow.random_uniform_initializer",
"tensorflow.gradients",
"tensorflow.to_float",
"tensorflow.train.Saver",... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
skeleton973213/class_schedule | [
"0a9354f4f5e2a2c292b7c0449569c37a63074600"
] | [
"class_info.py"
] | [
"import pandas as pd\nimport openpyxl\n\nraw_data = pd.read_excel(io=\"RAI_schedule.xlsx\", sheet_name=\"ROBOTICS & AI 12021\")"
] | [
[
"pandas.read_excel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
vidakDK/colour | [
"dd27c140ef9782e9718e0fa6e36800a958ab1c00",
"dd27c140ef9782e9718e0fa6e36800a958ab1c00"
] | [
"utilities/generate_plots.py",
"colour/models/tests/test_ipt.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nGenerate Plots\n==============\n\"\"\"\n\nfrom __future__ import division, unicode_literals\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\n\nimport colour\nfrom colour.plotting import *\nfrom colour.plotting.diagrams import (\n plot_spe... | [
[
"matplotlib.pyplot.plot",
"numpy.random.random",
"numpy.random.seed"
],
[
"numpy.reshape",
"numpy.array",
"numpy.tile"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ChiangYintso/ai | [
"44e6fac5f6854383a2314f10b0afc1b35952e852"
] | [
"jyzml/utils/metrics.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nfrom .decorator import len_equal\n\n\n@len_equal\ndef accuracy_score(y_actual: np.ndarray, y_predict: np.ndarray) -> float:\n \"\"\"\n 计算准确率\n :param y_actual: 真实值\n :param y_predict: 预测值\n :return: 准确率\n \"\"\"\n if y_actual.shape != y_predict.sh... | [
[
"numpy.var",
"numpy.absolute",
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stjordanis/tfx | [
"4749388de03230361f2b7b733a657b3bc18b4152",
"4749388de03230361f2b7b733a657b3bc18b4152"
] | [
"tfx/scripts/run_executor_test.py",
"tfx/examples/bert/utils/bert_models.py"
] | [
"# Copyright 2019 Google LLC. 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 by appl... | [
[
"tensorflow.test.main"
],
[
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.cast",
"tensorflow.keras.Model",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.Input"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
Sudhakaran7/car_gesture | [
"19eb2ba7ab5caeee9589cf639cddb74a9ece97d4"
] | [
"gesturecontrol.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 21 20:42:01 2020\n@author: Gnana Murthiy\n@description: Game controlling with Fists in Navy blue gloves using openCV. Left Fist- Break Righ Fist- acceleration\nThis code is inspired by a project, by Patel Digant: https://github.com/pateldi... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JulioZanotto/CarND_behavioral_cloning_P3 | [
"86fb6a4381029bd018234082298dd2a5446fe1bc"
] | [
"model_generator.py"
] | [
"# All Libraries\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport cv2\nimport csv\nfrom tqdm import tqdm\n\n# Setup Keras\nimport keras\nimport tensorflow as tf\nfrom keras.models import Sequential\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.layers.core imp... | [
[
"tensorflow.compat.v1.ConfigProto",
"pandas.read_csv",
"sklearn.utils.shuffle",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"tensorflow.Session",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
mindw96/Fast-SRGAN | [
"d8b779a09df81394d44483e0d2664f8744a4c7b5"
] | [
"dataloader.py"
] | [
"import tensorflow as tf\nimport os\n\nfrom tensorflow.python.ops import array_ops, math_ops\n\n\nclass DataLoader(object):\n \"\"\"Data Loader for the SR GAN, that prepares a tf data object for training.\"\"\"\n\n def __init__(self, image_dir, hr_image_size):\n \"\"\"\n Initializes the dataload... | [
[
"tensorflow.constant",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.keras.backend.image_data_format",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.identity",
"tensorflow.image.random_crop",
"tensorflow.image.resize",
"tensorflow.image.convert_image_dtype",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
nspope/tskit | [
"d421b4396a46472f74d8667a37413c188d1bddaf"
] | [
"python/tests/test_wright_fisher.py"
] | [
"# MIT License\n#\n# Copyright (c) 2018-2019 Tskit Developers\n# Copyright (C) 2017 University of Oxford\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, inclu... | [
[
"numpy.testing.assert_equal",
"numpy.random.seed",
"numpy.unique",
"numpy.random.choice",
"numpy.zeros_like",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
blevine37/HierQuant | [
"8b1959ff7b15a691c3cf322ddf109aae003d8725"
] | [
"cmatrix.py"
] | [
"\"\"\"Compressed matrix.\n\nHierarchical matrix implementation.\n\nCode for ab initio quantum chemistry based on a compressed representation of key data structures. Developed by researchers at the Institute for Advanced Copmutational Science (IACS) at Stony Brook University (SBU). Currently a work in progress.\n\n... | [
[
"numpy.diagflat",
"numpy.linalg.norm",
"scipy.sparse.linalg.svds",
"numpy.concatenate",
"numpy.full",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"1.0",
"0.17",
"1.3",
"1.8"
... |
pozzo-group-robots/OT2Protocols2 | [
"2386dae2b7f18a8a42fb8b4a0b8d2c6b2f3ff440"
] | [
"code-collab/hdf5tools/zetasizer_hdf5.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport numpy as np\nimport os\nimport glob\nimport h5py\nimport csv\nfrom fuzzywuzzy import fuzz \nfrom fuzzywuzzy import process\nfrom datetime import datetime\n\n# Make it so samples are saved as own hdf5 files instead. But the nwould groups names just have... | [
[
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dougalsutherland/compare_gan | [
"615bdc6fc54e5c074adeee543b779dd504dc7e9f"
] | [
"compare_gan/src/fid_score.py"
] | [
"# coding=utf-8\n# Copyright 2018 Google LLC & Hwalsuk Lee.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless require... | [
[
"tensorflow.device",
"tensorflow.Variable",
"tensorflow.control_dependencies",
"tensorflow.identity",
"numpy.concatenate",
"tensorflow.assert_less_equal",
"tensorflow.map_fn",
"tensorflow.assert_greater_equal",
"tensorflow.summary.scalar"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
rafa-cxg/tensorflow-tensorrt-yolo-interface | [
"843beef5c70b5404b59df3bde40977b089f985b0"
] | [
"utils/utils.py"
] | [
"import cv2\nimport time\nimport numpy as np\nimport os\nimport tensorflow as tf\nfrom .bbox import BoundBox, bbox_iou\nfrom scipy.special import expit\ndef gpu_nms(boxes, scores, num_classes, max_boxes=20, score_thresh=0.4, iou_thresh=0.5):\n \"\"\"\n /*----------------------------------- NMS on gpu --------... | [
[
"numpy.amax",
"numpy.expand_dims",
"tensorflow.concat",
"tensorflow.image.non_max_suppression",
"numpy.cumsum",
"numpy.concatenate",
"numpy.exp",
"numpy.where",
"tensorflow.boolean_mask",
"numpy.finfo",
"tensorflow.gather",
"numpy.argmax",
"numpy.zeros",
"nu... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
zentonllo/gcom | [
"3761ff4f2a68137ac196e75c8651260cb8c79e69"
] | [
"pr3/pruebas_alberto/mlp.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import division, print_function\n\nimport sys\nimport numpy as np\nimport mlpOptimizer as mlpo\n\n__author__ = \"Ignacio Casso, Daniel Gamo, Gwydion J. Martín, Alberto Terceño\"\n\n\nclass MLP(object):\n\n # Here are some appreciations about notation and the structure ... | [
[
"numpy.log",
"numpy.maximum",
"numpy.random.seed",
"numpy.einsum",
"numpy.asarray",
"numpy.arange",
"numpy.random.shuffle",
"numpy.random.randn",
"numpy.exp",
"numpy.tanh",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
KyunghyunLee/TSSL-BP | [
"4ae779cc4cf566adb5e05e7f02dd7de56642d087"
] | [
"functions/tsslbp.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as f\r\nfrom time import time \r\nimport global_v as glv\r\n\r\n\r\nclass TSSLBP(torch.autograd.Function): \r\n @staticmethod\r\n def forward(ctx, inputs, network_config, layer_config):\r\n shape = inputs.shape\r\n n_steps = sh... | [
[
"torch.zeros",
"torch.sum",
"torch.zeros_like",
"torch.tensor",
"torch.exp",
"torch.stack",
"torch.clamp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mafemorris/pennylane | [
"49655591618af994e18d9558e1dbf23cf9da6ffd"
] | [
"pennylane/gradients/finite_difference.py"
] | [
"# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\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-2.0\r\n\r\n# Unles... | [
[
"numpy.linalg.solve",
"numpy.abs",
"numpy.arange",
"numpy.stack",
"numpy.dtype",
"numpy.all",
"numpy.zeros_like",
"scipy.special.factorial",
"numpy.floor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.14",
"1.6",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
"1.8"
],
"tensorflow": []
... |
Ovewh/DUST | [
"f54e3288419434407285eb652cb0b5b143ede8f9"
] | [
"DUST/plot/utils.py"
] | [
"import numpy as np\nfrom matplotlib.colors import ListedColormap\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\nimport matplotlib as mpl\nfrom matplotlib.ticker import LogFormatterSciNotation\ndef _gen_log_clevs(dat_min, dat_max):\n \"\"\"Creates a logarithmic color scale.\"\"\"\n\n if dat_max > 0... | [
[
"numpy.logspace",
"numpy.isnan",
"numpy.reshape",
"matplotlib.ticker.LogFormatterSciNotation",
"numpy.log10",
"matplotlib.colors.ListedColormap",
"numpy.loadtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lab-midas/tcia-lesions | [
"2b8e6e6971c1ab4066e4168d79be73c2a4041ce5"
] | [
"misc.py"
] | [
"import numpy as np\nimport nibabel as nib\nfrom nibabel.orientations import ornt_transform, axcodes2ornt, inv_ornt_aff, apply_orientation, io_orientation, aff2axcodes\nimport pydicom\n\ndef reorient_nifti(img,\n target_orientation=('L','A','S'),\n verbose=False):\n new_ornt =... | [
[
"numpy.dot"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Prem547/ga-learner-dsmp-repo | [
"3bd613f4da5e8c81342aff02cb4f3f37a1f76a30"
] | [
"Prem547-/-greyatom-python-for-data-science/code.py"
] | [
"# --------------\nimport pandas as pd\nimport numpy as np\nfrom sklearn.cross_validation import train_test_split\n# code starts here\ndf = pd.read_csv(path)\nprint(df.shape)\nprint(df.head(5))\n\nX = df.loc[:, df.columns != 'list_price']\ny = df.iloc[:,1].values\nprint(X)\nprint(y)\n\nX_train, X_test, y_train, y_t... | [
[
"sklearn.cross_validation.train_test_split",
"pandas.read_csv",
"sklearn.metrics.r2_score",
"matplotlib.pyplot.subplots",
"sklearn.metrics.mean_squared_error",
"sklearn.linear_model.LinearRegression",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.where",
"mat... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
szrlee/vae-anomaly-detector | [
"f3406da47abd2b5db72d0be5f51910143da3fe9e"
] | [
"eval.py"
] | [
"\"\"\"\nMain experiment\n\"\"\"\nimport json\nimport os\nimport argparse\nimport torch\nimport numpy as np\nimport pickle\nfrom torch.utils.data import DataLoader\nfrom configparser import ConfigParser\nfrom datetime import datetime\nfrom scipy.special import logsumexp\n\nfrom vae.vae import VAE\nfrom utils.data i... | [
[
"numpy.log",
"numpy.expand_dims",
"numpy.concatenate",
"torch.cuda.is_available",
"scipy.special.logsumexp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.9",
"0.19",
"1.5",
"1.2",
"1.7",
"1.0",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
TinCodes/hit-prediction-code | [
"86320656210882b948492e34f3b88fd5b1d7440e"
] | [
"config/linear_regression_ll_filtered.py"
] | [
"import dbispipeline.result_handlers as result_handlers\nfrom dbispipeline.evaluators import GridEvaluator\n\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import MinMaxScaler\n\nimport common\n\nfrom dataloaders import MsdBbLoader\n\nimport eva... | [
[
"sklearn.linear_model.LinearRegression",
"sklearn.preprocessing.MinMaxScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zhangyong2/tensorflow_nlp | [
"4cc3cc4abec27526336897f1c62cf904b48f2676",
"4cc3cc4abec27526336897f1c62cf904b48f2676"
] | [
"nlp/segment/joint_bilstm_crf/model.py",
"nlp/segment/idcnn/utils.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\nimport time\nimport pickle\nimport numpy as np\nimport random\n\nfrom nlp.segment.joint_bilstm_crf import losses\nfrom nlp.segment.joint_bilstm_crf.dataset import data_utils\nfrom nlp.segment.joint_bilstm_crf.layers import EmbeddingLayer, HiddenLayer, TimeDistrib... | [
[
"tensorflow.concat",
"numpy.asarray",
"tensorflow.stack",
"tensorflow.cast",
"numpy.max",
"tensorflow.train.AdamOptimizer",
"tensorflow.gradients",
"numpy.argmax",
"tensorflow.train.MomentumOptimizer",
"tensorflow.nn.rnn_cell.MultiRNNCell",
"tensorflow.trainable_variabl... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
VirtualRaven/WebGallery | [
"2d8df641292eb78c3a18219e05086fa7a4fd414f"
] | [
"website/generate.py"
] | [
"#!/usr/bin/env python3\nimport glob\nimport datetime\nimport hashlib\nimport re\nimport os\nimport json\nimport numpy as np\nimport base64\nfrom jinja2 import Template, Environment, FileSystemLoader\nimport jinja2.filters as filters\nimport datetime\nimport re\nfrom PIL import Image\nfrom PIL import ImageCms\nfrom... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kalasuvaRahul/tensorflow | [
"2da3853684e5189c393b340c3c110d19b0f3875e"
] | [
"tensorflow/python/compat/compat.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.tf_export.tf_export"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.5",
"1.7",
"1.4"
]
}
] |
aishikchakraborty/fairseq-synsem | [
"52e3a7d09a7bd9e8d66c996e3b7b69215302e8ee"
] | [
"evaluation/evaluate.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport numpy as np\nimport random\nimport argparse\nimport csv\nimport os\nimport json\nfrom tqdm import tqdm\nimport time\nimport mmap\nimport _pickle as pickle\n\nparser = argparse.ArgumentParser(description='PyTor... | [
[
"torch.abs",
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.nn.functional.softmax",
"numpy.random.seed",
"torch.load",
"torch.cat",
"torch.manual_seed",
"torch.sum",
"torch.nn.Embedding",
"numpy.ones",
"torch.nn.Linear",
"torch.no_grad",
"torch.cuda... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
seqsense/f-pointnet | [
"d20bb1393dfee0c969f02fc30dfbdcb756317020"
] | [
"infer/prep_data_infer.py"
] | [
"import os\nimport sys\n\nBASE_DIR = os.path.dirname(os.path.abspath(__file__)) # '../frustum-pointnets/infer'\nROOT_DIR = os.path.dirname(BASE_DIR) # '../frustum-pointnets'\nsys.path.append(ROOT_DIR)\nsys.path.append(os.path.join(ROOT_DIR, 'mayavi'))\n#sys.path.append(os.path.join(ROOT_DIR, 'train'))\n\nif os.pat... | [
[
"matplotlib.pyplot.cm.get_cmap",
"numpy.random.choice",
"numpy.reshape",
"numpy.linalg.inv",
"numpy.cos",
"numpy.sin",
"numpy.arctan2",
"numpy.ones",
"numpy.copy",
"numpy.round",
"numpy.zeros_like",
"numpy.transpose",
"numpy.array",
"numpy.where",
"numpy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
VicHug27/web-scraping-challenge | [
"f2ee3a7eeabeca473cbf0e712a17e79e8eec45d6"
] | [
"scrape_mars.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\n#Import dependencies and setup\nimport pandas as pd\nfrom bs4 import BeautifulSoup as bs\nfrom splinter import Browser\nimport requests\nimport pymongo\nfrom webdriver_manager.chrome import ChromeDriverManager\n\n\n# In[2]:\n\n\nexecutable_path = {'executable... | [
[
"pandas.read_html"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
manzar96/st7 | [
"8dac6fa3497e5a3594766a232a9e8436120e9563"
] | [
"experiments/task71/features_extraction/train_pca_clf.py"
] | [
"import pickle\nimport os\nimport numpy as np\nfrom tqdm import tqdm\nfrom core.utils.parser import get_feat_parser\n\nfrom sklearn.metrics import f1_score, accuracy_score\nfrom sklearn.model_selection import KFold\nfrom sklearn.neural_network import MLPClassifier\nfrom sklearn.neighbors import KNeighborsClassifier... | [
[
"sklearn.naive_bayes.GaussianNB",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.gaussian_process.kernels.RBF",
"sklearn.model_selection.KFold",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.ensemble.AdaBoostClassifier",
"numpy.mean"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shrekris-anyscale/ray | [
"d36fd77548e1d83d6510b478f72ac668434458af",
"d36fd77548e1d83d6510b478f72ac668434458af"
] | [
"python/ray/train/tests/test_huggingface_trainer.py",
"python/ray/air/tests/test_huggingface_predictor.py"
] | [
"import pandas as pd\nimport pytest\nfrom unittest.mock import patch\nfrom ray.train.huggingface.huggingface_utils import TrainReportCallback\n\nfrom transformers import (\n AutoConfig,\n AutoModelForCausalLM,\n AutoTokenizer,\n Trainer,\n TrainingArguments,\n)\nfrom transformers.trainer_callback imp... | [
[
"pandas.read_json",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"nump... |
stciaischoolrnn/Practical-Time-Series-Analysis | [
"72eeabbcf2a3af742b2a114026cfd841b0ea9184"
] | [
"Chapter03/Chapter_3_tripleExponentialSmoothing.py"
] | [
"# Load modules\nfrom __future__ import print_function\nimport os\nimport pandas as pd\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n# Change working Directory\nos.chdir('C:/Users/pp9596/Documents/02 ZSP/00 PACKT/Book - Practical Time-Series Analysis/Avishek')\n\n#read the data from into a pandas.Dat... | [
[
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jhurreaq/py-pde | [
"42cd3e9cc45793840ecfe244e606c39b13502658"
] | [
"pde/fields/base.py"
] | [
"\"\"\"\nDefines base classes of fields, which are discretized on grids\n\n.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>\n\"\"\"\n\nfrom __future__ import annotations\n\nimport functools\nimport json\nimport logging\nimport warnings\nfrom abc import ABCMeta, abstractmethod, abstractproperty\nfrom inspect ... | [
[
"numpy.sqrt",
"numpy.asarray",
"scipy.ndimage.gaussian_filter1d",
"numpy.all",
"numpy.iscomplexobj",
"numpy.moveaxis",
"numpy.random.default_rng",
"scipy.interpolate.RegularGridInterpolator",
"numpy.subtract",
"numpy.flatnonzero",
"numpy.atleast_1d",
"numpy.std",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.14",
"1.6",
"1.10",
"0.15",
"1.4",
"1.3",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"0.16",
"1.8"
],
"tensorflow": []
... |
cnvrg/keras | [
"7f9bea44d5d4512fe21d0263d00fd39a9fb5c671"
] | [
"tests/keras/engine/test_training.py"
] | [
"import pytest\r\nimport numpy as np\r\nfrom numpy.testing import assert_allclose\r\n\r\nfrom keras.layers import Dense, Dropout\r\nfrom keras.engine.topology import merge, Input\r\nfrom keras.engine.training import Model, check_loss_and_target_compatibility\r\nfrom keras.models import Sequential\r\nfrom keras impo... | [
[
"numpy.random.random",
"numpy.testing.assert_allclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
peter-herman/weather_app | [
"b3fae3450bde19d7fd8b7b065b16ecebc35f9f09"
] | [
"test.py"
] | [
"import pandas as pd\nimport json, requests\nimport matplotlib.pyplot as plt\nurl = 'https://api.weather.gov/points/38.9072,-77.0369'\ndata = json.loads(requests.get(url).text)\nforecast_url = data['properties']['forecastHourly']\n\nforecast_data = json.loads(requests.get(forecast_url).text)\nforecast_df = pd.DataF... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Silvicek/distributional-dqn | [
"41a9095393dd25b7375119b4af7d2c35ee3ec6cc"
] | [
"distdeepq/build_graph.py"
] | [
"\"\"\"Deep Q learning graph\n\nThe functions in this file can are used to create the following functions:\n\n======= act ========\n\n Function to chose an action given an observation\n\n Parameters\n ----------\n observation: object\n Observation that can be feed into the output of make_obs_ph\n... | [
[
"tensorflow.cond",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.where",
"tensorflow.group",
"tensorflow.trainable_variables",
"tensorflow.tensordot",
"tensorflow.argmax",
"tensorflow.tile",
"tensorflow.gather_nd",
"tensorflow.shape",
"tensorflow.placehol... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.4",
"1.5",
"1.7",
"1.0",
"1.2"
]
}
] |
mtreviso/deepbondd | [
"0f412496eff000ba09de7d4ee5ccfa63f5ad4ab6"
] | [
"deepbond/models/utils.py"
] | [
"import copy\n\nimport numpy as np\nimport torch\nfrom torch.nn.utils.rnn import pack_padded_sequence as pack\nfrom torch.nn.utils.rnn import pad_packed_sequence as unpack\n\n\ndef unmask(tensor, mask, cut_length=0):\n \"\"\"\n Unmask a tensor and convert it back to a list of lists.\n\n Args:\n tens... | [
[
"torch.ones",
"torch.tril",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.sort",
"torch.arange",
"torch.triu"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
juliakreutzer/neuralmonkey | [
"edc4cb9c375b87451430c779f2b09e0fbf183836"
] | [
"neuralmonkey/experiment.py"
] | [
"\"\"\"Provides a high-level API for training and using a model.\"\"\"\n\nfrom argparse import Namespace # pylint: disable=unused-import\nimport os\nimport random\nfrom shutil import copyfile\nimport subprocess\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple\nfrom typing import Set # pyli... | [
[
"tensorflow.Graph",
"tensorflow.summary.FileWriter",
"numpy.random.seed",
"tensorflow.contrib.tensorboard.plugins.projector.visualize_embeddings",
"tensorflow.set_random_seed",
"tensorflow.contrib.tensorboard.plugins.projector.ProjectorConfig"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mli/tvm | [
"814b46dccb3c340be7611d113a303a546f7b2b2a"
] | [
"topi/tests/python/test_topi_upsampling.py"
] | [
"\"\"\"Test code for upsampling\"\"\"\nimport numpy as np\nimport tvm\nimport topi\nimport math\n\ndef verify_upsampling(batch, in_channel, in_height, in_width, scale):\n A = tvm.placeholder((batch, in_channel, in_height, in_width), name='A')\n B = topi.nn.upsampling(A, scale)\n out_shape = (batch, in_chan... | [
[
"numpy.random.uniform",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
adynmiles/DARTS-FQA | [
"a088a0efeb1160d0cdbf2b2a3e30f132c16eb53f"
] | [
"analyze.py"
] | [
"import torch\nimport numpy as np\nimport torch.nn as nn\nfrom numpy.linalg import eigvals\nfrom torch.autograd import Variable\nfrom copy import deepcopy\nimport logging\n\n\ndef _concat(xs):\n return torch.cat([x.view(-1) for x in xs])\n\n\nclass Analyzer(object):\n def __init__(self, model, args):\n ... | [
[
"torch.zeros",
"torch.zeros_like",
"torch.is_tensor",
"torch.autograd.grad",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nivibilla/EfficientHTR | [
"29b7df216cf4d051c533a48715d696b351377d09",
"29b7df216cf4d051c533a48715d696b351377d09"
] | [
"wordDetectorNN/src/infer - Copy.py",
"wordDetectorNN/src/eval - Copy.py"
] | [
"import argparse\n\nimport torch\nfrom path import Path\nfrom torch._C import device\n\nfrom dataloader import DataLoaderImgFile\nfrom eval import evaluate\nfrom net import WordDetectorNet\nfrom visualization import visualize_and_plot\n\n\ndef infer(device='cuda'):\n\n net = WordDetectorNet()\n net.load_state... | [
[
"torch.load"
],
[
"torch.no_grad",
"numpy.sum",
"numpy.count_nonzero",
"torch.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
khose/mseg-api | [
"ae649c40918a5fc8a14a88a12b01b8032cc53492"
] | [
"mseg/utils/txt_utils.py"
] | [
"#!/usr/bin/python3\n\nimport numpy as np\nfrom pathlib import Path\nfrom typing import List, Tuple\n\n_ROOT = Path(__file__).resolve().parent.parent\n\ndef read_txt_file(txt_fpath: str, strip_newlines: bool=False) -> List[str]:\n\t\"\"\" \n\t\tArgs:\n\t\t-\ttxt_fpath: string representing path to txt file\n\n\t\tRe... | [
[
"numpy.genfromtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SRooke/COG_adm2 | [
"ebdc2e5523bddf93ad4b102f49cf88bcb0d86653"
] | [
"sjoin.py"
] | [
"\"\"\"\"Spatial joins for GeoPandas\n\nThe general algorithm for these spatial join functions is:\n 1. Use a spatial index (rtree in the current implementation) to roughly compute\n the results. Because rtree operates on bounding boxes, this result is not final\n and must be refined, but refines the search t... | [
[
"pandas.DataFrame",
"numpy.concatenate",
"numpy.vectorize",
"numpy.column_stack",
"numpy.array",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Ericcsr/ClothFromDepth | [
"c21bbcceac4b36223f99a3f1177637296553dce0"
] | [
"clothsim.py"
] | [
"from numpy.core.arrayprint import dtype_is_implied\nfrom numpy.lib.utils import _set_function_name\nimport taichi as ti\nimport open3d as o3d\nimport numpy as np\n\n# TODO: Taichi Visualization need the field size to be actual particle number which limit flexibility\nMAX_VERTICES = 509\nMAX_FACES = 924\n# If a ver... | [
[
"numpy.asarray",
"numpy.max",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lxcode/twarc-csv | [
"60606a4e62c41d46324907dbfd2b55cbaec5a13f"
] | [
"twarc_csv.py"
] | [
"import os\nimport json\nimport click\nimport logging\nimport itertools\nimport pandas as pd\nfrom tqdm import tqdm\nfrom collections import OrderedDict\nfrom more_itertools import ichunked\nfrom twarc.expansions import flatten\n\nlog = logging.getLogger(\"twarc\")\n\nDEFAULT_TWEET_COLUMNS = \"\"\"__twarc.retrieved... | [
[
"pandas.api.types.is_list_like",
"pandas.json_normalize",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
igg-bioinfo/CKG | [
"7984ae239c5010545b95c9be3201a899682294de"
] | [
"ckg/report_manager/apps/dataUpload.py"
] | [
"import os\nimport sys\nimport re\nimport pandas as pd\nimport numpy as np\nfrom ckg import ckg_utils\nfrom ckg.graphdb_connector import connector\nfrom ckg.graphdb_builder import builder_utils\nfrom ckg.graphdb_connector import query_utils\nfrom ckg.analytics_core.viz import viz\n\nckg_config = ckg_utils.read_ckg_... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
mayu-ot/rethinking-evs | [
"022e76005ca87bd2d01cd6d05e4ca3356ada179d"
] | [
"src/summe_eval.py"
] | [
"from tools.summarizer import summarize\nfrom tools.io import load_summe_mat\nimport pandas as pd\nfrom sklearn.metrics import f1_score\nimport numpy as np\nimport json\nfrom joblib import Parallel, delayed\nimport os\n\ndef get_summe_gssummary():\n summe_data = load_summe_mat('data/raw/summe/GT/')\n \n go... | [
[
"sklearn.metrics.f1_score",
"numpy.array",
"numpy.random.random",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Inglezos/covid19-sir | [
"53306ae37d229ffcf4eaacec82dd944612fdc672",
"53306ae37d229ffcf4eaacec82dd944612fdc672"
] | [
"covsirphy/cleaning/vaccine_data.py",
"tests/test_cleaning/test_pcr.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom pathlib import Path\nimport numpy as np\nimport pandas as pd\nimport datetime\nfrom covsirphy.util.error import SubsetNotFoundError\nfrom covsirphy.cleaning.cbase import CleaningBase\n\n\nclass VaccineData(CleaningBase):\n \"\"\"\n Dataset regarding vacc... | [
[
"pandas.concat",
"pandas.to_datetime",
"pandas.to_numeric",
"pandas.DataFrame"
],
[
"pandas.to_datetime"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"nump... |
neozhangthe1/coverage_model | [
"8717e0a1fdd67af16a279e6b9aecf562f31bcdce",
"8717e0a1fdd67af16a279e6b9aecf562f31bcdce"
] | [
"groundhog/datasets/TM_dataset.py",
"experiments/nmt/force_decoding.py"
] | [
"\"\"\"\nData iterator for text datasets that are used for translation model.\n\"\"\"\n__docformat__ = 'restructedtext en'\n__authors__ = (\"Razvan Pascanu \"\n \"Caglar Gulcehre \"\n \"KyungHyun Cho \")\n__contact__ = \"Razvan Pascanu <r.pascanu@gmail>\"\n\nimport numpy as np\n\nimport ... | [
[
"numpy.arange",
"numpy.random.shuffle",
"numpy.load",
"numpy.array",
"numpy.loadtxt",
"numpy.random.randint"
],
[
"numpy.log",
"numpy.set_printoptions",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.random.RandomState"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pouyalj/DeepLearningCoursera | [
"4c0d79a53bbdd24fbb77503fed35e73d24949be2"
] | [
"1 - Neural Networks and Deep Learning/Deep Neural Network - Application.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Deep Neural Network for Image Classification: Application\n# \n# By the time you complete this notebook, you will have finished the last programming assignment of Week 4, and also the last programming assignment of Course 1! Go you! \n# \n# To build your cat/not-a-cat ... | [
[
"matplotlib.pyplot.imshow",
"numpy.random.seed",
"numpy.squeeze",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.divide",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MacHu-GWU/s3splitmerge-project | [
"873892158f4a2d0ee20f291e5d3b2a80f0bae1ba"
] | [
"poc/append_parquet_file.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nFind out how to merge big parquet file with low memory usage.\n\"\"\"\n\nimport io\nfrom s3splitmerge.tests import boto_ses\nimport pyarrow\nimport pyarrow.parquet\nimport pandas as pd\nimport awswrangler as wr\n\nvalue = \"Hello World\"\ncolumns = [\"id\", \"value\"]\ndf1 = pd.D... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jenia90/Python | [
"04f156a8973d6156a4357e0717d9eb0aa264d086"
] | [
"machine_learning/scoring_functions.py"
] | [
"import numpy as np\n\n\"\"\" Here I implemented the scoring functions.\n MAE, MSE, RMSE, RMSLE are included.\n\n Those are used for calculating differences between\n predicted values and actual values.\n\n Metrics are slightly differentiated. Sometimes squared, rooted,\n even log is used.\n\n Usi... | [
[
"numpy.square",
"numpy.log",
"numpy.sqrt",
"numpy.array",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kennethrithvik/smart_knee_brace | [
"be7cacb4487874b6639a62965fb25f0b4b1c196b"
] | [
"python_libraries/dataframe_logger/plotter.py"
] | [
"#!python3\n\n########\n'''\nMain logger to be used\nusage :\npython mqtt_logger <ACTION> <TIME in SECONDS>\n'''\n#######\nimport paho.mqtt.client as mqtt\nimport pandas as pd\nimport sys\nimport time\nimport datetime as dt\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\n# Don't forget... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylabel",
"matplotlib.animation.FuncAnimation",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vat99/casehold | [
"4f6703bb70def75abf534f13a5cb1201e7c295d7"
] | [
"multiple_choice/mc_no_trainer.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n# Copyright The HuggingFace Team and The HuggingFace Inc. team. 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# ... | [
[
"torch.utils.data.dataloader.DataLoader",
"torch.no_grad",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alexf1991/CNBF | [
"1dda6a6beecd3c37e89e37ade39ec8dbdd76eea4"
] | [
"scripts/evaluate.py"
] | [
"import os\nimport numpy as np\nfrom absl import logging\nfrom absl import app\nfrom absl import flags\nfrom utils.utils import *\nfrom utils.trainer import ModelEnvironment\nfrom utils.summary_utils import Summaries\nfrom models.cnbf import CNBF\nfrom models.complex_cnn import CNBF_CNN\nfrom models.eval_functions.... | [
[
"tensorflow.keras.regularizers.l2",
"tensorflow.keras.initializers.he_normal",
"tensorflow.random.normal",
"tensorflow.data.Dataset.from_generator"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
Draeius/loopwalk_kernel | [
"bbe0dd55275936abd4099e8c89f4f2bdca3d2be5"
] | [
"graph/UnlabeledLabelConverter.py"
] | [
"from collections import Counter\nfrom typing import Dict\n\nfrom grakel import Graph\n\nfrom graph.AbstractConverter import AbstractConverter\nfrom graph.GraphLoader import MatrixBuilder\nimport numpy as np\n\n\nclass UnlabeledLabelConverter(AbstractConverter):\n # A special converter, that applies the label ke... | [
[
"numpy.diag",
"numpy.matmul"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.