repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
alkscr/talking-head-anime-2-demo
[ "8de34d3e9a681519b8fe04645f54643583ace2ca" ]
[ "tha2/app/manual_poser.py" ]
[ "import logging\r\nimport os\r\nimport sys\r\nfrom typing import List\r\n\r\nsys.path.append(os.getcwd())\r\n\r\nimport numpy\r\nimport torch\r\nimport wx\r\nimport PIL.Image\r\n\r\nfrom tha2.poser.poser import Poser, PoseParameterCategory, PoseParameterGroup\r\nfrom tha2.util import extract_PIL_image_from_filelike...
[ [ "torch.device", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Leooo-Shen/MaskDetector
[ "2b4d94ee71e7d10dce6baeb7d3aac01dea5a1e80" ]
[ "nets/yolo4-aspp.py" ]
[ "import torch\nimport torch.nn as nn\nfrom collections import OrderedDict\nfrom nets.CSPdarknet import darknet53,Mish\n\n\ndef conv2d(filter_in, filter_out, kernel_size, stride=1):\n pad = (kernel_size - 1) // 2 if kernel_size else 0\n return nn.Sequential(OrderedDict([\n (\"conv\", nn.Conv2d(filter_in...
[ [ "torch.nn.functional.upsample", "torch.cat", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.AdaptiveAvgPool2d", "torch.nn.Upsample", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cioppaanthony/online-distillation
[ "581e0eff97d52b9214c724b20db78f2880e02d52" ]
[ "utils/folder_read_benchmark.py" ]
[ "\"\"\"\n----------------------------------------------------------------------------------------\nCopyright (c) 2020 - see AUTHORS file\n\nThis file is part of the ARTHuS software.\n\nThis program is free software: you can redistribute it and/or modify it under the terms \nof the GNU Affero General Public License ...
[ [ "torch.ones", "numpy.abs", "torch.Tensor", "torch.zeros", "torch.sum", "torch.from_numpy", "torch.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shauheen/triton
[ "12b6158c5cbc10c56f935985e6f466c9867d9238" ]
[ "python/triton/testing.py" ]
[ "import torch\nimport os\nfrom .code_gen import OutOfResources\nimport subprocess\nimport sys\n\n\ntry:\n import triton._C.libtriton.cutlass as _cutlass\n has_cutlass = True\nexcept ImportError:\n _cutlass = None\n has_cutlass = False\n\ndef catch_oor(kernel, pytest_handle=None):\n try:\n res ...
[ [ "torch.normal", "torch.mean", "torch.cuda.synchronize", "torch.randint", "torch.max", "torch.manual_seed", "torch.cuda.current_stream", "torch.cuda.Event", "torch.sum", "matplotlib.pyplot.figure", "pandas.DataFrame", "torch.tensor", "matplotlib.pyplot.subplot", ...
[ { "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": [] } ]
CxzPink/polyGAT
[ "95ee1414dd721567f321a7a6271ce518964688ac" ]
[ "models.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom layers import GraphAttentionLayer, SpGraphAttentionLayer, my_SpGraphAttentionLayer1, my_SpGraphAttentionLayer2\n\n\nclass GAT(nn.Module):\n def __init__(self, nfeat, nhid, nclass, dropout, alpha, nheads):\n \"\"\"Dense version of ...
[ [ "torch.nn.functional.log_softmax", "torch.nn.functional.dropout" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mosin26/selforacle
[ "c99478bf65fd137014f3b7947ed83d105b9f038a" ]
[ "code-predictors/detectors/single_image_based_detectors/autoencoders/convolutional_autoencoder.py" ]
[ "from tensorflow.keras import Input, Model\nfrom tensorflow.keras.layers import Conv2D, MaxPooling2D, UpSampling2D, BatchNormalization, Activation\n\nimport numpy as np\n\nfrom detectors.single_image_based_detectors.abs_single_image_autoencoder import AbstractSingleImageAD\nfrom detectors.single_image_based_detecto...
[ [ "tensorflow.keras.layers.Activation", "tensorflow.keras.Input", "numpy.reshape", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.Model", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.MaxPooling2D" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
zjplab/nmt_soft_prototype
[ "38ccc0b3a118072560ddbfb2c3d95d81e95082c8" ]
[ "fairseq/models/transformer_soft_proto.py" ]
[ "# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\nimport math\nfrom copy...
[ [ "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Embedding", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.nn.init.normal_", "torch.FloatTensor", "torch.no_grad", "torch.nn.init.xavier_uniform_", "torch.nn.functional.linear" ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
antonvs88/multiobj-guided-evac
[ "84d78ac29419011d7af45391f230f50e8cbe30f4", "ece2e12204bd41596173af5aacc0933acfd6b7c1" ]
[ "crowddynamics-simulation/complex_variance.py", "crowddynamics/crowddynamics/core/motion/fluctuation.py" ]
[ "import numpy as np\nfrom crowddynamics.core.geometry import geom_to_linear_obstacles\nfrom crowddynamics.simulation.agents import Circular, ThreeCircle, NO_TARGET, \\\n Agents, AgentGroup\nfrom crowddynamics.simulation.field import Field\nfrom crowddynamics.simulation.logic import Reset, InsideDomain, Integrato...
[ [ "scipy.spatial.qhull.Delaunay", "numpy.random.random", "numpy.linspace", "numpy.random.seed", "numpy.asarray", "numpy.round", "numpy.random.uniform", "numpy.concatenate", "numpy.searchsorted", "numpy.load", "numpy.zeros", "numpy.where" ], [ "numpy.random.uni...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
miramirakim227/SwapNeRF
[ "f9eba3ad054af30bc138c5460ef363165280c5e0" ]
[ "im2scene/training.py" ]
[ "from collections import defaultdict\nfrom torch import autograd\nimport torch.nn.functional as F\nimport numpy as np\n\n\nclass BaseTrainer(object):\n ''' Base trainer class.\n '''\n\n def evaluate(self, data, *args, **kwargs):\n ''' Performs an evaluation.\n '''\n eval_list = default...
[ [ "torch.nn.functional.binary_cross_entropy_with_logits", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jordy24/spacetech-kubesat
[ "e64372cc4cf71d9db7fe2395ba60d93722fccff6" ]
[ "kubesat/orekit.py" ]
[ "# Copyright 2020 IBM Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cityinspain/baseball-analytics
[ "f84b3856748cf8dec8f64db7e90fa94a17a0b7e9" ]
[ "download_scripts/retrosheet_wrangle.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"Wrangle Retrosheet Data from {data_dir}/retrosheet/raw to {data_dir}/retrosheet/wrangled\n\nWrangles: player per game and team per game data\n\"\"\"\n\n__author__ = 'Stephen Diehl'\n\nimport argparse\nimport re\nimport shutil\nfrom pathlib import Path\nimport logging\nimport sys\nim...
[ [ "pandas.merge", "pandas.to_datetime", "pandas.read_csv", "pandas.concat", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
chaitanya9899/Project_Ml_python_AI
[ "ba718e6fb5d8386e8402b605d7dc6180e9b7fceb" ]
[ "Color Detector & Tracker/detector.py" ]
[ "# pip install opencv-python\n# pip install opencv-contrib-python\n# pip install pillow\n\nimport cv2\nimport pandas as pd\nfrom PIL import Image, ImageTk\n\ncsv_path = 'assets/colors.csv'\nindex = ['color', 'color_name', 'hex', 'R', 'G', 'B']\ndf = pd.read_csv(csv_path, names=index, header=None)\n\ndef from_rgb(rg...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
websterkovacek/keras
[ "631102a7c9efb57a351355090796d5850285663c", "631102a7c9efb57a351355090796d5850285663c", "631102a7c9efb57a351355090796d5850285663c", "631102a7c9efb57a351355090796d5850285663c", "631102a7c9efb57a351355090796d5850285663c", "631102a7c9efb57a351355090796d5850285663c" ]
[ "keras/distribute/keras_premade_models_test.py", "keras/tests/model_subclassing_compiled_test.py", "keras/distribute/mirrored_variable_test.py", "keras/tests/custom_training_loop_test.py", "keras/layers/preprocessing/string_lookup_v1.py", "keras/layers/preprocessing/discretization_v1.py" ]
[ "# Copyright 2019 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.__internal__.distribute.multi_process_runner.test_main", "tensorflow.data.Dataset.from_tensor_slices", "numpy.random.uniform", "tensorflow.__internal__.test.combinations.combine" ], [ "numpy.abs", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.test.main", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { ...
jseltmann/vision-based-language
[ "c89e9309ca2cb7335136411771f1f34d81c3d53a" ]
[ "eval_binary/bert/eval_bert_log_reg.py" ]
[ "import spacy\nimport pickle\nimport gensim.downloader\nimport numpy as np\nimport transformers as tr\nimport torch\n\nclass BERT_log_reg_classifier:\n def __init__(self, trained_path):\n with open(trained_path, \"rb\") as clsf:\n self.classifier = pickle.load(clsf)\n if torch.cuda.is_av...
[ [ "numpy.append", "numpy.expand_dims", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mhaminh/graphnet
[ "ef74573c259cd25868d0b26f17a7f86502ec2ffc" ]
[ "src/graphnet/models/training/utils.py" ]
[ "from collections import OrderedDict\nimport os\nfrom typing import List, Optional, Tuple\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch_geometric.data.batch import Batch\n\nfrom graphnet.data.sqlite...
[ [ "torch.load", "numpy.asarray", "torch.utils.data.DataLoader", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.concatenate", "numpy.random.RandomState" ] ]
[ { "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": [] } ]
chaojin0310/Federated-learning-tensorflow
[ "a202a95e3d04d46c1a2a347ef3209aa46087d13e" ]
[ "models/cifar-100/squeezenet.py" ]
[ "import tensorflow as tf\nimport numpy as np\n\nfrom model import Model\nfrom baseline_constants import ACCURACY_KEY\nfrom utils.model_utils import batch_data\n\n\n# IMAGE_SIZE = 224\nIMAGE_SIZE = 32\n\n\nclass ClientModel(Model):\n def __init__(self, seed, lr, num_classes):\n self.num_classes = num_class...
[ [ "tensorflow.nn.relu", "tensorflow.layers.conv2d", "tensorflow.layers.flatten", "tensorflow.layers.batch_normalization", "tensorflow.concat", "tensorflow.control_dependencies", "tensorflow.get_collection", "tensorflow.layers.dropout", "tensorflow.equal", "tensorflow.layers.m...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
taiakindaniil/Python-Programming
[ "93df499fabd9d440cc1c485dd938ba5a58d9d157" ]
[ "Lab-4/app.py" ]
[ "from tkinter import *\nfrom config import *\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport util\n\nsymbols = [\"SBER\", \"GAZP\", \"TATN\", \"VTBR\", \"ALRS\", \"AFLT\", \"HYDR\", \"MOEX\", \"NLMK\", \"CHMF\", \"DSKY\", \"POLY\", \"YNDX\", \"AFKS\", \"LSRG\", \"LSNGP\", \"LKOH\", \"MTSS\", \"NVTK\",...
[ [ "pandas.read_csv", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Saidsp19/Intelligent-attendance-system-using-face-recognition
[ "d8e588f592d4b7d92756a31f6570464ee1e1bea6" ]
[ "Attendence system/dict.py" ]
[ "\"\"\"\r\n@author: Saikumar Dandla\r\n\"\"\"\r\n\r\n\r\nimport numpy as np\r\n\r\nname_dict = {0:'Avinash R' ,\r\n 1:'Durgendra Pandey',\r\n 2:'Rokkam Hari Sankar',\r\n 3:'Adurti Sai Mahesh',\r\n 4:'Manish Pratap Singh',\r\n 5:'RVNK Neeraj',\r\n ...
[ [ "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KariukiKirubi/computer-vision-ai-saturdays
[ "e18c7557bc29a00c0586411f019fd33d2eb5ebb4" ]
[ "1stMonth{ImageManipulation}/Files/1contrast.py" ]
[ "import numpy as np\nimport cv2\nimport math\n\nimg = cv2.imread('../Images/bottle.jpg', cv2.IMREAD_ANYCOLOR)\nheight = img.shape[0]\nwidth = img.shape[1]\n\ncontrast = 5\n\nfor i in np.arange(height):\n for j in np.arange(width):\n for k in range(0,3,1):\n a = img.item(i,j,k)\n b = ...
[ [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
goomhow/stock-manage-xgboost
[ "04299b1a0503da7948c769fda1dc7d3b6508ed6f", "04299b1a0503da7948c769fda1dc7d3b6508ed6f" ]
[ "ml/xgboost_model/broadband_model.py", "util/hcode.py" ]
[ "from datetime import datetime\nimport numpy as np\nimport pandas as pd\nfrom sklearn import metrics, learning_curve, svm\nfrom sklearn.model_selection import *\nfrom sklearn.externals import joblib\nimport xgboost as xgb\nfrom xgboost.sklearn import XGBClassifier\nfrom xgboost.plotting import plot_importance\nimpo...
[ [ "matplotlib.pyplot.legend", "sklearn.externals.joblib.dump", "sklearn.metrics.roc_auc_score", "numpy.linspace", "matplotlib.pyplot.plot", "numpy.mean", "sklearn.externals.joblib.load", "sklearn.metrics.classification_report", "sklearn.preprocessing.MinMaxScaler", "pandas.re...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1...
gunpowder1473/mySSD
[ "ee7b44de1ef2f6013b6b17ca3cdefd52729ed479" ]
[ "network/ssd_network_calc.py" ]
[ "import tensorflow as tf\nimport math\nfrom Common import common_methods\nfrom tensorflow.python.framework import tensor_shape\n\nslim = tf.contrib.slim\n\n\ndef ssdDefaultboxResult(inputs, num_classes, sizes, ratios=[1], normalization=-1):\n net = inputs\n if normalization > 0:\n net = common_methods....
[ [ "tensorflow.concat", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.minimum", "tensorflow.equal", "tensorflow.where", "tensorflow.boolean_mask", "tensorflow.while_loop", "tensorflow.logical_or", "tensorflow.nn.top_k", "tensorflow.name_scope", "tensorflow.ar...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
twobackfromtheend/challenger
[ "01d131487209029df342e68075e8aae133c4e632" ]
[ "challenger_bot/reinforcement_learning/model/dense_model.py" ]
[ "from typing import Sequence, TYPE_CHECKING\n\nfrom challenger_bot.reinforcement_learning.model.base_model import BaseModel\n\nif TYPE_CHECKING:\n from tensorflow.python.keras import Sequential\n\n\nclass DenseModel(BaseModel):\n\n def __init__(self, inputs: int, outputs: int, load_from_filepath: str = None,\...
[ [ "tensorflow.keras.layers.Dense", "tensorflow.keras.regularizers.l2", "tensorflow.keras.Sequential" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.2" ] } ]
yuhonghong66/minpy
[ "2e44927ad0fbff9295e2acf6db636e588fdc5b42" ]
[ "tests/unittest/test_autograd.py" ]
[ "from __future__ import print_function\n\nimport minpy.numpy as mp\nimport numpy as np\nimport minpy.dispatch.policy as policy\nfrom minpy.core import convert_args, return_numpy, grad_and_loss, grad, minpy_to_numpy as mn, numpy_to_minpy as nm\nimport time\n\n# mp.set_policy(policy.OnlyNumPyPolicy())\n\ndef test_aut...
[ [ "numpy.array", "numpy.random.randn", "numpy.abs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DeliciousHair/persim
[ "4702251c22d4fffbb1c29409f466745c6b6c26c5" ]
[ "test/test_visuals.py" ]
[ "import pytest\nimport numpy as np\n\nimport matplotlib.pyplot as plt\n\nimport persim\nfrom persim import plot_diagrams\n\n\n\"\"\"\n\n Testing visualization is a little more difficult, but still necessary. An example of how to get started:\n > https://stackoverflow.com/questions/27948126/how-can-i-write-uni...
[ [ "numpy.max", "numpy.array", "matplotlib.pyplot.subplots", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wangning911/Transferability_Black-Box_Attacks_new
[ "938ee1bc6c899f21749504fef49c86c175e4814a" ]
[ "demos-lifelong-transfer/demos-cnn/pytorch/main_pytorch.py" ]
[ "import os\nimport sys\nsys.path.insert(1, os.path.join(sys.path[0], '../utils'))\nfrom torch.autograd import Variable\nimport config\nfrom models_pytorch import move_data_to_gpu, DecisionLevelMaxPooling, CnnPooling_Max, ResNet, Vggish, AlexNet, CnnAtrous, EWC\nfrom utilities import (create_folder, get_filename, cr...
[ [ "torch.LongTensor", "torch.max", "torch.Tensor", "torch.load", "torch.eye", "torch.sum", "torch.zeros_like", "numpy.concatenate", "torch.nn.functional.mse_loss", "numpy.argmax", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
arstropica/Real-Time-Voice-Cloning
[ "9d879877846a2d71366f6c436473fca22362b643" ]
[ "synthesizer/synthesize.py" ]
[ "import torch\nfrom torch.utils.data import DataLoader\nfrom synthesizer.hparams import hparams_debug_string\nfrom synthesizer.synthesizer_dataset import SynthesizerDataset, collate_synthesizer\nfrom synthesizer.models.tacotron import Tacotron\nfrom synthesizer.utils.text import text_to_sequence\nfrom synthesizer.u...
[ [ "numpy.int32", "numpy.save", "torch.cuda.is_available", "torch.device", "torch.cuda.device_count" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scienceopen/cvhst
[ "0613fdcc11cd086cdd375aae05677b33bfbbcfd0" ]
[ "ionosphereAI/getpassivefm.py" ]
[ "#!/usr/bin/env python\nimport h5py\nfrom datetime import datetime as DT\nfrom numpy import log10, absolute, median, ascontiguousarray\nfrom pytz import UTC\n\"\"\"\nMichael Hirsch\nRead Haystack Passive FM radar frame, one frame per file\n\"\"\"\n\n\ndef getfmradarframe(fn):\n with h5py.File(fn, 'r') as f:\n ...
[ [ "numpy.ascontiguousarray", "numpy.median", "numpy.absolute" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mburaksayici/tsfresh
[ "de5cc5f800ad7ab19995e5beb31638cab55fd4e7" ]
[ "tsfresh/feature_extraction/feature_calculators.py" ]
[ "# -*- coding: utf-8 -*-\n# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)\n# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016\n\"\"\"\nThis module contains the feature calculators that take time series as input and calculate the values of the...
[ [ "numpy.dot", "numpy.polyfit", "numpy.expand_dims", "numpy.sqrt", "pandas.Series", "numpy.asarray", "numpy.cumsum", "numpy.nan_to_num", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.argmin", "numpy.searchsorted", "numpy.var", "numpy.histogram", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "1.5", "2.0", "1.4" ], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "1.3", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0...
justincohler/evictions-learn
[ "d9d07c2e9bfc6d78978936d732f0309b1c2157fa" ]
[ "src/analysis/helpers/outlier_table.py" ]
[ "import psycopg2\nimport os\nimport json\nimport pandas as pd\nimport sys\nsys.path.insert(0, '/Users/alenastern/Documents/Spring2018/Machine_Learning/evictions-learn/src/')\nfrom db_init import db_connect\ndef outlier_table(cur = db_connect()[0]):\n cols = [\"population\", \"poverty_rate\", \"pct_renter_occupie...
[ [ "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": [] } ]
dberardi2020/MovieSorter
[ "451b9c1004758a20f179cf39a5ab676b274a970e" ]
[ "Classes/Statistics.py" ]
[ "from os import path\n\nimport pandas as pd\n\nfrom definitions import const, helpers\n\n\nclass _Statistics:\n def __init__(self, name):\n self.pickle = path.join(const.data_dir, f\"{name}.pkl\")\n\n def _create_pickle(self):\n pd.DataFrame([]).to_pickle(self.pickle)\n\n def _get_dataframe(s...
[ [ "pandas.read_pickle", "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": [] } ]
JSeam2/IsoGraph
[ "96faf0b61ff9bf7f725cda055e89b26261338376" ]
[ "genetic/genetic_algo.py" ]
[ "\"\"\"\nImplementation referenced from\nhttps://github.com/handcraftsman/GeneticAlgorithmsWithPython/blob/master/ch02/genetic.py\n\"\"\"\n\nimport random\nfrom qutip import *\nimport numpy as np\nimport pandas as pd\nfrom functools import reduce\nimport datetime\nimport time\nimport pickle\nimport copy\n\n\n# QUTI...
[ [ "numpy.log", "numpy.triu_indices", "numpy.random.uniform", "pandas.read_pickle", "numpy.vstack", "numpy.random.randint" ] ]
[ { "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": [] } ]
vsvarunsharma10/pqai
[ "3ef1351fbc39671916517917de9074a62b092eef", "3ef1351fbc39671916517917de9074a62b092eef" ]
[ "core/indexer.py", "core/indexes.py" ]
[ "import annoy\nimport faiss\nimport numpy as np\nfrom psutil import virtual_memory\nfrom math import ceil\nfrom os import path\nimport json\n\n#from config.config import INDEX_DIR\n\n\nclass Indexer():\n\n \"\"\"\n Loads and caches vector indexes of various types (Annoy, FAISS).\n \"\"\"\n \n class _...
[ [ "numpy.arange", "numpy.array" ], [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
edmundus/tikzplotlib
[ "34a984069c5ec3222b239f2252a7e013993a63d1" ]
[ "tikzplotlib/axes.py" ]
[ "import matplotlib as mpl\nimport numpy\nfrom matplotlib.backends import backend_pgf as mpl_backend_pgf\n\nfrom . import color\n\n\nclass Axes:\n def __init__(self, data, obj):\n \"\"\"Returns the PGFPlots code for an axis environment.\n \"\"\"\n self.content = []\n\n # Are we dealing...
[ [ "matplotlib.backends.backend_pgf.common_texification", "numpy.array", "matplotlib.pyplot.get_cmap" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
delldu/ImagePatch
[ "aaeadba9fe9f40e9bf900468f100a06bafc8231f" ]
[ "train.py" ]
[ "import os\nimport math\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.backends.cudnn as cudnn\nfrom PIL import Image\nfrom torch.autograd import Variable\nfrom torchvision.utils import save_image\nfrom torchvision import datasets\nfrom torch.utils.data import DataL...
[ [ "torch.load", "torch.utils.data.DataLoader", "torch.set_num_threads", "torch.cuda.is_available", "torch.cuda.device_count" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hooloong/aliyunProblems
[ "077d115535fe54e47e59a0d96676b3995bbda75e" ]
[ "freshman01/taobao_finduser.py" ]
[ "import os\nimport random\nimport tensorflow as tf\nimport pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import scale # 使用scikit-learn进行数据预处理\n\nuser_data_file = \"../../data/fresh_comp_offline/tianchi_fresh_comp_train_user.csv\"\ngoods_data_file = \"../../data/fresh_comp_offline/tianchi_fresh_comp_...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Jarvis73/SubKmeans-Python
[ "71c30c5722df9f043e4d90845bbaa30c6017403e" ]
[ "src/utils/DataIO.py" ]
[ "import numpy as np\nfrom pathlib import Path\n\n\ndef writeClusters(f: Path, data: np.ndarray, labels: np.ndarray, separator=\";\"):\n with f.open(\"w\") as fid:\n for dp, label in zip(data, labels):\n lineData = np.array2string(dp, separator=separator, max_line_width=0x80000000)[1:-1]\n ...
[ [ "numpy.array2string", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wyzks123/Udacity-P4-BehavioralCloning
[ "462494630ce4d4a4a9242c2b72e24f30f6d8fb2b" ]
[ "model.py" ]
[ "# CarND-Behavioral-Cloning-P3\nimport os\nimport csv\nimport math \n\n###read driving img paths and mearsurements\nsamples = []\nwith open('../data/driving_log.csv') as csvfile:\n reader = csv.reader(csvfile)\n next(reader)\n for line in reader:\n samples.append(line)\nprint('total number of sample...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "sklearn.utils.shuffle", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ZhaoJ9014/five-video-classification-methods
[ "1d5e2c5be9d8e80919dc5c0ae45ed2b35e0b87e6" ]
[ "data.py" ]
[ "\"\"\"\nClass for managing our data.\n\"\"\"\nimport csv\nimport numpy as np\nimport random\nimport glob\nimport os.path\nimport pandas as pd\nimport sys\nimport operator\nfrom processor import process_image\nfrom keras.utils import np_utils\n\nclass DataSet():\n\n def __init__(self, seq_length=40, class_limit=...
[ [ "numpy.concatenate", "numpy.array", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
benSepanski/loopy
[ "5db582d579eb65ce58b93e2c53feb1d48404cf2d" ]
[ "test/test_callables.py" ]
[ "from __future__ import division, absolute_import, print_function\n\n__copyright__ = \"Copyright (C) 2018 Kaushik Kulkarni\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the ...
[ [ "numpy.log2", "numpy.allclose", "numpy.min", "numpy.linalg.norm", "numpy.random.randn", "numpy.random.rand", "numpy.argmin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Miraneh/seekr
[ "e8b4fed2c6de25fa81956638a9a5c4a897a00b38" ]
[ "seekr/pwm.py" ]
[ "# TODO (Dan) What should this file be called?\nimport pandas as pd\nimport numpy as np\n\nfrom collections import defaultdict\nfrom itertools import product\nfrom pathlib import Path\n\n\nclass CountsWeighter:\n \"\"\"Weight kmer counts by a collection of PWMs.\n\n Parameters\n ----------\n pwm_dir: st...
[ [ "pandas.read_csv", "pandas.DataFrame", "pandas.DataFrame.from_dict", "numpy.load", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
mithunpaul08/bert_tensorflow
[ "0b2487b700f0c4d46ff7461759593bed8cad9e84" ]
[ "run_classifier_ARC_DETAILED_sandeep.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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# Unl...
[ [ "tensorflow.contrib.cluster_resolver.TPUClusterResolver", "tensorflow.metrics.accuracy", "tensorflow.FixedLenFeature", "tensorflow.nn.log_softmax", "tensorflow.reduce_sum", "tensorflow.gfile.GFile", "tensorflow.cast", "tensorflow.train.init_from_checkpoint", "tensorflow.gfile.M...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
RichardScottOZ/subsurface
[ "637217f2f7f5c25c4e83b26e8c89e7e856ad209c" ]
[ "subsurface/visualization/to_pyvista.py" ]
[ "from typing import Union\n\nfrom subsurface.structs import PointSet, TriSurf, LineSet, TetraMesh, StructuredGrid\nfrom subsurface.structs.common import Common\nfrom subsurface.structs.errors import PyVistaImportError\nimport numpy as np\n\ntry:\n import pyvista as pv\nexcept ImportError:\n raise ImportError(...
[ [ "matplotlib.pyplot.imshow", "numpy.full", "matplotlib.pyplot.axis", "numpy.array", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhang677/A-case-study-of-GPR
[ "a85c59d8bf043a5b1201e88604a310ddf2627384" ]
[ "main.py" ]
[ "import pandas as pd\nimport torch\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport math\nimport gpytorch\nimport argparse\nmatplotlib.use('Agg')\n\n\nclass ExactGPModel(gpytorch.models.ExactGP):\n def __init__(self, train_x, train_y, likelihood):\n super(ExactGPModel, self)...
[ [ "pandas.read_csv", "numpy.abs", "numpy.linspace", "matplotlib.pyplot.title", "torch.load", "matplotlib.use", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "torch.tensor", "numpy.std", "torch.no_grad", "matplotlib.pyplot.xlabel", "numpy.array", "...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
wokas36/RWK
[ "c44d3d650f0704af49fe41969de0848563e63f65" ]
[ "lib/sinkhorn_algorithms.py" ]
[ "import numpy as np\n\nclass NanInDualError(Exception):\n pass\n\ndef sinkhorn(a, b, M, reg, method='sinkhorn', numItermax=1000, stopThr=1e-9, verbose=False, log=False, **kwargs):\n \"\"\"\n Solve the entropic regularization optimal transport problem and return the OT matrix\n The function solves the fo...
[ [ "numpy.dot", "numpy.log", "numpy.isinf", "numpy.abs", "numpy.asarray", "numpy.isnan", "numpy.ones", "numpy.std", "numpy.any", "numpy.exp", "numpy.zeros", "numpy.sum", "numpy.divide" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zaccharieramzi/tf-complex
[ "c1e5843bfc7afc9741b4f08fa5890301758ea124" ]
[ "tf_complex/convolutions.py" ]
[ "import tensorflow as tf\nfrom tensorflow.keras.layers import Layer, Conv2D\n\nfrom .activations import ComplexActivation\n\nclass ComplexConv2D(Layer):\n r\"\"\"Complex convolution.\n\n This is defined in [C2020].\n Parameters:\n n_filters (int): the equivalent number of filters used for a real\n ...
[ [ "tensorflow.complex", "tensorflow.math.imag", "tensorflow.math.real", "tensorflow.keras.layers.Conv2D" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
corvust/strawberryfields
[ "fd1b1aa18f5f7309ced9ca494912b4169bd9d19d" ]
[ "tests/frontend/compilers/test_gaussianunitary.py" ]
[ "# Copyright 2019 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n# Unless req...
[ [ "numpy.linalg.svd", "numpy.allclose", "numpy.random.seed", "numpy.abs", "numpy.max", "numpy.block", "numpy.identity", "numpy.random.rand", "numpy.angle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hishamelreedy/innovatefpga-GestureRecognitionAccelerator
[ "576e432875f5736f71cf915187ea6b42f376089a" ]
[ "bin/imgtocodev3.py" ]
[ "#some set up\nimport numpy as np\nfrom PIL import Image\n\n# load the test image\nim_path = r'circle.jpg'\nim = Image.open(im_path)\n\n# Read Image into Numpy Array\nim_input = np.asarray(im)\n\n# Reshape Input to be (3,224,224) instead of (224,224,3)\ntmp = np.zeros((3,224,224))\nfor i in range(0,224):\n for j...
[ [ "numpy.asarray", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wusunlab/chflux
[ "e6d24017fe8d692b3b05733508ff6db06a49ae76" ]
[ "chflux/io/parsers.py" ]
[ "\"\"\"PyChamberFlux I/O module containing a collection of data parsers.\"\"\"\nimport pandas as pd\n\n\n# A collection of parsers for timestamps stored in multiple columns.\n# Supports only the ISO 8601 format (year-month-day).\n# Does not support month-first (American) or day-first (European) format.\ntimestamp_p...
[ [ "pandas.to_datetime" ] ]
[ { "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": [] } ]
dstansby/cellfinder-core
[ "740dae17d862a9c5e7278044d0bb7238e54205e3" ]
[ "src/cellfinder_core/train/train_yml.py" ]
[ "\"\"\"\nmain\n===============\n\nTrains a network based on a yaml file specifying cubes of cells/non cells.\n\nN.B imports are within functions to prevent tensorflow being imported before\nit's warnings are silenced\n\"\"\"\n\n\nimport logging\nimport os\nfrom argparse import (\n ArgumentDefaultsHelpFormatter,\...
[ [ "tensorflow.keras.callbacks.TensorBoard", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.callbacks.CSVLogger", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
bilalmoiz/ai-platform
[ "8da01fa7a8339eec269d64a4e2cbd9b25509cd5e" ]
[ "tasks/computer-vision/image-classification/pneumonia_model.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sat Aug 31 13:08:05 2019\r\n\r\n@author: firstname.lastname\r\n\"\"\"\r\n\r\nimport numpy as np # linear algebra\r\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\r\nimport mlflow\r\nimport mlflow.keras\r\nimport keras\r\nfrom tensorflow.pytho...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
acl21/good-init-al
[ "da7a8b95b84ca0b78ccb7dc424303b7f24cb0fe1" ]
[ "Unsupervised-Classification/kmeans/kmeans_pytorch/__init__.py" ]
[ "from functools import partial\n\nimport numpy as np\nimport torch\nfrom tqdm import tqdm\n\nfrom .soft_dtw_cuda import SoftDTW\n\n\ndef initialize(X, num_clusters):\n \"\"\"\n initialize cluster centers\n :param X: (torch.tensor) matrix\n :param num_clusters: (int) number of clusters\n :return: (np....
[ [ "torch.cat", "numpy.random.choice", "torch.broadcast_tensors", "torch.argmin", "torch.sum", "torch.nonzero", "torch.device", "torch.index_select" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
eawag-rdm/savReaderWriter
[ "e766a38e20c09eb565ccfbe9064a7c557cc66baa" ]
[ "savReaderWriter/unit_tests/test_SavWriter_writerows_arrays_etc.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nWriting rows from arrays et al.\n\"\"\"\n\n\nimport os\nimport re\nfrom os.path import join\nfrom tempfile import gettempdir\nfrom collections import namedtuple\nfrom unittest.case import SkipTest\n\nimport nose\nfrom nose.tools import with_setup, assert_raises\n\ntry:\n pandasO...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
uon-language/uon-parser
[ "666894cf4917d8da01512918a147882550382269" ]
[ "uontypes/scalars/uon_float.py" ]
[ "import numpy as np\n\nfrom uontypes.scalars.uon_numeric import UonNumeric\n\n\nclass UonFloat(UonNumeric):\n \"\"\"A Uon type to represent floats.\n In reality, the float represented by this class are what\n we refer to as decimal real in the uon specification.\n \"\"\"\n def __init__(self, value, u...
[ [ "numpy.float64", "numpy.float32", "numpy.float128" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TekNCode/cuda_tensorflow_opencv
[ "a532c869115bdb13d18d0e2495d5bb6d9b133e01" ]
[ "test/tf_hw.py" ]
[ "import tensorflow as tf\nfrom tensorflow.python.client import device_lib\n\nprint(\"*** Tensorflow version : \", tf.__version__)\nprint(\"*** Tensorflow Keras : \", tf.keras.__version__)\n\nprint(\"*** TF Builf with cuda : \", tf.test.is_built_with_cuda())\nprint(\"*** TF compile flags : \", tf.sysconf...
[ [ "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.sysconfig.get_link_flags", "tensorflow.test.is_built_with_cuda", "tensorflow.config.experimental.list_physical_devices", "tensorflow.sysconfig.get_lib", "tensorflow.sysconfig.get_include", "tensorflow.sysconfig.get_c...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
yidan216home/TensorFlowOnSpark
[ "42606480125e0cd163fdf5e8ef977b0ced61beb3" ]
[ "src/com/yahoo/ml/tf/dfutil.py" ]
[ "# Copyright 2017 Yahoo Inc.\n# Licensed under the terms of the Apache 2.0 license.\n# Please see LICENSE file in the project root for terms.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\ndef toTFExample(dtypes):\n \"\"\"Helper function to conv...
[ [ "tensorflow.train.Int64List", "tensorflow.train.FloatList", "tensorflow.train.Features", "tensorflow.train.Example" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pratyush1991/crop-type-mapping
[ "d9d99ec92c3a090ec5576f9e46c89dfcc6f50cf3" ]
[ "src/models/TransformerEncoder.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.data\nimport os\nfrom models.ClassificationModel import ClassificationModel\nfrom models.transformer.Models import Encoder\n\nSEQUENCE_PADDINGS_VALUE=-1\n\nclass TransformerEncoder(ClassificationModel):\n def __init__(self,...
[ [ "torch.nn.LogSoftmax", "torch.load", "torch.arange", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.cuda.is_available", "torch.nn.Conv1d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zmitchell/trcdproc
[ "dbae216deeb56774bdeba18b92657118f83928f5" ]
[ "tests/test_compute_absorp.py" ]
[ "from os import remove\n\nimport h5py\nimport numpy as np\nfrom pytest import fixture, raises\n\nimport trcdproc.compute.absorp as compute\n\n\n@fixture(scope='function')\ndef delta_a_clean_input_data():\n \"\"\"Constructs an HDF5 file with specific values for the different signals for the sake of\n testing t...
[ [ "numpy.asarray", "numpy.arange", "numpy.empty", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
g8a9/interpretable-trading
[ "f2f345a0ddf20f556a0b128972cc001691bb9513" ]
[ "src/models/lstm.py" ]
[ "import numpy as np\nfrom pytorch_lightning import callbacks\nimport torch\nimport pytorch_lightning as pl\nfrom torch.utils.data import Dataset, DataLoader\nfrom sklearn.model_selection import train_test_split\nfrom torch import nn\nfrom collections import Counter\nimport os\nimport torchmetrics as tm\nfrom pytorc...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.nn.LSTM", "torch.zeros", "torch.cat", "sklearn.model_selection.train_test_split", "torch.from_numpy", "torch.tensor", "numpy.concatenate", "torch.nn.Linear", "numpy...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jaeseoko/16833_ParticleFilter
[ "77fbff72800726e7198984c23a4990c6cd525580" ]
[ "problem_set/code/sensor_model.py" ]
[ "'''\n Adapted from course 16831 (Statistical Techniques).\n Initially written by Paloma Sodhi (psodhi@cs.cmu.edu), 2018\n Updated by Wei Dong (weidong@andrew.cmu.edu), 2021\n'''\n\n# import cv2\nfrom tqdm import tqdm\nimport numpy as np\nimport math\nimport time\nfrom matplotlib import pyplot as plt\nfrom...
[ [ "numpy.log", "numpy.abs", "numpy.linspace", "numpy.sqrt", "numpy.cos", "numpy.sin", "numpy.arctan2", "numpy.size", "numpy.floor", "numpy.exp", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
adityaalifn/CSH3L3-Machine-Learning
[ "54cc6f0fda8f846c2577a0be21529aaa121b0631" ]
[ "Support Vector Machine/Source Code/fun.py" ]
[ "import matplotlib.pyplot as plt\nimport matplotlib\n\n\ndef scatter3d_visualize(X, y, title=\"\"):\n # Soal A nomer 1\n fig = plt.figure()\n ax = fig.add_subplot(111, projection='3d')\n for i in range(len(X)):\n xs = X[i][0]\n ys = X[i][1]\n zs = X[i][2]\n \n if y[i] ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.title", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aitoralmeida/lus_stratification
[ "8153a2dd4ddd49bac8c7d36269762ddd9207d72f" ]
[ "convert_model/old/convert_keras_to_tflite_optimized.py" ]
[ "import tensorflow as tf\nimport keras as k\n\nmodel = k.models.load_model('/results/covid19_model')\nconverter = tf.lite.TFLiteConverter.from_keras_model(model)\nconverter.optimizations = [tf.lite.Optimize.DEFAULT]\ntflite_model = converter.convert()\nopen(\"/results/covid19_model_optimized.tflite\", \"wb\").write...
[ [ "tensorflow.lite.TFLiteConverter.from_keras_model" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
salernoa/examples
[ "09354427ec282fc46037ffb1af7aea2eda63a167" ]
[ "tensorflow_examples/lite/model_maker/core/task/image_classifier_test.py" ]
[ "# Copyright 2019 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 requir...
[ [ "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.io.gfile.GFile", "tensorflow.compat.v2.lite.Interpreter", "numpy.argmax", "tensorflow.compat.v2.compat.v1.Session", "tensorflow.compat.v2.TensorShape", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
twesterhout/nqs-playground
[ "9fbb65a0631f2a0898effe5bfb1bbb41966cce65" ]
[ "distributed_example.py" ]
[ "import os\nimport re\nimport socket\nimport torch\nimport torch.distributed\n# import torch.multipro\n\ndef init_slurm(fn, backend=\"gloo\"):\n slurm_nodelist = os.environ[\"SLURM_NODELIST\"]\n root_node = slurm_nodelist.split(\" \")[0].split(\",\")[0]\n if \"[\" in root_node:\n name, numbers = roo...
[ [ "torch.multiprocessing.set_start_method", "torch.distributed.init_process_group", "torch.cuda.device_count", "torch.distributed.get_rank", "torch.distributed.get_world_size", "torch.multiprocessing.Process" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
La-fe/mmdetection
[ "4fbdc662a05349fc8813825b5b0011c91d184090" ]
[ "my_util/data2coco_offical.py" ]
[ "import os\nimport json\nimport numpy as np\nimport shutil\nimport pandas as pd\n\ndefect_name2label = {\n '破洞': 1, '水渍': 2, '油渍': 2, '污渍': 2, '三丝': 3, '结头': 4, '花板跳': 5, '百脚': 6, '毛粒': 7,\n '粗经': 8, '松经': 9, '断经': 10, '吊经': 11, '粗维': 12, '纬缩': 13, '浆斑': 14, '整经结': 15, '星跳': 16, '跳花': 16,\n '断氨纶': 17, '稀密档...
[ [ "numpy.asarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
erjihaoshi/audio
[ "b5dd693a396d18b8388548dc0caa94af23975dd3" ]
[ "test/test_kaldi_io.py" ]
[ "import os\nimport torch\nimport torchaudio.kaldi_io as kio\nimport unittest\nimport test.common_utils\n\n\nclass Test_KaldiIO(unittest.TestCase):\n data1 = [[1, 2, 3], [11, 12, 13], [21, 22, 23]]\n data2 = [[31, 32, 33], [41, 42, 43], [51, 52, 53]]\n test_dirpath, test_dir = test.common_utils.create_temp_...
[ [ "torch.eq", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YaNgZhAnG-V5/RoarTorch
[ "c994e16f956f1a76edda9bb1cca5998cb06f1ce3" ]
[ "src/attribution_methods/constant_class_mask_margin.py" ]
[ "import numpy as np\nimport torch\nfrom skimage.draw import circle\nfrom skimage import filters\n\n\ndef compute_constant_class_mask_margin(model, preprocessed_image, label, baseline=0.1, size=0.2):\n # Baselines is the margin between circle center and edge\n # margin insert mask to keep a margin to the edge ...
[ [ "torch.zeros_like", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DigZator/gym-minigrid
[ "d0fe2577ea9687141599907c2ed4956c62fa85e0" ]
[ "senor_sarsa_graphs.py" ]
[ "#!/usr/bin/env python3\n\nimport time\nimport argparse\nimport numpy as np\nimport gym\nimport gym_minigrid\nfrom gym_minigrid.wrappers import *\nfrom gym_minigrid.window import Window\nfrom gym_minigrid.register import env_list\nimport matplotlib\n#matplotlib.use('TkAgg')\nparser = argparse.ArgumentParser()\npars...
[ [ "matplotlib.pyplot.legend", "numpy.random.random_sample", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
complexly/py-ecomplexity
[ "772fbae9eaa4f995be725d05eed9a6fa6a7c7156" ]
[ "ecomplexity/ecomplexity.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom ecomplexity.calc_proximity import calc_discrete_proximity\nfrom ecomplexity.calc_proximity import calc_continuous_proximity\nfrom ecomplexity.ComplexityData import ComplexityData\nfrom ecomplexity.density import calc_density\nfrom ecomplexity.coicog import calc_coi_cog...
[ [ "pandas.concat", "numpy.linalg.eig", "numpy.real", "numpy.nansum", "pandas.DataFrame.from_dict", "numpy.corrcoef" ] ]
[ { "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": [] } ]
alandegenhart/neuropy
[ "a9f7b735da78a5296f648cb3bb94c1c31843c668" ]
[ "neuropy/mathutil.py" ]
[ "\"\"\"AIBS math module\n\nThis module contains assorted math functions.\n\n\"\"\"\n# Import\nimport numpy as np\n\n\ndef ismember_rows(a, b):\n \"\"\"Return rows of one matrix present in another.\n \n This function finds the rows of a that are equal to b. This function\n requires one of the two input a...
[ [ "numpy.diag", "numpy.linalg.eig", "numpy.all", "numpy.real", "numpy.cov", "scipy.linalg.cholesky", "numpy.any", "numpy.argsort", "numpy.flip", "numpy.zeros", "numpy.sum", "scipy.linalg.eig" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]
liuyngchng/Tetris-Python
[ "24027e261e24c7c54fe07b46984a2025cf174b5a" ]
[ "player.py" ]
[ "\"\"\"\nThis controls games key and aims to get a high score\n\"\"\"\nfrom copy import copy, deepcopy\nfrom numpy import array, mean\nfrom random import choice\nfrom functions import Status\nfrom squares import Squares\n\n\nclass AI:\n def __init__(self):\n self.direction = None\n\n def control(self, ...
[ [ "numpy.array", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Kushal-S-Bastakoti/Password_Generator
[ "73f92889d8b70ec0ada0ac1e9f5cffddbe368466" ]
[ "pwd_generator.py" ]
[ "#Simple Password Generator created by Kushal Sharma Bastakoti\n#Contact me on instagram at kushal.bastakoti\n\n#You can customize the weight,ratio and number of digits by just editing some values below \n\n#To use custom value run as python pwd_generator.py number1\n#number1 is the number of digits you want\n\n#to...
[ [ "numpy.append", "numpy.array", "numpy.count_nonzero" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ndiamant/marchent
[ "70d44e314897c98692fbdb98e847c382b7a43853" ]
[ "marchent/marcher.py" ]
[ "from dataclasses import dataclass\nfrom typing import Callable, List\nfrom enum import Enum\nimport colorsys\n\nimport numpy as np\n\n\nclass MarcherState(Enum):\n RUNNING = 0\n SPLITTING = 1\n STOPPING = 2\n\n\ndef assert_valid_distribution(x: np.ndarray):\n np.testing.assert_allclose(x.sum(axis=1), 1...
[ [ "numpy.random.choice", "numpy.cos", "numpy.sin", "numpy.arctan2", "numpy.random.rand", "numpy.array", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abhimandal/aneurysm-segmentation
[ "d491f2397e66b012a59b9a3f46a68550e0d5cd9d" ]
[ "aneurysm_segmentation3d/scripts/modelling/model.py" ]
[ "import os, sys\nimport torch\nimport pyvista as pv\nimport pandas as pd\nimport numpy as np\n\nsys.path.append(os.getcwd())\n\nfrom torch_points3d.applications.kpconv import KPConv\nfrom torch_points3d.core.common_modules.base_modules import (\n MultiHeadClassifier,\n)\n\n\nclass PartSegKPConv(torch.nn.Module):...
[ [ "torch.nn.functional.nll_loss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gurkirt/realtime-action-detection
[ "9dd8e1b5642c7cb3170a31cc3ec5a3c586a3b261" ]
[ "layers/modules/multibox_loss.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom data import v2 as cfg\nfrom ..box_utils import match, log_sum_exp\n\nclass MultiBoxLoss(nn.Module):\n \"\"\"SSD Weighted Loss Function\n Compute Targets:\n 1) Produce Confidence Target Indices by matching ground truth boxes\n ...
[ [ "torch.LongTensor", "torch.Tensor", "torch.nn.functional.cross_entropy", "torch.cuda.LongTensor", "torch.cuda.FloatTensor", "torch.no_grad", "torch.nn.functional.smooth_l1_loss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhouzhouxpyf/CFN-softbio
[ "21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc" ]
[ "examples/autonomous/ErrorPlotter.py" ]
[ "#!/usr/bin/python3\n\nimport numpy as np\nimport matplotlib as mpl\nmpl.rcParams['mathtext.fontset'] = 'cm'\nimport pylab as plt\n\n# Helpers\n########################################\n# TODO: DEPRECATED in favor of tools.val_stats\ndef print_d(d, i=4):\n '''Simple helper to print a dictionary.'''\n for k, v...
[ [ "numpy.min", "numpy.asarray", "scipy.ndimage.gaussian_filter1d", "numpy.max", "numpy.std", "numpy.argsort", "numpy.load", "numpy.average", "numpy.where" ] ]
[ { "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"...
ExpressAI/DataLab
[ "c3eddd4068f131d031c2486c60b650092bb0ae84" ]
[ "datalabs/utils/streaming_download_manager.py" ]
[ "from asyncio import TimeoutError\nimport glob\nfrom itertools import chain\nimport os\nfrom pathlib import Path, PurePosixPath\nimport posixpath\nimport re\nimport tarfile\nimport time\nfrom typing import List, Optional, Tuple, Union\n\nfrom aiohttp.client_exceptions import ClientError\nimport fsspec\n\nfrom datal...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
htet96/Integration-of-THOR-and-SiamRPN-wip-
[ "74d4baded10acfe6b35c6d7b2c66a3da6c36f4a1" ]
[ "trackers/SiamRPNpp/tracker/siammask_tracker.py" ]
[ "# Copyright (c) SenseTime. All Rights Reserved.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport cv2\nimport numpy as np\n\nfrom siamrpnpp.core.config import cfg\nfrom siamrpnpp.utils.bbox import cxy...
[ [ "numpy.maximum", "numpy.sqrt", "numpy.max", "numpy.argmax", "numpy.exp", "numpy.array", "numpy.unravel_index", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sharnesun/cgrowth_utils
[ "24552f02461ab7d9e903a6990c853dd907864053" ]
[ "cgrowth_utils/mle.py" ]
[ "import numpy as np\nimport scipy.stats as st\nimport scipy.optimize\nimport warnings\nimport pandas as pd\n\n\ndef log_like_iid_gamma(params, n):\n \"\"\"Log likelihood for i.i.d. Gamma measurements, parametrized\n by alpha, b=1/beta.\"\"\"\n alpha, b = params\n\n if alpha <= 0 or b <= 0:\n retu...
[ [ "numpy.exp", "numpy.log", "numpy.array", "scipy.stats.gamma.logpdf" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RoboCupULaval/StrategyAI
[ "ccddde144f2c0a67113d2e5ffe7c75ed9d4a3d19" ]
[ "ai/Algorithm/evaluation_module.py" ]
[ "# Under MIT License, see LICENSE.txt\nimport logging\nfrom typing import List\n\nimport numpy as np\n\nfrom Util.geometry import Line, angle_between_three_points, perpendicular, wrap_to_pi, closest_point_on_line, \\\n normalize, intersection_between_lines\nfrom Util.position import Position\nfrom Util.role impo...
[ [ "numpy.dot", "numpy.clip", "numpy.linalg.norm", "numpy.stack", "numpy.transpose", "numpy.argmin", "numpy.cross", "numpy.array", "numpy.zeros", "numpy.divide" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
suyashbire1/pym6
[ "8fe9930eb340898b242e1254309751b230d1bdd5" ]
[ "pym6/Variable.py" ]
[ "import numpy as np\nfrom netCDF4 import Dataset as dset, MFDataset as mfdset\nfrom functools import partial\nimport copy\nfrom .Plotter import plotter, rhotoz\n\nclass GridNdarray(np.ndarray):\n \"\"\"A class to hold a grid-located variable.\"\"\"\n def __new__(cls,input_array,loc):\n obj = input_arra...
[ [ "numpy.ma.isMaskedArray", "numpy.nditer", "numpy.ndarray.__array_wrap__", "numpy.append", "numpy.apply_over_axes", "numpy.diff", "numpy.any", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mnucci32/heat
[ "dc5cfb9c96cbec9738bc0fae34572a8c75859130" ]
[ "fem.py" ]
[ "#!/usr/bin/python3\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nimport time\n\nmpl.rcParams[\"font.size\"] = 20\n\nclass node:\n def __init__(self, id, coords):\n self.id_ = id\n self.coords_ = coords\n\n def Id(self):\n return self.id_\n\n def Coordinates(self):\n ...
[ [ "numpy.linalg.norm", "numpy.ones", "numpy.zeros_like", "numpy.cross", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abhishekgaikwad2006/data-av
[ "23cbe8ecc76d7e65327b68b981dc8d32c8f6f179" ]
[ "code.py" ]
[ "import pandas as pd\r\nimport csv\r\nimport plotly.graph_objects as go\r\nimport plotly.express as px\r\n\r\ndf = pd.read_csv(\"data.csv\")\r\n\r\nmean = df.groupby([\"student_id\", \"level\"], as_index=False)[\"attempt\"].mean()\r\nfig = px.scatter(mean, x=\"student_id\", y=\"level\", size=\"attempt\", color=\"at...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
tonyzoooo/my-portfolio
[ "3a87dd8685aae8a15b0751d30dac1589e46a51ef" ]
[ "data_generator.py" ]
[ "import pandas as pd\nimport datetime as dt\nimport numpy as np\nfrom dateutil.relativedelta import relativedelta\n\nfilepath = \"./data_sample.csv\"\n\ndef generate_dates():\n dates = []\n today = dt.date.today()\n for i in range(100):\n random_day = today - relativedelta(months=np.random.randint(0...
[ [ "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Milad84/Regression-Analysis
[ "3806c63a2ce86e74dc4c562f38cc299a0a5172c4" ]
[ "04_Simple Linear Regression with scikit-learn on Boston Housing sample data.py" ]
[ "#-------------------------------------------------------------------------------\n# Name: module1\n# Purpose:\n#\n# Author: milad\n#\n# Created: 01/01/2021\n# Copyright: (c) milad 2021\n# Licence: <your licence>\n#-------------------------------------------------------------------------------...
[ [ "matplotlib.pyplot.subplots", "sklearn.linear_model.LinearRegression", "sklearn.datasets.load_boston" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RobEn-AAST/image-quality-assessment
[ "4b5a0079c783faaa5b186a636f1214fe1651f496" ]
[ "src/handlers/data_generator.py" ]
[ "\nimport os\nimport numpy as np\nimport tensorflow as tf\nfrom utils import utils\n\n\nclass TrainDataGenerator(tf.keras.utils.Sequence):\n '''inherits from Keras Sequence base object, allows to use multiprocessing in .fit_generator'''\n def __init__(self, samples, img_dir, batch_size, n_classes, basenet_pre...
[ [ "numpy.random.shuffle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
houtanb/dash-docs
[ "daf5f555117ff5ba53d7d5161c5f08e8c270cad9" ]
[ "dash_docs/chapters/getting_started/examples/getting_started_table.py" ]
[ "# Run this app with `python app.py` and\n# visit http://127.0.0.1:8050/ in your web browser.\n\nimport dash\nimport dash_html_components as html\nimport pandas as pd\n\ndf = pd.read_csv('https://gist.githubusercontent.com/chriddyp/c78bf172206ce24f77d6363a2d754b59/raw/c353e8ef842413cae56ae3920b8fd78468aa4cb2/usa-ag...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
pmalhaire/dqn-from-scratch-with-tf2
[ "e11a4cc11c637b8a83bffcaddbbe5c76223f749f" ]
[ "whale/utils.py" ]
[ "import os\nfrom pathlib import Path\nimport json\nimport numpy as np\nfrom collections import OrderedDict\n\nfrom whale.card import WhaleCard as Card\n\n# Read required docs\nROOT_PATH = Path(__file__).parent\n\n# a map of trait to its index\nCARD_MAP = {'water': 0, 'wave': 1, 'double_wave': 2}\n\n# a map of abstr...
[ [ "numpy.random.seed", "tensorflow.random.set_seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
openforcefield/openff-interchange
[ "275bd4146dd2724c5eeb2b52d3177b53371edb7c" ]
[ "openff/interchange/interoperability_tests/internal/test_amber.py" ]
[ "import mdtraj as md\nimport numpy as np\nimport parmed as pmd\nimport pytest\nfrom openff.toolkit.topology import Molecule\nfrom openff.toolkit.typing.engines.smirnoff import ForceField\nfrom openff.units import unit\n\nfrom openff.interchange.components.interchange import Interchange\nfrom openff.interchange.driv...
[ [ "numpy.testing.assert_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
billybishop21/Algo_Signals_2.0
[ "07541de6cdc0de0c050f7c38173ee0ded33a6d19" ]
[ "remy_workflow/helpful_methods.py" ]
[ "from datetime import datetime\n# from logging import info\n# from multiprocessing import Value\n# from os import symlink\nimport questionary\nimport shelve\nimport pandas as pd\nimport sqlalchemy\n# from pathlib import Path\nimport remy_workflow.finnhubIO as fh\n# from time import sleep\nimport yfinance as yf\nimp...
[ [ "pandas.read_sql_table", "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": [] } ]
spinoza-centre/prf-seeg
[ "ed725f0284bede5d6947a7a22cfa77f9d921368c" ]
[ "experiment/trial.py" ]
[ "#!/usr/bin/env python\n#-*- coding: utf-8 -*-\n\nimport math, time\nimport numpy as np\nimport pandas as pd\n\nfrom exptools2.core import Trial\nfrom psychopy.core import getTime\nfrom psychopy.visual import TextStim\nfrom psychopy import logging\n\nfrom stimuli import FixationLines\n\n# #### Windows triggering\n#...
[ [ "numpy.arange", "numpy.zeros_like", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
loostrum/psrdada_filterbankdb
[ "efd2b9aa4e77c66758f4e41dfbecac5adac8130d" ]
[ "test/test_dada_fildb.py" ]
[ "import os\nimport unittest\nimport time\nimport multiprocessing as mp\n\nimport numpy as np\nfrom psrdada import Reader, Writer\n\nfrom dada_fildb import dada_fildb\nfrom dada_fildb.sigproc import SigprocFile\n\n\nclass TestDadaFildb(unittest.TestCase):\n\n def setUp(self):\n \"\"\"\n Set configur...
[ [ "numpy.asarray", "numpy.arange", "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
insomnia1996/mrc_c3
[ "081297faa8e5909e60cd222e2ebbf2a3338a02b3" ]
[ "test_multichoice_mrc.py" ]
[ "from __future__ import print_function\n\nimport argparse\nimport os\nfrom glob import glob\n\nimport torch\nfrom google_albert_pytorch_modeling import AlbertConfig, AlbertForMultipleChoice\nfrom preprocess.CHID_preprocess import RawResult, get_final_predictions, write_predictions, \\\n generate_input\nfrom pyto...
[ [ "torch.load", "torch.utils.data.TensorDataset", "torch.utils.data.SequentialSampler", "torch.utils.data.DataLoader", "torch.tensor", "torch.no_grad", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PriyankaDatar/NLP_project_BIDAF
[ "0e9790d6c4d7bfa2a29c0b0a30a5acc9959cd6f7" ]
[ "test.py" ]
[ "import json\nimport torch\nfrom sqlnet.utils import *\nfrom sqlnet.model.seq2sql import Seq2SQL\nfrom sqlnet.model.sqlnet import SQLNet\nimport numpy as np\nimport datetime\n\nimport argparse\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser()\n parser.add_argument('--toy', action='store_true'...
[ [ "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jmanson377/PySMSIM
[ "1f6187679810ea647d074ab65c80827b67a27d53" ]
[ "PySMSIM/examples/matyas.py" ]
[ "import numpy as np\n\ndef matyas(X):\n return (0.26 * (X[:,0] ** 2 + X[:,1] ** 2) - 0.48 * X[:,0] * X[:,1]).reshape(-1)\n\nif __name__ == \"__main__\":\n print(matyas(np.array([1,1]).reshape(1,-1)))\n print(matyas(np.array([0,0]).reshape(1,-1)))\n print(matyas(np.array([[0,0],[1,1]]).reshape(-1,2)))\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
st3107/pdfstream
[ "6e1829d889e5f5400386513efe993ad0596da8a5" ]
[ "tests/visualization/test_main.py" ]
[ "import matplotlib.pyplot as plt\nimport pytest\n\nimport pdfstream.visualization.main as vis\n\n\n@pytest.mark.parametrize(\n 'keys,kwargs', [\n (['Ni_gr', 'Ni_gr'], {'mode': 'line', 'legends': ['Ni0', 'Ni1'], 'label': 'gr'}),\n (['Ni_gr', 'Ni_gr'], {'mode': 'line', 'stack': False}),\n (['N...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.close", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DJdongbudong/Bearing-Detection
[ "b1cddb4c699f3180e2ef128933020b083eadfef0" ]
[ "experience/no3_train.py" ]
[ "import numpy as np\nimport pandas as pd\nimport math\n\n# step 1/3 数据生成器\n#把标签转成oneHot\ndef convert2oneHot(index,Lens):\n hot = np.zeros((Lens,))\n hot[int(index)] = 1\n return(hot)\nMANIFEST_DIR = \"../data/train.csv\"\nBatch_size = 20\nLens = 640 # 取640为训练和验证截点。\n# 训练样本生成器——然后使用 keras 的 fit_generator 就可...
[ [ "numpy.array", "pandas.read_csv", "numpy.zeros", "numpy.random.shuffle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ooooverflow/DigestPath2019
[ "db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8" ]
[ "model.py" ]
[ "import torch.nn as nn\nimport torch\nimport math\nimport time\nimport torch.utils.model_zoo as model_zoo\nfrom utils import BasicBlock, Bottleneck, BBoxTransform, ClipBoxes\nfrom anchors import Anchors\nimport losses\nfrom lib.nms.pth_nms import pth_nms\n\ndef nms(dets, thresh):\n \"Dispatch to either CPU or GP...
[ [ "torch.nn.Sequential", "torch.max", "torch.Tensor", "torch.zeros", "torch.cat", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.MaxPool2d", "torch.nn.Upsample", "torch.rand", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
camus1337/pytorch_geometric
[ "38514197a327541eb47abb69d4ab224910852605" ]
[ "torch_geometric/nn/models/node2vec.py" ]
[ "import torch\nfrom torch.nn import Embedding\nfrom torch.utils.data import DataLoader\nfrom torch_sparse import SparseTensor\n\nfrom torch_geometric.utils.num_nodes import maybe_num_nodes\n\ntry:\n import torch_cluster # noqa\n random_walk = torch.ops.torch_cluster.random_walk\nexcept ImportError:\n rand...
[ [ "torch.sigmoid", "sklearn.linear_model.LogisticRegression", "torch.cat", "torch.nn.Embedding", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tianjuchen/pyoptmat
[ "6f34205f450fd884679f37522ccd0d0b65ecdb71", "6f34205f450fd884679f37522ccd0d0b65ecdb71", "6f34205f450fd884679f37522ccd0d0b65ecdb71" ]
[ "examples/structural-inference/tension/deterministic/optimize.py", "pyoptmat/experiments.py", "pyoptmat/flowrules.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\n Example using the tutorial data to train a deterministic model, rather than\n a statistical model.\n\"\"\"\n\nimport sys\n\nsys.path.append(\"../../../..\")\nsys.path.append(\"..\")\n\nimport os.path\n\nimport numpy.random as ra\n\nimport xarray as xr\nimport torch\n\nfrom ...
[ [ "torch.set_default_tensor_type", "matplotlib.pyplot.tight_layout", "torch.tensor", "matplotlib.pyplot.plot", "numpy.random.uniform", "matplotlib.pyplot.ylabel", "torch.cuda.is_available", "torch.device", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "torch.nn.MS...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sadlyfell/bullbot
[ "b6ef96f61678fab4a245d8ccddf9d1ae7aae9fee" ]
[ "pajbot/modules/roulette.py" ]
[ "import datetime\nimport logging\n\nfrom numpy import random\n\nimport pajbot.exc\nimport pajbot.models\nfrom pajbot import utils\nfrom pajbot.managers.db import DBManager\nfrom pajbot.managers.handler import HandlerManager\nfrom pajbot.models.command import Command\nfrom pajbot.models.command import CommandExample...
[ [ "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]