repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Kinpzz/RCRNet-Pytorch | [
"8d9f0fe0c7ad651db7578b2d96741de11036ef82"
] | [
"libs/networks/resnet_dilation.py"
] | [
"#!/usr/bin/env python\r\n# coding: utf-8\r\n#\r\n# This code is based on torchvison resnet\r\n# URL: https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py\r\n\r\nimport torch.nn as nn\r\nimport torch.utils.model_zoo as model_zoo\r\n\r\n\r\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50... | [
[
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal_",
"torch.utils.model_zoo.load_url",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.AdaptiveAvgPool2d"
]
] |
rjmendez/lifepo4_bms | [
"7561b50d3ff6551a65cf9d10c8f4bffeeb34db34"
] | [
"plot_battery.py"
] | [
"#!/usr/bin/env python\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport sys\nall_raw = open(sys.argv[1], 'r')\n# init empty lists\ncell0v = []\ncell1v = []\ncell2v = []\ncell3v = []\ntotalv = []\n# Process data into lists\nfor line in all_raw:\n if 'voltage cell 0: ' in line:\n ... | [
[
"matplotlib.use",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.clf"
]
] |
CaptainEven/FairMOTVehicle | [
"1d9033bcab9723cc5be3d5d94a5ac3712e8e143e"
] | [
"src/lib/trains/mot.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom lib.models.decode import mot_decode\nfrom lib.models.losses import FocalLoss\nfrom lib.models.losses import Reg... | [
[
"torch.nn.Linear",
"torch.nn.functional.normalize",
"torch.nn.MSELoss",
"torch.ones",
"torch.nn.L1Loss",
"torch.exp",
"torch.nn.CrossEntropyLoss"
]
] |
ashley8jain/IITD-complaint-system-web | [
"21a94601cba710f558d1689b87cfc391a1541c9f",
"21a94601cba710f558d1689b87cfc391a1541c9f"
] | [
"lib/python2.7/matplotlib/projections/polar.py",
"lib/python2.7/matplotlib/backends/backend_cocoaagg.py"
] | [
"import math\nimport warnings\n\nimport numpy as np\n\nimport matplotlib\nrcParams = matplotlib.rcParams\nfrom matplotlib.axes import Axes\nimport matplotlib.axis as maxis\nfrom matplotlib import cbook\nfrom matplotlib import docstring\nfrom matplotlib.patches import Circle\nfrom matplotlib.path import Path\nfrom m... | [
[
"matplotlib.transforms.Transform.__init__",
"numpy.arccos",
"matplotlib.axes.Axes.cla",
"numpy.where",
"matplotlib.transforms.Affine2DBase.__init__",
"matplotlib.transforms.Bbox.unit",
"numpy.cos",
"numpy.concatenate",
"numpy.sin",
"numpy.empty",
"matplotlib.axes.Axes._... |
Jhengsh/tidyframe | [
"aa4f8a35cb4abe4d883eb59b6ef6a920580b611f"
] | [
"tests/test_nvl.py"
] | [
"import pandas as pd\nfrom tidyframe import nvl\n\n\ndef test_nvl_series():\n test_list = [0, 1, None, pd.np.NaN]\n test_series = pd.Series(test_list)\n nvl(test_series, 10)\n\n\ndef test_nvl_list():\n test_list = [0, 1, None, pd.np.NaN]\n nvl(test_list, 10)\n\n\ndef test_nvl_int():\n nvl(None, 10... | [
[
"pandas.Series"
]
] |
ArthurBernard/quant-reseach | [
"8b6385c7e688f33b6e98d5b470af2cb0c1cafb2c"
] | [
"src/example_helper.py"
] | [
"import msgpack\nimport zlib\nimport numpy as np\nimport helper_functions as hf\nimport datetime_helper as dh\n\ndef strip_data_by_time(t_data, data, t_min, t_max):\n\tdata = np.array([s for s, t in zip(data, t_data) if t >= t_min and t <= t_max])\n\tt_data = np.array([t for t in t_data if t >= t_min and t <= t_max... | [
[
"numpy.max",
"numpy.array",
"numpy.min"
]
] |
bmoretz/Python-Playground | [
"a367ec7659b85c24363c21b5c0ac25db08ffa1f6",
"a367ec7659b85c24363c21b5c0ac25db08ffa1f6",
"a367ec7659b85c24363c21b5c0ac25db08ffa1f6"
] | [
"src/Classes/MSDS400/Module 7/polution.py",
"src/Classes/MSDS400/Module 1/1.2.2.py",
"src/Classes/MSDS400/Module 1/1.4.1.py"
] | [
"from sympy import symbols, integrate, Rational, lambdify\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Pollution from a factory is entering a lake. The rate of concentration of the pollutant at time t is given by\nt = symbols( 't', positive = True )\ndP = 91*t ** Rational( 5, 2 )\n\n# where t is the nu... | [
[
"matplotlib.pyplot.show",
"numpy.linspace",
"matplotlib.pyplot.plot"
],
[
"numpy.array"
],
[
"numpy.array"
]
] |
Gareth001/tcav | [
"e391e7682c34933e27bd592106c119317383ef10"
] | [
"activation_generator.py"
] | [
"\"\"\"\nCopyright 2018 Google LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in w... | [
[
"numpy.array",
"tensorflow.gfile.Open",
"tensorflow.gfile.Exists",
"numpy.load",
"tensorflow.logging.info",
"numpy.random.shuffle",
"numpy.save",
"tensorflow.gfile.MakeDirs",
"numpy.float32",
"tensorflow.gfile.ListDirectory"
]
] |
SPIDER-CMB/xfaster | [
"1b8e56d775f2c3a8693d1372ae461392c21da7ca"
] | [
"xfaster/spec_tools.py"
] | [
"from __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import division\nimport numpy as np\n\n__all__ = [\n \"wigner3j\",\n \"get_camb_cl\",\n \"scale_dust\",\n]\n\n\ndef blackbody(nu, ref_freq=353.0):\n \"\"\"\n The ratio of the blackbody function for dust at... | [
[
"numpy.log",
"numpy.abs",
"numpy.exp",
"numpy.zeros"
]
] |
FireRedz/HFR-Resampler | [
"1246e40c836f2e6e5cb0cf1aeaafd03bc7bf5d48"
] | [
"weights.py"
] | [
"import math\nimport numpy as np\nfrom enum import IntEnum\n\nclass Mode(IntEnum):\n CUSTOM = 0\n EQUAL = 1\n GAUSS = 2\n GAUSS_SYM = 3\n PYRAMID = 4\n PYRAMID_SYM = 5\n SIVEROO_1 = 6\n SIVEROO_2 = 7\n\n#This function will return an ... | [
[
"numpy.sum"
]
] |
FLyingLSJ/ssd.pytorch | [
"9caca0788f0bebab345f969a7d3c1f8b2081b809"
] | [
"eval.py"
] | [
"\"\"\"Adapted from:\n @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch\n @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn\n Licensed under The MIT License [see LICENSE for details]\n\"\"\"\n\nfrom __future__ import print_function\nimport torch\nimport torch... | [
[
"numpy.minimum",
"numpy.mean",
"numpy.where",
"numpy.finfo",
"torch.cuda.is_available",
"numpy.sort",
"torch.load",
"numpy.cumsum",
"numpy.concatenate",
"numpy.max",
"numpy.arange",
"numpy.argmax",
"torch.masked_select",
"numpy.array",
"numpy.zeros",
... |
NunoEdgarGFlowHub/vision | [
"86001a871d3335046e2dca7715d9babf73e6956f"
] | [
"torchvision/models/densenet.py"
] | [
"import re\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.model_zoo as model_zoo\nfrom collections import OrderedDict\n\n__all__ = ['DenseNet', 'densenet121', 'densenet169', 'densenet201', 'densenet161']\n\n\nmodel_urls = {\n 'densenet121': 'https://download.pytorch.org... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.functional.avg_pool2d",
"torch.nn.init.constant_",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.functional.dropout",
"torch.nn.BatchNorm2d",
"torch.utils.model_zoo.load_url",
"torch.nn.init.kaiming_normal_",
"torch.nn.R... |
jtsuchiyama/hawaii-covid-tracker | [
"456f63728f6e17208477e7b585e997e8f8b35657"
] | [
"app.py"
] | [
"import os\nimport time\nimport requests\nfrom bs4 import BeautifulSoup\nimport datetime\nfrom twilio.rest import Client\nimport pandas as pd\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport math\n\nclass Data():\n def __init__(self,link): # Automatically stores the data from parsed link as the object... | [
[
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.grid",
"pandas.DataFrame",
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylim",
"matplotli... |
myeonghak/kobert-multi-label-VOC-classifier | [
"983524e8331b5e833d85779dfe7521c21bf2d1cd"
] | [
"voc_classifier/metrics_for_multilabel.py"
] | [
"# https://github.com/iliaschalkidis/lmtc-eurlex57k/blob/master/metrics.py\n\nfrom sklearn.metrics import accuracy_score\nfrom sklearn.metrics import precision_score\nfrom sklearn.metrics import recall_score\nfrom sklearn.metrics import f1_score\n\n\nimport numpy as np\n\n\ndef mean_precision_k(y_true, y_score, k=1... | [
[
"numpy.array",
"numpy.asarray",
"numpy.sum",
"numpy.mean",
"numpy.take",
"sklearn.metrics.accuracy_score",
"numpy.argsort",
"sklearn.metrics.precision_score",
"sklearn.metrics.f1_score",
"numpy.unique",
"sklearn.metrics.recall_score"
]
] |
gitpharm01/Parapose | [
"220f3af30011e1dd7c0d5f20660a1dd01eab63db"
] | [
"imageLoader.py"
] | [
"import numpy as np\nimport random\nimport os\nimport json\nimport math\nimport cv2\n\ndef getPaddedROI(img, center_x, center_y, width, height):\n #print(str(int(center_x)) + \",\" + str(int(center_y)))\n paddingColor = [0,0,0]\n top_left_x = center_x - int(width/2)-1\n #print(\"top_left_x:\")\n #pri... | [
[
"numpy.zeros",
"numpy.size"
]
] |
MichaelGoodale/opensauce-python | [
"03c278ca92b150188821dadfc9702ff9f939aa4e"
] | [
"tools/convert_json_to_mat.py"
] | [
"# Script to convert json into proprietary .mat files\n\n# Licensed under Apache v2 (see LICENSE)\n\nimport sys\nimport os\nimport glob\nimport json\nfrom scipy.io import savemat\n\n\ndef main(json_dir, out_dir):\n \"\"\" Script to convert all .json files in json_dir into corresponding .mat\n files in out... | [
[
"scipy.io.savemat"
]
] |
HanMeh/dreamerv2 | [
"ec9904613cb70dded51017f724f05eb688c1bc3d"
] | [
"plotting.py"
] | [
"import argparse\nimport collections\nimport functools\nimport itertools\nimport json\nimport multiprocessing as mp\nimport os\nimport pathlib\nimport re\nimport subprocess\nimport warnings\n\nos.environ['NO_AT_BRIDGE'] = '1' # Hide X org false warning.\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotli... | [
[
"matplotlib.use",
"numpy.concatenate",
"numpy.array",
"numpy.set_string_function",
"matplotlib.ticker.MaxNLocator",
"numpy.minimum",
"numpy.nanpercentile",
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"numpy.nanmean",
"numpy.stack",
"numpy.argsort",
"numpy.... |
andrewcalderwood/flopy | [
"0432ce96a0a5eec4d20adb4d384505632a2db3dc",
"0432ce96a0a5eec4d20adb4d384505632a2db3dc",
"0432ce96a0a5eec4d20adb4d384505632a2db3dc"
] | [
"flopy/mbase.py",
"flopy/utils/gridintersect.py",
"flopy/modflow/mfwel.py"
] | [
"\"\"\"\nmbase module\n This module contains the base model class from which\n all of the other models inherit from.\n\n\"\"\"\nimport abc\nimport os\nimport shutil\nimport threading\nimport warnings\nimport queue as Queue\n\nfrom datetime import datetime\nfrom shutil import which\nfrom subprocess import Popen, P... | [
[
"numpy.append"
],
[
"numpy.max",
"numpy.concatenate",
"numpy.array",
"matplotlib.pyplot.get_cmap",
"numpy.min",
"matplotlib.pyplot.subplots",
"numpy.recarray",
"numpy.linspace"
],
[
"numpy.dtype"
]
] |
csutakbalazs/deepSI | [
"895030225937fb5fcbd4fc0eaba6c306ec0b5820",
"895030225937fb5fcbd4fc0eaba6c306ec0b5820"
] | [
"deepSI/systems/narendra_li_benchmark.py",
"deepSI/systems/system.py"
] | [
"import deepSI\nfrom deepSI.systems.system import System_ss, System_data\nimport numpy as np\n\nclass NarendraLiBenchmark(System_ss): #https://arxiv.org/pdf/2003.14162.pdf\n \"\"\"docstring for NarendraLiBenchmark\"\"\"\n def __init__(self):\n '''Noise, system setting and x0 settings'''\n super(... | [
[
"numpy.sin",
"numpy.exp",
"numpy.cos"
],
[
"numpy.concatenate",
"numpy.max",
"numpy.array",
"numpy.random.RandomState",
"numpy.min",
"numpy.mean",
"scipy.integrate.solve_ivp",
"numpy.swapaxes",
"numpy.isscalar",
"torch.load",
"numpy.append",
"numpy.i... |
lferraz/kornia | [
"c30ef6149bd92054d482339a2b0cd18f8272f5f5"
] | [
"kornia/geometry/conversions.py"
] | [
"from typing import Tuple\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom kornia.constants import pi\n\n__all__ = [\n # functional api\n \"rad2deg\",\n \"deg2rad\",\n \"pol2cart\",\n \"cart2pol\",\n \"convert_points_from_homogeneous\",\n \"convert_points_to_homogen... | [
[
"torch.cat",
"torch.stack",
"torch.finfo",
"torch.squeeze",
"torch.eye",
"torch.nn.functional.pad",
"torch.where",
"torch.chunk",
"torch.sqrt",
"torch.is_tensor",
"torch.norm",
"torch.unsqueeze",
"torch.abs",
"torch.tensor",
"torch.zeros_like",
"torc... |
WayneGame/InformationExtraction | [
"d593adc5ad02fa7046873c95a1b4af0befe08c5f"
] | [
"classification/src/train.py"
] | [
"\nimport config\nimport pandas as pd\nimport pickle\nimport numpy as np\nfrom keras.preprocessing.text import Tokenizer\n\nfrom keras.preprocessing.sequence import pad_sequences\n\nfrom sklearn.model_selection import StratifiedKFold\nfrom sklearn.metrics import classification_report\nimport tensorflow as tf\nfrom ... | [
[
"sklearn.metrics.confusion_matrix",
"tensorflow.keras.layers.SpatialDropout1D",
"tensorflow.keras.layers.Dense",
"pandas.read_csv",
"numpy.concatenate",
"sklearn.model_selection.StratifiedKFold",
"matplotlib.pyplot.savefig",
"numpy.argmax",
"tensorflow.keras.optimizers.Adam",
... |
dhetong/LogSampleTest | [
"7ae4cffd43ba6c90f4a5cf164eb44072ece5f08d"
] | [
"benchmark/IPLoM_agreement.py"
] | [
"import sys\nsys.path.append('../')\nfrom logparser import IPLoM, evaluator\nimport os\nimport pandas as pd\n\nCT = [0.25, 0.3, 0.4, 0.4, 0.35, 0.58, 0.3, 0.3, 0.9, 0.78, 0.35, 0.3, 0.4]\nlb = [0.3, 0.4, 0.01, 0.2, 0.25, 0.25, 0.3, 0.25, 0.25, 0.25, 0.3, 0.2, 0.7]\nn_para = 13\n\nbenchmark_settings = {\n 'HDFS':... | [
[
"pandas.DataFrame"
]
] |
aiporre/whisk | [
"e07c381bc5d0df4e5dcabd7d75c0c97d0de3ad2c"
] | [
"whisk/test_merge3.py"
] | [
"\"\"\"\nAuthor: Nathan Clack\nDate : 2009\n\nCopyright (c) 2009 HHMI. Free downloads and distribution are allowed for any\nnon-profit research and educational purposes as long as proper credit is given\nto the author. All other rights reserved.\n\"\"\"\nfrom .tests import plot_whiskers\nfrom ui.whiskerdata.trace ... | [
[
"scipy.integrate.quad"
]
] |
viniciusarruda/SHOT | [
"46e122026805833df36b40d68fe8d815f8d614af"
] | [
"experiments/digit/unsupervised_digit_inspect.py"
] | [
"import argparse\nimport os, sys\nimport os.path as osp\nimport torchvision\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torchvision import transforms\nimport network, loss\nfrom torch.utils.data import DataLoader\nimport random, pdb, math, copy\nfrom tqdm import tqdm\... | [
[
"torch.nn.Softmax",
"torch.max",
"numpy.random.seed",
"torch.no_grad",
"torch.manual_seed",
"torch.squeeze",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
einarf/ModernGL | [
"e4a7f53289043a0ac06130c67edc75b878484a0e"
] | [
"examples/crate.py"
] | [
"import os\n\nimport moderngl\nimport numpy as np\nfrom objloader import Obj\nfrom PIL import Image\nfrom pyrr import Matrix44\n\nimport data\nfrom window import Example, run_example\n\n\nclass CrateExample(Example):\n title = \"Crate\"\n\n def __init__(self, **kwargs):\n super().__init__(**kwargs)\n\n... | [
[
"numpy.sin",
"numpy.cos"
]
] |
treggit/pycryptobot | [
"47ed7f260d19fd1ec7e607e0654ebb768a3f035c"
] | [
"pycryptobot.py"
] | [
"\"\"\"Python Crypto Bot consuming Coinbase Pro or Binance APIs\"\"\"\n\nimport functools\nimport os\nimport sched\nimport sys\nimport time\nimport pandas as pd\nfrom datetime import datetime\nfrom models.PyCryptoBot import PyCryptoBot, truncate as _truncate\nfrom models.AppState import AppState\nfrom models.Tradin... | [
[
"pandas.DataFrame"
]
] |
jkondic/overcooked_ai | [
"a8d5fb1f9c16c410c47ea4b639ddc20a64276e86"
] | [
"testing/agent_test.py"
] | [
"import unittest\nimport numpy as np\n\nfrom overcooked_ai_py.agents.agent import AgentPair, FixedPlanAgent, GreedyHumanModel, RandomAgent, SampleAgent\nfrom overcooked_ai_py.mdp.actions import Direction, Action\nfrom overcooked_ai_py.mdp.overcooked_mdp import OvercookedGridworld, OvercookedState, PlayerState, Obje... | [
[
"numpy.random.seed",
"numpy.allclose",
"numpy.array"
]
] |
kaderghal/ADNI_Data_processing | [
"454462d3913d77e3bc4de2b9725b456301c7b351"
] | [
"src/pytorch-template/old/models/baseline_3D_single.py"
] | [
"import os\nimport sys\nimport errno\nimport random\nimport pickle\nimport numpy as np\n\nimport torch\nimport torchvision\nimport torch.nn.functional as F\n\nfrom torch.utils.data.dataset import Dataset\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.utils.data.sampler import BatchSampler\nfrom torch... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.functional.max_pool2d"
]
] |
Advanjef/espnet | [
"47f51a77906c4c44d0da23da04e68676e4b931ab"
] | [
"espnet/bin/asr_train.py"
] | [
"#!/usr/bin/env python3\n# encoding: utf-8\n\n# Copyright 2017 Tomoki Hayashi (Nagoya University)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Automatic speech recognition model training script.\"\"\"\n\nimport logging\nimport os\nimport random\nimport subprocess\nimport sys\n\nfrom distuti... | [
[
"numpy.random.seed"
]
] |
qiyunzhu/taxa-assign-benchmarking | [
"df0fbe6a84f20ac2e2febbbb21bd686ec90e84e3"
] | [
"benchutils/transformers.py"
] | [
"import pandas as pd\n\nkraken_rank_dictionary = {\n 'P': 'phylum',\n 'C': 'class',\n 'O': 'order',\n 'F': 'family',\n 'G': 'genus',\n 'S': 'species'\n}\n\ngreengenes_rank_dict = {\n 'k__': 'kingdom',\n 'p__': 'phylum',\n 'c__': 'class',\n 'o__': 'order',\n 'f__': 'family',\n 'g_... | [
[
"pandas.read_csv"
]
] |
ishanic/MeshRCNN-keypoints | [
"fdc2c81ce57313207478ab9ff1699614addc5993"
] | [
"demo/demo.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport argparse\nimport logging\nimport multiprocessing as mp\nimport numpy as np\nimport os\nimport torch\nfrom detectron2.config import get_cfg\nfrom detectron2.data import MetadataCatalog\nfr... | [
[
"torch.device",
"numpy.array",
"numpy.ceil",
"torch.stack",
"torch.tensor"
]
] |
raharth/PyMatch | [
"93cf10fd9ca0fa104b0f2a30e613f75fd0561b92"
] | [
"pymatch/utils/KFold.py"
] | [
"import torch\n\n\nclass KFold:\n\n def __init__(self, dataset, n_fold=10, batch_size=32, num_workers=0, pin_memory=False):\n self.fold = 0\n self.batch_size = batch_size\n self.num_workers = num_workers\n self.pin_memory = pin_memory\n self.dataset = dataset\n self.n_fo... | [
[
"torch.manual_seed",
"torch.utils.data.SubsetRandomSampler"
]
] |
FinFetChannel/PytracingMaze | [
"6ccb444c76ede7e48ac09a74d550f32884c7c74b",
"6ccb444c76ede7e48ac09a74d550f32884c7c74b"
] | [
"RayTracingMazeEnem.py",
"pytracing render choices.py"
] | [
"import numpy as np\r\nimport pygame as pg\r\nfrom numba import njit\r\n\r\ndef main():\r\n size = np.random.randint(20,60) # size of the map\r\n posx, posy, posz = 1.5, np.random.uniform(1, size -1), 0.5\r\n \r\n rot, rot_v = (np.pi/4, 0)\r\n lx, ly, lz = (size*20, size*30, 1000)\r\n mr, mg, mb, ... | [
[
"numpy.rot90",
"numpy.deg2rad",
"numpy.sin",
"numpy.random.normal",
"numpy.random.choice",
"numpy.reshape",
"numpy.zeros",
"numpy.log",
"numpy.where",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.arctan",
"numpy.sqrt",
"numpy.clip",
"numpy.dsta... |
lesteve/robopose | [
"536e5317c891bf6bb2b8cbdda294533b3f111e09",
"536e5317c891bf6bb2b8cbdda294533b3f111e09"
] | [
"robopose/evaluation/meters/utils.py",
"robopose/rendering/bullet_scene_renderer.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom collections import OrderedDict\n\n\ndef one_to_one_matching(pred_infos, gt_infos,\n keys=('scene_id', 'view_id'),\n allow_pred_missing=False):\n keys = list(keys)\n pred_infos['pred_id'] = np.arange(len(pred_infos))\n... | [
[
"pandas.DataFrame"
],
[
"numpy.logical_or"
]
] |
PritishSehzpaul/pennylane | [
"93ff1b2deeaf620db90ec91448fde64709a9fd9f"
] | [
"tests/tape/interfaces/test_qnode_jax.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.allclose",
"numpy.array",
"numpy.sin",
"numpy.cos"
]
] |
suhasgupta791/mids-w251-final-project | [
"aa1ef80685c6d9b5fc8a444e438078150cc0d96c"
] | [
"utils/utils.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\nimport random\nimport numpy as np\nimport sys, os\nimport pandas as pd \nimport torch\nfrom torchsummary import summary\nfrom torchtext import data\nimport torch.nn as nn\nimport torch.utils.data\nfrom torch.utils.data import Dataset, TensorDataset,DataLoader, RandomSample... | [
[
"sklearn.model_selection.train_test_split",
"torch.utils.data.RandomSampler",
"torch.utils.data.DataLoader",
"torch.tensor"
]
] |
sjkelly/openlane | [
"0fec8c8fb2382d3d487127face5109ec7d2baa51"
] | [
"scripts/csv2html/csv2html.py"
] | [
"# Copyright 2020 Efabless 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 applicable law ... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
hit-thusz-RookieCJ/flowtron | [
"3822bd0ed3226b001dd4ec1653809449f889b520"
] | [
"flowtron_logger.py"
] | [
"import random\nimport torch\nfrom torch.utils.tensorboard import SummaryWriter\nfrom flowtron_plotting_utils import plot_alignment_to_numpy\nfrom flowtron_plotting_utils import plot_gate_outputs_to_numpy\n\n\nclass FlowtronLogger(SummaryWriter):\n def __init__(self, logdir):\n super(FlowtronLogger, self)... | [
[
"torch.sigmoid"
]
] |
brberg/stokes-crevasse-advection | [
"c5996d0330de5971381b4d0a9543c784b94a8918"
] | [
"plotting/thumbnails_warm.py"
] | [
"from __future__ import division\nimport numpy as np\nimport sys\nimport os\nimport shutil\nimport vtk\nfrom vtk.util.numpy_support import vtk_to_numpy\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport matplotlib.animation as animation\nimport matplotlib.colors as mcolors... | [
[
"scipy.interpolate.interp1d",
"numpy.zeros",
"matplotlib.pyplot.sca",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.close",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"numpy.linspace",
"matplotlib.pyplot.xticks"
]
] |
Quansight/pnumpy | [
"59d430f74168539a0710321c4eecb53d25db4833"
] | [
"src/pnumpy/sort.py"
] | [
"import os\nimport sys\n\n__all__ = [\n 'lexsort','sort', 'argsort','argmin', 'argmax', 'searchsorted']\n\nfrom pnumpy._pnumpy import getitem, lexsort32, lexsort64\nimport numpy as np\n\nfrom numpy import asarray, array, asanyarray\nfrom numpy import concatenate\n\n#array_function_dispatch = functools.partial(\n... | [
[
"numpy.asanyarray",
"numpy.asarray",
"numpy.lexsort"
]
] |
YeWR/cogdl | [
"5be13cda808c44333f7059db11d13a1d0f190ffa"
] | [
"cogdl/datasets/gtn_data.py"
] | [
"import sys\nimport time\nimport os\nimport os.path as osp\nimport requests\nimport shutil\nimport tqdm\nimport pickle\nimport numpy as np\n\nimport torch\n\nfrom cogdl.data import Data, Dataset, download_url\n\nfrom . import register_dataset\n\n\ndef untar(path, fname, deleteTar=True):\n \"\"\"\n Unpacks the... | [
[
"torch.cat",
"numpy.array",
"numpy.zeros",
"torch.max",
"torch.arange",
"torch.save",
"torch.from_numpy",
"torch.ones",
"torch.load"
]
] |
PiotrKrasnowski/Speech_Encryption | [
"305a01b82aabb03bedc9036dd69fe18df90ef57b"
] | [
"a_full_model.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport time\nfrom copy import copy\nimport os\n\nfrom single_pitch import single_pitch\nfrom channel import channel \nfrom pseudo_speech import Pseudospeech_Synthetizer_class\nfrom encryption import Encryption_class\nfrom speech_analyzer import Speech_Analyzer_c... | [
[
"matplotlib.pyplot.show",
"numpy.random.randint",
"numpy.fromfile"
]
] |
nifunk/GNNMushroomRL | [
"d0d8eefdc10bca62e7cb536d65ea619607be755b",
"d0d8eefdc10bca62e7cb536d65ea619607be755b"
] | [
"mushroom_rl/core/parallelization_tools/step_sequence.py",
"mushroom_rl/algorithms/value/batch_td/lspi.py"
] | [
"# Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and\n# Technical University of Darmstadt.\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# 1. Redistributions... | [
[
"numpy.concatenate",
"torch.get_default_dtype",
"numpy.array",
"torch.Size",
"numpy.asarray",
"numpy.zeros",
"torch.arange",
"scipy.signal.lfilter",
"numpy.arange",
"numpy.flatnonzero"
],
[
"numpy.linalg.norm",
"numpy.linalg.matrix_rank",
"numpy.zeros",
... |
nickjmiller/MLBenchmark | [
"f6c3865c2dd5b71a471789041f3d800705371531"
] | [
"benchmark.py"
] | [
"import csv\nfrom default_clf import DefaultNSL\nfrom itertools import chain\nfrom time import process_time\n\nimport numpy as np\nimport pandas as pd\n\nNUM_PASSES = 100\nNUM_ACC_PASSES = 50\nTRAIN_PATH = 'data/KDDTrain+.csv'\nTEST_PATH = 'data/KDDTest+.csv'\n\nATTACKS = {\n 'normal': 'normal',\n\n 'back': '... | [
[
"numpy.empty",
"numpy.zeros"
]
] |
nfkjsfoeif/AutoGCN | [
"4496bc066936d93b2e852c8010d95fb372910a80"
] | [
"train/train_superpixels_graph_classification.py"
] | [
"\"\"\"\n Utility functions for training one epoch \n and evaluating one epoch\n\"\"\"\nimport torch\nimport torch.nn as nn\nimport math\n\nfrom train.metrics import accuracy_MNIST_CIFAR as accuracy\n\ndef train_epoch(model, optimizer, device, data_loader, epoch=0):\n model.train()\n epoch_loss = 0\n ... | [
[
"torch.no_grad"
]
] |
jlakkis/sciPENN | [
"34afb2008a076e13c40965a76d3dd31d0c331652"
] | [
"src/sciPENN/Network/Model.py"
] | [
"from math import log, exp\nfrom numpy import inf, zeros, zeros_like as np_zeros_like, arange, asarray, empty\nfrom pandas import concat\nfrom anndata import AnnData\n\nfrom torch import cat, no_grad, randn, zeros_like, zeros as torch_zeros, ones, argmax\nfrom torch.nn import Module, Linear, Sequential, RNNCell, So... | [
[
"torch.nn.Linear",
"numpy.zeros_like",
"torch.optim.lr_scheduler.StepLR",
"torch.nn.RNNCell",
"torch.nn.Softmax",
"torch.nn.Sequential",
"torch.no_grad",
"pandas.concat",
"torch.zeros_like",
"torch.argmax"
]
] |
decibelcooper/tensorflow | [
"e85f387c30384664f1006b3189a30702818ff354"
] | [
"tensorflow/python/keras/engine/training_eager_test.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.keras.backend.zeros",
"tensorflow.python.keras.testing_utils.get_test_data",
"tensorflow.python.keras.layers.Activation",
"tensorflow.python.keras.layers.Dense",
"numpy.random.random",
"tensorflow.python.platform.test.main",
"tensorflow.python.keras.models.Sequential... |
c0g/tomserflow | [
"f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e"
] | [
"tensorflow/contrib/learn/python/learn/ops/dnn_ops.py"
] | [
"\"\"\"TensorFlow ops for deep neural networks.\"\"\"\n# Copyright 2015-present The Scikit Flow 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#\... | [
[
"tensorflow.python.ops.rnn_cell.linear",
"tensorflow.contrib.learn.python.learn.ops.dropout_ops.dropout",
"tensorflow.python.ops.variable_scope.variable_scope"
]
] |
evenmarbles/rlpy | [
"3c3c39a316285ca725268e81aef030e5c764f797",
"3c3c39a316285ca725268e81aef030e5c764f797"
] | [
"rlpy/stats/models/_basic.py",
"rlpy/environment/mountaincar.py"
] | [
"from __future__ import division, print_function, absolute_import\n# noinspection PyUnresolvedReferences\nfrom six.moves import range\n\nimport numpy as np\nfrom scipy.misc import doccer\n\nfrom ...stats import nonuniform\nfrom ...auxiliary.array import normalize, nunique, accum\n\n__all__ = ['markov']\n\n\n_doc_de... | [
[
"numpy.bincount",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.finfo",
"numpy.isscalar",
"numpy.vstack",
"scipy.misc.doccer.docformat"
],
[
"numpy.random.normal",
"numpy.array",
"numpy.sin",
"numpy.zeros",
"matplotlib.pyplot.fignum_exists",
"matplotl... |
skysky77/MGNMT | [
"19dded399a310cd118eee09bd37d657746d11cf1"
] | [
"src/tasks/lm.py"
] | [
"# MIT License\n\n# Copyright (c) 2018 the NJUNMT-pytorch authors.\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, including without limitation the rights\n# t... | [
[
"numpy.full",
"numpy.isnan",
"torch.cuda.manual_seed_all",
"torch.autograd.backward",
"numpy.random.seed",
"torch.enable_grad",
"torch.no_grad",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.tensor",
"numpy.transpose",
"torch.load",
"numpy.argsort"
]
... |
krishnaaxo/Finance-Forcasting-Dashboard | [
"6386247b7e661fb0804b80d4c77dd5dcd94a7e87"
] | [
"app.py"
] | [
"\n\nimport pandas as pd\nimport tweepy\nfrom textblob import TextBlob\nfrom wordcloud import WordCloud\nimport plotly.graph_objs as go\nimport os\nimport re\nimport pystan\nimport numpy as np\nimport streamlit as st\nimport matplotlib.pyplot as plt\nimport yfinance as yf\nfrom fbprophet import Prophet\nfrom fbpro... | [
[
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylabel",
"pandas.read_csv",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.imshow"
]
] |
gabrielpreviato/py4syn | [
"ac97c220d38e1aa630ff3ba4d9da030a0d3833d8"
] | [
"py4syn/epics/DxpFakeClass.py"
] | [
"\"\"\"Dxp Class\n\nPython Class for EPICS Fake Dxp Control.\n\n:platform: Unix\n:synopsis: Python Class for EPICS Spectro control.\n\n.. moduleauthor:: Gabriel Fedel <gabriel.fedel@lnls.br>\n .. note:: 11/30/2016 [gabrielfedel] first version released\n\"\"\"\nimport os\n\nimport numpy as np\nimport h5py\nfrom ... | [
[
"numpy.random.randint",
"numpy.random.rand"
]
] |
govindjeevan/facenet | [
"70a7ee5c5836bc8a31935250eb2d9e818ebf1f2d"
] | [
"src/train_softmax.py"
] | [
"\"\"\"Training a face recognizer with TensorFlow using softmax cross entropy loss\n\"\"\"\n# MIT License\n# \n# Copyright (c) 2016 David Sandberg\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n#... | [
[
"tensorflow.train.start_queue_runners",
"numpy.ones_like",
"tensorflow.train.get_checkpoint_state",
"numpy.mean",
"numpy.where",
"numpy.cumsum",
"tensorflow.train.range_input_producer",
"tensorflow.local_variables_initializer",
"tensorflow.global_variables_initializer",
"te... |
zjzh/SALib | [
"95a3371e503f9253cb917b8f0101c0202b969c2b"
] | [
"src/SALib/test_functions/Ishigami.py"
] | [
"import numpy as np\r\n\r\n\r\ndef evaluate(X: np.ndarray, A: float = 7.0, B: float = 0.1) -> np.ndarray:\r\n \"\"\"Non-monotonic Ishigami-Homma three parameter test function:\r\n\r\n `f(x) = \\sin(x_{1}) + A \\sin(x_{2})^2 + Bx^{4}_{3}\\sin(x_{1})`\r\n\r\n This test function is commonly used to benchmark ... | [
[
"numpy.sin",
"numpy.power",
"numpy.zeros"
]
] |
cdfreeman-google/jax | [
"ca6f8186a36a8962845289ffc6baed3e96390f68"
] | [
"tests/lax_control_flow_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.array",
"numpy.isnan",
"numpy.sin",
"numpy.zeros",
"numpy.random.RandomState",
"numpy.sum",
"numpy.ones",
"numpy.shape",
"numpy.float32",
"numpy.prod",
"numpy.arange",
"numpy.cumsum",
"numpy.int32",
"numpy.tril",
"numpy.int16"
]
] |
wadpac/mcfly | [
"c288ba227df0e7423dccde63f9886b025ceec269"
] | [
"mcfly/modelgen.py"
] | [
"#\n# mcfly\n#\n# Copyright 2017 Netherlands eScience Center\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... | [
[
"numpy.random.random",
"numpy.random.uniform",
"numpy.random.randint"
]
] |
joachimwolff/scHiCExplorer | [
"8aebb444f3968d398c260690c89c9cd0e3186f0e",
"8aebb444f3968d398c260690c89c9cd0e3186f0e"
] | [
"schicexplorer/scHicCluster.py",
"schicexplorer/scHicClusterCompartments.py"
] | [
"import argparse\nimport os\nfrom multiprocessing import Process, Queue\nimport time\n\n\nimport logging\nlog = logging.getLogger(__name__)\nfrom scipy import linalg\nimport cooler\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nfrom matplotlib.cm import get_cmap\nfrom sklearn.cluster im... | [
[
"matplotlib.use",
"numpy.array",
"numpy.savetxt",
"sklearn.cluster.SpectralClustering",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.yticks",
"matplotlib.pypl... |
rlaboulaye/transformer | [
"119195b2be1d2a3418141a73536d5167e97e06ed"
] | [
"meta_logger.py"
] | [
"import os\nimport json\nimport datetime\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n\nclass MetaLogger(object):\n\n def __init__(self, meta_config, config, task_directory, load_directory=None, load_epoch=None):\n self.results_directory = os.path.join('meta_results', str(datetime.dateti... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.xticks"
]
] |
jaywonchung/Learning-ML | [
"5298318686144a78bed42d979e10fbd9979c0159"
] | [
"Implementations/Conditional-Variational-Autoencoder/plot_utils.py"
] | [
"import torchvision\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\n\ndef display_and_save_batch(title, batch, data, save=True, display=True):\n \"\"\"Display and save batch of image using plt\"\"\"\n im = torchvision.utils.make_grid(batch, nrow=int(batch.shape[0]**0.5))\n plt.titl... | [
[
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.colors.ListedColormap"
]
] |
ethantsai/nlwhistlers | [
"1b8cabf96e4fbb9a032bb4cd03797d65fe7a144b"
] | [
"dataPlotter.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\nlines = open(\"for_james.csv\").read().splitlines()\ndata = [[float(x) for x in lines[i].split(\", \")] for i in range(len(lines))]\n\n# each item in data is a list of floats that can be passed to plt.hist\n\nfor i in ... | [
[
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"numpy.logspace",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.yscale"
]
] |
Jwmc999/Transformers4Rec | [
"e6cdf13a7c0102303c0258120274f88b2d42c9c2"
] | [
"transformers4rec/tf/block/dlrm.py"
] | [
"#\n# Copyright (c) 2021, 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... | [
[
"tensorflow.keras.utils.register_keras_serializable"
]
] |
getschomp/pandas | [
"85dc1713bc6a1064f4afdf2a907bc9c72cdc364b"
] | [
"pandas/core/arrays/categorical.py"
] | [
"# pylint: disable=E1101,W0232\n\nimport numpy as np\nfrom warnings import warn\nimport textwrap\n\nfrom pandas import compat\nfrom pandas.compat import u, lzip\nfrom pandas._libs import lib, algos as libalgos\n\nfrom pandas.core.dtypes.generic import (\n ABCSeries, ABCIndexClass, ABCCategoricalIndex)\nfrom pand... | [
[
"pandas.core.dtypes.concat._concat_categorical",
"numpy.array_equal",
"pandas.core.dtypes.dtypes.CategoricalDtype.validate_categories",
"pandas.core.algorithms.factorize",
"pandas.core.accessor.delegate_names",
"pandas.CategoricalIndex",
"pandas.compat.u",
"pandas.core.algorithms._... |
suiyizhao/Pytorch-speedup | [
"a9d4b0accc703035559ac6f42daddf8b1f0eb40a"
] | [
"src/train_amp.py"
] | [
"import sys\nimport time\nimport torch\nimport random\nimport argparse\n\nimport numpy as np\nimport torch.nn as nn\nimport torchvision.transforms as transforms\n\nfrom torchvision import datasets\nfrom torch.utils.data import DataLoader\n\n# new #\nimport torch.cuda.amp as amp\n\ndef printParaNum(model):\n \n ... | [
[
"torch.nn.Linear",
"torch.cuda.manual_seed_all",
"torch.cuda.amp.autocast",
"torch.max",
"numpy.random.seed",
"torch.nn.BatchNorm2d",
"torch.nn.LeakyReLU",
"torch.manual_seed",
"torch.nn.Conv2d",
"torch.cuda.is_available",
"torch.nn.ReflectionPad2d",
"torch.utils.da... |
michalkouril/PYNQ | [
"c72febc2decc83816f40b91a7f60e11fe707c248"
] | [
"pynq/lib/logictools/tests/test_fsm_generator.py"
] | [
"# Copyright (c) 2016, Xilinx, Inc.\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# 1. Redistributions of source code must retain the above copyright notice,\n# this... | [
[
"numpy.array",
"numpy.array_equal"
]
] |
WenZhihao666/TREND | [
"ca4b17139b5f24d44d9421fed92021eb7a95ed6d"
] | [
"main_test.py"
] | [
"import sys\n\nsys.path.append('../')\nimport torch\nimport numpy as np\nimport random\nimport math\nimport time\nimport argparse\nfrom data_tlp_cite import DataHelper_t\nfrom torch.utils.data import DataLoader\nfrom model import Model\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model... | [
[
"torch.cat",
"torch.cuda.manual_seed",
"torch.cuda.manual_seed_all",
"numpy.random.seed",
"sklearn.metrics.accuracy_score",
"torch.manual_seed",
"torch.abs",
"sklearn.linear_model.LogisticRegression",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.load... |
khanhlvg/tensorflow | [
"a59b74ccaafae59d616ecf08204d63023ff6f49c",
"a59b74ccaafae59d616ecf08204d63023ff6f49c",
"a59b74ccaafae59d616ecf08204d63023ff6f49c",
"a59b74ccaafae59d616ecf08204d63023ff6f49c",
"a59b74ccaafae59d616ecf08204d63023ff6f49c"
] | [
"tensorflow/contrib/model_pruning/python/pruning_test.py",
"tensorflow/python/keras/optimizer_v2/ftrl.py",
"tensorflow/python/keras/estimator/__init__.py",
"tensorflow/python/keras/optimizer_v2/rmsprop.py",
"tensorflow/python/kernel_tests/linalg/linear_operator_util_test.py"
] | [
"# Copyright 2017 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.contrib.model_pruning.python.pruning.Pruning",
"numpy.count_nonzero",
"tensorflow.python.ops.variables.VariableV1",
"tensorflow.python.training.training_util.get_or_create_global_step",
"tensorflow.python.ops.state_ops.assign_add",
"tensorflow.python.ops.variable_scope.variable... |
wbkang/rpi-repo | [
"fc2b770f99cc2405fbf6855f9f961c4f6aed99cb"
] | [
"rpiweather/server.py"
] | [
"#!/usr/bin/env python3\n\nimport RPi.GPIO as GPIO\nimport time\nimport threading\nimport logging\nimport pandas as pd\nimport numpy as np\nfrom tzlocal import get_localzone\nfrom flask import Flask, render_template, url_for, request\n\nlogging.basicConfig(level=logging.INFO,\n format='%(asctime)... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.DataFrame.from_records",
"pandas.concat"
]
] |
vg2691994/mock_frb_injection_results | [
"a4747e5ef38ed2171af22e40816bf75afc7e192d"
] | [
"helpers.py"
] | [
"#!/home/observer/miniconda2/bin/python\n\nimport numpy as N\nimport sys, os\nimport logging as L\nimport subprocess as S\nfrom collections import namedtuple\nfrom sigpyproc.Readers import FilReader as F\nsys.path.append(\"/home/vgupta/Codes/Fake_FRBs/\")\nfrom Furby_reader import Furby_reader\n\nclass FileNotFound... | [
[
"numpy.any",
"numpy.where"
]
] |
DagothHertil/NNVEP-SRN-Deblur | [
"c092fec78dfe73ce6247a56f1e16ab4f4576d6b0"
] | [
"models/model.py"
] | [
"from __future__ import print_function\nimport os\nimport time\nimport random\nimport datetime\nimport scipy.misc\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nfrom datetime import datetime\nfrom util.util import *\nfrom util.BasicConvLSTMCell import *\n\n\nclass DEBLUR(objec... | [
[
"tensorflow.train.start_queue_runners",
"tensorflow.constant_initializer",
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.train.slice_input_producer",
"tensorflow.train.get_checkpoint_state",
"tensorflow.string_join",
"tensorflow.stack",
"tensorflow.global_variables_in... |
navaneethsdk/qiskit-terra | [
"66a029f2a67c14dbf34857d172b088d75d152b55",
"66a029f2a67c14dbf34857d172b088d75d152b55"
] | [
"qiskit/visualization/gate_map.py",
"qiskit/visualization/state_visualization.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modificatio... | [
[
"numpy.max",
"matplotlib.get_backend",
"numpy.asarray",
"matplotlib.ticker.MaxNLocator",
"matplotlib.patches.FancyArrow",
"matplotlib.pyplot.close",
"numpy.mean",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplots",
"matplotlib.patches.Ellipse",
"matplotlib.pyplot.... |
maldins46/CovidTracker | [
"6a50e780935de62e07c691fae2363c290aae5795"
] | [
"chart-generation/charts/vaccines.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCharts about the national vaccines data.\n@author: riccardomaldini\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as mtick\nfrom data_extractors.vaccines_regions import benchmark_dict, marche_df\nfrom data_extractors.vaccines_italy impo... | [
[
"matplotlib.pyplot.grid",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.plot",
"matplotlib.dates.MonthLocator",
"matplotlib.ticker.PercentFormatter",
"matplotlib.pyplot.gcf",
"matplotlib.pyp... |
SuwoongHeo/models | [
"10ef6bbe39bb5ac3d0e2755dc60b6843d39d395c"
] | [
"official/vision/beta/modeling/layers/detection_generator.py"
] | [
"# Copyright 2021 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.ones_like",
"tensorflow.reshape",
"tensorflow.image.combined_non_max_suppression",
"tensorflow.stack",
"tensorflow.greater",
"tensorflow.nn.softmax",
"tensorflow.gather",
"tensorflow.cast",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.shape"... |
zhaoy17/Macro_lib | [
"44c1fd16ae139bbfe6616d1bdca55420fd1695f7"
] | [
"macro_lib/growth/solow.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matlibplot.pyplot as plt\n\n\n'''\nSimulating Solow-Swan model, which attempts to model the long-run economic growth\nby looking at capital accumulation (K), population growth (L) and technological \nprogress, which results in increase in productivity. It models the ... | [
[
"pandas.DataFrame"
]
] |
sinhaharsh/pytorch-CycleGAN-and-pix2pix | [
"7a38c79f4344c954dd28d041c82c121c92465d3d"
] | [
"data/unaligned_dataset.py"
] | [
"import os.path\nfrom data.base_dataset import BaseDataset, get_transform\nfrom data.image_folder import make_dataset\nfrom PIL import Image\nimport random\nimport h5py\nimport numpy as np\nfrom skimage.transform import resize as skResize\nfrom util.util import normalize, adaptive_instance_normalization\n\nclass Un... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.stack",
"numpy.einsum"
]
] |
carolinscholl/SORN | [
"99f908c88265ecc26dad195b56bebfa12838591f"
] | [
"utils/backup.py"
] | [
"\"\"\"Backup handler\n\nThis script is contains the backup handling functions.\n\"\"\"\n\nimport os\nimport time\nimport pickle\nimport shutil\nfrom shutil import ignore_patterns\nimport pypianoroll\nimport numpy as np\n\n\ndef backup_pickle(experiment, stats):\n ''''\n Back up handling function.\n\n Argu... | [
[
"numpy.random.rand"
]
] |
monocilindro/torchsat | [
"5ac62e1aa9fee1d7a5a4a58914c128cf8e18cc09"
] | [
"scripts/train_cd.py"
] | [
"import argparse\nimport os\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom torch.utils.tensorboard import SummaryWriter\nfrom ignite.metrics import IoU, Precision, Recall\n\nimport torchsat.transforms.transforms_cd as T\nfrom to... | [
[
"torch.device",
"numpy.array",
"torch.no_grad",
"torch.nn.CrossEntropyLoss",
"torch.optim.lr_scheduler.CosineAnnealingWarmRestarts",
"torch.utils.data.DataLoader",
"torch.nn.BCELoss",
"torch.load",
"torch.utils.tensorboard.SummaryWriter"
]
] |
jess010/pandas | [
"9872d6757e5117dce070981141cee562f675694e",
"9872d6757e5117dce070981141cee562f675694e",
"9872d6757e5117dce070981141cee562f675694e"
] | [
"pandas/tests/frame/test_reshape.py",
"pandas/tests/categorical/test_missing.py",
"asv_bench/benchmarks/offset.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nfrom warnings import catch_warnings\nfrom datetime import datetime\n\nimport itertools\nimport pytest\n\nfrom numpy.random import randn\nfrom numpy import nan\nimport numpy as np\n\nfrom pandas.compat import u\nfrom pandas import (DataFrame, Index... | [
[
"numpy.random.rand",
"pandas.compat.u",
"pandas.Timestamp",
"pandas.util.testing.assert_raises_regex",
"numpy.concatenate",
"pandas.Timedelta",
"pandas.DataFrame",
"numpy.prod",
"numpy.arange",
"pandas.MultiIndex",
"pandas.Period",
"numpy.array",
"numpy.zeros",
... |
jray319/tensorflow | [
"5cdf8f26c806e893e0773ad34e2b59008cc6f8ec",
"5cdf8f26c806e893e0773ad34e2b59008cc6f8ec"
] | [
"tensorflow/python/kernel_tests/variables_test.py",
"tensorflow/python/kernel_tests/padding_fifo_queue_test.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.ops.math_ops.less",
"numpy.random.rand",
"tensorflow.python.ops.variables.local_variables_initializer",
"tensorflow.python.ops.math_ops.matmul",
"numpy.negative",
"tensorflow.python.ops.array_ops.ones",
"tensorflow.pyth... |
omkarsutar1255/Python-Data | [
"169d0c54b23d9dd5a7f1aea41ab385121c3b3c63"
] | [
"Python/Machine Learning/Indian AI Production/Feature Engineering/05-Categorical Missing value imputation.py"
] | [
"# todo : Data Cleaning\n# todo : Categorical Missing value imputation Part-5\n\n# todo : Importing library\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# todo : import data\ndf = pd.read_csv(r\"G:\\DataSet\\House Price Prediction\\train.csv\")\n\n# todo : anal... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.hist",
"pandas.read_csv",
"matplotlib.pyplot.subplot"
]
] |
billhhh/model-quantization-1 | [
"e816c3ffd36426810e31de04dfdec1894a600c2d"
] | [
"tools.py"
] | [
"import os, sys, glob, argparse\nimport logging\nimport types\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn.functional as F\n\nimport utils\nimport models\nimport main as entry\n\nos.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\"\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\"\n\ndef export_onnx(... | [
[
"torch.zeros",
"torch.rand",
"torch.nn.Softmax",
"torch.cuda.is_available",
"torch.onnx.export",
"torch.load",
"torch.nn.functional.conv2d"
]
] |
narendasan/neural-mmo | [
"36a588db0021cccd7275cebef2cbdc5ee8eb40d5"
] | [
"evolution/diversity.py"
] | [
"from pdb import set_trace as TT\nimport numpy as np\nimport scipy\nfrom scipy.spatial import ConvexHull\nimport skimage\nfrom skimage.morphology import disk\nimport skbio\n\nglobal trg_image\ntrg_image = None\n\ndef diversity_calc(config):\n div_calc_name = config.FITNESS_METRIC\n return get_div_calc(div_calc_... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.cov",
"numpy.log",
"numpy.float",
"numpy.sum",
"numpy.exp",
"numpy.mean",
"numpy.where",
"scipy.stats.multivariate_normal",
"numpy.einsum",
"scipy.spatial.ConvexHull",
"numpy.average",
"numpy.hstack",
"numpy.log... |
jnwei/deep-molecular-massspec | [
"b82b40b57441b939da5899dfb575b284d20cea8e"
] | [
"make_train_test_split.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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"tensorflow.gfile.MkDir"
]
] |
patcao/ibis | [
"661bbd20081285f3c29267793f3d070d0c8a0db8"
] | [
"ibis/expr/operations.py"
] | [
"import collections\nimport functools\nimport itertools\nimport operator\nfrom contextlib import suppress\nfrom typing import Any, Dict, List\n\nimport numpy as np\nimport toolz\nfrom cached_property import cached_property\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.r... | [
[
"numpy.array_equal"
]
] |
huggingface/neural-compressor | [
"16a4a12045fcb468da4d33769aff2c1a5e2ba6ba"
] | [
"test/test_model_conversion.py"
] | [
"#\n# -*- coding: utf-8 -*-\n#\nimport unittest\nimport os\nimport shutil\nimport yaml\nimport tensorflow as tf\n\nfrom neural_compressor.experimental import model_conversion\ntf.compat.v1.enable_eager_execution()\nfrom tensorflow import keras\n\nfrom tensorflow.python.framework import graph_util\nfrom neural_comp... | [
[
"tensorflow.compat.v1.Graph",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.Reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.models.load_model",
"tensorflow.keras.layers.MaxPooling2D",... |
VitorGDellino/Neural-Network | [
"fb2ff335656145d385c0fbf6e68b0840efe51dd2"
] | [
"MNIST/mnist.py"
] | [
"import tensorflow as tf\nfrom tensorflow import keras\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n#print(tf.__version__)\n\ndef plot_image(i, predictions_array, true_label, img):\n predictions_array, true_label, img = predictions_array[i], true_label[i], img[i]\n plt.grid(False)\n plt.xticks([])\n... | [
[
"numpy.max",
"matplotlib.pyplot.subplot",
"tensorflow.train.AdamOptimizer",
"tensorflow.keras.layers.Flatten",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"tensorflow.keras.layers.De... |
kiyoon/GulpIO2 | [
"143d53dbb7091b0938832415e32e04992439faf6"
] | [
"src/gulpio2/fileio.py"
] | [
"#!/usr/bin/env python\n\nimport os\nimport re\nimport pickle\nimport json\nimport glob\nimport numpy as np\n\nfrom abc import ABC, abstractmethod\nfrom concurrent.futures import ProcessPoolExecutor\nfrom contextlib import contextmanager\nfrom collections import namedtuple, OrderedDict\n\nfrom tqdm import tqdm\n\nf... | [
[
"numpy.random.shuffle"
]
] |
MartimChaves/ret_detect | [
"774521a079be4324d542a841c7b3be808c18356b"
] | [
"main.py"
] | [
"import cv2.cv2 as cv2\r\nimport skimage.io as io\r\nfrom skimage.transform import downscale_local_mean\r\nimport numpy as np\r\nfrom model import *\r\n\r\nfrom sklearn.naive_bayes import GaussianNB\r\n\r\nfrom sklearn.model_selection import train_test_split\r\n\r\nimport numpy as np\r\nfrom sklearn.naive_bayes imp... | [
[
"numpy.copy",
"numpy.load",
"numpy.min",
"numpy.multiply",
"numpy.where",
"numpy.divide",
"numpy.max",
"numpy.save",
"matplotlib.pyplot.subplots",
"numpy.argmax",
"numpy.arange",
"numpy.column_stack",
"numpy.array",
"numpy.zeros",
"numpy.round",
"skl... |
mendesmiguel/keras | [
"bf1378f39d02b7d0b53ece5458f9275ac8208046"
] | [
"keras/preprocessing/image.py"
] | [
"\"\"\"Fairly basic set of tools for real-time data augmentation on image data.\n\nCan easily be extended to include new transformations,\nnew preprocessing methods, etc...\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\n... | [
[
"numpy.dot",
"scipy.ndimage.interpolation.affine_transform",
"numpy.random.choice",
"numpy.rollaxis",
"numpy.copy",
"scipy.linalg.svd",
"numpy.min",
"numpy.mean",
"numpy.cos",
"numpy.random.random",
"numpy.max",
"numpy.sin",
"numpy.prod",
"numpy.arange",
... |
qiubit/openpilot | [
"013e49bf907539d119fbebcf02f4ce3749849065"
] | [
"selfdrive/locationd/models/car_kf.py"
] | [
"#!/usr/bin/env python3\nimport sys\n\nimport math\nimport numpy as np\nimport sympy as sp\n\nfrom selfdrive.locationd.models.constants import ObservationKind\nfrom rednose.helpers.ekf_sym import EKF_sym, gen_code\n\ni = 0\n\n\ndef _slice(n):\n global i\n s = slice(i, i + n)\n i += n\n\n return s\n\n\nclass Sta... | [
[
"numpy.array",
"numpy.diag",
"numpy.zeros",
"numpy.atleast_2d"
]
] |
SelectLOL1/BeagleBoneBlack_PRU_PowerMeter | [
"ee027e2713e1649ca7c4b68a737cd611695a6855"
] | [
"RRDGraphs/rrd_1month.py"
] | [
"import time\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdate\nimport numpy as np\nimport rrdtool\n\nstart = 2628000\nend = 0\n\nif int(end) <= 0:\n end = 2\nif int(start) <= 0:\n start = 600\n\nepochTimeNow = int(time.time()-1)\ndata = rrdtool.fetch('/home/bca/rrdtoolfilesave/powerCapturene... | [
[
"numpy.array",
"matplotlib.dates.epoch2num",
"numpy.zeros",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.close",
"matplotlib.pyplot.tight_layout",
"mat... |
samiemostafavi/conditional-latency-probability-prediction | [
"a196f2db8c6f30f8613797b6a23bffd77a01e1e3"
] | [
"plot_conditionals_with_tis.py"
] | [
"import numpy as np\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pyarrow.compute as pc\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom pr3d.nonbayesian import ConditionalGammaEVM\n\n# load dataset first\nfile_addresses = ['dataset_onehop_processed.parquet']\ntable = pa.concat_tables(\... | [
[
"matplotlib.pyplot.savefig",
"numpy.linspace",
"numpy.random.default_rng",
"matplotlib.pyplot.subplots"
]
] |
mjhyman/bmtk | [
"42dcce944fe8ff8cab02b19d2d983f73a8cbc0d1",
"42dcce944fe8ff8cab02b19d2d983f73a8cbc0d1"
] | [
"bmtk/utils/reports/spike_trains/plotting.py",
"bmtk/builder/network_adaptors/dm_network.py"
] | [
"# Copyright 2020. Allen Institute. All rights reserved\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the\n# following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and ... | [
[
"numpy.max",
"numpy.array",
"matplotlib.pyplot.savefig",
"numpy.min",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
],
[
"numpy.where",
"numpy.array",
"numpy.uint32",
"numpy.zeros"
]
] |
0xtristan/deep-reinforcement-learning | [
"fb943ddb2796d85cc876ea076a26d850b7b87919"
] | [
"dqn/exercise/dqn_agent.py"
] | [
"import numpy as np\nimport random\nfrom collections import namedtuple, deque\n\nfrom model import QNetwork\n\nimport torch\nimport torch.nn.functional as F\nimport torch.optim as optim\n\nBUFFER_SIZE = int(1e5) # replay buffer size\nBATCH_SIZE = 64 # minibatch size\nGAMMA = 0.99 # discount fact... | [
[
"torch.no_grad",
"torch.from_numpy",
"torch.nn.functional.mse_loss",
"torch.cuda.is_available",
"numpy.arange",
"numpy.vstack"
]
] |
rgaensler/gcode | [
"c6a6b617a04490dedefb2bae7b596a2e12ab4ab1"
] | [
"test/test_spatial_interpolation.py"
] | [
"from math import pi, sqrt\nfrom typing import List\n\nimport numpy as np\nimport pytest\n\nfrom src.kinematics.forward_kinematics import get_tform\nfrom src.prechecks.spatial_interpolation import linear_interpolation, circular_interpolation\n\n\n@pytest.mark.parametrize(\"start,end,ds,expected_points\",\n ... | [
[
"numpy.testing.assert_allclose",
"numpy.linalg.norm"
]
] |
jdmonaco/neuroswarms | [
"a2bfaa4e9b84baecdb41e01a32a028665e8886d7"
] | [
"neuroswarms/matrix.py"
] | [
"\"\"\"\nMatrix operations for neuroswarms models.\n\nAuthor: Joseph Monaco (jmonaco@jhu.edu)\nAffiliation: Johns Hopkins University\nCreated: 2019-05-12\nUpdated: 2020-11-16\n\nRelated paper:\n\n Monaco, J.D., Hwang, G.M., Schultz, K.M. et al. Cognitive swarming in complex\n environments with attractor dynam... | [
[
"numpy.swapaxes",
"numpy.empty",
"numpy.hypot",
"numpy.broadcast_arrays"
]
] |
hudua/azureml | [
"51f67380aa773184ef1710a3983ce017c29e68e8"
] | [
"azure-ml-pipelines/pytorch/training-folder/pytorch_train.py"
] | [
"\nfrom __future__ import print_function, division\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.optim import lr_scheduler\nfrom torchvision import datasets, models, transforms\nimport numpy as np\nimport time\nimport os\nimport copy\nimport argparse\n\nfrom azureml.core.run import R... | [
[
"torch.nn.Linear",
"torch.optim.lr_scheduler.StepLR",
"numpy.float",
"torch.max",
"torch.set_grad_enabled",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.nn.CrossEntropyLoss",
"torch.sum"
]
] |
SantiLJ/strategy-template | [
"28ec389a7ebac93e85e07b5310976bb08445f230"
] | [
"app.py"
] | [
"# Fetches and displays a basic candlestick app.\r\n\r\nimport dash\r\nimport plotly.graph_objects as go\r\nimport plotly.express as px\r\nimport dash_core_components as dcc\r\nimport dash_html_components as html\r\nfrom dash_table import DataTable, FormatTemplate\r\nfrom utils import *\r\nfrom datetime import date... | [
[
"sklearn.linear_model.LinearRegression"
]
] |
Lovestarni/asv_simulator | [
"824c832f071c51212367569a07f67e2dadfc1401"
] | [
"nodes/teleop_joy.py"
] | [
"#!/usr/bin/env python\n## @package teleop_joy A node for controlling the P3DX with an XBox controller\n\nimport rospy\n\nfrom geometry_msgs.msg import Twist\nfrom nav_msgs.msg import Odometry\n\nfrom sensor_msgs.msg import Joy\nimport numpy as np\n\ndef quat2yaw(q):\n return np.arctan2(2*(q.y*q.z + q.w*q.x), 1 ... | [
[
"numpy.arctan2"
]
] |
zhyongquan/Automotive-Software-Blog | [
"c35bed037190fd6181f20c55d1621fd11f01480b"
] | [
"002_Particle_Filter/Particle_Filter.py"
] | [
"import numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\ndef estimate(particles, weights):\r\n \"\"\"returns mean and variance of the weighted particles\"\"\"\r\n pos = particles\r\n mean = np.average(pos, weights=weights, axis=0)\r\n var = np.average((pos - mean)**2, weights=weights, axis=0)\r\n ... | [
[
"numpy.random.rand",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.random.randn",
"numpy.exp",
"numpy.arange",
"numpy.sqrt",
"numpy.cumsum",
"numpy.average",
"matplotlib.pyplot.show",
"numpy.cos"
]
] |
qingdujun/manual-nre | [
"c32ecc9397e2533dfd2cb8d7e5b9e748293028f8"
] | [
"nrekit/rl.py"
] | [
"import tensorflow as tf\nimport os\nimport sklearn.metrics\nimport numpy as np\nimport sys\nimport math\nimport time\nfrom . import framework\nimport network\n\nclass policy_agent(framework.re_model):\n def __init__(self, train_data_loader, batch_size, max_length=120):\n framework.re_model.__init__(self,... | [
[
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.logical_and",
"tensorflow.placeholder",
"tensorflow.summary.FileWriter",
"tensorflow.global_variables_initializer"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.