repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
danruod/FS-DGPM
[ "8cc57aed8caf0f8b3c1c02db0b88895d7ed3d7b5" ]
[ "model/fsdgpm.py" ]
[ "import numpy as np\nimport torch\nimport math\nfrom model.base import *\n\nclass Net(BaseNet):\n def __init__(self, n_inputs, n_outputs, n_tasks, args):\n super(Net, self).__init__(n_inputs, n_outputs, n_tasks, args)\n\n # steps for sharpness\n self.inner_steps = args.inner_batches\n\n ...
[ [ "torch.mean", "torch.sigmoid", "torch.mm", "torch.ones", "torch.autograd.set_detect_anomaly", "torch.zeros", "torch.clone", "torch.tensor", "torch.diag", "torch.clamp", "torch.autograd.grad" ] ]
asvskartheek/sentiment-analysis
[ "9bdc531e31e9b6885eab235ba23d542834bb379e" ]
[ "pretrained.py" ]
[ "import argparse\nimport pickle\n\nimport torch\n\nfrom models import *\nimport spacy\n\nfrom utils import count_parameters\n\nnlp = spacy.load(\"en\")\n\nparser = argparse.ArgumentParser()\n\nparser.add_argument(\n \"--model\", default=\"fast\", type=str, help=\"pre-trained model architecture\"\n)\n\nargs = par...
[ [ "torch.device", "torch.LongTensor" ] ]
liannah/credit_default_prediction
[ "10a372b9524d726c2d25e6b59fe91e4df1a18b22" ]
[ "src/clean_split_data.py" ]
[ "#!/usr/bin/env python\n\n# Author: Taiwo Owoseni\n# date: 2021-11-25\n\n\"\"\"\nCleans and splits raw data into train and test data set and save to file path as csv file.\n\nUsage: src/clean_split_data.py --input_path=<input_path> --out_dir=<out_dir>\n\nOptions:\n--input_path=<input_path> Path (file path) to raw...
[ [ "pandas.read_csv", "sklearn.model_selection.train_test_split" ] ]
racoles/PyXRF
[ "e53b6fdae2bb4ce95273d9db05d8092b4d8ebec5" ]
[ "pyxrf/model/load_data_from_db.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport h5py\nimport numpy as np\nimport os\nimport json\nimport multiprocessing\nimport pandas as pd\nimport platform\nimport math\nimport time as ttime\nimport copy\nimport re\nfrom distutils.version import LooseVersion\n\nimpor...
[ [ "numpy.linspace", "numpy.asarray", "numpy.squeeze", "numpy.hstack", "numpy.swapaxes", "numpy.fliplr", "numpy.arange", "numpy.reshape", "numpy.sin", "numpy.copy", "numpy.diff", "numpy.zeros", "numpy.append", "numpy.transpose", "numpy.array", "numpy.fl...
AlexanderIvanovQC/sklearn-onnx
[ "0afbe295aa3f1abbcea60f582faac31d16bd3ab0" ]
[ "tests/test_utils/utils_backend.py" ]
[ "# SPDX-License-Identifier: Apache-2.0\n\n\"\"\"\nHelpers to test runtimes.\n\"\"\"\nimport os\nimport sys\nimport glob\nimport pickle\nfrom distutils.version import StrictVersion # noqa\nimport numpy\nfrom numpy.testing import assert_array_almost_equal, assert_array_equal\nimport onnx\nimport onnxruntime\n\n\ncla...
[ [ "numpy.abs", "numpy.asarray", "numpy.issubdtype", "numpy.dtype", "numpy.testing.assert_array_equal", "numpy.testing.assert_array_almost_equal" ] ]
bmazoure/dreamerv2_jax
[ "f7a1b6233280f756df524e6b70455b8607d30c44" ]
[ "dreamerv2/common/batched_buffer.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 requ...
[ [ "numpy.arange", "numpy.empty", "numpy.ones", "numpy.save", "numpy.ravel_multi_index", "numpy.zeros_like", "numpy.moveaxis", "numpy.load", "numpy.array", "numpy.unravel_index", "numpy.sum", "numpy.zeros" ] ]
judejeh/rom-comma
[ "2cace7c4d9d72a35237bc7ddc0f54aec3b9b1d63" ]
[ "archived - prd/archive/test_functions_rbf_3.py" ]
[ "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Robert A. Milton\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright no...
[ [ "scipy.stats.ortho_group.rvs", "numpy.eye", "numpy.zeros", "numpy.full" ] ]
Ostirion-net/ppscore-time_series
[ "4292741934b39a94eb3faf3b111a02a2e9afb36a" ]
[ "tests/test_calculation.py" ]
[ "# # -*- coding: utf-8 -*-\n\nimport pytest\nimport pandas as pd\nimport numpy as np\n\nimport ppscore as pps\n\n\ndef test__normalized_f1_score():\n from ppscore.calculation import _normalized_f1_score\n\n assert _normalized_f1_score(0.4, 0.5) == 0\n assert _normalized_f1_score(0.75, 0.5) == 0.5\n\n\ndef ...
[ [ "pandas.read_csv", "pandas.to_datetime", "pandas.DataFrame", "numpy.random.randn", "numpy.random.uniform" ] ]
magnusoy/Sparkie
[ "428b716a50cd0c274670971ee007e82571a04a80" ]
[ "python/src/deprecated/vision/depth_camera.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\n__author__ = \"Magnus Kvendseth Øye\"\n__copyright__ = \"Copyright 2020, Sparkie Quadruped Robot\"\n__credits__ = [\"Magnus Kvendseth Øye\", \"Petter Drønnen\", \"Vegard Solheim\"]\n__version__ = \"1.0.0\"\n__license__ = \"MIT\"\n__maintainer__ = \"Magnus Kvendseth Øye\"\n__email...
[ [ "numpy.asanyarray" ] ]
wpv1999/twitchslam
[ "c52a14fe1034426b6dfc1e6222984a9a06e40b6a" ]
[ "optimize_crappy.py" ]
[ "from helpers import add_ones\n#import autograd.numpy as np\nfrom scipy.optimize import least_squares, leastsq\nimport cv2\n\nimport numpy as np\nimport sympy as sp\nfrom sympy.utilities.autowrap import autowrap, ufuncify, binary_function\nfrom sympy.printing.ccode import ccode\n\nEPS = 1e-10\n\ndef rotation_from_m...
[ [ "numpy.concatenate", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
AparCode/mask_identifier
[ "44abfcd686c4c39eb2f595ab425e41bd6574611a" ]
[ "show_finished_image.py" ]
[ "import cv2\nimport detect_faces as data\nimport numpy as np\nimport cnn_model_setup as cm\nimport torch\nimport model as m\nimport social_distancing as sd\n\ndef convert_image(image, model, landmarks, bounding_boxes, resized_crop, bgr=True, resize=True):\n \"\"\"Uses faces found from the detect_faces file and a...
[ [ "torch.Tensor", "numpy.rint", "numpy.append", "numpy.argmax", "numpy.count_nonzero", "torch.cuda.is_available" ] ]
ZHUI/Paddle
[ "32ae8e81322ed380a89157fcb632c229e2c64979" ]
[ "python/paddle/incubate/hapi/tests/test_dataset_cifar.py" ]
[ "# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.random.randint" ] ]
MagdalenaMl/pykeen
[ "611daed766a6763c30026e5d21c4ba7647f4fcda" ]
[ "src/pykeen/triples/triples_factory.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Implementation of basic instance factory which creates just instances based on standard KG triples.\"\"\"\n\nimport dataclasses\nimport itertools\nimport logging\nimport pathlib\nimport re\nfrom typing import Any, Callable, Collection, Dict, List, Mapping, Optional, Sequence, Set, ...
[ [ "numpy.isin", "torch.empty", "numpy.unique", "torch.cat", "pandas.DataFrame", "torch.tensor", "numpy.concatenate", "numpy.vectorize", "numpy.asanyarray", "torch.stack", "numpy.array", "numpy.empty" ] ]
patrislav1/streaming-form-data
[ "c9a5f5a542712fdc3ef41dd84889af9619f93822" ]
[ "utils/profile.py" ]
[ "from argparse import ArgumentParser\nimport cProfile\nfrom functools import wraps\nfrom io import StringIO, BytesIO\nfrom numpy import random\nimport pstats\n\nfrom requests_toolbelt import MultipartEncoder\nfrom streaming_form_data.parser import StreamingFormDataParser\nfrom streaming_form_data.targets import Val...
[ [ "numpy.random.bytes", "numpy.random.seed" ] ]
zengxianyu/photometric_optimization
[ "f0b20c75bd5692196da6301a07dfe3009d21b474" ]
[ "wj_fitting.py" ]
[ "import os, sys\nimport cv2\nimport torch\nimport torchvision\nimport torch.nn.functional as F\nimport torch.nn as nn\nimport numpy as np\nimport datetime\nfrom face_seg_model import BiSeNet\nimport torchvision.transforms as transforms\nfrom renderer import Renderer\nimport util\nfrom PIL import Image\nfrom face_al...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "torch.load", "torch.cat", "torch.from_numpy", "torch.unsqueeze", "numpy.save", "matplotlib.pyplot.plot", "numpy.max", "numpy.zeros_like", "matplotlib.pyplot.grid", "torch.nn.functional.interpolate", "matplo...
gordicaleksa/pytorch-naive-video-neural-style-transfer
[ "3773483926f9f96534c45dc35251e296185a69e8" ]
[ "manual_mask_cleaning.py" ]
[ "\"\"\"\n Automatic segmentation is not always perfect, this scripts helps by providing semi-automatic mask cleaning.\n Final option is using some editing software and editing masks there (high cost).\n\n Usual workflow:\n 1. Copy processed_masks/ into processed_masks_refined/ (as this script is des...
[ [ "numpy.uint8" ] ]
spencerlyon2/Distributions.py
[ "7e2a4c810c18e8292fa3c50c2f47347ee2707d58" ]
[ "distcan/matrix.py" ]
[ "\"\"\"\nMatrix variate distributions\n\n@author : Spencer Lyon <spencer.lyon@stern.nyu.edu>\n@date : 2015-01-07\n\n\"\"\"\nfrom math import log, sqrt, pi\nimport numpy as np\nimport scipy.stats as st\nimport scipy.linalg as la\nfrom scipy.special import gammaln, digamma\n\n__all__ = [\"Wishart\", \"InverseWishart\...
[ [ "scipy.stats.chi2.rvs", "numpy.linalg.slogdet", "numpy.arange", "scipy.linalg.solve", "scipy.linalg.cholesky", "numpy.random.randn", "scipy.special.gammaln", "scipy.linalg.inv", "numpy.zeros", "numpy.empty" ] ]
springrid/udacity-drlnd-p1-navigation
[ "3d5bf24b6fe33b1efa249fa190e5299e7cfa5f87" ]
[ "p1_navigation/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...
[ [ "numpy.arange", "torch.from_numpy", "torch.nn.functional.mse_loss", "torch.no_grad", "torch.cuda.is_available", "numpy.vstack" ] ]
easonyang1996/HistoImgProcess
[ "d12c61d7b33d2cc2bb9d2a26aa06ca295faacbc8" ]
[ "CS-CO/model/cs_co.py" ]
[ "#!~/anaconda3/bin/python3\n# ******************************************************\n# Author: Pengshuai Yang\n# Last modified: 2021-01-13 17:58\n# Email: yps18@mails.tsinghua.edu.cn\n# Filename: cs_co.py\n# Description: \n# cross stain contrastive learning \n# ***********************************************...
[ [ "torch.nn.BatchNorm1d", "torch.load", "torch.cat", "torch.randn", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.no_grad", "torch.flatten", "torch.nn.ReLU", "numpy.array" ] ]
iwamura-lab/my_codes
[ "70140fe81b70d7ea4969c442771db40054cc109e" ]
[ "my_codes/phonon/total_dos.py" ]
[ "#!/usr/bin/env python\n\nimport argparse\n\nimport numpy as np\nimport phonopy\n\nif __name__ == \"__main__\":\n\n parser = argparse.ArgumentParser()\n parser.add_argument(\"-m\", \"--mesh\", type=int, default=20, help=\"mesh number\")\n parser.add_argument(\"-s\", \"--save\", action=\"store_true\", help=...
[ [ "numpy.array" ] ]
IcewineChen/pytorch-pyranet
[ "2cb56bbda10b3c90efa5baed87381063cb180420" ]
[ "utils/debugger.py" ]
[ "import numpy as np\nimport cv2\nimport ref as ref\nimport matplotlib.pyplot as plt\nimport mpl_toolkits.mplot3d\nfrom mpl_toolkits.mplot3d import Axes3D\ntry:\n #import mayavi.mlab\n pass\nexcept:\n pass\n \ndef show2D(img, points, c):\n points = ((points.reshape(ref.nJoints, -1))).astype(np.int32)\...
[ [ "numpy.where" ] ]
NeuralNetworkLab/Stream-Fusion-Network
[ "6e4232352953f6a6a1fba4ce022cd8a462610215" ]
[ "tf_model_zoo/models/syntaxnet/syntaxnet/graph_builder.py" ]
[ "# Copyright 2016 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.convert_to_tensor", "tensorflow.get_variable", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.concat", "tensorflow.python.ops.state_ops.assign_add", "tensorflow.nn.l2_loss", "tensorflow.train.ExponentialMovingAverage", "tensorflow.group", "tensorflow...
ylavinia/pulearning632
[ "b4ed5e721aee85c9aa8375bf817e64237f6b298d" ]
[ "project/detect_modality.py" ]
[ "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt \nimport seaborn as sns\nfrom sklearn import *\nimport glob, sys, os\nfrom pathlib import Path\nfrom src.utils import get_proj_root\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\ndef find_peaks(df, col_name_str, min_peak_fraction)...
[ [ "scipy.signal.find_peaks", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "scipy.signal.peak_prominences", "numpy.argmin", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.vlines", "matplotlib.pyplot.figure" ] ]
UKPLab/coling2018-graph-neural-networks-question-answering
[ "389558d6570195debea570834944507de4f21d65" ]
[ "questionanswering/models/lexical_baselines.py" ]
[ "import torch\nfrom torch import nn as nn\n\nfrom questionanswering.models import modules\nfrom questionanswering.models.modules import batchmv_cosine_similarity\n\n\nclass OneEdgeModel(nn.Module):\n\n def __init__(self,\n tokens_encoder=None,\n **kwargs\n ):\n ...
[ [ "torch.nn.Linear", "torch.nn.ReLU" ] ]
ali4413/Ali-Mehrabifard
[ "0b319934299f42460b789a0627f553181d95468a" ]
[ "exercises/solution_01_05.py" ]
[ "# Import pandas \nimport pandas as pd\n\n# Read in the dataset \nhockey_players = pd.read_csv('data/canucks.csv', index_col=0)\n\n\n# Display the dataframe\nhockey_players.head()" ]
[ [ "pandas.read_csv" ] ]
aelwan/pyemu
[ "482cedeb637982e6bd5fc45babd9c95922d90dd2" ]
[ "pyemu/pst/pst_handler.py" ]
[ "\nfrom __future__ import print_function, division\nimport os\nimport re\nimport copy\nimport warnings\nimport numpy as np\nimport pandas as pd\npd.options.display.max_colwidth = 100\nimport pyemu\nfrom ..pyemu_warnings import PyemuWarning\nfrom pyemu.pst.pst_controldata import ControlData, SvdData, RegData\nfrom p...
[ [ "pandas.notnull", "pandas.read_csv", "numpy.abs", "numpy.sqrt", "pandas.isnull", "numpy.isnan", "pandas.DataFrame", "numpy.log10", "numpy.sum" ] ]
keeeal/alpha-zero-ut3
[ "d6ff5e20b97cdd386ca27fa8be06334cc8afdb3d" ]
[ "ut3/pytorch/UT3NNet.py" ]
[ "\nimport torch\nfrom torch import nn\n\nclass UT3NNet(nn.Module):\n def __init__(self, game, args):\n self.size = game.getBoardSize()\n self.channels = game.getBoardChannels()\n self.actions = game.getActionSize()\n self.args = args\n\n super(UT3NNet, self).__init__()\n ...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.cat", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.ReLU" ] ]
marcnunez/CabinMonitoringV1
[ "f95cf73afcd843f1a8a107517f96d4631a5d8726" ]
[ "train_sppe/src/utils/img.py" ]
[ "# -----------------------------------------------------\n# Copyright (c) Shanghai Jiao Tong University. All rights reserved.\n# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)\n# -----------------------------------------------------\n\nimport numpy as np\nimport torch\nimport scipy.misc\nimport torch.nn.functional...
[ [ "torch.Tensor", "torch.zeros", "numpy.arange", "torch.is_tensor", "torch.from_numpy", "numpy.sin", "numpy.cos", "numpy.float32", "numpy.transpose", "numpy.array", "numpy.exp", "numpy.zeros" ] ]
keke185321/combine-copy-
[ "de2eba77d8db5c9c1908aac1262590b80c2348ce" ]
[ "tktest1.py" ]
[ "#---------Imports\nfrom numpy import arange, sin, pi\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg\nfrom matplotlib.figure import Figure\nimport Tkinter as Tk\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n#---------End of imports\n\nfig = plt.Fig...
[ [ "numpy.arange", "numpy.sin", "matplotlib.pyplot.Figure", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ] ]
ltalirz/asetk
[ "bdb31934a5eb49d601e492fc98078d27f5dd2ebd" ]
[ "asetk/format/igor.py" ]
[ "\"\"\"Classes for use with IGOR Pro\n\n\"\"\"\n\nimport re\nimport numpy as np\nfrom . import cube\n\nclass Axis(object):\n \"\"\"Represents an axis of an IGOR wave\"\"\"\n\n def __init__(self, symbol, min, delta, unit, wavename=None):\n self.symbol = symbol\n self.min = min\n self.delta...
[ [ "numpy.array", "numpy.min" ] ]
ChristinaB/Topnet-WM
[ "abfed11a3792a43ad23000cbf3b2cb9161f19218" ]
[ "Preprocessing/MODFLOW_to_TopNet.py" ]
[ "import numpy as np\nimport os\n\nMOD_indx = {2:0, 3:1, 4:2, 5:3, 6:4, 7:5, 8:6, 9:7, 10:8, 11:9,\n 12:10, 13:11, 14:12, 15:13, 16:14, 17:15, 18:16, 19:17, 20:18, 21:19,\n 22:20, 23:21, 24:22, 25:23, 26:24, 27:25, 28:26, 29:27, 30:28, 31:29,\n 32:30, 33:31, 34:32, 35:33...
[ [ "numpy.asarray", "numpy.zeros", "numpy.full" ] ]
travbid/tensorflow
[ "a53365719e445edc5b48f0877f1d85b8d5837384" ]
[ "tensorflow/python/keras/optimizer_v2/optimizer_v2.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.ops.array_ops.shape", "tensorflow.python.keras.backend.name_scope", "tensorflow.python.keras.backend.batch_get_value", "tensorflow.python.keras.optimizer_v2.learning_rate_schedule.deserialize", "tensorflow.python.ops.variables.Variable", "tensorflow.python.framework.ops....
vivekkatial/HAQC
[ "4ac97c779d28722bcebeedf9e59aeeda788dbb41" ]
[ "qaoa_vrp/generators/random_instances.py" ]
[ "import networkx as nx\nimport numpy as np\nimport uuid\n\nfrom qaoa_vrp.utils import distance, get_direction\n\n\ndef generate_random_instance(\n num_nodes: int,\n num_vehicles: int,\n instance_type: str,\n num_outliers: int = 1,\n gamma: int = 2,\n quasi: bool = False,\n noise: float = 0.1,\n...
[ [ "numpy.sqrt", "numpy.array", "numpy.random.random", "numpy.fill_diagonal" ] ]
rohanverma94/spark
[ "8ef0159550c143e07fa79b120b2d1fdf9d535fdc" ]
[ "python/pyspark/ml/tests/test_algorithms.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "numpy.isclose", "numpy.allclose", "numpy.testing.assert_allclose" ] ]
RaphaelBajon/argopy
[ "5e8762c0e5e35f8afb70fcde996b024e6631edb1" ]
[ "argopy/fetchers.py" ]
[ "#!/bin/env python\n# -*coding: UTF-8 -*-\n\"\"\"\n\nHigh level helper methods to load Argo data from any source\nThe facade should be able to work with all available data access point,\n\nValidity of access points parameters (eg: wmo) is made here, not at the data/index source fetcher level\n\n\"\"\"\n\nimport war...
[ [ "numpy.max", "numpy.unique", "numpy.min" ] ]
Lazersmoke/idawator-hacking
[ "12db250afa6f0192041a233339db535edbc72f86", "12db250afa6f0192041a233339db535edbc72f86" ]
[ "py/learning.py", "py/parseMidi.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\nfrom mido import MidiFile, Message, MidiTrack\nfrom itertools import permutations\nimport os\n\nnp.set_printoptions(precision=2)\n\n# This is the size of the Fock space o...
[ [ "matplotlib.pyplot.legend", "tensorflow.keras.backend.prod", "tensorflow.stack", "tensorflow.keras.Sequential", "tensorflow.keras.layers.InputLayer", "tensorflow.math.argmax", "numpy.stack", "tensorflow.gather", "numpy.argmax", "numpy.insert", "numpy.zeros", "tensor...
thbeutin/csep2
[ "79bc5c77c90f4dd13dae69425d3cb39aabcec7bf" ]
[ "examples/catalog_interactions.py" ]
[ "import time\nimport os\nimport numpy\nimport matplotlib.pyplot as pyplot\n\nfrom csep.core.catalogs import UCERF3Catalog, ComcatCatalog\nfrom csep.utils.plotting import plot_cumulative_events_versus_time, plot_magnitude_versus_time\n\n\"\"\"\nNote:\n This script requires about 12-14Gb of Ram because generators ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.axvline", "numpy.min", "numpy.median", "numpy.max", "matplotlib.pyplot.ylabel", "numpy.mean", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.hist", "numpy.vstack", "matplotlib.pyplot.figure" ] ]
jarekj71/salbec
[ "4aa85bcc5b501d641d78d93794355be2f1a75047" ]
[ "GUI/surface.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 10 15:55:55 2020\n\n@author: jarekj\n\"\"\"\n\nfrom PyQt5 import QtWidgets\nfrom PyQt5.QtCore import (pyqtSignal)\nimport pickle, os, sys\nimport pandas as pd\n\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCan...
[ [ "matplotlib.figure.Figure", "matplotlib.use", "matplotlib.pyplot.subplots", "pandas.ExcelWriter", "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg" ] ]
Novandev/gn_api
[ "08b071ae3916bb7a183d61843a2cd09e9fe15c7b" ]
[ "recommendation_engines/similar_songs.py" ]
[ "import sys,os\nimport pandas as pd\nfrom sklearn.neighbors import NearestNeighbors\nimport pickle\nsys.path.insert(1, os.path.join(sys.path[0], '..'))\nfrom config import elastic\n# Based on the data\n\n\n\nclass Similar():\n\n \"\"\"\n This class is used to find silimar songs by emotional score using K-Near...
[ [ "sklearn.neighbors.NearestNeighbors", "pandas.DataFrame" ] ]
CorentinJ/WeatherCollector
[ "4c7fa3ca17bf2da0b49120ca7c1cbefe7be91a92" ]
[ "station.py" ]
[ "from csvtable import CsvTable\r\nfrom csvtable import cache_dir\r\nfrom urllib import request\r\nfrom urllib.error import HTTPError, URLError\r\nfrom datetime import datetime\r\nimport numpy as np\r\nimport os\r\nimport gzip\r\nimport time\r\nfrom shapely.geometry.point import Point\r\n\r\nclass Station:\r\n ti...
[ [ "numpy.deg2rad", "numpy.array", "numpy.sum", "numpy.sqrt" ] ]
carlospatinos/realtime-vad
[ "abfe1e65bfdbb392543c5c15801457144795ff4a" ]
[ "plotInput.py" ]
[ "#!/usr/bin/env python3\n\"\"\"Plot the live microphone signal(s) with matplotlib.\n\nMatplotlib and NumPy have to be installed.\n\n\"\"\"\nimport argparse\nimport queue\nimport sys\n\nfrom matplotlib.animation import FuncAnimation\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport sounddevice as sd\n\n\n...
[ [ "numpy.roll", "matplotlib.pyplot.show", "matplotlib.animation.FuncAnimation", "matplotlib.pyplot.subplots" ] ]
fsxfreak/yarnnlm
[ "de117fc58337e206f3d2ca2d60a76d0d2a8078fb" ]
[ "src/find_rare_subs.py" ]
[ "'''\nOutputs likely sentences with rare words substituted into the sentence.\n'''\nimport logging as log\nimport os, sys\n\nimport tensorflow as tf\nimport numpy as np\n\nimport reader, util\nfrom flags import * # for FLAGS\nfrom model import RNNLM\n\nlog.basicConfig(stream=sys.stderr, level=log.INFO,\n format=...
[ [ "tensorflow.app.run" ] ]
guanlnny/HDRmaster
[ "0680695841659ea3aff09dab229d1738e742a0b9" ]
[ "HDRmaster-cpu/vgg.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torchvision import models\n\n\nclass Vgg19(torch.nn.Module):\n def __init__(self, requires_grad=False):\n super(Vgg19, self).__init__()\n vgg_pretrained_features = models.vgg19(pretrained=True).features\n self.slice1 = torch.nn.Sequential()\n ...
[ [ "torch.nn.Sequential", "torch.nn.L1Loss" ] ]
annacuomo/TenK10K_analyses_HPC
[ "2023a3e36d06cf66bc114e6b4d00a2e3345fbc3b" ]
[ "scripts/run_association_Tcells_one_gene.py" ]
[ "import os\nimport sys\nimport scanpy as sc\nimport pandas as pd\nimport xarray as xr\nfrom numpy import ones\nfrom pandas_plink import read_plink1_bin\nfrom numpy.linalg import cholesky\nimport time\nfrom limix.qc import quantile_gaussianize\n\nfrom cellregmap import run_association_fast\n\n\narg = {}\n\n# chrom\n...
[ [ "pandas.read_csv", "pandas.DataFrame", "numpy.ones", "numpy.linalg.cholesky", "pandas.read_pickle" ] ]
Amarify/DXC-Industrialized-AI-Starter
[ "87e050e6871bfcd86f37c90ec597f035cb270744" ]
[ "dxc/ai/clean_data/clean_data.py" ]
[ "import pandas as pd\nimport janitor #data cleaning\nfrom ftfy import fix_text #data cleaning\nimport nltk #data cleaning\nnltk.download('punkt') #data cleaning\nimport scrubadub #data cleaning\nimport arrow #normalizing dates\nimport numpy as np\nfrom sklearn.base import TransformerMixin\nfrom sklearn.impute impor...
[ [ "numpy.squeeze", "sklearn.impute.KNNImputer", "sklearn.preprocessing.OrdinalEncoder", "numpy.array", "pandas.to_numeric" ] ]
louieworth/Pytorch_RL
[ "9313c987a5e5d5727a68ffd64225426bd986f6bd" ]
[ "Policy/AC/main_AC.py" ]
[ "import numpy as np\nimport gym\nfrom AC import Agent\nfrom utils import plotLearning\nimport matplotlib.pyplot as plt\nfrom torch.utils.tensorboard import SummaryWriter\n\nwriter = SummaryWriter()\n\nif __name__ == \"__main__\":\n agent = Agent(alpha=5e-5, beta=1e-5, input_dim=[2], gamma=0.99,\n ...
[ [ "torch.utils.tensorboard.SummaryWriter" ] ]
VasilyevEvgeny/self-focusing_3D
[ "c90b4d78d2d72365566f8a49b325bd48127b1e44", "c90b4d78d2d72365566f8a49b325bd48127b1e44" ]
[ "core/noise.py", "core/kerr_effect.py" ]
[ "from abc import ABCMeta, abstractmethod\nfrom pyfftw.builders import ifft2\nfrom numpy import sqrt, pi, exp, zeros, float64, complex64, correlate, var\nfrom numpy import random, mean\nfrom numpy.fft import fftshift\nfrom numba import jit\n\n\nclass ComplexNoise(metaclass=ABCMeta):\n \"\"\"\n Abstract class f...
[ [ "numpy.random.random", "numpy.sqrt", "numpy.fft.fftshift", "numpy.correlate", "numpy.mean", "numpy.var", "numpy.exp", "numpy.zeros" ], [ "numpy.exp" ] ]
vmarchesin/ml-playground
[ "d9ee805f0fc32bcff244e65aadfd344e24fae8d7", "d9ee805f0fc32bcff244e65aadfd344e24fae8d7" ]
[ "google-machine-learning-crash-course/py/2_tensorflow_example.py", "google-machine-learning-crash-course/py/1_tensorflow_example.py" ]
[ "from __future__ import print_function\n\nimport math\nimport os\n\nfrom IPython import display\nfrom matplotlib import cm\nfrom matplotlib import gridspec\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom sklearn import metrics\nimport tensorflow as tf\nfrom tensorflow.python.dat...
[ [ "pandas.Series", "matplotlib.cm.coolwarm", "numpy.linspace", "tensorflow.contrib.estimator.clip_gradients_by_norm", "pandas.DataFrame", "matplotlib.pyplot.plot", "sklearn.metrics.mean_squared_error", "pandas.read_csv", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.su...
sequence-dev/landlab
[ "a84fbf67a46de08bf8b6758bb316bff3423e746c" ]
[ "landlab/io/tests/test_read_esri_ascii.py" ]
[ "#! /usr/bin/env python\n\"\"\"\nUnit tests for landlab.io.esri_ascii module.\n\"\"\"\nimport os\n\nimport pytest\nimport numpy as np\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\nfrom six import StringIO\n\nfrom landlab.io import read_esri_ascii, read_asc_header\nfrom landlab.io import ...
[ [ "numpy.array", "numpy.testing.assert_array_almost_equal" ] ]
jmcmahon443/nvidia-jetson-competition
[ "3e13841f02b7a67813d1437a91cf04be4674dcdd" ]
[ "jetson_ws/src/beat_makers/beat_detector.py" ]
[ "#!/usr/bin/env python\nfrom __future__ import division\n\nimport time, sys\nimport aubio, pyaudio\nimport rospy\nimport numpy as np\nfrom beat_msgs.msg import Beat\n\nRATE = 32000 #44100\n\n\nclass BeatMaker(object):\n LIVE=1\n OFFLINE=0\n\n source=[]\n rate=10 #calcualte by win_size/sampling rate: 512...
[ [ "numpy.arange", "numpy.fromstring" ] ]
SACGF/variantgrid
[ "515195e2f03a0da3a3e5f2919d8e0431babfd9c9" ]
[ "snpdb/management/commands/delete_unused_variants.py" ]
[ "import numpy as np\nfrom django.core.management.base import BaseCommand\n\nfrom annotation.models import AnnotationRangeLock, VariantAnnotation\nfrom snpdb.models import Variant, VariantZygosityCount\n\n\nclass Command(BaseCommand):\n \"\"\"\n Until 210622 - (PythonKnownVariantsImporter v.16) we used to ...
[ [ "numpy.linspace" ] ]
nvinard/seismicToolBox
[ "f304a87ab61ed6c0c2ef730be01421a937ce5b22" ]
[ "seismicToolBox.py" ]
[ "\"\"\"\r\nA python module for plotting and manipulating seismic data and headers,\r\nkirchhoff migration and more. Contains the following functions\r\n\r\nload_header : load mat file header\r\nload_segy : load segy dataset\r\nsorthdr : sort seismic header\r\nsortdata ...
[ [ "numpy.nanmax", "numpy.sqrt", "numpy.asarray", "matplotlib.pyplot.axes", "numpy.max", "matplotlib.pyplot.plot", "numpy.round", "numpy.mean", "numpy.where", "numpy.divide", "numpy.square", "matplotlib.pyplot.gca", "numpy.pad", "numpy.clip", "numpy.reshape...
sadrasabouri/vat_tf
[ "b7e36a6efb8f32217455ebcb9df258aaae0e53de" ]
[ "train_semisup.py" ]
[ "import time\n\nimport numpy\nimport tensorflow.compat.v1 as tf\n\nimport layers as L\nimport vat\n\nFLAGS = tf.app.flags.FLAGS\n\ntf.app.flags.DEFINE_string('device', '/gpu:0', \"device\")\n\ntf.app.flags.DEFINE_string('dataset', 'cifar10', \"{cifar10, svhn}\")\ntf.app.flags.DEFINE_string('logdir', './', \"Logging...
[ [ "tensorflow.compat.v1.app.flags.DEFINE_bool", "tensorflow.compat.v1.train.Supervisor", "numpy.random.randint", "tensorflow.compat.v1.app.run", "tensorflow.compat.v1.train.AdamOptimizer", "tensorflow.compat.v1.global_variables", "tensorflow.compat.v1.trainable_variables", "tensorflo...
ElijahAhianyo/advertools
[ "5d3d3c88bfb76fe2917f3583de8fe874e26a5900" ]
[ "advertools/logs.py" ]
[ "\"\"\"\n.. _logs:\n\nLog File Analysis (experimental)\n================================\n\nLogs contain very detailed information about events happening on computers.\nAnd the extra details that they provide, come with additional complexity that\nwe need to handle ourselves. A pageview may contain many log lines, ...
[ [ "pandas.read_parquet", "pandas.to_datetime", "pandas.to_numeric", "pandas.DataFrame" ] ]
lucasmansilla/multiatlas-landmark
[ "0295a4471ca8f08040885f105b4c67e8f450c57e" ]
[ "scripts/get_labels_from_points.py" ]
[ "import os\nimport argparse\nimport numpy as np\nfrom PIL import Image\n\nfrom src.utils.io import read_dir\nfrom src.preprocess import get_seg\n\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument('--points_dir', type=str)\n parser.add_argument('--output_dir', type=s...
[ [ "numpy.load", "numpy.uint8" ] ]
Kleinjohann/elephant
[ "74ef4a27f1d208fa0aab94f33f315907401da3bb" ]
[ "elephant/test/test_asset.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nUnit tests for the ASSET analysis.\n\n:copyright: Copyright 2014-2016 by the Elephant team, see AUTHORS.txt.\n:license: Modified BSD, see LICENSE.txt for details.\n\"\"\"\n\nimport unittest\nimport numpy as np\nimport scipy.spatial\nimport quantities as pq\nimport neo\n\ntry:\n ...
[ [ "numpy.arange", "numpy.testing.assert_array_equal", "numpy.all", "numpy.array", "numpy.zeros", "numpy.vstack", "numpy.testing.assert_array_almost_equal" ] ]
aoifemcdonagh/yolov4-custom-functions
[ "0a4ec58597a5bb3429f7d09ea157643c7a4e66f9" ]
[ "detect_video.py" ]
[ "import os\r\n# comment out below line to enable tensorflow outputs\r\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\r\nimport time\r\nimport tensorflow as tf\r\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\r\nif len(physical_devices) > 0:\r\n tf.config.experimental.set_memory_growth(physica...
[ [ "tensorflow.compat.v1.ConfigProto", "tensorflow.constant", "tensorflow.saved_model.load", "tensorflow.config.experimental.set_memory_growth", "numpy.asarray", "tensorflow.lite.Interpreter", "tensorflow.config.experimental.list_physical_devices", "tensorflow.shape", "tensorflow....
mananatee/PyNeuron-Toolbox
[ "43f5f4201ac9b17126c7a29e21b7afa17f4cab08" ]
[ "PyNeuronToolbox/synapses.py" ]
[ "from __future__ import division\nimport numpy as np\n\ndef add_exp2(h,seg,spktimes,e=0,tau1=0.5,tau2=20,weight=0.001):\n \"\"\"\n Adds a double-exponential synapse at seg, with spikes\n specified by the list/np.array spktimes. Optional arguments\n specify parameters for the synapse. Returns a list of\n...
[ [ "numpy.sort" ] ]
clive819/YOLO
[ "2d3afef299b888a60f24df027506a0f16cb1344b" ]
[ "train.py" ]
[ "from torch.utils.data.dataloader import DataLoader\nfrom torch.optim import SGD, Adam\nfrom config import device, tc\nfrom model import YOLO\nfrom utils import *\nimport torch\nimport numpy as np\n\n\n# MARK: - load data\ncocoDataset = COCODataset(tc.imageDir, tc.annFile, fromInternet=False if tc.imageDir else Tru...
[ [ "torch.utils.data.dataloader.DataLoader", "numpy.mean", "torch.load" ] ]
GreenWaves-Technologies/gap_sdk
[ "6d255c70883cf157d76d006b2dbf55bc6974b21f" ]
[ "tools/nntool/importer/tflite2/handlers/backend/conv_2d.py" ]
[ "# Copyright (C) 2020 GreenWaves Technologies, SAS\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n\n...
[ [ "numpy.zeros" ] ]
G-Wang/wavenet
[ "a0e39e2c128dec1ad2d534e4b7a436d67a119f9a" ]
[ "pytorch/gary_sampler.py" ]
[ "import argparse\nimport json\nimport os\nimport random\nimport torch\nimport torch.utils.data\nimport sys\nimport audio as deepaudio\nfrom hparams import hparams\n\nimport utils\n\nclass DeepMels(torch.utils.data.Dataset):\n \"\"\"\n This is the main class that calculates the spectrogram and returns the\n ...
[ [ "torch.from_numpy", "torch.save" ] ]
potus28/ML-Project---GLN
[ "84e81b28fb8ee28ed3695f0148d6f278e82f78c3" ]
[ "gln/test/model_inference.py" ]
[ "from __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import division\n\n\nimport rdkit\nfrom rdkit import Chem\nimport os\nimport numpy as np\nimport torch\nimport pickle as cp\nimport math\nfrom scipy.special import softmax\nfrom gln.data_process.data_info import DataInfo...
[ [ "numpy.argsort", "scipy.special.softmax", "torch.load" ] ]
Subaru-PFS/dev_pfsmodel
[ "d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05" ]
[ "2d_PSF_code/Zernike_Module.py" ]
[ "\"\"\"\nFirst created on Mon Aug 13 10:01:03 2018\n\nMain code for the creation of the image for Zernike analysis;\nOther moduls avaliable are:\n Zernike_Cutting_Module\n Zernike_Analysis_Module\n\n\nVersions:\nOct 31, 2018; 0.1 -> 0.11 fixed FRD effect\nNov 1, 2018; 0.11 -> 0.12 added correct edges to the d...
[ [ "numpy.dot", "numpy.polyfit", "scipy.linalg.svd", "numpy.minimum", "numpy.sqrt", "numpy.linspace", "numpy.arctan", "numpy.nan_to_num", "numpy.fft.fftshift", "numpy.concatenate", "numpy.seterr", "numpy.max", "numpy.round", "numpy.zeros_like", "scipy.ndima...
NathalieGou/mne-nirs
[ "387e34bef41d7cb4103d0901070c1e54e7f0707e" ]
[ "mne_nirs/visualisation/tests/test_visualisation.py" ]
[ "# Authors: Robert Luke <mail@robertluke.net>\n#\n# License: BSD (3-clause)\n\nimport mne\nimport mne_nirs\nimport numpy as np\nfrom mne.utils import (requires_pysurfer, traits_test)\nfrom mne_nirs.experimental_design.tests.test_experimental_design import \\\n _load_dataset\nfrom mne_nirs.experimental_design imp...
[ [ "numpy.eye" ] ]
inertialsense/inertial-sense-sdk
[ "68893b0207d12d21420744706578f90ef215be4a" ]
[ "python/pylib/newISDataAnalytics.py" ]
[ "'''\nCreated on Feb 17, 2017\n\n'''\n# from numbers import Number\nimport numpy as np\nimport os\nimport sys\n# import ctypes as ct\nimport math\nimport pylib.ISToolsDataSorted as itd\nimport subprocess as subprocess\nimport pdb\n\nfrom pylab import plt\nfrom scipy.interpolate import interp1d\nfrom pylib.pose impo...
[ [ "numpy.square", "numpy.hstack", "numpy.min", "numpy.arange", "numpy.set_printoptions", "numpy.max", "scipy.interpolate.interp1d", "numpy.mean", "numpy.argmax", "numpy.diff", "numpy.array", "numpy.sum", "numpy.empty" ] ]
bopopescu/drawquest-web
[ "8d8f9149b6efeb65202809a5f8916386f58a1b3b" ]
[ "website/drawquest/management/commands/coin_balance_histogram.py" ]
[ "import datetime\n\nfrom django.core.management.base import BaseCommand\nfrom matplotlib import pyplot\n\nfrom drawquest.apps.drawquest_auth.models import User\nfrom drawquest import knobs, economy\n\n\nclass Command(BaseCommand):\n args = ''\n help = ''\n\n def handle(self, *args, **options):\n bal...
[ [ "matplotlib.pyplot.figure", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.hist", "matplotlib.pyplot.ylabel" ] ]
cclauss/DBNet
[ "53dd1b2d3d609257920bb3553ca3d012abe29f0e" ]
[ "models/resnet152_pm.py" ]
[ "import os\r\nimport sys\r\n\r\nimport tensorflow as tf\r\nimport scipy\r\nimport numpy as np\r\n\r\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\r\nsys.path.append(os.path.join(BASE_DIR, '../utils'))\r\n\r\nimport tf_util\r\nfrom custom_layers import Scale\r\nfrom keras.layers import Input, Dense, Convolu...
[ [ "scipy.misc.imresize", "tensorflow.matmul", "tensorflow.truncated_normal", "tensorflow.constant", "tensorflow.Graph", "tensorflow.reduce_mean", "tensorflow.zeros", "tensorflow.stack", "tensorflow.reshape", "tensorflow.cast", "tensorflow.placeholder", "numpy.stack", ...
CGuichardMasterDL/MCS_DTW
[ "e3bc1fac3599774e1a5182bbd9e55bebdac44a94" ]
[ "mcs_dtw/kppv.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n Algo de classification par k-plus proches voisins en utilisant la librairie sklearn\n\"\"\"\n\n#========== IMPORT ==========#\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.preprocessing import Standard...
[ [ "numpy.dot", "numpy.asarray", "sklearn.neighbors.KNeighborsClassifier", "matplotlib.pyplot.axes", "matplotlib.ticker.LinearLocator", "numpy.mean", "numpy.transpose", "matplotlib.ticker.FormatStrFormatter", "sklearn.preprocessing.StandardScaler", "numpy.meshgrid", "sklea...
mljack/OBBDet_Swin
[ "9491f1277babb31e900dc5f5e6a117bf46b62961" ]
[ "mmdet/ops/dcn/deform_conv.py" ]
[ "import math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import CONV_LAYERS\nfrom mmcv.utils import print_log\nfrom torch.autograd import Function\nfrom torch.autograd.function import once_differentiable\nfrom torch.nn.modules.utils import _pair, _single\n\nfrom . import d...
[ [ "torch.sigmoid", "torch.nn.modules.utils._single", "torch.Tensor", "torch.cat", "torch.zeros_like", "torch.nn.modules.utils._pair", "torch.chunk", "torch.nn.functional.pad" ] ]
yohney/pytorch-ssd
[ "205767324f64f1638debcb7247cc81f04b826b37" ]
[ "vision/ssd/mobilenet_v2_ssd_lite.py" ]
[ "import torch\nfrom torch.nn import Conv2d, Sequential, ModuleList, BatchNorm2d\nfrom torch import nn\nfrom ..nn.mobilenet_v2 import MobileNetV2, InvertedResidual\n\nfrom .ssd import SSD, GraphPath\nfrom .predictor import Predictor\nfrom .config import mobilenetv1_ssd_config as config\n\n\ndef SeperableConv2d(in_ch...
[ [ "torch.device", "torch.nn.Conv2d", "torch.nn.BatchNorm2d" ] ]
SURAJtheMAKER/Tflite
[ "c7e966b5e35ee7fc511c1efe84dba8d3558f2b1c" ]
[ "tensorflow/python/ops/array_ops.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.framework.tensor_shape.scalar", "tensorflow.python.ops.gen_math_ops._range", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.gen_array_ops._mirror_pad", "tensorflow.python.ops.gen_array_ops._split_v", "tensorflow.python.ops.gen_array_ops.ga...
shubham-goel/idr
[ "44959e7aac267775e63552d8aac6c2e9f2918cca" ]
[ "code/training/idr_train.py" ]
[ "import os\nfrom datetime import datetime\nfrom pyhocon import ConfigFactory\nimport sys\nimport torch\n\nimport utils.general as utils\nimport utils.plots as plt\n\nclass IDRTrainRunner():\n def __init__(self,**kwargs):\n torch.set_default_dtype(torch.float32)\n torch.set_num_threads(1)\n\n ...
[ [ "torch.optim.lr_scheduler.MultiStepLR", "torch.set_default_dtype", "torch.utils.data.DataLoader", "torch.nn.Embedding", "torch.set_num_threads", "torch.cuda.is_available" ] ]
ChenlingJ/MCycle
[ "1fb72be3f889bd5f30c5dbd927f31b3bca2f1c38" ]
[ "mcycle/defaults.py" ]
[ "from .logger import log\r\nfrom .constants import *\r\nimport CoolProp as CP\r\n\r\nTOLATTR = 'h'\r\nTOLABS = 1e-7\r\nTOLREL = 1e-7\r\nDIV_T = 5.\r\nDIV_X = 0.1\r\nMAXITER_CYCLE = 50\r\nMAXITER_COMPONENT = 50\r\nMAX_WALLS = 200\r\nTRY_BUILD_PHASE_ENVELOPE = True\r\nGRAVITY = 9.80665\r\nDP_PORT_IN_FACTOR = 1.0\r\nD...
[ [ "matplotlib.get_backend", "matplotlib.use" ] ]
Advitya-sharma/lidtk
[ "8122f3ddf801bbb1f254d69fd5d9f815fcdbb28e" ]
[ "lidtk/features.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"Feature Extraction module.\"\"\"\n\n# core modules\nimport pickle\n\n# 3rd party modules\nfrom sklearn.feature_extraction.text import TfidfVectorizer\n\n\ndef extract(cfg, text):\n \"\"\"\n Extract features.\n\n Parameters\n ----------\n cfg : dict\n\n Returns\n ...
[ [ "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
hukefei/chongqing_contest
[ "c38ae3e6f25230282c65cdd568de93f28e88c6d6" ]
[ "tools_2/preprocess/augument/test.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\n@author: sunchongjing\n@license: (C) Copyright 2019, Union Big Data Co. Ltd. All rights reserved.\n@contact: sunchongjing@unionbigdata.com\n@software: \n@file: test.py\n@time: 2019/9/9 18:20\n@desc:\n\"\"\"\n\nimport numpy as np\nimport cv2\nimport random\nfrom pre...
[ [ "numpy.array" ] ]
adriangutierrezg/combinato
[ "ee6fe8fcc5748da758add38ee842ce942151a4bb" ]
[ "combinato/guisort/sorter.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\nthis file contains the code for the spike sorting GUI\n\"\"\"\nfrom __future__ import print_function, division, absolute_import\nimport sys\nimport os\nfrom getpass import getuser\nfrom time import strftime\nimport time\n\nfrom PyQt5.QtCore import Qt\nfrom PyQt5.QtWidgets import (QM...
[ [ "numpy.hstack", "pandas.read_hdf", "numpy.array", "numpy.diff" ] ]
askoki/nfl_dpi_prediction
[ "dc3256f24ddc0b6725eace2081d1fb1a7e5ce805" ]
[ "src/visualization/accumulate_grid_search_report.py" ]
[ "import os\nimport pandas as pd\nfrom settings import Models, FIGURES_DIR, STATISTICS_FILENAME\nfrom src.features.helpers.data_load import get_n_cmd_arg\n\nfolder_result_name = get_n_cmd_arg('Enter results folder!', 1)\nmodels_list = Models.get_models_list()\n\ncumulative_results = pd.DataFrame()\n# Disable pandas ...
[ [ "pandas.DataFrame" ] ]
christineton/D3
[ "c2c3ecff3d735628e790839fd2d0ae4dadb7b4f8" ]
[ "03-Ins_Fullstack_Flask_Plotly/demo/app.py" ]
[ "import pandas as pd\n\nfrom flask import (\n Flask,\n render_template,\n jsonify)\n\nfrom flask_sqlalchemy import SQLAlchemy\n\napp = Flask(__name__)\n\n# The database URI\napp.config['SQLALCHEMY_DATABASE_URI'] = \"sqlite:///db/emoji.sqlite\"\n\ndb = SQLAlchemy(app)\n\n\n# Create our database model\nclass...
[ [ "pandas.read_sql_query", "pandas.DataFrame" ] ]
stan-holaysan/Thesis-MaskRCNN
[ "ecc4de12473545bdfb744f01224a6df6266ef605" ]
[ "train2.py" ]
[ "\"\"\"\nMask R-CNN\nTrain on the toy bottle dataset and implement color splash effect.\nCopyright (c) 2018 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n------------------------------------------------------------\nUsage: import the module (see Jupyter noteb...
[ [ "tensorflow.test.gpu_device_name", "tensorflow.config.list_physical_devices", "numpy.array", "numpy.where", "numpy.sum" ] ]
zwc662/On_Manifold_Counterexample
[ "0cd2de85083d60d73542dc59f33cbce53798cbf8" ]
[ "RealNVP/script/learn_by_data.py" ]
[ "__author__ = \"Xinqiang Ding <xqding@umich.edu>\"\n__date__ = \"2019/11/03 21:50:25\"\n\nimport numpy as np\nimport torch\ntorch.set_default_dtype(torch.float64)\nimport torch.optim as optim\nimport pickle\nimport math\nfrom sys import exit\nimport matplotlib.pyplot as plt\nfrom sklearn import datasets\nfrom RealN...
[ [ "torch.normal", "matplotlib.pyplot.title", "torch.Tensor", "torch.set_default_dtype", "sklearn.datasets.make_moons", "torch.sum", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", ...
oldbridge/covid_euskadi
[ "1a8a67711333c6c9d428f8f146999a34acd25a5c" ]
[ "plot_news.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jan 30 15:36:48 2021\n\n@author: Xabi\n\"\"\"\n\nfrom functions import read_from_csv_net, read_populations\nimport matplotlib.pyplot as plt\n\n\nif __name__ == '__main__':\n df = read_from_csv_net()\n \n fig, ax = plt.subplots(5, 1, sharex=True)\n \n s...
[ [ "matplotlib.pyplot.subplots" ] ]
Programmer-Sidharth/FridayChatBot
[ "7bef7561f61333bfa5e048017a89e04100ae1776" ]
[ "FridayChatBot/tasks.py" ]
[ "from .functionalities import *\nimport requests\nimport re\nfrom bs4 import BeautifulSoup\nimport random\nimport numpy as np\n\nclass Tasks:\n # or make your own greetings\n greetings = np.array(['hi', 'hello', \"hey there\", \"how are you\", \"what are you doing\", \"how is it going\"])\n name = np.array(['who...
[ [ "numpy.array" ] ]
mathiasaap/SegCaps-1
[ "fe7fdd226d6c85ddca2e04f795311988a42bf985" ]
[ "load_data_multiclass.py" ]
[ "'''\nCapsules for Object Segmentation (SegCaps)\nOriginal Paper by Rodney LaLonde and Ulas Bagci (https://arxiv.org/abs/1804.04241)\nCode written by: Rodney LaLonde\nIf you use significant portions of this code or the ideas from our paper, please cite it :)\nIf you have any questions, please email me at lalonde@kn...
[ [ "numpy.expand_dims", "matplotlib.use", "numpy.arange", "numpy.squeeze", "sklearn.model_selection.train_test_split", "sklearn.model_selection.KFold", "numpy.save", "numpy.concatenate", "matplotlib.pyplot.ioff", "numpy.random.shuffle", "numpy.any", "numpy.count_nonzer...
daniellebrown/pandas
[ "bd00a1c8e6dc778ffc2b9271b21942e4b793c6d1" ]
[ "pandas/tests/frame/test_constructors.py" ]
[ "from collections import OrderedDict, abc\nfrom datetime import datetime, timedelta\nimport functools\nimport itertools\n\nimport numpy as np\nimport numpy.ma as ma\nimport numpy.ma.mrecords as mrecords\nimport pytest\n\nfrom pandas.compat import is_platform_little_endian\n\nfrom pandas.core.dtypes.common import is...
[ [ "pandas.PeriodIndex", "pandas.Series", "pandas.RangeIndex", "numpy.asarray", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "numpy.dtype", "pandas.util.testing.assert_frame_equal", "numpy.concatenate", "pandas.util.testing.assert_index_equal", "numpy.random.randn"...
lueshen/lingshiqing
[ "9fe930ccf00c9a80a054a9db761443057af791bf" ]
[ "Reports/tex/biTreePriceSimulation.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu May 9 13:46:08 2019\n\n@author: Leheng Chen\n\"\"\"\n\nfrom binomialTreePricer import asianOptionBinomialTree\nimport pandas as pd\nimport numpy as np\nfrom datetime import datetime, timedelta\n\nuly_names = ['Crude Oil WTI', 'Ethanol', 'Gold', 'Silver', 'Natural Ga...
[ [ "numpy.busday_count", "pandas.DataFrame" ] ]
javoweb/cvat
[ "684544d2a06c192e7155f655897e6360b4a3be37" ]
[ "datumaro/datumaro/plugins/datumaro_format/converter.py" ]
[ "\n# Copyright (C) 2019 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\n# pylint: disable=no-self-use\n\nimport json\nimport numpy as np\nimport os\nimport os.path as osp\n\nfrom datumaro.components.converter import Converter\nfrom datumaro.components.extractor import (\n DEFAULT_SUBSET_NAME, Annotation,...
[ [ "numpy.require" ] ]
apeyrard/sjtu-work
[ "ca98fec3c83b81ed9091bdc968cb5ad8a74d1d6a" ]
[ "DIP/exercises/ex10/pca.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\nimport sys\nimport os\nfrom PIL import Image\nimport numpy as np\n\nsize = None\nmatrix_x = None\nfor image in os.listdir('./washington'):\n try:\n print(image)\n with Image.open(os.path.join('./washington',image)) as im:\n imgVector = np...
[ [ "numpy.dot", "numpy.linalg.eig", "numpy.vsplit", "numpy.zeros", "numpy.vstack" ] ]
robfalck/CADRE
[ "f1fb419aade62fe830d56d958f35f1e153f04363" ]
[ "CADRE/sun.py" ]
[ "\"\"\"\nSun discipline for CADRE\n\"\"\"\n\nfrom six.moves import range\nimport numpy as np\nimport scipy.sparse\n\nfrom openmdao.core.explicitcomponent import ExplicitComponent\n\nfrom CADRE.kinematics import computepositionrotd, computepositionrotdjacobian\nfrom CADRE.kinematics import computepositionspherical, ...
[ [ "numpy.dot", "numpy.cos", "numpy.sin", "numpy.cross", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
iggisv9t/dimreducers-crusher
[ "3632ed9f51d26e1732199c11750eefd54cfda45d" ]
[ "dimreducers_crusher/reducers/N_MDS.py" ]
[ "from .AbstractReducer import AbstractReducer\nfrom sklearn.manifold import MDS as skmds\nimport numpy as np\n\n\nclass N_MDS(AbstractReducer):\n def __init__(self, d: int = 2, random_state: int = 0, **kwargs):\n super().__init__(d, random_state)\n self._main = skmds(n_components=d, random_state=ra...
[ [ "sklearn.manifold.MDS" ] ]
mbonyani/uav_data_harvesting
[ "bcb31385fefa42b7c6df7c9d44ad37b3e3ed05c4" ]
[ "src/Map/Shadowing.py" ]
[ "import numpy as np\nimport os\nimport tqdm\nfrom src.Map.Map import load_map\n\n\ndef bresenham(x0, y0, x1, y1, obstacles, shadow_map):\n if obstacles[y0, x0]:\n return\n x_dist = abs(x0 - x1)\n y_dist = -abs(y0 - y1)\n x_step = 1 if x1 > x0 else -1\n y_step = 1 if y1 > y0 else -1\n\n erro...
[ [ "numpy.ndindex", "numpy.load", "numpy.save", "numpy.ones" ] ]
ilijagjorgjiev/SSD_FascadeParsing
[ "a31346a3828f3bda9687a9013a40389dab446cef" ]
[ "ssd_project/utils/transformations.py" ]
[ "import torch\nimport random\nimport torchvision.transforms.functional as FT\nfrom torch.utils.data import Dataset\nfrom PIL import Image\nimport glob\nimport math\nimport numpy as np\nfrom ssd_project.utils.utils import *\nfrom ssd_project.utils.global_variables import *\n\ndevice = DEVICE\n\nclass TrainDataset(Da...
[ [ "torch.LongTensor", "torch.max", "torch.min", "torch.FloatTensor", "torch.stack", "numpy.load" ] ]
theandygross/TCGA
[ "bf36d5d69b92b09da54b4111c633f7e60cb7e210" ]
[ "src/Figures/Survival.py" ]
[ "\"\"\"\nCreated on Apr 7, 2013\n\n@author: agross\n\"\"\"\nfrom Processing.Helpers import get_vec_type, to_quants\nfrom Stats.Survival import get_cox_ph\n\nimport pandas as pd\nimport matplotlib.pylab as plt\nimport pandas.rpy.common as com\nimport rpy2.robjects as robjects \nfrom Stats.Survival import get_surv_fi...
[ [ "matplotlib.pylab.gcf", "pandas.Series", "matplotlib.pylab.subplot2grid", "numpy.nanmin", "matplotlib.pylab.figure", "matplotlib.pylab.subplots" ] ]
zvowell/commandLineBasics_2020
[ "240cb78ac92996d0708d820020230d8e5aa8bce3" ]
[ "workshop-resources/python-script/ClassRosterFormat.py" ]
[ "#Script to reformat a class roster into output format\n#9/26/2019\n\nimport pandas as pd\nimport sys\n\n# declare the function name as 'parser', and establish an argument for parser to take, which is named 'filePath'\ndef parser(filePath):\n # define a variable called 'df' as the value of the contents defined b...
[ [ "pandas.concat", "pandas.read_csv" ] ]
puraminy/OpenPrompt
[ "49f0ed9719bb6285e94c746de4511991c848492c" ]
[ "openprompt/prompts/prompt_generator.py" ]
[ "from abc import abstractmethod\nfrom builtins import ValueError\nfrom typing import List, Optional, Dict\nimport torch\nimport torch.nn.functional as F\nfrom ..utils import logger\nfrom transformers import T5Tokenizer, T5ForConditionalGeneration, BertForMaskedLM, RobertaForMaskedLM\nfrom transformers.tokenization_...
[ [ "torch.cat", "torch.sum", "torch.tensor", "torch.vstack", "torch.unique", "torch.no_grad", "numpy.argsort", "numpy.array", "torch.logsumexp", "torch.argmax" ] ]
pnnl/SOSAT
[ "610f99e0bb80f2f5e7836e7e3b6b816e029838bb" ]
[ "tests/constraints/test_regime_constraint.py" ]
[ "import pytest\nfrom scipy.stats import lognorm\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom SOSAT import StressState\nfrom SOSAT.constraints import FaultingRegimeConstraint\nfrom SOSAT.constraints import SU\n\n# depth in meters\ndepth = 1228.3\n# density in kg/m^3\navg_overburden_density = 2580.0\n...
[ [ "numpy.sqrt", "matplotlib.pyplot.savefig" ] ]
determined-ai/gpt-neox
[ "9d06fa3f97fec0f70df52cd721099082476c9ee5" ]
[ "megatron/model/norms.py" ]
[ "import torch\nfrom .fused_layer_norm import MixedFusedLayerNorm as LayerNorm\n\n# Attempt to import FusedLayerNorm from Apex\ntry:\n from apex.normalization.fused_layer_norm import FusedLayerNorm as ApexLayerNorm\n\n # Try to use FusedLayerNorm from Apex - this will trigger an error.\n _ = ApexLayerNorm(8...
[ [ "torch.norm", "torch.ones", "torch.zeros", "torch.nn.LayerNorm", "torch.split" ] ]
danielrjiang/Ax
[ "43014b28683b3037b5c7307869cb9b75ca31ffb6" ]
[ "ax/models/tests/test_botorch_defaults.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nfrom unittest import mock\n\nimport torch\nfrom ax.models.torch.botorch_defaults import _get_model, get_and_fit_model\nfrom ax.utils.common.testutils import TestCase\nfrom botorch.models import FixedNoiseGP, SingleTa...
[ [ "torch.ones", "torch.zeros" ] ]
bsobhani/bluesky-widgets
[ "ecc1ee02d85858ca4d2976356bc9cb70a5e015d6" ]
[ "bluesky_widgets/models/plot_builders.py" ]
[ "import functools\nimport itertools\n\nimport numpy\n\nfrom .plot_specs import (\n FigureSpec,\n AxesSpec,\n ImageSpec,\n LineSpec,\n)\nfrom .utils import auto_label, call_or_eval, RunManager, run_is_live_and_not_completed\nfrom ..utils.dict_view import DictView\n\n\nclass Lines:\n \"\"\"\n Plot y...
[ [ "numpy.unravel_index", "numpy.ones" ] ]
gefux/OQuPy
[ "764528fb6181ea62f8829a9e0a9e3faa2af71e1f" ]
[ "tests/physics/example_C_test.py" ]
[ "# Copyright 2020 The TEMPO Collaboration\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 l...
[ [ "numpy.testing.assert_almost_equal", "numpy.array" ] ]
timcast725/MVCNN_Pytorch
[ "0ec1d9705540d6d279cf8309cad264f40325997a" ]
[ "models/mvcnn_bottom_col.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\n\n\n__all__ = ['MVCNN_bottom', 'mvcnn_bottom']\n\n\nmodel_urls = {\n 'alexnet': 'https://download.pytorch.org/models/alexnet-owt-4df8aa71.pth',\n}\n\n\nclass MVCNN_bottom(nn.Module):\n\n def __init__(self, num_classes=1000):\n ...
[ [ "torch.max", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url" ] ]