repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
lwang114/InformationQuantizer | [
"45419140708e612495fd324a9e5724306d4d4129"
] | [
"datasets/spoken_word_dataset.py"
] | [
"import torch\nimport torchaudio\nimport torchvision\nfrom torchvision import transforms\nimport nltk\nfrom nltk.stem import WordNetLemmatizer\nfrom collections import defaultdict\n# from allennlp.predictors.predictor import Predictor\n# import allennlp_models.structured_prediction\nimport numpy as np\nimport re\ni... | [
[
"numpy.concatenate",
"torch.cat",
"torch.stack",
"torch.isnan",
"torch.nn.utils.rnn.pad_sequence",
"torch.FloatTensor",
"numpy.loadtxt"
]
] |
betatim/MCL-DSCI-011-programming-in-python | [
"b51f43a6bb1bedf0db028613d48d6566309ec44a"
] | [
"exercises/en/exc_01_28b.py"
] | [
"import pandas as pd\n\n# The data\n\nhockey_players = pd.read_csv('data/canucks.csv')\n\n# Find the total salary of the team \n# Save it in an object called player_cost\n\n____ = hockey_players[[____]].____()\n\n# Display it\n\n____\n"
] | [
[
"pandas.read_csv"
]
] |
jphandrigan/exposedsurface | [
"796c2af01247750e9957173ee9b4938e537af467"
] | [
"main.py"
] | [
"#import libraries\nfrom scipy.interpolate import interp1d\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n#set the tank/compartment volume (in Litres)\nvolume = '12124'\n \nx = np.array([20820, 43910, 5254, 6272, 4343, 2380, 3372, 5678, 1575, 2978, 3675, 4155, 7948, 10510, 3186, 9464, 7949, 3785, 5678, 794... | [
[
"numpy.array",
"scipy.interpolate.interp1d"
]
] |
iosonofabio/semiknn | [
"c7819a7ae850df1264f8d92f7bdc02f85afc21c2"
] | [
"northstar/averages.py"
] | [
"# vim: fdm=indent\n# author: Fabio Zanini\n# date: 17/06/19\n# content: Atlas averages\n__all__ = ['Averages']\n\nimport warnings\nimport numpy as np\nimport pandas as pd\nfrom anndata import AnnData\nimport leidenalg\nfrom .fetch_atlas import AtlasFetcher\nfrom .cluster_with_annotations import Cluste... | [
[
"numpy.argmin",
"numpy.empty",
"pandas.DataFrame",
"numpy.sqrt",
"numpy.log10",
"numpy.array",
"numpy.real",
"sklearn.manifold.TSNE",
"numpy.intersect1d",
"numpy.argsort",
"scipy.spatial.distance.cdist",
"numpy.log2",
"numpy.isnan",
"numpy.cov",
"numpy.s... |
syncpy/SyncPy | [
"70f990971a4b4215549559134812c7469c87c88f"
] | [
"src/Methods/utils/Crqa.py"
] | [
"### This file is a part of the Syncpy library.\n### Copyright 2015, ISIR / Universite Pierre et Marie Curie (UPMC)\n### Main contributor(s): Giovanna Varni, Marie Avril,\n### syncpy@isir.upmc.fr\n### \n### This software is a computer program whose for investigating\n### synchrony in a fast and exhaustive way. \n##... | [
[
"numpy.array",
"numpy.count_nonzero",
"numpy.trace",
"numpy.zeros",
"numpy.log",
"numpy.sum",
"numpy.diagonal",
"numpy.nonzero",
"numpy.any",
"numpy.where",
"numpy.arange"
]
] |
ZeitgeberH/FISH-VIEWER | [
"ce7e2e89d1f1895e8e7596da1d04afb324a0075d"
] | [
"gr_utilities/_paramtreecfg.py"
] | [
"import numpy as np\r\n\r\nfrom pyqtgraph.parametertree.parameterTypes import QtEnumParameter as enum\r\nfrom pyqtgraph.Qt import QtWidgets\r\n\r\ndlg = QtWidgets.QFileDialog\r\n\r\ncfg = {\r\n 'list': {\r\n 'limits': {\r\n 'type': 'checklist',\r\n 'limits': ['a', 'b', 'c']\r\n ... | [
[
"numpy.linspace",
"numpy.arange"
]
] |
zhangbo2008/GAT_network | [
"c871a2aceceaa5d638c96c21d23d64ed07c07b4c"
] | [
"layers.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# 这个是做cities 问题的\nclass GraphAttentionLayer(nn.Module):\n \"\"\"\n Simple GAT layer, similar to https://arxiv.org/abs/1710.10903\n \"\"\"\n\n def __init__(self, in_features, out_features, dropout, alpha, concat=... | [
[
"torch.zeros",
"torch.Size",
"torch.nn.Dropout",
"torch.cat",
"torch.isnan",
"torch.nn.LeakyReLU",
"torch.nn.functional.dropout",
"torch.nn.init.xavier_uniform_",
"torch.nn.functional.elu",
"torch.mm",
"torch.ones",
"torch.sparse_coo_tensor",
"torch.nn.functiona... |
hainan-xv/kaldi | [
"053a9f515fc6712d5da84ca35ab0802a1fd89588"
] | [
"egs/wsj/s5/steps/tfrnnlm/train_lstm_fast.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n# Copyright (C) 2017 Intellisist, Inc. (Author: Hainan Xu)\n# 2018 Dongji Gao\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 ... | [
[
"tensorflow.exp",
"tensorflow.contrib.rnn.BasicLSTMCell",
"tensorflow.matmul",
"numpy.exp",
"tensorflow.reshape",
"tensorflow.gradients",
"tensorflow.stack",
"tensorflow.nn.embedding_lookup",
"tensorflow.gather",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.... |
watsonjj/ThesisAnalysis | [
"5bfae5700dd953fe5f44c56a0cf0a34241dd4c17",
"5bfae5700dd953fe5f44c56a0cf0a34241dd4c17"
] | [
"ThesisAnalysis/scripts/reduction/spe_spectrum.py",
"ThesisAnalysis/scripts/reduction/mc_illumination_profile.py"
] | [
"from ThesisAnalysis import get_data, ThesisHDF5Writer\nfrom ThesisAnalysis.files import spe_files\nimport numpy as np\nimport pandas as pd\nfrom CHECLabPy.core.io import DL1Reader\nfrom CHECLabPy.spectrum_fitters.gentile import GentileFitter\nimport warnings\nfrom pandas.errors import PerformanceWarning\n\n\ndef p... | [
[
"pandas.DataFrame",
"numpy.linspace"
],
[
"numpy.arange",
"numpy.sqrt"
]
] |
gabrielmahia/obamAI | [
"ba45f0a6efae793d7f5e356a1dbf5c6835a65dba"
] | [
"chapter13-mi-unsupervised/iic-13.5.1.py"
] | [
"\"\"\"Build, train and evaluate an IIC Model\n\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\nfrom tensorflow.keras.layers import Input, Dense, Flatten\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.optimizers import... | [
[
"tensorflow.keras.backend.expand_dims",
"tensorflow.keras.backend.repeat_elements",
"tensorflow.keras.backend.sum",
"numpy.reshape",
"tensorflow.keras.layers.Input",
"numpy.zeros",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.backend.transpose",
"tensorflow.keras.models... |
yinghai/pytext | [
"5457c157d7a5f39bb96e2f207560cc52d9b98c83"
] | [
"pytext/models/seq_models/light_conv.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom typing import Dict, Optional\n\nimport torch.jit\nimport torch.nn as nn\nfrom pytext.config import ConfigBase\nfrom torch import Tensor\n\nfrom .base import PyTextIncrementalDecoderComponent\nfrom .utils import unf... | [
[
"torch.nn.init.xavier_uniform_",
"torch.nn.init.constant_"
]
] |
Peiiii/wpcv | [
"56ed5327b921c52cd666c76bc204ac9ee5e5d150",
"56ed5327b921c52cd666c76bc204ac9ee5e5d150"
] | [
"wpcv/plp/data/quadnet.py",
"wpcv/models/resnet/val.py"
] | [
"# coding: utf-8\nfrom __future__ import division\n\nimport sys\nimport os\nimport config as cfg\n\nsys.path.append(os.path.abspath('..'))\nimport cv2\nimport random, os, glob, json\nfrom utils.centernet_utils import draw_points_heatmap\nfrom torch.utils.data import dataset\nimport numpy as np\n\ntry:\n import x... | [
[
"numpy.array",
"numpy.transpose",
"numpy.expand_dims"
],
[
"torch.cuda.is_available",
"torch.tensor",
"torch.argmax",
"torch.load"
]
] |
marypilataki/mirdata | [
"78981e1f1e7b8661e2d04de0dd5640981bbb1881"
] | [
"tests/test_ikala.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nfrom mirdata import ikala, utils\nfrom tests.test_utils import run_track_tests\n\n\ndef test_track():\n default_trackid = '10161_chorus'\n data_home = 'tests/resources/mir_datasets/iKala'\n track = ikala.Track(default_trackid, data_home=data_home)\n\n ex... | [
[
"numpy.array",
"numpy.array_equal",
"numpy.abs"
]
] |
RWTH-EBC/pyCity | [
"88c832aa647ceb8889abd8f851b7349c3366e30a",
"88c832aa647ceb8889abd8f851b7349c3366e30a"
] | [
"pycity_base/classes/demand/zone_parameters.py",
"pycity_base/functions/slp_thermal.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Mar 24 21:22:29 2015\n\n@author: tsz\n\nInputs:\nA_f (section 6.4) - used area in m^2\n\"\"\"\n\nfrom __future__ import division\n\nimport numpy as np\nimport math\n\n\nclass ZoneParameters(object):\n \"\"\"\n This class holds all relevan... | [
[
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.power",
"numpy.maximum"
],
[
"numpy.array",
"numpy.dot",
"numpy.reshape",
"numpy.zeros",
"numpy.sum",
"numpy.loadtxt",
"numpy.append",
"numpy.average"
]
] |
chocjy/randomized-LS-solvers | [
"4c1c9211ee56a7344baebc6d36e33d72ccb620b9"
] | [
"src/lsqr_spark.py"
] | [
"from math import sqrt, log\n\nimport numpy as np\nfrom numpy.linalg import norm, lstsq\n\nimport time\nimport logging\nlogger = logging.getLogger(__name__)\n\ndef lsqr_spark( matrix_Ab, m, n, N, tol=1e-14, iter_lim=None):\n \"\"\"\n A simple version of LSQR on Spark\n \"\"\"\n\n x_iter = []\n time_i... | [
[
"numpy.linalg.norm",
"numpy.dot",
"numpy.zeros",
"numpy.min",
"numpy.finfo",
"numpy.abs"
]
] |
webclinic017/advisor_app | [
"9cdab4aca19e193850943ef8308bad5c5ea0415d",
"9cdab4aca19e193850943ef8308bad5c5ea0415d",
"9cdab4aca19e193850943ef8308bad5c5ea0415d"
] | [
"src/models/forecast/web_sarima.py",
"src/models/forecast/web_arima.py",
"src/models/strategy/web_support_resistance.py"
] | [
"import warnings\nfrom datetime import datetime, date\nimport pandas as pd\nimport numpy as np\nfrom matplotlib.font_manager import FontProperties\nimport matplotlib.pyplot as plt\nimport itertools\nimport streamlit as st\nimport yfinance as yf\nfrom statsmodels.tsa.stattools import adfuller\nfrom statsmodels.tsa.s... | [
[
"pandas.to_datetime",
"numpy.log",
"pandas.DataFrame",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.style.use",
"pandas.plotting.register_matplotlib_converters"
],... |
disalechinmay/Face-Recognition | [
"ba7aad77ae595a33f1ee2e8ac1372ed11142cd97"
] | [
"recognize.py"
] | [
"import cv2\nfrom imutils import face_utils\nimport numpy as np\nimport argparse\nimport imutils\nimport dlib\nimport math\nfrom PIL import Image\nfrom subprocess import call\nimport os\nimport threading\nimport time\nimport tensorflow as tf\nfrom tensorflow import keras\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL... | [
[
"tensorflow.keras.models.load_model",
"numpy.array"
]
] |
hyperconnect/LADE | [
"cfe96b7ca6520f3410d4cae9cc10919e6114bbb9"
] | [
"models/CausalNormClassifier.py"
] | [
"import torch\nimport torch.nn as nn\nfrom utils import *\nfrom os import path\nimport math\n\nclass Causal_Norm_Classifier(nn.Module):\n\n def __init__(self, num_classes=1000, feat_dim=2048, use_effect=True, num_head=2, tau=16.0, alpha=3.0, gamma=0.03125, *args):\n super(Causal_Norm_Classifier, self).__i... | [
[
"torch.cat",
"torch.norm",
"torch.split",
"torch.from_numpy",
"torch.Tensor"
]
] |
vincentme/PyMIC | [
"5cbbca7d0a19232be647086d4686ceea523f45ee",
"5cbbca7d0a19232be647086d4686ceea523f45ee"
] | [
"pymic/net/net2d/cople_net.py",
"pymic/layer/convolution.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nAuthor: Guotai Wang\nDate: 12 June, 2020\nImplementation of of COPLENet for COVID-19 pneumonia lesion segmentation from CT images.\nReference: \n G. Wang et al. A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions \n from CT Images. IEEE Transac... | [
[
"torch.cat",
"torch.nn.Dropout",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.LeakyReLU",
"torch.nn.ConvTranspose2d",
"torch.transpose",
"torch.nn.ReLU",
"torch.nn.Upsample",
"torch.nn.Conv2d",
"torch.nn.AdaptiveAvgPool2d",
"torc... |
kaaiian/KingCrabNet | [
"05ffbcc48cd692223c475ebd8ca758e01ded6521",
"05ffbcc48cd692223c475ebd8ca758e01ded6521"
] | [
"models/crabnet.py",
"plot_crabnet_densenet_classics.py"
] | [
"import numpy as np\n\nimport torch\nfrom torch import nn\n\n\n# %%\nclass AttentionBlock(nn.Module):\n \"\"\"\n This implements the multi-headed attention block\n of the CrabNet architecture.\n Parameters\n ----------\n d_model: int\n the number of expected features in the input (required,... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.LayerNorm",
"torch.cat",
"torch.nn.Identity",
"torch.nn.Softmax",
"torch.nn.LeakyReLU",
"torch.nn.ReLU",
"torch.nn.PReLU",
"numpy.sqrt",
"torch.as_tensor",
"torch.transpose",
"torch.matmul",
"torch.sum"
],
... |
tuttugu-ryo/lecture-source-py | [
"9ce84044c2cc421775ea63a004556d7ae3b4e504"
] | [
"source/_static/code/aiyagari/aiyagari_household.py"
] | [
"import numpy as np\nfrom numba import jit\n\nclass Household:\n \"\"\"\n This class takes the parameters that define a household asset accumulation\n problem and computes the corresponding reward and transition matrices R\n and Q required to generate an instance of DiscreteDP, and thereby solve\n fo... | [
[
"numpy.empty",
"numpy.asarray",
"numpy.log",
"numpy.zeros",
"numpy.linspace"
]
] |
mshodge/FaultScarpAlgorithm | [
"25ddc9b063705ceb941c1bbe00ffe2ac1bb107cb"
] | [
"#4_Misfit_Analysis.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Aug 21 14:02:54 2017 - v1.0 Finalised Fri Apr 13\n\n@author: michaelhodge\n\"\"\"\n\n#A script to perform a misfit analysis between manual and algorithm methods\n#to identify the best performing parameter space\n\n#Loads packages required\nimp... | [
[
"matplotlib.pyplot.colorbar",
"numpy.isnan",
"numpy.int",
"matplotlib.pyplot.contourf",
"numpy.zeros",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"matp... |
vincent7293/automl | [
"34279e956ec30877beaec0fc73acd5071ad0a8fd"
] | [
"efficientdet/inference.py"
] | [
"# Copyright 2020 Google Research. 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... | [
[
"tensorflow.compat.v1.transpose",
"tensorflow.compat.v1.saved_model.load",
"tensorflow.compat.v1.RunMetadata",
"tensorflow.compat.v1.placeholder",
"tensorflow.python.client.timeline.Timeline",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.compat.v1.stack",
"tenso... |
MaratSaidov/artificial-text-detection | [
"74b2100294232ec361db84fdc3a24fdeba1fce49"
] | [
"artificial_detection/utils.py"
] | [
"import os\nimport pickle\nimport random\nimport zlib\nfrom os import path\nfrom typing import List, Optional\n\nimport pandas as pd\nimport torch\nfrom transformers import DistilBertTokenizerFast\n\nimport wandb\nfrom artificial_detection.data.data import BinaryDataset, TextDetectionDataset\n\n\nclass MockDataset:... | [
[
"torch.manual_seed",
"pandas.DataFrame",
"torch.cuda.manual_seed_all"
]
] |
snad-space/ztf-viewer | [
"a0152d415beb11095134d0e407956ea088db1684"
] | [
"ztf_viewer/figures.py"
] | [
"from datetime import datetime\nfrom io import BytesIO, StringIO\n\nimport matplotlib\nimport matplotlib.backends.backend_pgf\nimport matplotlib.figure\nimport numpy as np\nimport pandas as pd\nfrom astropy.time import Time\nfrom flask import Response, request, send_file\nfrom immutabledict import immutabledict\nfr... | [
[
"numpy.array",
"pandas.DataFrame.from_records",
"matplotlib.backends.backend_pgf.FigureCanvasPgf",
"matplotlib.ticker.AutoMinorLocator",
"matplotlib.figure.Figure"
]
] |
somaliz/artificio | [
"37dda063e316503d53ac45f3b104a5cf1aaa4d78"
] | [
"similar_images_AE/src/clustering/KNN.py"
] | [
"'''\n KNN.py (author: Anson Wong / github: ankonzoid)\n \n General kNN model class object using sklearn library. \n'''\nfrom sklearn.neighbors import NearestNeighbors\n\nclass KNearestNeighbours(object):\n\n def __init__(self):\n # Parameters from training/test data set\n self.n_train = None # nu... | [
[
"sklearn.neighbors.NearestNeighbors"
]
] |
miranmanesh/ConditionalDETR | [
"c7d24c221125daa6322adc9915af77701240f063"
] | [
"models/position_encoding.py"
] | [
"# ------------------------------------------------------------------------\n# Conditional DETR\n# Copyright (c) 2021 Microsoft. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 [see LICENSE for details]\n# ------------------------------------------------------------------------\n# Copied from... | [
[
"torch.nn.init.uniform_",
"torch.cat",
"torch.nn.Embedding",
"torch.arange"
]
] |
Shom770/data-science-projects | [
"a85ef8c73fbee66ac060414716e2b0440772f07f",
"a85ef8c73fbee66ac060414716e2b0440772f07f"
] | [
"experimenting/temp_contour.py",
"surface_analysis/surface_analysis.py"
] | [
"import logging\n\nimport cartopy.crs as ccrs\nimport cartopy.feature as cfeature\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom netCDF4 import Dataset\n\nlogging.basicConfig()\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\n\ndata_nam = Dataset(\n (\n f\"http://nomads.... | [
[
"numpy.array",
"matplotlib.pyplot.figure",
"numpy.greater_equal",
"numpy.less_equal",
"matplotlib.pyplot.show",
"numpy.meshgrid"
],
[
"numpy.array",
"matplotlib.pyplot.figure",
"numpy.greater_equal",
"numpy.less_equal",
"matplotlib.pyplot.show",
"numpy.meshgrid"... |
lyg1597/CyPhyHouseExperiments | [
"b72bfc1a2beb379a1c3e429bb979815a82242707"
] | [
"experiments_koord/app_krd_py/dist_delivery_w_markers.krd.py"
] | [
"import numpy as np\n\nimport rospy\nfrom cym_gazebo import marker_builder\nfrom cym_marker.msg import Marker\n\nfrom src.config.configs import AgentConfig, MoatConfig\nfrom src.harness.agentThread import AgentThread\nfrom src.motion.deconflict import clear_path\nfrom src.motion.rectobs import RectObs\nfrom src.mot... | [
[
"numpy.array"
]
] |
banr1jnts/Earthquake_Prediction | [
"13757e3498ef26e8db261fa04c0437f0f1d2e884"
] | [
"inference.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport pandas as pd\nimport os\nimport glob\nimport datetime\nimport random\nimport keras.optimizers\nimport keras.backend as K\nfrom keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, CSVLogger\n\nfrom params import args\nimport models, naives, losses\n\nif __n... | [
[
"tensorflow.set_random_seed",
"pandas.to_datetime",
"pandas.read_table",
"pandas.merge",
"tensorflow.get_default_graph",
"numpy.random.seed",
"pandas.DataFrame",
"pandas.date_range",
"numpy.mean",
"tensorflow.ConfigProto",
"pandas.concat",
"numpy.hstack",
"panda... |
X-rayLaser/multi-directional-mdrnn | [
"70b0e1c2e07b5f476c264c6700e8d34d41a2ce10"
] | [
"tests/unit/multi_dimensional_RNN/_test_mdgru_on_2d_grid.py"
] | [
"from .test_mdrnn_on_2d_grid import Degenerate2DInputToMDRNNTests, \\\n OutputShapeGiven2DTests, OutputShapeGiven6DInputTests\nimport tensorflow as tf\nfrom mdrnn import MDGRU\n\n\nclass Degenerate2DInputToMDGRUTests(Degenerate2DInputToMDRNNTests):\n def create_mdrnn(self, **kwargs):\n return MDGRU(**k... | [
[
"tensorflow.keras.layers.GRU"
]
] |
biboamy/instrument-disentangle | [
"bdf6e7d36ce36e6abe0249712cc9b853e77e7a36"
] | [
"v3/disentangled training/lib.py"
] | [
"import librosa, torch\n#from pypianoroll import Multitrack, Track\nimport numpy as np\nimport torch.nn.init as init\nfrom torch.utils.data import Dataset\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nfrom random import randint\n\ndef griffin_lim(mag_spec, n_fft, hop,... | [
[
"torch.zeros",
"numpy.angle",
"torch.nn.init.constant_",
"numpy.random.randn",
"numpy.exp",
"torch.from_numpy",
"torch.squeeze",
"torch.nn.functional.max_pool1d",
"torch.nn.BCEWithLogitsLoss",
"numpy.sqrt",
"numpy.issubdtype",
"torch.nn.functional.max_pool2d"
]
] |
czyczyyzc/WeiboSpider | [
"41b9c97cb01d41cb4a62efdd452451b5ef25bdbc"
] | [
"utils/lda.py"
] | [
"# -*- coding:utf-8 -*-\nimport os\nimport csv\nimport random\nimport numpy as np\nfrom collections import OrderedDict\n\n\nclass Document(object):\n def __init__(self):\n self.words = []\n self.length = 0\n\n\nclass StatisticalData(object):\n def __init__(self):\n self.docs_count = 0\n ... | [
[
"numpy.random.multinomial",
"numpy.sum",
"numpy.zeros"
]
] |
TimotheeMathieu/rlberry | [
"a351ead4209d3f95c1327e8140a83d6bc0214d40"
] | [
"examples/demo_bandits/plot_compare_index_bandits.py"
] | [
"\"\"\"\n=============================================================\nComparison subplots of various index based bandits algorithms\n=============================================================\n\nThis script Compare several bandits agents and as a sub-product also shows\nhow to use subplots in with `plot_writer... | [
[
"numpy.max",
"numpy.array",
"matplotlib.pyplot.subplots",
"numpy.cumsum",
"matplotlib.pyplot.show"
]
] |
blazejdolicki/vissl | [
"9c10748a19fb1c637f32687142c8cd685f2410ff"
] | [
"tests/test_losses.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nimport unittest\nfrom collections import namedtuple\n\nimport torch\nimport torch.nn as nn\nfrom classy_vision.generi... | [
[
"torch.nn.Softmax",
"torch.nn.CrossEntropyLoss",
"torch.no_grad",
"torch.ones",
"torch.random.manual_seed",
"torch.randint",
"torch.tensor",
"torch.allclose",
"torch.randn"
]
] |
mohamedelkansouli/Ensae_py | [
"8bc867bd2081c259c793fadfa8be5dcc7bd1400b",
"8bc867bd2081c259c793fadfa8be5dcc7bd1400b"
] | [
"_unittests/ut_special/test_rue_paris.py",
"src/ensae_teaching_cs/data/datacpt.py"
] | [
"\"\"\"\n@brief test log(time=25s)\n\"\"\"\nimport os\nimport sys\nimport unittest\nfrom pyquickhelper.loghelper import fLOG\nfrom pyquickhelper.pycode import fix_tkinter_issues_virtualenv\nfrom pyensae.datasource import download_data\n\ntry:\n import src\nexcept ImportError:\n path = os.path.normpath(\n... | [
[
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
],
[
"pandas.read_csv"
]
] |
gingergenius/patent-embedding-visualization | [
"6c7d34dd5de097fbaafac9f6e837fcbc233563b5"
] | [
"src/fiz_lernmodule/word2vec.py"
] | [
"\"\"\"\nUsed for patent landscaping use-case.\n\"\"\"\n\nimport os\nimport pandas as pd\nimport tensorflow as tf\nfrom sklearn.manifold import TSNE\nimport matplotlib.pyplot as plt\nfrom scipy.spatial import distance\nimport seaborn as sns; sns.set()\n\n\nclass Word2Vec(object):\n \"\"\" Word2Vec embedding. \"\... | [
[
"tensorflow.train.latest_checkpoint",
"pandas.DataFrame",
"tensorflow.Graph",
"tensorflow.Session",
"tensorflow.train.Saver",
"sklearn.manifold.TSNE",
"matplotlib.pyplot.subplots",
"tensorflow.random_uniform",
"scipy.spatial.distance.cosine",
"tensorflow.div",
"pandas.r... |
ignazioa/mobile-gaitlab | [
"34681ce956ad885c388f8b811bf1eb236b1f20b7"
] | [
"demo/demo.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Demonstration of Video Gait Analysis\n# \n# In this notebook we present how to run OpenPose processing on a video and how apply neural networks from the paper to data processed by OpenPose. As a result, for a given mp4 file we will get predictions from all models.\n# \... | [
[
"numpy.isnan",
"numpy.zeros",
"pandas.DataFrame",
"numpy.ones",
"numpy.mean",
"numpy.stack"
]
] |
jaatadia/tic-toc-sic | [
"ee93e23bbe40c9ad5d981604d01076386a6b9b59"
] | [
"graphs/n.py"
] | [
"import csv\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.stats import mode\n\n# -----------------------------------\n# \t\t\t\tDATA\n# -----------------------------------\n\nn = [1.151309, 1.706339, 0.392103, 0.279633, 0.428113, 0.124932, 1.550828, 4.597046, 2.037313, 1.119261, 0.797872, 0.51172... | [
[
"scipy.stats.mode",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"numpy.mean",
"matplotlib.pyplot.figure",
"numpy.std",
"matplotlib.pyplot.ylabel"
]
] |
q759729997/qytPytorch | [
"b9b4b6aeff67596c493871c0842dc72c5b66c548",
"b9b4b6aeff67596c493871c0842dc72c5b66c548",
"b9b4b6aeff67596c493871c0842dc72c5b66c548"
] | [
"test/utils/test_cnn.py",
"qytPytorch/utils/matplotlib_utils.py",
"test/models/cv/image_classify/test_nin.py"
] | [
"\"\"\"\r\n main_module - CNN工具类,测试时将对应方法的@unittest.skip注释掉.\r\n\r\n Main members:\r\n\r\n # __main__ - 程序入口.\r\n\"\"\"\r\nimport sys\r\nimport unittest\r\n\r\nimport torch\r\nfrom torch import nn\r\n\r\nsys.path.insert(0, './') # 定义搜索路径的优先顺序,序号从0开始,表示最大优先级\r\n\r\nimport qytPytorch # noqa\r\nprint('q... | [
[
"torch.nn.MaxPool2d",
"torch.nn.Conv2d",
"torch.ones"
],
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow"
],
[
"torch... |
xopherw/algotrader | [
"6daafe165d7eb4d5d34b2a7051e102f15bcb71dd"
] | [
"caller.py"
] | [
"import requests, datetime as dt, numpy as np, pandas as pd, pytz\nfrom dateutil.relativedelta import relativedelta\n\n\n# Call for raw data (NASDAQ)\ndef nsdq_data(ticker):\n try:\n today = dt.datetime.now(pytz.timezone('US/Eastern')).date()\n past = today - relativedelta(years= 5)\n price ... | [
[
"pandas.DataFrame",
"numpy.gradient"
]
] |
LeoWood/bert | [
"bb916e2038e9c8360463e60678d999606f58ad0d"
] | [
"test_merge.py"
] | [
"#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n# Author: LiuHuan\n# Datetime: 2019/6/21 10:45\nfrom sklearn import metrics\nimport os\nimport pandas as pd\nimport tensorflow as tf\n\nflags = tf.flags\n\nFLAGS = flags.FLAGS\n\n## Required parameters\nflags.DEFINE_string(\n \"output_dir\", None,\n \"output resu... | [
[
"sklearn.metrics.classification_report",
"sklearn.metrics.confusion_matrix"
]
] |
maartenbuyl/memory-enhanced-maze-exploration | [
"e897b14ac3678a6d9a80d1366eaec9ebaa13255e"
] | [
"result_analysis/exp5/results_to_table.py"
] | [
"import numpy as np\nimport os\n\nresults_files = [\n \"post_results_lin.txt\",\n \"post_results_lstm.txt\",\n \"post_results_gruc.txt\"\n]\n\n\n# Output: (training set results, test set results)\ndef file_into_tuple(file_name):\n prefix = os.path.dirname(__file__) + \"/\"\n\n file = open(prefix + fi... | [
[
"numpy.array",
"numpy.format_float_positional"
]
] |
wx-b/dm_robotics | [
"647bc810788c74972c1684a8d2e4d2dfd2791485",
"5d407622360ccf7f0b4b50bcee84589e2cfd0783",
"5d407622360ccf7f0b4b50bcee84589e2cfd0783"
] | [
"py/moma/sensors/site_sensor_test.py",
"py/moma/subtask_env.py",
"py/vision/ros_utils.py"
] | [
"# Copyright 2020 DeepMind Technologies Limited.\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 appli... | [
[
"numpy.hstack",
"numpy.array",
"numpy.linalg.norm"
],
[
"numpy.random.random"
],
[
"numpy.array"
]
] |
RyanShahidi/easyml | [
"664076b4aba733751905ed351e5a320f20f1e520"
] | [
"Python/examples/example.py"
] | [
"from easymlpy import glmnet\nfrom glmnet import ElasticNet\nimport numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import StandardScaler\n\n\n# Load data\nprostate = pd.read_table('./Python/examples/prostate.txt')\n\n# Generate coefficients from data using easy_glmnet\noutput = glmnet.easy_glmnet(pros... | [
[
"numpy.all",
"pandas.read_table",
"numpy.asarray",
"sklearn.preprocessing.StandardScaler"
]
] |
rdaelanroosa/ME333_Final_Project | [
"ba11f7b522b527d7a4ef340e47c81dedd1d41af6"
] | [
"client.py"
] | [
"\n\nimport serial\nimport matplotlib.pyplot as plt \nfrom genref import genRef\n\nPORT = '/dev/ttyUSB'\n\nMOTOR_SERVO_RATE = 200.0\nPIC_MAX_STORE = 2000\n\n\nmenu = '''\n\nMENU:\n\n a: Read current (ticks)\n b: Read current (mA)\n c: Read encoder (ticks)\n d: Read encoder (deg)\n e: Reset encoder\n ... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
yngvem/zebrafish-bloodflow | [
"632186ed94c160795b3306d4d7360d88e369054a"
] | [
"src/confocal_microscopy/plotting/gui.py"
] | [
"import numexpr as ne\nimport numpy as np\nfrom PyQt5 import QtWidgets\nfrom PyQt5.QtCore import Qt\n\nfrom .gui_components import FloatSlider, IntSlider, SliceViewer, SurfaceViewer\n\n\nclass ImageViewer(QtWidgets.QWidget):\n def __init__(self, image, voxel_size=(1, 1, 1), parent=None, flags=Qt.WindowFlags()):\... | [
[
"numpy.asfortranarray",
"numpy.mean"
]
] |
mcnanna/ugali | [
"dcf53594658a2b577f4da271783b43ed0a79fec9"
] | [
"tests/test_parser.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nGeneric python script.\n\"\"\"\n__author__ = \"Alex Drlica-Wagner\"\nimport os\nimport ugali.utils.parser\nimport numpy as np\n\ndef test_targets():\n test_data = \\\n\"\"\"#name lon lat radius coord \nobject_1 354.36 -63.26 1.0 CEL\nobject_2 19.45 -17.46 1.0 CEL\n#object_3 ... | [
[
"numpy.testing.assert_array_almost_equal"
]
] |
Thibaud-Ardoin/d4rl | [
"631cdcbf93441384dcf96df39a70c287749ab2ad"
] | [
"scripts/brac/flow_evaluation_vis.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Google Research 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.logical_not",
"numpy.array",
"numpy.random.RandomState",
"tensorflow.compat.v1.convert_to_tensor",
"numpy.arange",
"numpy.squeeze"
]
] |
yongxinw/mot_neural_solver | [
"5dec429be531a56ce5720416cd6a2f00447a2950",
"5dec429be531a56ce5720416cd6a2f00447a2950"
] | [
"src/mot_neural_solver/tracker/mpn_tracker.py",
"src/mot_neural_solver/utils/iou.py"
] | [
"import numpy as np\nimport pandas as pd\n\nimport torch\n\nfrom mot_neural_solver.data.mot_graph import Graph\n\nfrom mot_neural_solver.tracker.projectors import GreedyProjector, ExactProjector\nfrom mot_neural_solver.tracker.postprocessing import Postprocessor\n\nfrom mot_neural_solver.utils.graph import get_knn_... | [
[
"torch.zeros",
"torch.device",
"numpy.array",
"numpy.concatenate",
"numpy.empty",
"numpy.isnan",
"torch.arange",
"scipy.sparse.csgraph.connected_components",
"torch.isnan",
"numpy.triu_indices_from",
"torch.no_grad",
"torch.from_numpy",
"numpy.tril_indices_from"... |
ryoma-jp/samples | [
"85c0be62f9de1194121d225adee12c9810229960",
"85c0be62f9de1194121d225adee12c9810229960"
] | [
"python/tensorflow_sample/Ver2.x/06_optimizer/trainer/trainer.py",
"python/tabnet_sample/pytorch/tabnet/tabnet.py"
] | [
"#! -*- coding: utf-8 -*-\n\n#---------------------------------\n# モジュールのインポート\n#---------------------------------\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras.preprocessing.image import ImageData... | [
[
"tensorflow.keras.optimizers.SGD",
"tensorflow.keras.layers.Add",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.models.Model",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.applications.resnet50.ResNet50",
"tensorflow.ker... |
pervrosen/google-research | [
"45eca1118642cc1257824856ac6e1ab0aa7bf299"
] | [
"graph_compression/compression_lib/compression_op.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Google Research 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... | [
[
"tensorflow.compat.v1.assign",
"tensorflow.compat.v1.transpose",
"tensorflow.compat.v1.train.get_global_step",
"tensorflow.compat.v1.matmul",
"tensorflow.compat.v1.shape",
"tensorflow.compat.v1.less",
"tensorflow.compat.v1.compat.v2.summary.scalar",
"numpy.max",
"tensorflow.com... |
JoostvDoorn/pywren | [
"57f8ac9d988fea60df9510fc80c0e44d037d0e8c"
] | [
"tests/test_simple.py"
] | [
"#\n# Copyright 2018 PyWren Team\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 agre... | [
[
"numpy.concatenate",
"numpy.zeros",
"numpy.sum",
"numpy.testing.assert_array_equal",
"numpy.arange"
]
] |
awesome-archive/tensorlayer | [
"120a79f957926475b6f3db02da71a269f8130771"
] | [
"tensorlayer/layers/normalization.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom .core import *\n\n\nclass LocalResponseNormLayer(Layer):\n \"\"\"The :class:`LocalResponseNormLayer` layer is for Local Response Normalization.\n See ``tf.nn.local_response_normalization`` or ``tf.nn.lrn`` for new TF version.\n The 4-D input tensor is a 3-D array of 1-D vec... | [
[
"tensorflow.python.training.moving_averages.assign_moving_average"
]
] |
IBM/answer-type-prediction | [
"5818237ed9f0f5de6f8b8de8f16ef7efabbf414b"
] | [
"code/data_process.py"
] | [
"import torch\nfrom torch.utils.data import TensorDataset\n\nimport utils\n\n\ndef get_context_representation(\n text,\n tokenizer,\n max_seq_length,\n):\n context_tokens = tokenizer.tokenize(text)\n\n context_ids = tokenizer.convert_tokens_to_ids(context_tokens)\n context_ids = contex... | [
[
"torch.tensor",
"torch.utils.data.TensorDataset"
]
] |
ShinanWu/Paddle | [
"0d276d38b456b7e77cd69903939edb63cc34f73c"
] | [
"python/paddle/fluid/framework.py"
] | [
"# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.dtype"
]
] |
deephyper/nas-gcn | [
"7faa66e9f4ec1f990a5ccdcfe0dd5255d4475b6f"
] | [
"nas_gcn/analysis/analysis_utils.py"
] | [
"import json\nimport pickle\nimport glob\nimport numpy as np\nimport pandas as pd\nfrom tabulate import tabulate\nfrom datetime import datetime\nfrom sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score\nimport matplotlib.pyplot as plt\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sk... | [
[
"matplotlib.pyplot.xlim",
"numpy.copy",
"numpy.multiply",
"pandas.read_csv",
"matplotlib.pyplot.xticks",
"numpy.empty",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.tight_layout",
"numpy.append",
"numpy.vstack",
... |
bdvd/numpy | [
"cea994fac86dbc5af7bee3f15fc5b475a99163fa",
"cea994fac86dbc5af7bee3f15fc5b475a99163fa",
"cea994fac86dbc5af7bee3f15fc5b475a99163fa"
] | [
"numpy/lib/tests/test_function_base.py",
"numpy/distutils/mingw32ccompiler.py",
"numpy/f2py/tests/test_block_docstring.py"
] | [
"import operator\nimport warnings\nimport sys\nimport decimal\nfrom fractions import Fraction\nimport pytest\n\nimport numpy as np\nfrom numpy import ma\nfrom numpy.testing import (\n assert_, assert_equal, assert_array_equal, assert_almost_equal,\n assert_array_almost_equal, assert_raises, assert_allclose, I... | [
[
"numpy.quantile",
"numpy.random.rand",
"numpy.lib.rot90",
"numpy.median",
"numpy.tile",
"numpy.random.random",
"numpy.bincount",
"numpy.empty",
"numpy.lib.sinc",
"numpy.prod",
"numpy.lib.trapz",
"numpy.lib.msort",
"numpy.lib.select",
"numpy.percentile",
... |
Snijderfrey/suunto2python | [
"704bc046221d6809dc3bdd2118b34927a192600f"
] | [
"suunto_exercise_data.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport json\nimport zipfile\nimport glob\nimport numpy as np\nimport pandas as pd\nfrom tqdm import tqdm\n\n\nclass exercise_data:\n \"\"\"\n Imports data recorded by a Suunto Ambit 3 Peak into a Pandas DataFrame.\n\n Currently, the data is imported best ... | [
[
"pandas.to_datetime",
"numpy.array",
"numpy.ones_like",
"pandas.to_timedelta",
"pandas.MultiIndex.from_arrays",
"pandas.MultiIndex.from_product",
"pandas.Series"
]
] |
hougiebear/Deepdrive-Autonomous-Vehicles | [
"6b952c9e5d01893dc4319bbd74b9fa951719fcf9"
] | [
"src/offline_RL/dcql_roundabout.py"
] | [
"import gym\nimport highway_env\nimport numpy as np\n\nimport gym\nfrom d3rlpy.algos import DQN\nfrom d3rlpy.online.buffers import ReplayBuffer\nfrom d3rlpy.online.explorers import LinearDecayEpsilonGreedy\nimport d3rlpy\nfrom d3rlpy.wrappers.sb3 import to_mdp_dataset\nimport torch.nn as nn\nimport torch\nfrom d3rl... | [
[
"sklearn.model_selection.train_test_split"
]
] |
sniafas/photography-style-analysis | [
"b5d828055cf40b127ac69e86af173a77bada3b32"
] | [
"src/utils/train_utils.py"
] | [
"import json\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\nimport importlib\nimport datetime\n\nimport tensorflow_addons as tfa\nfrom tensorflow.keras.losses import CategoricalCrossentropy\nfrom tensorflow.keras.metrics import CategoricalAccuracy, Mean, Precision, Recall, AUC\n\nimport matplotl... | [
[
"tensorflow.keras.optimizers.SGD",
"matplotlib.pyplot.xlim",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.io.read_file",
"tensorflow.keras.losses.CategoricalCrossentropy",
"numpy.concatenate",
"matplotlib.pyplot.savefig",
"tensorflow.keras.optimizers.Nadam",
"numpy... |
aseembits93/avoiding-side-effects | [
"72ebc8ce5d66c846780aa9e710ae56ff12bd23af"
] | [
"training/cb_vae.py"
] | [
"###############################################################################\n\n# CB-VAE code adapted from https://github.com/Robert-Aduviri/Continuous-Bernoulli-VAE\n\n###############################################################################\n\n#MIT License\n\n#Copyright (c) 2019 Robert Aduviri\n\n#Permi... | [
[
"torch.nn.Linear",
"torch.stack",
"torch.clamp",
"torch.pow",
"torch.abs",
"torch.randn_like",
"torch.tensor",
"torch.utils.data.DataLoader",
"torch.load",
"torch.log",
"torch.utils.data.TensorDataset",
"torch.masked_select"
]
] |
hackingbutlegal/FacebookPostsScraper | [
"aa873eb97f7b1ad00ca0dbb4da1d63f38bcbbdb9"
] | [
"FacebookPostsScraper.py"
] | [
"import requests\nfrom bs4 import BeautifulSoup\nimport pickle\nimport os\nfrom urllib.parse import urlparse, unquote\nfrom urllib.parse import parse_qs\nimport pandas as pd\nimport json\n\n\nclass FacebookPostsScraper:\n\n # We need the email and password to access Facebook, and optionally the text in the Url t... | [
[
"pandas.DataFrame"
]
] |
ojmakhura/DIGITS | [
"f34e62c245054b51ea51fcb8949d2ca777f162d1"
] | [
"digits/download_data/mnist.py"
] | [
"# Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.\n\nimport gzip\nimport os\nimport struct\n\nimport numpy as np\nimport PIL.Image\n\nfrom .downloader import DataDownloader\n\n\nclass MnistDownloader(DataDownloader):\n \"\"\"\n See details about the MNIST dataset here:\n http://yann.lec... | [
[
"numpy.fromstring"
]
] |
masher1/SocialMediaMining | [
"615205159f363bffd8d6cd8fd32afd65cdfe4332",
"615205159f363bffd8d6cd8fd32afd65cdfe4332"
] | [
"HW2/HW2.py",
"demo/venv/Lib/site-packages/pandas/io/excel/_openpyxl.py"
] | [
"import twitter\nimport json\nimport networkx\nimport matplotlib\nimport sys\nimport numpy\nimport sys\nimport time\nfrom functools import partial\nfrom sys import maxsize as maxint\nfrom urllib.error import URLError\nfrom http.client import BadStatusLine\nimport matplotlib.pyplot as plt\nimport Chapter_9Twitter_Co... | [
[
"matplotlib.pyplot.show"
],
[
"pandas.compat._optional.import_optional_dependency",
"pandas.io.excel._util._validate_freeze_panes"
]
] |
abgoswam/cs224u | [
"33e1a22d1c9586b473f43b388163a74264e9258a",
"33e1a22d1c9586b473f43b388163a74264e9258a"
] | [
"nli_02_models_trials1.py",
"_hw4_trials2.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Natural language inference: models\n\n# In[1]:\n\n\n__author__ = \"Christopher Potts\"\n__version__ = \"CS224u, Stanford, Spring 2020\"\n\n\n# ## Contents\n# \n# 1. [Contents](#Contents)\n# 1. [Overview](#Overview)\n# 1. [Set-up](#Set-up)\n# 1. [Sparse feature represen... | [
[
"numpy.concatenate",
"torch.nn.Linear",
"torch.cat",
"torch.nn.LSTM",
"numpy.zeros",
"pandas.crosstab",
"pandas.DataFrame",
"torch.no_grad",
"torch.softmax",
"sklearn.linear_model.LogisticRegression",
"torch.LongTensor"
],
[
"torch.cat",
"torch.nn.GRU"
]
] |
jlebensold/flrl-ddpg | [
"d91e9f4aedf48d0614e33bd22c7f684ecda089b1"
] | [
"src/networks.py"
] | [
"import random\n\nimport gym\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.distributions import Normal\n\nfrom collections import ChainMap\n\n\nclass ValueNetwork(nn.Module):\n def __init__(self, num_inputs, num_actions, hidde... | [
[
"torch.nn.Linear",
"torch.cat"
]
] |
tpet/rpz_planning | [
"cf52732bfac8aef7d1ba9da20e3930671e142b80"
] | [
"scripts/utils/travelled_dist.py"
] | [
"#!/usr/bin/env python\n\nimport rospy\nfrom std_msgs.msg import Float64\nfrom nav_msgs.msg import Path\nfrom geometry_msgs.msg import PoseStamped\nimport numpy as np\nfrom ros_numpy import msgify, numpify\nimport tf2_ros\n\n\nclass TravelledDistPub:\n \"\"\"\n This ROS node publishes ground truth travelled d... | [
[
"numpy.linalg.norm"
]
] |
savinay95n/Behavioral-cloning-Steering-angle-prediction | [
"efa0c02d1d21dc7233899193de0be5615fe27318"
] | [
"nvidia_MODEL2.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport os\r\nimport cv2\r\nimport random\r\nimport json\r\nimport math\r\n\r\nimport keras\r\nfrom keras.preprocessing.image import *\r\nfrom keras.models import Sequential, Model\r\nfrom keras.layers import Convolution2D, Flatten, Max... | [
[
"numpy.random.random",
"pandas.read_csv",
"matplotlib.pyplot.subplots",
"numpy.random.randint",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.subplot",
"numpy.expand_dims",
"numpy.zeros",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.float32",
"matplo... |
dushik/AdversarialDNN-Playground | [
"8feb6e1ef1d293dcb8869faa8a84216cdc3dd5ce"
] | [
"webapp/models/l0_model.py"
] | [
"# ML includes\nimport tensorflow as tf\nimport numpy as np\nimport pandas as pd\n\n# General python includes\nimport os\nimport math\nimport json\nfrom itertools import permutations, combinations, product\n\n# Plotting\nimport matplotlib\nimport matplotlib.pyplot as plt\nmatplotlib.style.use('fivethirtyeight')\n\n... | [
[
"matplotlib.style.use",
"tensorflow.train.latest_checkpoint",
"numpy.fill_diagonal",
"numpy.reshape",
"numpy.sum",
"numpy.copy",
"tensorflow.argmax",
"tensorflow.train.import_meta_graph",
"tensorflow.gradients",
"numpy.argmax",
"tensorflow.stack",
"tensorflow.get_co... |
JasonSWFu/speechbrain | [
"cb78ba2b33fceba273b055dc471535344c3053f0",
"cb78ba2b33fceba273b055dc471535344c3053f0"
] | [
"recipes/WHAMandWHAMR/meta/create_whamr_rirs.py",
"speechbrain/nnet/complex_networks/c_CNN.py"
] | [
"\"\"\"\nAdapted from the original WHAMR script to obtain the Room Impulse ResponsesRoom Impulse Responses\n\nAuthors\n * Cem Subakan 2021\n\"\"\"\nimport os\nimport pandas as pd\nimport argparse\nimport torchaudio\n\nfrom recipes.WHAMandWHAMR.meta.wham_room import WhamRoom\nfrom scipy.signal import resample_pol... | [
[
"scipy.signal.resample_poly",
"pandas.read_csv",
"torch.from_numpy"
],
[
"torch.nn.functional.pad",
"torch.Tensor"
]
] |
mingchen62/im2text-pytorch | [
"9516be1aad70517603383a92670c296f8d7e343e"
] | [
"onmt/Models.py"
] | [
"from __future__ import division\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.autograd import Variable\nfrom torch.nn.utils.rnn import pack_padded_sequence as pack\nfrom torch.nn.utils.rnn import pad_packed_sequence as unpack\n\nimport onmt\nfrom onmt.Utils import aeq\n\n\ndef... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.cat",
"torch.stack",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.functional.relu"
]
] |
Justin-Yuan/learn-to-interact | [
"eb013bb3bab269bda8a8075e64fe3bcd2964d8ae",
"eb013bb3bab269bda8a8075e64fe3bcd2964d8ae"
] | [
"marl/algorithms/masac/run_masac.py",
"marl/algorithms/rmaddpg/run_rmaddpg.py"
] | [
"import os\nimport sys \n# path at level marl/\nsys.path.insert(0, os.path.abspath(\".\"))\nimport time\nimport argparse\nimport numpy as np\nfrom functools import partial \nfrom collections import OrderedDict, defaultdict\nimport torch\n\n# local\nfrom algorithms.masac.utils import get_sample_scheme, dispatch_samp... | [
[
"torch.set_num_threads"
],
[
"torch.set_num_threads"
]
] |
TobiasUhmann/pykeen | [
"82ca32a69f46f2e8a6255d7d2ce519eefbb3757e",
"82ca32a69f46f2e8a6255d7d2ce519eefbb3757e"
] | [
"tests/test_utils.py",
"src/pykeen/models/unimodal/rgcn.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"Unittest for for global utilities.\"\"\"\n\nimport string\nimport unittest\n\nimport numpy\nimport torch\n\nfrom pykeen.nn import Embedding\nfrom pykeen.utils import (\n clamp_norm,\n compact_mapping,\n flatten_dictionary,\n get_until_first_blank,\n l2_regularization... | [
[
"torch.rand",
"torch.stack",
"torch.arange",
"torch.ones",
"torch.manual_seed",
"torch.randint",
"numpy.prod",
"torch.allclose"
],
[
"torch.zeros",
"torch.rand",
"torch.nn.functional.normalize",
"torch.nn.ParameterList",
"torch.unique",
"torch.cat",
... |
rustam-fork/ml-course-uz | [
"e1554d4c69bf0e421aa596d77aab65639df1ff73"
] | [
"code/math_examples.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom matplotlib import cm\n\n\ndef draw_parabola(steps=50):\n x = np.linspace(-4, 4, steps)\n plt.plot(x, x ** 2)\n plt.axvline(x=0, color='b', linestyle='dashed')\n\n\ndef draw_paraboloid(steps=50):\n fig = p... | [
[
"numpy.sin",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.cos",
"matplotlib.pyplot.axvline",
"numpy.linspace",
"numpy.meshgrid"
]
] |
tylerbrunette/tensorpac | [
"afae9557db417a54b001c0837dbc8638f6fe20f0"
] | [
"tensorpac/utils.py"
] | [
"\"\"\"Utility functions.\"\"\"\nimport logging\n\nimport numpy as np\nfrom scipy.signal import periodogram\n\nfrom tensorpac.methods.meth_pac import _kl_hr\nfrom tensorpac.pac import _PacObj, _PacVisual\nfrom tensorpac.io import set_log_level\n\nlogger = logging.getLogger('tensorpac')\n\n\ndef pac_vec(f_pha='mres'... | [
[
"matplotlib.pyplot.xlim",
"numpy.exp",
"matplotlib.pyplot.bar",
"numpy.concatenate",
"numpy.full",
"numpy.zeros_like",
"matplotlib.pyplot.tick_params",
"numpy.arange",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.gca",
"numpy.atleast_2d",
"numpy.array",
... |
flomertens/wise-utils | [
"ebc8e88a0a752f6119d049e6f7a044c9e6818f24"
] | [
"libwise/app/WaveletBrowser.py"
] | [
"#!/usr/bin/env python\n\nfrom libwise import uiutils, wavelets, plotutils\nimport waveletsui\nimport numpy as np\n\n\nclass WaveletBrowser(uiutils.Experience):\n\n def __init__(self, wavelet_families=wavelets.get_all_wavelet_families()):\n uiutils.Experience.__init__(self)\n self.gui = uiutils.UI(... | [
[
"numpy.sin"
]
] |
james-morrison-mowi/wavespectra | [
"d721b8bb491113173eabad0773ce4494b81c5e74"
] | [
"tests/broken/test_construct.py"
] | [
"import sys\nimport os\nimport logging\nimport unittest\nimport time\nimport numpy as np\nfrom numpy.testing import assert_array_almost_equal\n\nplot = False\nif plot:\n import matplotlib.pyplot as plt\n\nsys.path.insert(0,os.path.join(os.path.dirname(__file__),'..'))\n\nfrom wavespectra.construct import jonswap... | [
[
"numpy.array",
"matplotlib.pyplot.pcolormesh",
"numpy.minimum",
"numpy.exp",
"numpy.testing.assert_array_almost_equal",
"numpy.where",
"numpy.arange",
"numpy.trapz",
"numpy.random.randint",
"numpy.sqrt",
"numpy.power",
"matplotlib.pyplot.show",
"numpy.sinh",
... |
MauroSilvaPinto/Interpretable-EEG-seizure-prediction-using-a-multiobjective-evolutionary-algorithm | [
"210302843f2881ea1b19b25c9e5599e3896e09a8",
"210302843f2881ea1b19b25c9e5599e3896e09a8"
] | [
"Code/Data Processing/pre_processing.py",
"Code/Control Method/Utils.py"
] | [
"\"\"\"\na code to pre-process and extract fist-level features from raw data from the selected patients.\nthe output will be the extracted features, chronologically, in 5 second non-overlapping windows\norder by patient and seizure.\n\nformat output name:pat[patient_number]_seizure[seizure_number]_featureMatrix.npy... | [
[
"scipy.integrate.trapz",
"numpy.load",
"numpy.mean",
"numpy.where",
"scipy.signal.lfilter",
"numpy.sort",
"numpy.unique",
"numpy.gradient",
"numpy.concatenate",
"numpy.save",
"numpy.arange",
"numpy.vstack",
"numpy.array",
"numpy.delete",
"scipy.integrate... |
thisch/pydipole | [
"e496177fe60c3ec1d3b28d2dc843c0fd54b5757c"
] | [
"dipole/tests/base.py"
] | [
"import pytest\nimport os\nimport numpy as np\nimport logging\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\n\nclass Base:\n log = logging.getLogger('dip')\n\n def setup_method(self, method):\n print(\"\\n{}:{}\".format(self.__class__.__name__, method.__name__))\n # TODO support f... | [
[
"matplotlib.pyplot.colorbar",
"numpy.sin",
"matplotlib.cm.rainbow",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"numpy.cos",
"numpy.abs",
"matplotlib.pyplot.show"
]
] |
ggservice007/my-happy-pandas | [
"63145d54e452177f7d5b2fc8fdbc1fdf37dd5b16"
] | [
"my_happy_pandas/core/arrays/sparse/array.py"
] | [
"\"\"\"\nSparseArray data structure\n\"\"\"\nfrom collections import abc\nimport numbers\nimport operator\nfrom typing import Any, Callable, Union\nimport warnings\n\nimport numpy as np\n\nfrom my_happy_pandas._libs import lib\nimport my_happy_pandas._libs.sparse as splib\nfrom my_happy_pandas._libs.sparse import B... | [
[
"numpy.concatenate",
"numpy.full",
"numpy.result_type",
"numpy.array",
"numpy.datetime64",
"numpy.asarray",
"numpy.errstate",
"numpy.any",
"numpy.abs",
"numpy.all",
"numpy.searchsorted",
"numpy.insert",
"numpy.empty_like"
]
] |
verages/YOLOv4_light | [
"b8f707a7ab5c2f3b2fd58d34e287e6b28a625641"
] | [
"core/loss.py"
] | [
"# -*- coding: utf-8 -*-\n# @Brief: loss相关\n\nfrom core.ious import box_ciou, box_iou\nfrom nets.yolo import yolo_head\nimport config.config as cfg\nimport tensorflow as tf\nfrom tensorflow.keras import losses\n\n\ndef smooth_labels(y_true, e):\n \"\"\"\n u(y)表示一个关于label y,且独立于观测样本x(与x无关)的固定且已知的分布:\n q... | [
[
"tensorflow.TensorArray",
"tensorflow.abs",
"tensorflow.shape",
"tensorflow.expand_dims",
"tensorflow.while_loop",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.constant",
"tensorflow.reduce_max",
"tensorflow.reduce_sum",
"tensorflow.boolean_mask",
"ten... |
PrimozGodec/text-semantics | [
"194b0bce7adcc8937a30643959681f0b175927ab"
] | [
"textsemantics/textrank/pagerank_weighted.py"
] | [
"\"\"\"\nModule was removed from gensim - this is a fixed copy.\n\nThis module calculate PageRank [1]_ based on wordgraph.\n\n\n.. [1] https://en.wikipedia.org/wiki/PageRank\n\nExamples\n--------\n\nCalculate Pagerank for words\n\n.. sourcecode:: pycon\n\n >>> from textsemantics.textrank.keywords import get_grap... | [
[
"scipy.sparse.linalg.eigs",
"scipy.sparse.csr_matrix",
"scipy.linalg.eig",
"numpy.abs"
]
] |
rpitonak/BioPAL | [
"08c57b3ba2d8e5a06105f930b1067c2541636bb6"
] | [
"biopal/io/data_io.py"
] | [
"# SPDX-FileCopyrightText: BioPAL <biopal@esa.int>\n# SPDX-License-Identifier: MIT\n\nimport os\nimport io\nimport struct\nimport logging\nimport operator\nimport numpy as np\nfrom scipy.interpolate import interp2d\nfrom biopal.io.xml_io import raster_info\nfrom biopal.utility.constants import EPSG_CODE_LLA\nfrom a... | [
[
"numpy.max",
"numpy.int",
"numpy.zeros",
"numpy.round",
"numpy.load",
"numpy.min",
"numpy.logical_and",
"numpy.where",
"numpy.finfo",
"numpy.arange",
"numpy.sqrt",
"scipy.interpolate.interp2d"
]
] |
KoDa-project/pykoda | [
"a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0",
"a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0"
] | [
"experiments/visualisation/plot_outliers.py",
"src/pykoda/data/getdata.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nimport pykoda\n\n\ndef plot_outliers(company, date, n_sigma: float = 5.0):\n \"\"\"Plot stations that accumulate significant delays, defined as the ones that accumulate a median delay\n n_sigma times the median delay.\"\"\"\n df = pykoda.datautils.get... | [
[
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.sca",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.scatter",
"numpy.nanmedian"
],
[
"pandas.json_normalize",
"pandas.DataFrame",
"pandas.date_range",
"pandas.concat",
"numpy.dtype"
]
] |
h4iku/tag-recom | [
"3acdeeed14ff11329ef724d30d99300d53ffc0f3"
] | [
"tag_recommender/multilabel_classification.py"
] | [
"import json\nimport pickle\n\nimport numpy as np\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom sklearn.calibration import CalibratedClassifierCV\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.multiclass import OneVsRestClassifier\nfrom sklearn.pipeline import FeatureUn... | [
[
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.preprocessing.MultiLabelBinarizer",
"sklearn.preprocessing.MinMaxScaler",
"sklearn.svm.LinearSVC"
]
] |
frecklebars/Ryven | [
"86a8c06effc47897d0b8fbbd1fa8580a957f9515"
] | [
"packages/sklearn/_bak/svm/nodes/svm___NuSVC0/svm___NuSVC0.py"
] | [
"from NIENV import *\n\n\n# API METHODS --------------\n\n# self.main_widget\n# self.update_shape()\n\n# Ports\n# self.input(index)\n# self.set_output_val(index, val)\n# self.exec_output(index)\n\n# self.create_new_input(type_, label, widget_name=None, widget_pos='under', pos=-1)\n# self.delete_input(index)\n# self... | [
[
"sklearn.svm.NuSVC"
]
] |
harveyslash/Deep-Image-Analogy-TF | [
"9bda06fbe3a5786217a3db112d2f162573b1dd90"
] | [
"src/models/VGG19.py"
] | [
"import time\nimport os\nfrom src.PatchMatch import PatchMatchOrig\nimport torchvision.models as models\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch import optim\nimport torch.utils.model_zoo as model_zoo\nimport cv2\nimpo... | [
[
"numpy.array",
"torch.autograd.Variable",
"torch.norm",
"torch.nn.AvgPool2d",
"torch.optim.Adam",
"torch.from_numpy",
"torch.nn.ReLU",
"numpy.random.uniform",
"torch.randn"
]
] |
tltneon/SourceIO | [
"e4ba86d801f518e192260af08ef533759c2e1cc3",
"e4ba86d801f518e192260af08ef533759c2e1cc3"
] | [
"source1/qc/qc.py",
"goldsrc/mdl_v4/structs/sequence.py"
] | [
"import math\nfrom typing import List\n\nimport numpy as np\n\nfrom ..mdl.v49.mdl_file import Mdl\nfrom ..mdl.structs.bone import ProceduralBoneType\nfrom ..mdl.structs.header import StudioHDRFlags\nfrom ..mdl.structs.bodygroup import BodyPartV49\nfrom pathlib import Path\n\n\ndef vector_i_transform(input: List, ma... | [
[
"numpy.zeros"
],
[
"numpy.array"
]
] |
christiansafka/ONNX-Inference-AWS-Lambda | [
"28663ff0b25bb813aba92a37dc7dfba396551373"
] | [
"onnx_export.py"
] | [
"import torch\nimport torch.onnx\nimport onnxruntime\nimport numpy as np\nfrom efficientnet_pytorch.model import EfficientNetAutoEncoder\n\nmodel = EfficientNetAutoEncoder.from_pretrained('efficientnet-b0')\nmodel.eval()\n\ndummy_input = torch.rand(1, 3, 224, 224)\n\n\n# # Export the model\ndynamic_axes = {'input' ... | [
[
"torch.rand",
"torch.onnx.export"
]
] |
vishalbelsare/parametric_modeling | [
"9bfe5df35671930043215c8f6c855af8f49e28bf"
] | [
"src/aryule.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Jan 22 20:38 2014\n\n@author: Sammy Pfeiffer\n@email: sammypfeiffer@gmail.com\nThis file pretends to imitate the behaviour of the MATLAB function aryule\n\nUsing spectrum implementation:\nhttp://thomas-cokelaer.info/software/spectrum/html/user/ref_para... | [
[
"numpy.hstack"
]
] |
thomMar/per-title-analysis | [
"f87ab1af65f429723df6c74ef22095a1882348e0"
] | [
"per_title_analysis/per_title_analysis.py"
] | [
"# -*- coding: utf-8 -*-\n\n#importation\n\nfrom __future__ import division\nfrom pylab import *\nimport sys\nimport os\nimport json\nimport datetime\nimport statistics\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\nfrom task_providers import Probe, CrfEncode, CbrEncode, Metric\n\n\n\... | [
[
"matplotlib.pyplot.bar",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.table"
]
] |
Feng-XiaoYue/Reinforcement-learning-with-tensorflow-master | [
"011594083410f9b2f8e16eb5deed26e730ed849e"
] | [
"contents/MyExperiment/Exp3_test/run_this.py"
] | [
"from .cluster_env import Cluster\nfrom .RL_brain import QLearningTable\nimport datetime\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pylab as pl\nimport random\nimport pandas as pd\nimport time\nfrom pandas.testing import assert_frame_equal\n\ndef state_init():\n init_state = pd.DataFrame(np.zer... | [
[
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.Figure",
"numpy.arange",
"matplotlib.pyplot.show"
]
] |
Yinan-Zhao/AoANet | [
"f0070931e0121c473d9a36b66d4c85b090c47c85"
] | [
"scripts/prepro_labels_vizwiz.py"
] | [
"\"\"\"\nPreprocess a raw json dataset into hdf5/json files for use in data_loader.lua\n\nInput: json file that has the form\n[{ file_path: 'path/img.jpg', captions: ['a caption', ...] }, ...]\nexample element in this list would look like\n{'captions': [u'A man with a red helmet on a small moped on a dirt road. ', ... | [
[
"numpy.concatenate",
"numpy.all",
"numpy.zeros"
]
] |
yardencsGitHub/vak | [
"04da97b02ded5acccab437c2538d0a1ded3bef80"
] | [
"src/vak/timebins.py"
] | [
"\"\"\"module for functions that deal with vector of times from a spectrogram,\ni.e. where elements are the times at bin centers\"\"\"\nimport numpy as np\n\n\ndef timebin_dur_from_vec(time_bins, n_decimals_trunc=5):\n \"\"\"compute duration of a time bin, given the\n vector of time bin centers associated wit... | [
[
"numpy.diff",
"numpy.trunc"
]
] |
Pandinosaurus/pandas_streaming | [
"03008b63545e3634290ef0c041e920d94d454ccf"
] | [
"_unittests/ut_df/test_dataframe_helpers_simple.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@brief test log(time=4s)\n\"\"\"\nimport unittest\nimport pandas\nimport numpy\nfrom pyquickhelper.pycode import ExtTestCase\nfrom pandas_streaming.df import dataframe_unfold\nfrom pandas_streaming.df.dataframe_helpers import hash_int, hash_str, hash_float\n\n\nclass TestDataF... | [
[
"numpy.isnan"
]
] |
Romero027/SlowFast | [
"f4308eb1c46d88c3a41a6fb2d1fd4fad56fdd43a"
] | [
"slowfast/visualization/predictor.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nimport cv2\nimport torch\nfrom detectron2 import model_zoo\nfrom detectron2.config import get_cfg\nfrom detectron2.engine import DefaultPredictor\n\nimport slowfast.utils.checkpoint as cu\nfrom slowfast.datasets impo... | [
[
"torch.cat",
"torch.tensor"
]
] |
neuromusic/napari-ndtiffs | [
"7e89e5b2e5291631daf4e962d43e51757a2b1797"
] | [
"napari_ndtiffs/reader.py"
] | [
"\"\"\"Plugin to read lattice light sheet folders into napari.\"\"\"\nimport glob\nimport logging\nimport os\nimport re\nimport zipfile\nfrom contextlib import contextmanager\nfrom typing import Any, Callable, Dict, List, Tuple, Union\n\nimport numpy as np\nfrom dask import array as da\nfrom dask import delayed\nfr... | [
[
"numpy.divide"
]
] |
L-Net-1992/panda | [
"e6c2b0ff01ea4eca283ea7c850e44675edcdebdf"
] | [
"tests/safety/common.py"
] | [
"import os\nimport abc\nimport unittest\nimport importlib\nimport numpy as np\nfrom collections import defaultdict\nfrom typing import Optional, List, Dict\n\nfrom opendbc.can.packer import CANPacker # pylint: disable=import-error\nfrom panda import ALTERNATIVE_EXPERIENCE, LEN_TO_DLC\nfrom panda.tests.safety impor... | [
[
"numpy.arange"
]
] |
silvanmelchior/CBF-SSM | [
"34a5300f4b9a58e945c04d6c85f6e649ec63e609"
] | [
"run/run_robomove.py"
] | [
"import numpy as np\nfrom cbfssm.datasets import RoboMove\nfrom cbfssm.training import Trainer\nfrom cbfssm.outputs import OutputsRoboMove\nfrom cbfssm.model import CBFSSM\n\n\n# curriculum learning scheme presented in appendix\n# first train w/o entropy, then add it\nfor phase in range(2):\n\n #\n # Config\n... | [
[
"numpy.asarray"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.