repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
HTDPNJ/Sentiment-Classification-Via-Galvanic-Skin-Response-Based-on-Deep-Learning-Models | [
"bcb9cdb84bd4d2f73c19d781139d060b1d433171"
] | [
"Src/Pidian_select_average_tezheng_2_aftfft_getlastdata.py"
] | [
"###从皮电每几个数值求了均值后,获取每个用户对应视频num的数据\nimport csv\nimport pandas as pd\nimport numpy as np\ndef get_last_sec_data(source_path,dis_path,num): ##源文件路径,目标文件路径,num表示最后几秒的数据/若num表示-1取得则是所有时间数据\n name_testtime_Filmname_list=[]\n csvfile = open(source_path, newline='') # 打开文件\n csvReader = csv.reader(csvfile) # 返回... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
kanelouise/python-projects | [
"abbce0df88719140e25232d06539155e0466189b"
] | [
"la.py"
] | [
"import pandas as pd\nimport lxml\nfrom datetime import date\n\ntoday = date.today()\n\n#create dataframe of polling locations from LA County website\nla = pd.read_html(\"https://locator.lavote.net/locations-list/vc?id=4085\")[0]\n\n#output dataframe to CSV and save it with today's date so we have a record of when/... | [
[
"pandas.read_html"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
watersnaily/RGB-D-3D-object-detection-based-real-time-monitoring-system-in-an-agile-production-environment | [
"49b2b8f97df36bb2057a5f7032ce12c7920c08b4"
] | [
"object_detector_cpu/src/train/svm_classifier/svm_predict.py"
] | [
"import cv2\nimport numpy as np\nimport os\n\nclass svm_predictor():\n\n def __init__ (self,svm_load_path,bow_load_path,bow_threshold):\n self.svm = cv2.ml.SVM_load(svm_load_path) \n self.surf = cv2.xfeatures2d.SURF_create(bow_threshold)\n self.bow_extractor = cv2.BOWImgDescriptorExtracto... | [
[
"numpy.load",
"numpy.float32"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ChuinHongYap/permutation-python | [
"51efa0d23a086a1520d77f6ed095be10cd7e182e"
] | [
"permutation_combination/combination.py"
] | [
"import numpy as np\nimport math\n\n'''\nDifferent combination methods using python\n'''\n\n# Using raw mathematics\ndef comb(n, r):\n num = denom_a = denom_b= 1\n \n # n!\n if n >= 1:\n for i in range (1,n+1):\n num=num*i\n\n if r < n:\n # r!\n for i in range (1,r+1):\n denom_a=denom_a*i\n ... | [
[
"numpy.prod"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
djain454/Show-Attend-and-Tell-Neural-Image-Caption-Generation-with-Visual-Attention | [
"c6619fdb748a8cbb4bb7daba1af87e5c17a06d8e"
] | [
"generate_caption.py"
] | [
"\"\"\"\nWe use the same strategy as the author to display visualizations\nas in the examples shown in the paper. The strategy used is adapted for\nPyTorch from here:\nhttps://github.com/kelvinxu/arctic-captions/blob/master/alpha_visualization.ipynb\n\"\"\"\n\nimport argparse, json, os\nimport matplotlib.cm as cm\n... | [
[
"matplotlib.pyplot.imshow",
"numpy.sqrt",
"torch.load",
"torch.tensor",
"matplotlib.pyplot.set_cmap",
"matplotlib.pyplot.subplot",
"torch.FloatTensor",
"numpy.float32",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.text",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jinamshah/xlnet | [
"67084a2a1d2a6ca0232b320c582e18072fd2ea05"
] | [
"xlnet.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport json\nimport os\nimport tensorflow as tf\nimport modeling\n\n\ndef _get_initializer(FLAGS):\n\t\"\"\"Get variable intializer.\"\"\"\n\tif FLAGS.init == \"uniform\":\n\t\tinitializer = tf.initial... | [
[
"tensorflow.gfile.Open",
"tensorflow.gfile.Exists",
"tensorflow.initializers.random_normal",
"tensorflow.gfile.MakeDirs",
"tensorflow.variable_scope",
"tensorflow.initializers.random_uniform"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lwgkzl/ICLR2021-Workshop-Challenge-Track2-Baseline | [
"b0a71c422134bc6e801aba9c925932d7650e59bc"
] | [
"baseline_a2c/Collect.py"
] | [
"import gym\r\nimport time\r\nimport torch\r\nimport warnings\r\nimport numpy as np\r\nfrom copy import deepcopy\r\nfrom numbers import Number\r\nfrom typing import Dict, List, Union, Optional, Callable\r\n\r\nfrom tianshou.policy import BasePolicy\r\nfrom tianshou.exploration import BaseNoise\r\nfrom tianshou.data... | [
[
"numpy.ones_like",
"numpy.arange",
"numpy.std",
"numpy.asanyarray",
"numpy.mean",
"numpy.where",
"numpy.zeros_like",
"torch.no_grad",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vikozlov89/mlflow | [
"40b7367dd4e3bb4424b5a53cccaa1a70218cccc9"
] | [
"mlflow/tracking/client.py"
] | [
"\"\"\"\nInternal package providing a Python CRUD interface to MLflow experiments, runs, registered models,\nand model versions. This is a lower level API than the :py:mod:`mlflow.tracking.fluent` module,\nand is exposed in the :py:mod:`mlflow.tracking` module.\n\"\"\"\nimport contextlib\nimport logging\nimport jso... | [
[
"numpy.issubdtype",
"numpy.clip"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Arnold-n/covid19 | [
"4d3e5b288418ee40cd8a45f458662c46a22b1b2a"
] | [
"process_casus_data.py"
] | [
"#!/usr/bin/env python3\n\"\"\"Script for casus analysis (using functions from casus_analysis.py).\"\"\"\n\nfrom copy import deepcopy\nimport matplotlib.pyplot as plt\nimport matplotlib\nimport pandas as pd\nimport numpy as np\nimport casus_analysis as ca\nimport urllib.request\nimport tools\n\ndef get_summary_df(m... | [
[
"pandas.to_datetime",
"numpy.arange",
"matplotlib.pyplot.subplots",
"pandas.Timedelta",
"numpy.ones",
"matplotlib.ticker.MaxNLocator",
"matplotlib.pyplot.close",
"numpy.array",
"pandas.Timestamp",
"numpy.zeros",
"matplotlib.pyplot.pause"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
milutter/deep_differential_network | [
"b52d87b1ec22d1cb622647252455faac31eedfb7"
] | [
"deep_differential_network/differential_network.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\nfrom deep_differential_network.activations import *\n\n\nclass DifferentialLayer(nn.Module):\n\n def __init__(self, input_size, output_size, activation=\"ReLu\"):\n super(DifferentialLayer, self).__init__()\n\n ... | [
[
"torch.nn.init.calculate_gain",
"torch.nn.Parameter",
"torch.nn.Softplus",
"numpy.sqrt",
"torch.Tensor",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.init.xavier_normal_",
"torch.eye",
"torch.no_grad",
"torch.nn.init.orthogonal_",
"torch.nn.init.spars... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TechieBoy/deepfake-detection | [
"5bc7164710a32a64a65dd55e09aa58a030e8d0ee",
"5bc7164710a32a64a65dd55e09aa58a030e8d0ee"
] | [
"experiments/head_pose/extract_head_pose.py",
"scripts/seperate_audio.py"
] | [
"import numpy as np\nfrom glob import glob\nimport os\nfrom concurrent.futures import ProcessPoolExecutor\nimport json\nfrom head_pose_estimator import HeadPoseEstimator\nfrom face import face_68_landmarks\nimport cv2\nfrom model_loader import get_points_from_landmarks, get_68_3d_model\n\ndataset_folder_fake = '../... | [
[
"numpy.concatenate",
"numpy.ravel",
"numpy.fromstring",
"numpy.savetxt"
],
[
"numpy.array_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
haoranD/Human-Activity-Recognition-DL | [
"277206e27e320eeb7d97333b0f0e65b274325b5e"
] | [
"Code/Generate_SingleModel_LSTM.py"
] | [
"import torch\nfrom torch.autograd import Variable\nimport torch.functional as F\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom sklearn.metrics import f1_score\n\nclass RNN(torch.nn.Module):\n def __init__(self, dim, dropout_keep_prob, rnn_size, number_of_layers, n_classes):\n super().__init__... | [
[
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.Tensor",
"torch.nn.LSTM",
"torch.zeros",
"numpy.vstack",
"torch.nn.Linear",
"torch.no_grad",
"torch.save",
"torch.cuda.is_available",
"numpy.random.randint",
"sklearn.metrics.f1_score",
"numpy.array",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mkofinas/locs | [
"4cb0ab9e989ebfee42d1d2850bdf3360336b5c1c"
] | [
"locs/models/dnri_dynamicvars.py"
] | [
"import math\n\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import init\nimport torch.nn.functional as F\n\nimport locs.models.model_utils as model_utils\nfrom locs.models.model_utils import RefNRIMLP, encode_onehot, get_graph_info\n\n\nclass DNRIDynamicVars(nn.Module):\n def __init__(s... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.zeros",
"torch.load",
"torch.nn.ELU",
"torch.nn.GRU",
"torch.nn.functional.dropout",
"torch.nn.BCEWithLogitsLoss",
"torch.where",
"torch.softmax",
"torch.ones",
"torch.eye",
"torch.tensor",
"torch.nn.Sequent... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
StateOfTheArt-quant/transformerquant | [
"f6775d7aa920b84908b0a09d9ba098b1fe87bdff"
] | [
"transformerquant/featurizers/default_featurizer.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright StateOfTheArt.quant. \n#\n# * Commercial Usage: please contact allen.across@gmail.com\n# * Non-Commercial Usage:\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 obtai... | [
[
"torch.randn"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ZhaoZhibin/Physionet2020model | [
"ea7379bd1e4c145c84fd254faa0d5d1330cd2f6e"
] | [
"datasets/ECG.py"
] | [
"#!/usr/bin/python\n# -*- coding:utf-8 -*-\nfrom datasets.ECGDatasets import dataset\nimport pandas as pd\nfrom datasets.sequence_aug import *\n\nnormlizetype = 'none'\nstart = 0\nseq_length = 4096\nsample_ratio = 0.5\ndata_transforms = {\n 'train': Compose([\n #Reshape(),\n #DownSample(sample_rati... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
opentaps/eemeter | [
"e544a295c3ab8721e632b61510232454ea24932d"
] | [
"eemeter/caltrack/usage_per_day.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n\n Copyright 2014-2019 OpenEEmeter contributors\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.apa... | [
[
"pandas.Series",
"numpy.isnan",
"numpy.arange",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
Dianevera/heart-prediction | [
"c11e4ce92d501e1a398ee31b44d1552d8c6a29c5"
] | [
"heartpredictions/LSTM/create_dataloaders.py"
] | [
"import torch\n\ndef create_dataloaders(dataset, split_proportions, batch_size, display_informations=False):\n lengths = [round(len(dataset) * split) for split in split_proportions]\n r = 0\n for i in range(len(lengths)):\n r_tmp = lengths[i] % 3\n lengths[i] = lengths[i] - r_tmp\n r +... | [
[
"torch.utils.data.DataLoader"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nlpaueb/GreekBERT | [
"2f0d84b65b77e8465bbbdbe77f9ec5a685b1ce15"
] | [
"examples/xnli/bert/dataset.py"
] | [
"import torch\nimport json\n\nfrom tqdm.auto import tqdm\nfrom torch.utils.data import Dataset\n\nfrom ...utils.sequences import pad_to_max\n\n\nclass XNLIBERTDataset(Dataset):\n L2I = {\n 'neutral': 0,\n 'contradiction': 1,\n 'contradictory': 1,\n 'entailment': 2\n }\n\n def __... | [
[
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MaximovaIrina/transformers | [
"185876392c0dcd4c4bb02f2750822144a3bee545"
] | [
"src/transformers/models/detr/modeling_detr.py"
] | [
"# coding=utf-8\n# Copyright 2021 Facebook AI Research The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or... | [
[
"torch.nn.functional.softmax",
"torch.nn.init.uniform_",
"torch.max",
"torch.nn.functional.l1_loss",
"torch.nn.functional.dropout",
"torch.cat",
"torch.zeros",
"torch.nn.Embedding",
"torch.tanh",
"torch.cdist",
"torch.no_grad",
"torch.nn.functional.interpolate",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.4",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
krishanr/geo-deep-learning | [
"990ca1799dfeef317fe7438ec2f3eba9dfad70d5"
] | [
"utils/augmentation.py"
] | [
"# WARNING: data being augmented may be scaled to (0,1) rather, for example, (0,255). Therefore, implementing radiometric\n# augmentations (ex.: changing hue, saturation, brightness, contrast) may give undesired results.\n# Scaling process is done in images_to_samples.py l.215\nimport numbers\nimport warnings\nfrom... | [
[
"numpy.nanmax",
"numpy.ascontiguousarray",
"numpy.nanmin",
"torch.from_numpy",
"numpy.nan_to_num",
"numpy.int64",
"numpy.iinfo",
"numpy.transpose",
"numpy.random.uniform",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TDHolmes/Harma | [
"6ebdc2f3d8c2f9df5319495bb0201b94b86c02f4"
] | [
"Pensel/scripts/save_sensor_data.py"
] | [
"#! /usr/bin/env python3\nimport time\nimport struct\nimport matplotlib.pyplot as plt\n\nimport pensel_utils as pu\n\n\nclass LSM303DLHC_Parser(object):\n SAMPLES_PER_SECOND = 100 # conservative\n\n def __init__(self, port, baudrate, verbose=0):\n self.verbose = verbose\n self.port = port\n ... | [
[
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jmarrietar/tensorflow-recorder | [
"f03063c763936a4911eb52e62a0c796f9173204d"
] | [
"tfrecorder/accessor.py"
] | [
"# Lint as: python3\n\n# Copyright 2020 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
[
"pandas.api.extensions.register_dataframe_accessor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"0.24",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
zqcchris/feudal_networks | [
"02935592d7bceb77b49bd6deef836c67a23e408b"
] | [
"feudal_networks/envs/vision_maze.py"
] | [
"\nimport gym\nfrom gym import spaces\nimport numpy as np\n\nclass VisionMazeEnv(gym.Env):\n def __init__(self, room_length=3, num_rooms_per_side=2):\n assert room_length % 2 == 1, \"room_length must be odd\"\n assert room_length >= 3, \"room_length must be greater than 3\"\n assert num_room... | [
[
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
WilmerLab/mofun | [
"ec95f2c4455a37ff73d0f595b56f4a246924c2dd"
] | [
"perf/uio-66-67-perf/perf-plot.py"
] | [
"\nimport click\nimport matplotlib.pyplot as plt\nfrom matplotlib import rc\nimport numpy as np\nimport pandas as pd\n\nrc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})\n\nfsl = fs = 9\n\n@click.command()\n@click.argument('csv-path', type=click.File())\n@click.option('--outputpath', '-o', type=click.... | [
[
"pandas.read_csv",
"matplotlib.pyplot.close",
"pandas.to_numeric",
"matplotlib.rc",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
aczyzewski/data_visualization_with_multidimensional_scaling | [
"3a607833da1c207b40899d6c0fe6f9b9d3180ca2"
] | [
"lab1_lin_combination/aczyzewski_lab_1_homework.py"
] | [
"#!/usr/bin/env python\nimport itertools\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D # Without this projection='3d' is not recognized\n\n\ndef draw_contour_2d(points):\n \"\"\"Draws contour of the 2D figure based on the order of the points.\n\n :param points: ... | [
[
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.margins",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.arrow",
"numpy.array",
"numpy.sum",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shenzebang/FedRep | [
"7cd63f1065e2f42079e71294fa4df7b4d20c968a"
] | [
"models/test.py"
] | [
"# Modified from: https://github.com/pliang279/LG-FedAvg/blob/master/models/test.py\n# credit goes to: Paul Pu Liang\n\n# !/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @python: 3.6\n\nimport copy\nimport numpy as np\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torch.utils.data impor... | [
[
"torch.max",
"torch.nn.functional.cross_entropy",
"torch.from_numpy",
"torch.tensor",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
amitkml/TSAI-DeepVision-EVA4.0-Phase-2 | [
"f9e232b3eb6ce20f522136523e79208ed85a1f28"
] | [
"03-FaceRecognition-I/thetensorclan-aws/face/face_blend_common.py"
] | [
"import math\n\nimport cv2\nimport dlib\nimport numpy as np\n\n\n# Returns 8 points on the boundary of a rectangle\ndef getEightBoundaryPoints(h, w):\n boundaryPts = []\n boundaryPts.append((0, 0))\n boundaryPts.append((w / 2, 0))\n boundaryPts.append((w - 1, 0))\n boundaryPts.append((w - 1, h / 2))\... | [
[
"numpy.reshape",
"numpy.int32",
"numpy.linalg.norm",
"numpy.int",
"numpy.copy",
"numpy.argmin",
"numpy.float32",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
voxmenthe/keras-io | [
"7165ea10a913de1857cbaa81a90c4443a699c726"
] | [
"guides/training_with_built_in_methods.py"
] | [
"\"\"\"\nTitle: Training & evaluation with the built-in methods\nAuthor: [fchollet](https://twitter.com/fchollet)\nDate created: 2019/03/01\nLast modified: 2020/04/13\nDescription: Complete guide to training & evaluation with `fit()` and `evaluate()`.\n\"\"\"\n\n\n\"\"\"\n## Setup\n\"\"\"\n\nimport tensorflow as tf... | [
[
"tensorflow.keras.metrics.BinaryAccuracy",
"tensorflow.keras.models.load_model",
"tensorflow.keras.losses.CategoricalCrossentropy",
"tensorflow.reduce_sum",
"tensorflow.cast",
"numpy.random.random_sample",
"tensorflow.keras.metrics.CategoricalAccuracy",
"tensorflow.keras.callbacks.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
Abhishek-TyRnT/scikit-learn | [
"bcd902e591e07ee3a67cecc77fcda5a4d1935631",
"b758c2e84d5082eab5fdfee68490d43223a0ec35"
] | [
"sklearn/kernel_approximation.py",
"sklearn/neural_network/_multilayer_perceptron.py"
] | [
"\"\"\"\nThe :mod:`sklearn.kernel_approximation` module implements several\napproximate kernel feature maps based on Fourier transforms and Count Sketches.\n\"\"\"\n\n# Author: Andreas Mueller <amueller@ais.uni-bonn.de>\n# Daniel Lopez-Sanchez (TensorSketch) <lope@usal.es>\n\n# License: BSD 3 clause\n\nimpo... | [
[
"numpy.dot",
"scipy.linalg.svd",
"numpy.sqrt",
"scipy.fftpack.fft",
"numpy.zeros_like",
"numpy.hstack",
"scipy.sparse.issparse",
"numpy.sin",
"numpy.zeros",
"numpy.log",
"scipy.fftpack.ifft",
"numpy.cosh",
"scipy.sparse.csr_matrix",
"numpy.tan",
"scipy.s... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.14",
"0.15",
"0.12",
"0.10"
],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mpariente/OrdNMF | [
"fc038656f2881ef129cf3eba0c8f91380f480cb4"
] | [
"model/dcPF/dcpf.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: ogouvert\n\nVariational Inference algorithm for Discrete Compound Poisson Factorization (DCPF)\n\n- DCPF MODEL:\nW ~ Gamma(aphaW,betaW) ## UxK (size of W)\nH ~ Gamma(aphaH,betaH) ## IxK\nC ~ Poisson(t*W*H) ## UxIxK \nN = sum(C) ... | [
[
"numpy.log",
"numpy.abs",
"numpy.random.seed",
"numpy.isnan",
"scipy.special.digamma",
"scipy.sparse.csr_matrix",
"scipy.special.gammaln",
"numpy.random.gamma",
"numpy.exp",
"numpy.sum",
"numpy.isin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.18",
"0.19"
],
"tensorflow": []
}
] |
astrogirl1/montepython_public | [
"deaefcf08dd42b4492c00868442afbc25b2fd484"
] | [
"montepython/analyze.py"
] | [
"\"\"\"\n.. module:: analyze\n :synopsis: Extract data from chains and produce plots\n\n.. moduleauthor:: Karim Benabed <benabed@iap.fr>\n.. moduleauthor:: Benjamin Audren <benjamin.audren@epfl.ch>\n\nCollection of functions needed to analyze the Markov chains.\n\nThis module defines as well a class :class:`Infor... | [
[
"numpy.diag",
"numpy.dot",
"numpy.polyfit",
"numpy.amax",
"numpy.sqrt",
"numpy.linspace",
"numpy.cumsum",
"numpy.concatenate",
"numpy.max",
"numpy.searchsorted",
"numpy.exp",
"numpy.histogram",
"numpy.copy",
"numpy.zeros",
"matplotlib.pyplot.figure",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
georgesbarron/qiskit-terra | [
"221dfffe058951c9c493d346583d20b560a414f5"
] | [
"test/python/circuit/test_library.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.asarray",
"numpy.kron",
"numpy.all",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.any",
"numpy.exp",
"numpy.eye",
"numpy.testing.assert_almost_equal",
"numpy.zeros",
"numpy.testing.assert_array_almost_equal",
"numpy.isclo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yannbouteiller/rlrd | [
"391925c2a243f602599b74c2a168b669a8233066"
] | [
"rlrd/wrappers_rd.py"
] | [
"from collections import deque\nfrom random import sample\nimport itertools\n\nimport gym\nfrom gym.spaces import Tuple, Discrete\n\nimport numpy as np\n\n\nclass RandomDelayWrapper(gym.Wrapper):\n \"\"\"\n Wrapper for any non-RTRL environment, modelling random observation and action delays\n NB: alpha ref... | [
[
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
timothyb0912/checkrs | [
"213ac39b5dccc0c38d984a66286174de070af00d"
] | [
"src/checkrs/market.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nFunctions for plotting simulated vs observed market shares of each alternative.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sbn\n\nfrom .plot_utils import _label_despine_save_and_show... | [
[
"numpy.unique",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.sort",
"numpy.repeat",
"numpy.where",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
rebekka-burkholz/hidden-networks | [
"04b07bfdf4500b58886ee9093ec4283846404be8"
] | [
"simple_mnist_example.py"
] | [
"# General structure from https://github.com/pytorch/examples/blob/master/mnist/main.py\nfrom __future__ import print_function\nimport argparse\nimport os\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\n... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.Dropout2d",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.nn.functional.log_softmax",
"torch.manual_seed",
"torch.nn.functional.conv2d",
"torch.nn.functional.relu",
"torch.no_grad",
"torch.cuda.is_available",
"torch.flatten",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
c-benko/HHG_phasematching_fsEC | [
"ea8029ceaa47fb62957eadfa8634d5d9b319cecb"
] | [
"src/laser.py"
] | [
"import numpy as np\n\nclass laser:\n '''\n The laser class, very basic. Takes intensity and pulse width, contains function form of pulse.\n\n Takes pulse_FWHM in [s], Int in [10**14 W cm**-2], lam is wavelength in [nm], spot is w0 in [um].\n pulse(self, t, strength, sigma) outputs a sin**2 pulse for th... | [
[
"numpy.exp",
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bpbpublications/Natural-Computing-with--Python | [
"6338976b5d3edef026d9387d005d246b6160b508"
] | [
"Chapter_04/ACO.py"
] | [
"import math\nimport random\nfrom bisect import bisect_left\nfrom random import randint\nimport matplotlib.pyplot as plt\nimport matplotlib\n\nclass colony:\n\tclass ant:\n\t\tdef __init__(self, colony):\n\t\t\tself.visited_food_locations = [colony.start]\n\t\t\tself.traveled_distance = 0\n\t\t\t\n\t\t\tself.unvisi... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.tick_params",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lchen23/xraylarch | [
"6861ad36a24cceef5e4e3e9d1260c818a4e661ec",
"6861ad36a24cceef5e4e3e9d1260c818a4e661ec"
] | [
"larch/xsw/YongsCode/SimpleParratt.py",
"larch/xsw/SimpleParratt.py"
] | [
"import math\nimport cmath\nimport numpy\n#import fluo # used in Layer.get_index, change to readf1f2, stop using fluo\nimport readf1f2a\n\n# 9/20/2010: Y.Choi.\n# Reflectivity calculation using Parratt's recursive formula\n# Calculate reflected intensity as a function of angle or energy\n# Needs accesss to index o... | [
[
"numpy.arange"
],
[
"numpy.arange",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Jasonnor/deepface | [
"1512d0ae58832d7c66f01b24acca1077323ecfbd"
] | [
"api/api.py"
] | [
"from flask import Flask, jsonify, request, make_response\n\nimport argparse\nimport uuid\nimport json\nimport time\nfrom tqdm import tqdm\n\nimport tensorflow as tf\n\nfrom deepface import DeepFace\nfrom deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace\nfrom deepface.extendedmodels import Age, Gen... | [
[
"tensorflow.get_default_graph"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
basiralab/ReMI-Net | [
"15402fee3afb572480971b11dac23c6da4f30e0c"
] | [
"plotting.py"
] | [
"import matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nfrom matplotlib._color_data import BASE_COLORS\r\nfrom sklearn.manifold import TSNE\r\n\r\ndef plot_cbt(img, fold_num=1, timepoint=0):\r\n img = np.repeat(np.repeat(img, 10, axis=1), 10, axis=0)\r\n plt.imshow(img)\r\n plt... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.axis",
"numpy.repeat",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
samvanderpoel/PixelGeom | [
"cbe7ae3edd62105d69843f7317c608b16907849f"
] | [
"tests/testcmap.py"
] | [
"import functools\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os, sys\nsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # add parent dir to sys path\n\nfrom grid import rgb_to_cmap\n\nif not os.path.isdir('tests/test-output'):\n os.makedirs('tests/test-output')\n\n# S... | [
[
"numpy.ndenumerate",
"numpy.zeros",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.close"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kaylai/VESIcal | [
"3ea18b0ce30b30fb55786346c37ef8f428ee5034"
] | [
"VESIcal/models/liu.py"
] | [
"from VESIcal import activity_models\nfrom VESIcal import calibration_checks\nfrom VESIcal import core\nfrom VESIcal import fugacity_models\nfrom VESIcal import model_classes\nfrom VESIcal import sample_class\n\nimport numpy as np\nimport warnings as w\nimport sympy\nfrom scipy.optimize import root_scalar\n\n\nclas... | [
[
"scipy.optimize.root_scalar",
"numpy.max",
"numpy.real",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.9",
"1.5",
"1.2",
"1.7",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
everdoubling/Korean-math-word-problems-solver | [
"55faec42462f9b99e8952ab900389b0621f21935"
] | [
"legacy/template-jit.py"
] | [
"# %%\nfrom numba import jit\n\nimport time\nimport re\nimport wordsim\nimport utils\nimport dataset\n\nimport numpy as np\n\n# pos tagging된 두 단어를 비교한 score를 계산, w1 = template tag, w2 = question tag\n# w = (str, POS, start, end)의 형식, start, end는 문장에서의 span 시작과 끝 index\n# 이상적으로는 str과 POS값을 모두 고려하여 score를 계산하여야 하지만 일... | [
[
"numpy.zeros",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AmarSaini/Cost-Based-Optimization | [
"c6a2fcd930ac915a3d09585ff285b5bea0653a32"
] | [
"Cost Based Optimization.py"
] | [
"import math\nimport numpy as np\nimport tensorflow as tf\nimport time\nimport matplotlib.pyplot as plt\nfrom scipy.optimize import curve_fit\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras import optimizers\nfrom keras import callbacks\n\n# ----- Global Variables -----\n\n# Feature... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"tensorflow.exp",
"matplotlib.pyplot.plot",
"numpy.diff",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"scipy.optimize.curve_fit",
"numpy.zeros",
"matplotlib.p... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | [
"a072cb940201bbcdb2d0f4d0dfa1dde478fa4464"
] | [
"src/speech/model_joint.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport pdb\nimport numpy as np\nfrom torch.nn.utils.rnn import pad_packed_sequence, pad_sequence, pack_padded_sequence\n\noutput = []\n\nclass LSTM_Audio(nn.Module):\n def __init__(self, hidden_dim, num_layers, device,dropout_rate=0 ,bidirect... | [
[
"torch.mean",
"torch.nn.Dropout",
"torch.max",
"torch.zeros",
"torch.cat",
"torch.nn.LSTM",
"torch.nn.Conv2d",
"torch.sum",
"torch.unsqueeze",
"torch.tensor",
"torch.tanh",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.exp",
"torch.matmul",
"torch.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mwang87/NPAtlasGNPSproxy | [
"f3fa873cbf1d346f4cb8bd24739ee3c33d0e575f"
] | [
"workflow/bin/convert_mibig.py"
] | [
"import requests\nimport sys\nimport json\nimport pandas as pd\nimport glob\nimport requests_cache\nfrom tqdm import tqdm\nimport urllib.parse\nrequests_cache.install_cache('demo_cache')\n\n\ndef get_inchikey(smiles):\n url = \"https://gnps-structure.ucsd.edu/inchikey?smiles={}\".format(urllib.parse.quote(smiles... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ahmed-shariff/lighttrack | [
"28ff1aea5273ead4013d0c733ca15328d7563245"
] | [
"detector/detector_utils.py"
] | [
"# Source: https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/a68d786f6c9cb65d944c2f48eb7d219c914de11f/utils/utils.py\n\nfrom __future__ import division\nimport math\nimport time\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport numpy as np\nimpor... | [
[
"numpy.expand_dims",
"torch.max",
"torch.zeros",
"torch.cat",
"numpy.concatenate",
"torch.FloatTensor",
"numpy.where",
"torch.ones",
"numpy.pad",
"numpy.unique",
"numpy.eye",
"torch.from_numpy",
"numpy.finfo",
"numpy.argmax",
"numpy.zeros",
"torch.nn... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PrashantDandriyal/tensorflow | [
"cc6d91a334802a0a4a1c66e539c2b08602fa588b"
] | [
"tensorflow/lite/tools/pip_package/setup.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... | [
[
"numpy.get_include"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
s-vidal/style_transfer | [
"a7f02b1ee0a69c49ff59f8b36e8d6c4500cc665a"
] | [
".history/server_2/algo_20200930102133.py"
] | [
"import matplotlib.pylab as plt\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow_hub as hub\n\n\ndef style_transfer(content_image_path, style_image_path):\n try:\n content_image_path = \"images/rnd_imgs/trump.jpg\"\n style_image_path = \"images/style_imgs/wave.jpg\"\n\n conten... | [
[
"tensorflow.constant",
"matplotlib.pylab.axis",
"matplotlib.pylab.imread",
"tensorflow.image.resize",
"matplotlib.pylab.imshow",
"matplotlib.pylab.savefig"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sgs-weather-and-environmental-systems/rstt | [
"bd7855001e65f4802f4a2556fc5d7d2fa1f85619"
] | [
"gr-rstt/python/nle_integral.py"
] | [
"#!/usr/bin/python3\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport sys\n\n\nclass Src:\n def __init__(self, fname, block_size, navg = 1):\n self.offs = 0\n self.navg = navg\n self.block_size = block_size\n self.data = np.fromfile(fname, dtype=np.float32)\n l = d... | [
[
"numpy.log",
"numpy.fromfile",
"numpy.sqrt",
"numpy.isfinite",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"numpy.exp",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
andy920262/pytorch-a2c-ppo-acktr | [
"2e7e85219dfe737cb4036de3cf0c8b00706d640e"
] | [
"storage.py"
] | [
"import torch\nfrom torch.utils.data.sampler import BatchSampler, SubsetRandomSampler\n\n\nclass RolloutStorage(object):\n def __init__(self, num_steps, num_processes, obs_shape, action_space, state_size):\n self.observations = torch.zeros(num_steps + 1, num_processes, *obs_shape)\n self.states = t... | [
[
"torch.LongTensor",
"torch.ones",
"torch.cat",
"torch.randperm",
"torch.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
andrijaster/GCRF-GCRFC | [
"1a308bd563838719cb6afe826d1852e00aafb514"
] | [
"src/preprocess/Distr_gener.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Oct 24 10:42:49 2018\n\n@author: Andrija Master\n\"\"\"\nimport pandas as pd\nimport numpy as np\nfrom scipy.io import arff\nfrom sklearn.utils import shuffle\nfrom sklearn.metrics import mean_squared_error\nimport matplotlib.pyplot as plt\nimport seaborn as sb\n\n\n... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.subplot",
"numpy.load",
"numpy.where",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
cmaureir/TurnipBot5000 | [
"6f65ea2618d194c8c7e410cec3810ceeab670505"
] | [
"lib/spreadsheet.py"
] | [
"import re\nimport pandas as pd\nimport numpy as np\nimport gspread\nfrom google.oauth2.service_account import Credentials\n\ndef get_data(credentials):\n scope = ['https://spreadsheets.google.com/feeds',\n 'https://www.googleapis.com/auth/drive']\n credentials = Credentials.from_service_account_f... | [
[
"pandas.DataFrame.from_records"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
liziyun/SparseConvNet | [
"0053b2a4eef3d0b9d4b79ede3ede664c2f0a3910"
] | [
"examples/cifar10/data.py"
] | [
"\n# Copyright 2016-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport torch\nimport torchnet\nimport torchvision\nimport torchvision.transforms as transforms\nimport sparsec... | [
[
"torch.LongTensor",
"torch.FloatTensor",
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
HanKun66/haker_ner | [
"7c05a10987d82394c9b1a471ca7fdc302cf4e646"
] | [
"train.py"
] | [
"\"\"\"Train and evaluate the model\"\"\"\nimport os\nimport torch\nimport utils\nimport random\nimport logging\nimport argparse\nimport torch.nn as nn\nfrom tqdm import trange\nfrom evaluate import evaluate\nfrom data_loader import DataLoader\nfrom SequenceTagger import BertForSequenceTagging\nfrom transformers.op... | [
[
"torch.manual_seed",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
determinant-io/aboleth | [
"53a3de23dce4d607ffec92be936e83d2dd7ebb3c"
] | [
"tests/test_utils.py"
] | [
"\"\"\"Test the aboleth utilities.\"\"\"\n\nfrom types import GeneratorType\n\nimport numpy as np\nimport tensorflow as tf\n\nimport aboleth as ab\n\n\ndef test_batch():\n \"\"\"Test the batch feed dict generator.\"\"\"\n X = np.arange(100)\n fd = {'X': X}\n\n data = ab.batch(fd, batch_size=10, n_iter=1... | [
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
linthieda/ynn | [
"8c3334c57fc461e4883027dbc0559b961a206922",
"8c3334c57fc461e4883027dbc0559b961a206922",
"8c3334c57fc461e4883027dbc0559b961a206922"
] | [
"script/script_2_1_naive.py",
"script/script_3_1_preprocessing.py",
"script/script_4_0_pbp.py"
] | [
"# required python version: 3.6+\n\nimport os\nimport sys\nimport src.load_data as load_data\nfrom src import layer\nimport src.rbm as rbm\nimport matplotlib.pyplot as plt\nimport numpy\nimport os\n\n# format of data\n# disitstrain.txt contains 3000 lines, each line 785 numbers, comma delimited\n\nfull_path = os.p... | [
[
"numpy.random.seed"
],
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.loadtxt",
"matplotlib.pyplot.ylab... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xmyhhh/DBPN-Pytorch | [
"7e6852658605ec59347661f88251e6c92ff5e56e"
] | [
"base_networks.py"
] | [
"import torch\nimport math\n\nclass DenseBlock(torch.nn.Module):\n def __init__(self, input_size, output_size, bias=True, activation='relu', norm='batch'):\n super(DenseBlock, self).__init__()\n self.fc = torch.nn.Linear(input_size, output_size, bias=bias)\n\n self.norm = norm\n if se... | [
[
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.add",
"torch.nn.ConvTranspose2d",
"torch.nn.InstanceNorm1d",
"torch.nn.PReLU",
"torch.nn.Conv2d",
"torch.nn.PixelShuffle",
"torch.nn.Tanh",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.InstanceNorm2d",
"t... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jjakimoto/BBoptimizer | [
"fcc58393905ee72184ad3759ea444bc52b9a3a2d"
] | [
"bboptimizer/samplers/utils.py"
] | [
"from collections import defaultdict\nimport numpy as np\nimport random\nfrom scipy.stats import norm\n\n\nSAMPLERS_MAP = dict()\n\n\ndef register(cls):\n SAMPLERS_MAP[cls.sampler_name] = cls\n\n\ndef _random_sample(params_conf):\n \"\"\"Sample parameters at random with dictionary format\n\n Parameters\n ... | [
[
"numpy.sqrt",
"scipy.stats.norm.pdf",
"numpy.min",
"scipy.stats.norm.cdf",
"numpy.atleast_2d",
"numpy.log10",
"numpy.random.uniform",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
conghaowoooong/Project-Erina | [
"e4e645a348d5df6d571d5334a0e2d5ecba8466bb"
] | [
"helpmethods.py"
] | [
"'''\n@Author: ConghaoWong\n@Date: 2019-12-20 09:39:11\nLastEditors: Conghao Wong\nLastEditTime: 2020-08-16 00:06:03\n@Description: helpmethods\n'''\n\nimport os\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow as tf\nfrom sklearn.manifold import TSNE\n\nfrom tqdm import tqdm\n\ndef list2arra... | [
[
"matplotlib.pyplot.plot",
"sklearn.manifold.TSNE",
"numpy.max",
"numpy.mean",
"numpy.exp",
"numpy.where",
"numpy.ones_like",
"tensorflow.linalg.svd",
"numpy.arange",
"numpy.matmul",
"numpy.stack",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.close",
"matp... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
ashish2020kashyap/cessini | [
"9713fd76d2e31a95266ec69da2abc98424a46e52"
] | [
"anees/views.py"
] | [
"import csv, io\nfrom django.shortcuts import render,redirect\nfrom django.contrib import messages\nfrom .models import *\nfrom .forms import CampaignForm,CreateUserForm,CustomerForm,EmailForm,EmailUpdateForm,CampUpdateForm\nfrom django.contrib.auth.models import Group,User\nfrom django.contrib.auth import authenti... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
semskurto/YOLOX | [
"1196be5ad7f25f013e512d2bfe4a743031321896"
] | [
"yolox/exp/yolox_base.py"
] | [
"#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.\n\nimport os\nimport random\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\nfrom .base_exp import BaseExp\n\n\nclass Exp(BaseExp):\n\n def __init__(self):\n super().__ini... | [
[
"torch.distributed.broadcast",
"torch.LongTensor",
"torch.utils.data.distributed.DistributedSampler",
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.distributed.barrier",
"torch.optim.SGD",
"torch.distributed.get_world_size"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cyberlabsai/watchdog-middleware | [
"d66805e7b5155cf6ca7b228d10dc80632ab6aa0d"
] | [
"model.py"
] | [
"import math\nimport numpy as np\nimport tensorflow as tf\nfrom enum import Enum, unique\n\n\n@unique\nclass InputType(Enum):\n TENSOR = 1\n BASE64_JPEG = 2\n\n\nclass OpenNsfwModel:\n \"\"\"Tensorflow implementation of Yahoo's Open NSFW Model\n\n Original implementation:\n https://github.com/yahoo/o... | [
[
"tensorflow.nn.relu",
"tensorflow.nn.softmax",
"tensorflow.reshape",
"tensorflow.layers.max_pooling2d",
"tensorflow.placeholder",
"tensorflow.add",
"tensorflow.pad",
"tensorflow.layers.average_pooling2d",
"numpy.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
bluesea0/pytorch-tutorial | [
"74dffb57fd8fc7e4298e83f9e0762d88d1e5768e"
] | [
"tutorials/02-intermediate/deep_residual_network/main.py"
] | [
"# ---------------------------------------------------------------------------- #\n# An implementation of https://arxiv.org/pdf/1512.03385.pdf #\n# See section 4.2 for the model architecture on CIFAR-10 #\n# Some part of the code was referenced from below ... | [
[
"torch.nn.Sequential",
"torch.nn.CrossEntropyLoss",
"torch.max",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.no_grad",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PirateX0/MAMS-for-ABSA | [
"cddcdb0f423b3fdb2c76b70744737abed3a00d17"
] | [
"src/module/attention/attention.py"
] | [
"from torch import nn\nimport torch.nn.functional as F\nfrom src.module.utils import constants\n\nclass Attention(nn.Module):\n \"\"\"\n The base class of attention.\n \"\"\"\n\n def __init__(self, dropout):\n super(Attention, self).__init__()\n self.dropout = dropout\n\n def forward(se... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.dropout"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ewanlee/Learning-to-Group | [
"a32f00cd4c7244c5d5c32dfa68bfdac8eb71a4ae"
] | [
"code/GDL/knn.py"
] | [
"# k-nearest neighbors algorithm\n# input : set of samples X\n# output : the array of length k\nimport numpy as np\nfrom sklearn.neighbors import NearestNeighbors\n\n\ndef knn(k, X):\n neigh = NearestNeighbors(k + 1, metric='euclidean', n_jobs=-1).fit(X)\n kneighbors = neigh.kneighbors(\n X,\n k... | [
[
"numpy.array",
"sklearn.neighbors.NearestNeighbors"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
njwardhan/colour | [
"fedf769764b46cd0b4484cde7e4f59a09b37515c"
] | [
"colour/colorimetry/illuminants.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nIlluminants\n===========\n\nDefines *CIE* illuminants computation related objects:\n\n- :func:`colour.sd_CIE_standard_illuminant_A`\n- :func:`colour.sd_CIE_illuminant_D_series`\n- :func:`colour.daylight_locus_function`\n\nReferences\n----------\n- :cite:`CIETC1-482004` : CI... | [
[
"numpy.around",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ViKrAm-Bais/Machine-Learning-with-Python | [
"35dcaac6f3c60353962b69b35e185f4e09e26adf",
"35dcaac6f3c60353962b69b35e185f4e09e26adf"
] | [
"classification/logistic_regression/logistic regression.py",
"classification/random_forest/Random_Forest.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # logistic regression\n\n# importing modules\n\n# In[33]:\n\n\nimport numpy as np\nfrom sklearn.datasets import make_classification\nimport matplotlib.pyplot as plt\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.model_selection import train_test_split... | [
[
"sklearn.datasets.make_classification",
"sklearn.linear_model.LogisticRegression",
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.confusion_matrix"
],
[
"matplotlib.pyplot.gray",
"sklearn.ensemble.RandomFores... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"... |
KennCoder7/LearnToPayAttention-tensorflow | [
"33e32830602ed1ca35c26918d433e9de37438af8"
] | [
"vgg_att.py"
] | [
"import os\r\nfrom tensorflow.keras import Input, Model, optimizers, datasets\r\nfrom tensorflow.keras.callbacks import ModelCheckpoint\r\nfrom tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense, Flatten, BatchNormalization, Activation, Layer\r\nfrom tensorflow.keras import utils\r\nfrom attention import At... | [
[
"matplotlib.pyplot.imshow",
"tensorflow.concat",
"tensorflow.keras.optimizers.SGD",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Conv2D",
"matplotlib.pyplot.subplot",
"tensorflow.argmax",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.callbacks.ModelCheckpoint",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
rafalbojarczuk/MusicGenreClassifier | [
"259a8f30a057c165f67b44278ad21b140e688759"
] | [
"train.py"
] | [
"import tensorflow as tf\nimport tensorflow.keras as keras\nimport librosa\nimport librosa.feature\nimport glob\nimport numpy as np\nfrom utils import load_data\nfrom models import simple_cnn\nfrom sklearn.metrics import classification_report\nfrom sklearn.metrics import confusion_matrix\n\ntrainX, trainY, validati... | [
[
"sklearn.metrics.classification_report",
"sklearn.metrics.confusion_matrix"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
raminaghods/NATS | [
"175e2a495fffac4161bbee5501053068e3391885"
] | [
"Synthetic_Code/SyntheticRun.py"
] | [
"'''\nCode for the work:\n\n``Multi Agent Active Search using Realistic Depth-Aware Noise Model'', Ramina Ghods, William J Durkin and Jeff Schneider\n\n(C) Ramina Ghods 2020 (rghods@cs.cmu.edu)\nPlease cite the following paper to use the code:\n\n@article{ghods2020multi,\n title={Multi-Agent Active Search using Re... | [
[
"matplotlib.pyplot.legend",
"numpy.amax",
"scipy.stats.sem",
"numpy.all",
"numpy.mean",
"numpy.arange",
"numpy.stack",
"numpy.repeat",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.savefig",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"1.0",
"0.17",
"1.3",
"1.8"
... |
Karthik-Suresh93/fpn_visdrone | [
"5a360e2b26e1c12416b9fd79f99cd96c6f8577e9"
] | [
"lib_original/datasets/uav.py"
] | [
"from __future__ import print_function\r\nfrom __future__ import absolute_import\r\n# --------------------------------------------------------\r\n# Fast R-CNN\r\n# Copyright (c) 2015 Microsoft\r\n# Licensed under The MIT License [see LICENSE for details]\r\n# Written by Ross Girshick\r\n# --------------------------... | [
[
"scipy.io.loadmat",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
RiceD2KLab/TCH_CardiacSignals_F20 | [
"ea6e84703086ddb7bfc5ba164aa67acdc9e78b7d",
"ea6e84703086ddb7bfc5ba164aa67acdc9e78b7d"
] | [
"src/archive/LSTM/LSTMAEts10.py",
"src/exploration/ecg_signal_animation.py"
] | [
"import tensorflow\nfrom tensorflow import keras\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, LSTM, Dropout, RepeatVector, TimeDistributed\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\nimport sys\n\n\ndef create_model(X):\n model = Sequential()\n ... | [
[
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.legend",
"tensorflow.keras.layers.Dropout",
"matplotlib.pyplot.title",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.callbacks.EarlyStopping",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"tensorflow.keras.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
v7labs/darwin-lib | [
"13efb4867effd3d312bcfafe1ee242aed61fae3a"
] | [
"darwin/dataset/local_dataset.py"
] | [
"import json\nimport multiprocessing as mp\nfrom pathlib import Path\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple\n\nimport numpy as np\nfrom darwin.dataset.utils import get_classes, get_release_path, load_pil_image\nfrom darwin.utils import SUPPORTED_IMAGE_EXTENSIONS\nfrom PIL import Image as PIL... | [
[
"numpy.sqrt",
"numpy.unique",
"numpy.mean",
"numpy.array",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
thlautenschlaeger/sds | [
"710e7c6b1b15afd0476b6f0f60c03415571bebeb",
"710e7c6b1b15afd0476b6f0f60c03415571bebeb"
] | [
"evaluation/l4dc2020/pendulum_bayesian/pendulum_bayesian_compare.py",
"sds_numpy/utils.py"
] | [
"import torch\nimport numpy as np\nimport numpy.random as npr\n\nfrom sds_numpy import rARHMM, ARHMM\nfrom sds_bayesian_numpy.vbrarhmm import VBrARHMM\nfrom sds_bayesian_numpy.vbarhmm import VBARHMM\nfrom sds_bayesian_numpy.vbhmm import VBHMM\nfrom sds_numpy.utils import sample_env\n\n# from reg.gp import DynamicMu... | [
[
"matplotlib.pyplot.gca",
"numpy.hstack",
"sklearn.model_selection.ShuffleSplit",
"numpy.random.seed",
"torch.manual_seed",
"numpy.vstack",
"numpy.eye",
"numpy.stack",
"numpy.ones",
"numpy.std",
"torch.set_num_threads",
"numpy.mean",
"matplotlib.pyplot.close",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.4",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
... |
YoushaaMurhij/3d-tracking-approaches | [
"0fcb9d6d1ff9cc9bb637e8e988f510a80c04f695"
] | [
"Probabilistic_Tracker/get_nuscenes_stats.py"
] | [
"import os\nimport sys\n\nimport numpy as np\nfrom main import iou3d, convert_3dbox_to_8corner\nfrom sklearn.utils.linear_assignment_ import linear_assignment\n\nfrom nuscenes import NuScenes\nfrom nuscenes.eval.common.config import config_factory\nfrom nuscenes.eval.tracking.evaluate import TrackingEval\nfrom nusc... | [
[
"sklearn.utils.linear_assignment_.linear_assignment",
"numpy.sqrt",
"numpy.stack",
"numpy.std",
"numpy.mean",
"numpy.var",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
letylu/bootcamp-bringing-ML-models-into-production-intermediary-jun-aug2021 | [
"bdb3a8dfd5232bf6d999458c1e8cad1736469b32"
] | [
"bootcamp/lesson3/blob_function/LRBlobTrigger/__init__.py"
] | [
"import io\r\nimport logging\r\nimport joblib\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\nimport azure.functions as func\r\nfrom azureml.core import Model\r\n\r\n\r\ndef main(inputBlob: func.InputStream, predictions: func.Out[str]):\r\n logging.info(\"Python blob trigger function processed blob\")\r\n\r... | [
[
"numpy.array_str"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
detritus3872/kartothek | [
"e4155e4ec72decd6d5ee67d6258f7683cc690c01"
] | [
"tests/core/test_index.py"
] | [
"# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport logging\nimport pickle\nfrom itertools import permutations\n\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\nimport pytest\nimport pytz\nfrom hypothesis import assume, given\nfrom pandas.testing import assert_series_equal\n\nfrom kartothek.core.i... | [
[
"pandas.Timestamp",
"pandas.testing.assert_series_equal",
"pandas.Index",
"numpy.iinfo"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
royJackman/HorsePythons | [
"b40170b21d65f007cc9e6847debd09cba6365c71"
] | [
"crawler.py"
] | [
"import argparse\nimport asyncio\nimport json\nimport pyppeteer\nimport re\nimport sys\nimport numpy as np\n\nfrom bs4 import BeautifulSoup as bs\nfrom tabulate import tabulate\n\nparser = argparse.ArgumentParser(description='Gather horse race data from offtrackbetting.com')\nparser.add_argument('-b', '--base-date'... | [
[
"numpy.array",
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sarahyurick/cloud-ml-examples | [
"572c607ffeffae276f113b6dff7f76a9643e84b5"
] | [
"aws/code/serve.py"
] | [
"#\n# Copyright (c) 2019-2021, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
colesbury/boost-histogram | [
"9e39e111cfd416fae6b2e8209157386163dd46ab"
] | [
"tests/test_axis.py"
] | [
"import abc\nimport copy\n\nimport numpy as np\nimport pytest\nfrom numpy.testing import assert_allclose, assert_array_equal\nfrom pytest import approx\n\nimport boost_histogram as bh\n\n\n@pytest.mark.parametrize(\n \"axis,args,opt,kwargs\",\n [\n (bh.axis.Regular, (1, 2, 3), \"\", {}),\n (bh.a... | [
[
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.reshape",
"numpy.testing.assert_allclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RaghuSpaceRajan/bsuite-mdpp-merge | [
"4f3cfd7dd943ae525e19dab315212a4290edd85f"
] | [
"bsuite/environments/bandit.py"
] | [
"# python3\n# pylint: disable=g-bad-file-header\n# Copyright 2019 DeepMind Technologies Limited. 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:/... | [
[
"numpy.random.RandomState",
"numpy.linspace",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
asappresearch/rationale-alignment | [
"8d2bf06ba4c121863833094d5d4896bf34a9a73e",
"8d2bf06ba4c121863833094d5d4896bf34a9a73e"
] | [
"classify/metric/loss/ce.py",
"similarity/models/alignment.py"
] | [
"from typing import Dict, List, Tuple, Optional\n\nimport torch\nimport torch.nn.functional as F\n\nfrom classify.metric.abstract import AlignmentMetric\nfrom classify.metric.abstract import Metric\n\n\nclass CrossEntropyLoss(Metric):\n \"\"\"Computes the hinge loss between aligned and un-aligned document pairs ... | [
[
"torch.stack",
"torch.nn.functional.cross_entropy"
],
[
"torch.device",
"torch.index_select",
"torch.ones_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ElchinValiyev/GameAI | [
"bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e"
] | [
"Project_3/bayesian_imitation_learning/kmeans.py"
] | [
"import numpy as np\nimport random\n\n\ndef distance(a, b):\n sum_square = 0\n for i in range(len(a)):\n sum_square += (a[i] - b[i]) ** 2\n return np.sqrt(sum_square)\n\n\ndef e_step(centers, datapoints):\n clusters = np.zeros((len(datapoints)), dtype=np.int64)\n\n for i in range(len(datapoint... | [
[
"numpy.sqrt",
"numpy.min",
"numpy.shape",
"numpy.bincount",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chengsoonong/crowdastro | [
"ce14432c36de0574b73d813304365b74446a61f8"
] | [
"crowdastro/active_learning/test.py"
] | [
"\"\"\"Tests active learning agents with pool-based binary classification.\n\nMatthew Alger\nThe Australian National University\n2016\n\"\"\"\n\nimport multiprocessing\nimport multiprocessing.pool\n\nimport matplotlib.pyplot as plt\nimport numpy\nimport sklearn.cross_validation\nimport sklearn.datasets\nimport skle... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.mean",
"numpy.ma.masked_array",
"numpy.random.binomial",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wellcometrust/WellcomeML | [
"f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf"
] | [
"wellcomeml/ml/bert_semantic_equivalence.py"
] | [
"from collections import defaultdict\nfrom datetime import datetime\nimport math\nimport os\n\nfrom transformers import BertConfig, BertTokenizer, \\\n TFBertForSequenceClassification\n\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.u... | [
[
"tensorflow.keras.models.load_model",
"sklearn.utils.validation.check_is_fitted",
"tensorflow.concat",
"tensorflow.config.list_physical_devices",
"tensorflow.data.Dataset.from_generator",
"tensorflow.keras.callbacks.TensorBoard",
"tensorflow.TensorShape",
"tensorflow.keras.layers.D... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
oscillating-gate/eurorack | [
"35bf03aa35b01a7a4a9b0a0ca2898677cd3a9f6a"
] | [
"streams/resources/waveforms.py"
] | [
"#!/usr/bin/python2.5\n#\n# Copyright 2014 Olivier Gillet.\n#\n# Author: Olivier Gillet (ol.gillet@gmail.com)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, ... | [
[
"numpy.arange",
"numpy.exp",
"numpy.log2"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AWehrhahn/exoplanet_transit_snr | [
"f1bdaddb89e1c8b819651bcd2d80ed95d2a1fc0f",
"f1bdaddb89e1c8b819651bcd2d80ed95d2a1fc0f"
] | [
"exoplanet_transit_snr/petitradtrans.py",
"examples/plot_samples.py"
] | [
"# -*- coding: utf-8 -*-\nfrom typing import Tuple\nfrom unittest import runner\n\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.units import Quantity\n\ntry:\n # Importing petitRADTRANS takes forever...\n import petitRADTRANS as prt\n from petitRADTRANS import nat_cst as nc\n\nexcept (I... | [
[
"numpy.logspace",
"numpy.ones_like"
],
[
"numpy.min",
"matplotlib.pyplot.subplots",
"numpy.percentile",
"numpy.max",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
awakenting/master-thesis | [
"d612c3b240b2d7325cac6fbf9c85c3d81250b558"
] | [
"code/figure_scripts/figure_3_15_expm_fit_posteriors.py"
] | [
"import os\nimport numpy as np\n\nimport matplotlib as mpl\n\nmpl.use(\"pgf\")\ngeneral_fontsize = 20\ncuston_pgf_rcparams = {\n 'font.family': 'serif',\n 'font.serif': 'cm',\n 'font.size': general_fontsize,\n 'xtick.labelsize': general_fontsize,\n 'ytick.labelsize': general_fontsize,\n 'axes.labe... | [
[
"pandas.read_hdf",
"numpy.arange",
"matplotlib.use",
"matplotlib.rcParams.update",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
skelton-group/FitLib | [
"84481cbcdae2bf0575e162717866b4035187d57a"
] | [
"FitLib/Fitter.py"
] | [
"# FitLib/Fitter.py\n\n\n# ----------------\n# Module Docstring\n# ----------------\n\n\"\"\" Main Fitter class. \"\"\"\n\n\n# -------\n# Imports\n# -------\n\nimport math\n\nimport numpy as np\n\nfrom scipy.optimize import minimize\n\nfrom FitLib.Function import Function\n\n\n# ------------\n# Fitter Class\n# ----... | [
[
"numpy.asarray",
"scipy.optimize.minimize",
"numpy.shape",
"numpy.mean",
"numpy.logical_and"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"1.0",
"0.17",
"1.3",
"1.8"
... |
pablohawz/tfg-Scan-Paint-clone | [
"056cd50d9e4274620cf085a41ed9d326e16dd47b"
] | [
"app/__main__.py"
] | [
"# This Python file uses the following encoding: utf-8\nfrom app.package.views.Calibrate_view import CalibrateView\nfrom app.package.controllers.Calibrate_controller import CalibrateController\nfrom app.package.models.Calibrate_model import CalibrateModel\nimport sys\nimport matplotlib\n\nfrom PySide2.QtWidgets imp... | [
[
"matplotlib.use"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
leimao/Rotated_Rectangle_Crop_OpenCV | [
"716ed23fda7d9034b80ce9b1927c612c914ff74d"
] | [
"rotated_rect_crop.py"
] | [
"# Image Preprocessing Utilities\n# Lei Mao\n# University of Chicago\n# 3/1/2018\n\nimport cv2\nimport numpy as np\n\n\ndef inside_rect(rect, num_cols, num_rows):\n # Determine if the four corners of the rectangle are inside the rectangle with width and height\n # rect tuple\n # center (x,y), (width, heigh... | [
[
"matplotlib.pylab.tight_layout",
"matplotlib.pylab.show",
"numpy.min",
"matplotlib.pylab.subplot",
"numpy.max",
"matplotlib.pylab.figure",
"matplotlib.gridspec.GridSpec",
"matplotlib.pylab.savefig",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MattiaMolon/pytorch-YOLOv4 | [
"552ddcad714785785c7153dc790b0ea27c53302c"
] | [
"dataset.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@Time : 2020/05/06 21:09\n@Author : Tianxiaomo\n@File : dataset.py\n@Noice :\n@Modificattion :\n @Author :\n @Time :\n @Detail :\n\n\"\"\"\nimport os\nimport random\nimport sys\nfrom typing import Tuple\n\nimport cv2\nimport nump... | [
[
"numpy.random.seed",
"numpy.clip",
"torch.zeros",
"numpy.random.shuffle",
"numpy.concatenate",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.where",
"torch.as_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ganguli-lab/projecting-manifolds | [
"05a0ca8c87e2f38e51f2f392a13ee670588c5fc7"
] | [
"rand_mfld_proj/mfld/gauss_mfld_plot.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Apr 28 13:46:16 2016\n\n@author: Subhy\n\nPlot distance, principal angles between tangent spaces and curvature as a\nfunction of position on a Gaussian random surface in a high dimensional space\n\nFunctions\n=========\nmake_fig_ax\n Make figure and axes objects\n... | [
[
"numpy.maximum",
"numpy.load",
"matplotlib.pyplot.get_cmap",
"numpy.stack",
"matplotlib.pyplot.colorbar",
"numpy.append",
"matplotlib.pyplot.GridSpec",
"numpy.array",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ananth-repos/machine-learning | [
"a510dcf81fab9137c33f568e73d65262667b3973"
] | [
"1.Linear Regression/1.Code - Using Theory/1.2D - Regression.py"
] | [
"# This code shows how a linear regression analysis can be applied to a 2-dimensional data\n# Implementation here is based on the theory described in the jupyter notebook.\n\n# Code Flow:\n # 1. Import all relevant libraries.\n # 2. Generate sample data & save it as a csv file (Stored as a csv file just to us... | [
[
"numpy.dot",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"numpy.random.uniform",
"numpy.random.normal",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
JonasRSV/Friday | [
"f959eff95ba7b11525f97099c8f5ea0e325face7"
] | [
"mm/models/shared/augmentations/background.py"
] | [
"\"\"\"Download sounds from https://www.soundsnap.com/.\"\"\"\nimport numpy as np\nimport pathlib\nimport sox\n\n\nfrom models.shared.augmentations.core import Augmentation\n\n\nclass Background(Augmentation):\n\n def __init__(self,\n background_noises: pathlib.Path,\n sample_rate... | [
[
"numpy.random.uniform",
"numpy.array",
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mjlbach/robovat | [
"4b46459531c50f3801e6557174e49bfec532d870"
] | [
"robovat/envs/robot_env.py"
] | [
"\"\"\"The parent class for robot environments.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport abc\nimport collections\nimport random\nimport os.path\n\nimport gym\nimport gym.spaces\nimport numpy as np\n\nfrom robovat.simulation.sim... | [
[
"numpy.random.uniform"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
usmanzaheer1995/udacity-ai-programming-nanodegree | [
"50c3dcd59e5a215089c51960d269b8878690ec5c"
] | [
"train.py"
] | [
"import time\nimport json\nfrom pathlib import Path\n\nimport argparse\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom torch import nn, optim\nimport torch.nn.functional as F\nfrom torchvision import transforms, datasets, models\nfrom PIL import Image\n\nfrom workspace_... | [
[
"torch.exp",
"torch.no_grad",
"torch.utils.data.DataLoader"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nicdnb/tensorflow | [
"ad5c0c4d091c93ef65e91c55cb4df065d0c7a989"
] | [
"tensorflow/contrib/data/python/kernel_tests/optimize_dataset_op_test.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.data.ops.dataset_ops.Dataset.from_tensors",
"tensorflow.python.data.ops.dataset_ops.Dataset.from_tensor_slices",
"numpy.ones",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.platform.test.main",
"tensorflow.python.data.ops.dataset_ops.Dataset.range",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
romepeng/efinance | [
"6255dfaa7624a5ef28e55b5378c5263a63aa18e3"
] | [
"efinance/bond/getter.py"
] | [
"from ..utils import process_dataframe_and_series\nimport multitasking\nimport pandas as pd\nimport requests\nfrom typing import (List,\n Union,\n Dict)\n\nfrom ..common import get_history_bill as get_history_bill_for_bond\nfrom ..common import get_today_bill as get_today_bill_... | [
[
"pandas.concat",
"pandas.Series",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.