repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
ghuls/weblogo
[ "7eab5d1b8a8ec38786fa426af84bd77950835524" ]
[ "tests/test_matrix.py" ]
[ "#!/usr/bin/env python\n\nimport unittest\nfrom io import StringIO\n\nimport numpy as np\n\nfrom weblogo import data\nfrom weblogo.matrix import AlphabeticArray, Motif, SubMatrix\nfrom weblogo.seq import Alphabet, protein_alphabet, unambiguous_protein_alphabet\n\nfrom . import data_stream\n\n\nclass test_Alphabetic...
[ [ "numpy.asarray", "numpy.shape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
OfficialCodexplosive/RESKit
[ "e006e8c9923ddb044dab6951c95a15fa43489398" ]
[ "test/01_util/economic/test_lcoe.py" ]
[ "from reskit.util.economic.lcoe import levelized_cost_of_electricity, levelized_cost_of_electricity_simplified\nimport numpy as np\n\n\ndef test_levelized_cost_of_electricity():\n annual_expenditures = np.full(30, 100)\n annual_expenditures[0] = 500\n\n np.random.seed(0)\n annual_generation = np.random....
[ [ "numpy.random.random", "numpy.random.seed", "numpy.full", "numpy.array", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
meng630/GMD_E3SM_SCM
[ "990f84598b79f9b4763c3a825a7d25f4e0f5a565", "990f84598b79f9b4763c3a825a7d25f4e0f5a565" ]
[ "components/mpas-source/testing_and_setup/compass/ocean/tendency_verification/all/Redi/plot.py", "components/mpas-source/testing_and_setup/compass/ocean/Redi_verification/SouthernOceanSlice40/all/add_initial_state.py" ]
[ "#!/usr/bin/env python\n'''\nThis script plots results from MPAS-Ocean convergence test.\n'''\nimport numpy as np\nfrom netCDF4 import Dataset\nimport matplotlib.pyplot as plt\nimport matplotlib\nmatplotlib.use('Agg')\n\n\n# mrp: read from file mesh after nx,ny attributes are added:\nnx = 10 # ncfileMesh.getncattr...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "numpy.reshape", "matplotlib.use", "matplotlib.pyplot.loglog", "matplotlib.pyplot.savefig", "matplotlib.pyplot.gcf", "matplotlib.pyplot.colorbar", "numpy.max", "matplotlib.pyplot.clf", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nevetscode23/docassemble
[ "e081281b3001baad12240a8bd9c19f24eefaef4d" ]
[ "docassemble_webapp/docassemble/webapp/machinelearning.py" ]
[ "import re\nimport random\nimport codecs\nimport pickle\nimport datetime\nimport os\nimport json\nimport threading\nfrom sqlalchemy import and_, select, delete\nfrom sklearn.ensemble import RandomForestClassifier\nimport pandas as pd\nfrom pandas.api.types import CategoricalDtype\nimport numpy as np\nimport yaml\nf...
[ [ "pandas.api.types.CategoricalDtype", "pandas.Series", "sklearn.ensemble.RandomForestClassifier", "pandas.DataFrame", "pandas.get_dummies" ] ]
[ { "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": [] } ]
windows7lover/RegularizedNonlinearAcceleration
[ "5120b7cbbd159e2a1a5b0f6f99d14f5f0e4774f0" ]
[ "Python/rna_v2/online_rna.py" ]
[ "import torch as T\nimport numpy as np\nfrom numpy import linalg as LA\nfrom torch.optim import Optimizer, SGD\nimport copy\n\nclass online_rna(SGD):\n \n def __init__(self,params, lr,momentum=0,dampening=0,weight_decay=0,nesterov=False,K=10,reg_acc=1e-5,acceleration_type='online',do_average=False):\n ...
[ [ "numpy.linalg.solve", "numpy.eye", "numpy.linalg.norm", "numpy.ones", "numpy.concatenate", "numpy.asmatrix", "numpy.linalg.lstsq", "numpy.shape", "numpy.transpose", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhujiaxiaowang/Safety-helmet-detection-based-on-Yolov3
[ "5f68bd391fc1f5ca796b955c28ea8f4074215b09" ]
[ "yolo.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nClass definition of YOLO_v3 style detection model on image and video\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nfrom PIL...
[ [ "numpy.expand_dims", "numpy.random.seed", "numpy.asarray", "numpy.random.shuffle", "numpy.floor", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CompetitionDataResearch/recsys-spotify-challenge
[ "7468e82fcc69c45b46fd23ad924446d31f729a2e", "7468e82fcc69c45b46fd23ad924446d31f729a2e" ]
[ "src/submit/submit.py", "src/100songs_shuffle/auto_cf_test_submission_100_shuffle.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThis script manage all slice files\nfor final submit\n\nCreated on Tue May 15 10:39:10 2018\n\n@author: bwhe\n\"\"\"\n\nimport os\nimport gc\nimport pickle\nimport pandas as pd\nfrom sklearn.preprocessing import LabelEncoder\nimport numpy as np\n\n\n\n\n__path__ = '.'\n\n\n# conver...
[ [ "numpy.concatenate", "numpy.zeros", "pandas.DataFrame" ], [ "pandas.read_csv", "sklearn.externals.joblib.load", "scipy.sparse.csr_matrix", "sklearn.svm.LinearSVC", "sklearn.preprocessing.LabelEncoder", "scipy.sparse.lil_matrix" ] ]
[ { "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": [] }, { "matplotlib": [], "nump...
Shawn-Guo-CN/spikesorters
[ "e67831289bfefb356c3fd8e5700934fdeaf2b894" ]
[ "spikesorters/utils/ssmdarecordingextractor.py" ]
[ "# Ultimately this file will be merged with mda extractors\n# of spikeextractors. But temporarily we have a local copy\n# here that works internally with ironclust\n\nimport json\nimport numpy as np\nimport os\n\nfrom spikeextractors import RecordingExtractor\nfrom spikeextractors import SortingExtractor\n\nfrom .....
[ [ "numpy.unique", "numpy.rint", "numpy.genfromtxt", "numpy.concatenate", "numpy.ones", "numpy.savetxt", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
syao13/pdb_eda
[ "3f622ac5345e8179b1e08813c6197d35339d3b00" ]
[ "pdb_eda/pdbParser.py" ]
[ "\"\"\"\nPDB Parser (pdb_eda.pdbParser)\n-------------------------------------------------------\n\nThis module provides methods to read and parse the PDB format files and returns PDB objects.\nFormat details of PDB can be found in ftp://ftp.wwpdb.org/pub/pdb/doc/format_descriptions/Format_v33_Letter.pdf.\n\"\"\"\n...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HibikiJie/MONet
[ "931400df28cb62aab90662abe00acd1d3688073d" ]
[ "models/monet_s_set.py" ]
[ "import numpy\n\n\nclass Set:\n\n def __init__(self):\n '''图片和标签的位置'''\n self.image_path = 'MONet/data/image'\n self.label_path = 'MONet/data'\n self.image_size = 640 # 图片尺寸\n size = 's'\n depth_multiple = None\n width_multiple = None\n '''设置锚定框的尺寸大小'''\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lcit/metrics_delin
[ "30f1ad9ccc901e63770f39a80b0e1ec6bbfb34d9" ]
[ "graph_based/holes_marbles_new_metric.py" ]
[ "import os\nimport sys\nimport numpy as np\nimport networkx as nx\nimport time\nimport copy\nimport random\nimport itertools\nimport scipy\nfrom scipy.spatial.distance import cdist\n\nfrom .. import utils\nfrom .common import extract_subgraph, compute_quantities, compute_scores\n \ndef node_matching_hung...
[ [ "numpy.random.seed", "scipy.spatial.distance.cdist", "numpy.ones", "numpy.copy", "numpy.argsort", "numpy.array", "numpy.unravel_index" ] ]
[ { "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" ...
muradkhan101/sound-emotion-nn
[ "3ab44541b29a847df2f5ab6a9393ef107ce0ec0d" ]
[ "classify.py" ]
[ "import matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\n\nfrom keras.models import load_model\nfrom pyAudioAnalysis import audioFeatureExtraction, audioBasicIO\nimport pandas as pd\nimport numpy as np\nimport argparse\nimport imutils\nimport pickle\nimport cv2\nimport os\n\nap = argparse.Argum...
[ [ "numpy.expand_dims", "matplotlib.use", "numpy.concatenate", "numpy.argmax", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ysulsky/metaworld
[ "33f3b90495be99f02a61da501d7d661e6bc675c5" ]
[ "metaworld/envs/mujoco/multitask_env.py" ]
[ "import gym\nfrom gym.spaces import Box\nimport numpy as np\n\nfrom metaworld.core.serializable import Serializable\n\n\nclass MultiTaskEnv(gym.Env, Serializable):\n def __init__(self,\n task_env_cls=None,\n task_args=None,\n task_kwargs=None,):\n Serializab...
[ [ "numpy.ones", "numpy.concatenate", "numpy.prod", "numpy.zeros", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
qstommyshu/deltahacks7
[ "d4119d14fd5ba8bd5b45cd48cca8b0ba5f6290cd" ]
[ "assemble/Diabetes.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[ ]:\n\n\nimport tensorflow as tf\nfrom sklearn.model_selection import train_test_split\nimport pandas as pd\nfrom keras.models import Sequential\nfrom keras.layers import Dropout, Activation, Dense, Flatten\nfrom keras.callbacks import ModelCheckpoint\nimport numpy as...
[ [ "numpy.array", "sklearn.model_selection.train_test_split", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
scottfabini/machine-learning-perceptron
[ "2bc4b7b415871bc73ac8c033983df73719df9422" ]
[ "6_q-learning/Board.py" ]
[ "#!/usr/bin/env python3\nimport pandas as pd\nimport numpy as np\nimport random\nfrom enum import Enum\nimport os\n\n# Enumeration of available actions\nclass Action(Enum):\n P = 0\n N = 1\n S = 2\n E = 3\n W = 4\n\n# Enumeration of available states\nclass State(Enum):\n Empty = 0\n Wall = 1\n ...
[ [ "numpy.ndenumerate", "numpy.argmax", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JRC1995/Continuous-RvNN
[ "b33bdbd2f80119dc0fa3ed6d44865a3d45bc1e81" ]
[ "inference/models/encoders/ordered_memory.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport math\n\n\nclass Distribution(nn.Module):\n def __init__(self, nslot, hidden_size, dropout):\n super(Distribution, self).__init__()\n\n self.query = nn.Sequential(\n nn.Dropout(dropout),\n nn.Linear(h...
[ [ "torch.nn.functional.normalize", "torch.nn.Dropout", "torch.cat", "torch.zeros_like", "torch.nn.LayerNorm", "torch.exp", "torch.nn.Linear", "torch.nn.Sigmoid", "torch.arange", "torch.stack", "torch.nn.ReLU", "torch.cumsum", "torch.ones_like", "torch.nn.funct...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SunAriesCN/tensorflow
[ "ac8f62a3eba894e35917d5ea974f9dc502148f13" ]
[ "tensorflow/python/compat/compat.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.platform.tf_logging.warning", "tensorflow.python.util.tf_export.tf_export" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.5", "1.7", "1.4" ] } ]
juharris/PySyft
[ "dbb70f24cc55a7dca032fb06f1a8662cb15092a9" ]
[ "test/torch/tensors/test_additive_shared.py" ]
[ "import pytest\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport syft\nfrom syft.frameworks.torch.tensors.interpreters.additive_shared import AdditiveSharingTensor\n\n\ndef test_wrap(workers):\n \"\"\"\n Test the .on() wrap functionality for AdditiveSharingTensor\n \"\"\"\n\...
[ [ "torch.abs", "torch.mean", "torch.cat", "torch.zeros", "torch.sum", "torch.mm", "torch.ones", "torch.tensor", "torch.rand", "torch.roll", "torch.nn.functional.max_pool2d", "torch.dot", "torch.LongTensor", "torch.nn.functional.avg_pool2d", "torch.IntTenso...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hipros/TwitterBERT
[ "d6c2004796ece62d01950e891f68d8a5b6aae631" ]
[ "classifier.py" ]
[ "import torch\n\nfrom torch import nn\n\n\nclass BERTClassifier(nn.Module):\n def __init__(self, bert, hidden_size=768, num_classes=2, dr_rate=None, params=None):\n super(BERTClassifier, self).__init__()\n self.bert_model = bert\n self.dr_rate = dr_rate # dropout rate\n self.classifie...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cdluminate/robrank
[ "980141400525d295ac9642cd0f978d3e9e85ab90", "980141400525d295ac9642cd0f978d3e9e85ab90" ]
[ "tools/grad.py", "robrank/utils.py" ]
[ "'''\nCopyright (C) 2019-2021, Mo Zhou <cdluminate@gmail.com>\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable...
[ [ "torch.nn.functional.normalize", "torch.nn.functional.pairwise_distance", "torch.no_grad", "torch.rand", "torch.nn.functional.cosine_similarity", "torch.dot" ], [ "torch.nn.functional.normalize", "sklearn.cluster.KMeans", "torch.zeros", "torch.sum", "torch.distribut...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
translationalneurosurgery/tool-offspect
[ "011dafb697e8542fc7c3cf8af8523af3ff704a14" ]
[ "tests/mock/mock_smartmove.py" ]
[ "\"\"\"\nMock and test smartmove\n-----------------------\n\n:code-block: bash\n\n python mock_smartmove.py .\n \n offspect tms -t test.hdf5 -f documentation.txt VvNn_VvNn_2000-12-31_23-59-59.cnt \"VvNn 2000-12-31_23-59-59.cnt\" -r contralateral_mep -c Ch1 -pp 100 100\n\n\"\"\"\n\nimport libeep\nfrom pathl...
[ [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
theGuyWithBlackTie/Deep-Extreme-Multi-Label-Learning
[ "e90e4fb5ebeba009358af529594db2201f8f434c" ]
[ "config.py" ]
[ "# Contains all static and live configurations about the project\r\nimport torch\r\n\r\n# paths\r\nDATASET = 'Bibtex' # Default dataset is set to Bibtex dataset\r\nDATAFOLDER = 'data/'\r\nMODEL_SAVED= 'outputs/{}/model/state_dict_model.pt'\r\nPREDICTIONS_PATH = 'outputs/{}/predictions/final_results_and_targets....
[ [ "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dailab/elvis
[ "9b808d0777b014ee0c2d79e4b9a2390bea4841e6" ]
[ "elvis/result.py" ]
[ "from numpy import histogram\nfrom datetime import timedelta\nimport numpy as np\nfrom elvis.charging_point import ChargingPoint\nfrom elvis.config import ScenarioRealisation\nfrom elvis.utility.elvis_general import num_time_steps, create_time_steps\nfrom elvis.distribution import EquallySpacedInterpolatedDistribut...
[ [ "numpy.array", "numpy.histogram", "numpy.quantile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tobikasali/Disaster_response_pipleine
[ "aee12fc6ca27486490a5d90f7267740e4f7d6f1c" ]
[ "app/run.py" ]
[ "import json\nimport plotly\nimport pandas as pd\nimport numpy as np\n\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.tokenize import word_tokenize\n\nfrom flask import Flask\nfrom flask import render_template, request, jsonify\nfrom plotly.graph_objs import Bar\nfrom sklearn.externals import joblib\nfrom sqla...
[ [ "pandas.read_sql_table", "sklearn.externals.joblib.load", "numpy.sum" ] ]
[ { "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": [] } ]
LeosyHsu/tflite_on_microcontroller
[ "afb1a59fc1bc792ac72d1a3e22e2469020529788" ]
[ "slim/nets/nasnet/nasnet.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\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#\...
[ [ "tensorflow.nn.softmax", "tensorflow.transpose", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.identity", "tensorflow.contrib.layers.flatten", "tensorflow.logging.info", "tensorflow.contrib.layers.l2_regularizer", "tensorflow.variable_scope", "tensorflow...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "1.2" ] } ]
mxl9999/LoanStats
[ "07d032a98f8dad5298b1edd1b2963d5fe26f1de4" ]
[ "LoanStats.py" ]
[ "\n# coding: utf-8\n\n# In[10]:\n\n\nimport numpy as np\nimport pandas as pd\nloandata = pd.DataFrame(pd.read_excel('D:\\data analysis\\Data capture\\loandata.xlsx'))\n\n\n# In[11]:\n\n\nloandata\n\n\n# In[31]:\n\n\nloandata.duplicated().value_counts()\n\n\n# In[13]:\n\n\nloandata.drop_duplicates()\n\n\n# In[14]:\n...
[ [ "matplotlib.pyplot.legend", "pandas.to_datetime", "sklearn.cross_validation.train_test_split", "pandas.read_excel", "matplotlib.pyplot.barh", "matplotlib.pyplot.rc", "sklearn.neighbors.KNeighborsClassifier", "pandas.cut", "matplotlib.pyplot.title", "matplotlib.pyplot.pie", ...
[ { "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": [] } ]
giladcohen/darkon-examples
[ "29b0a880cc2ed7ac1b463e9e1e633ab521e04dc0" ]
[ "cifar10_resnet/hyper_parameters.py" ]
[ "# Coder: Wenxin Xu\n# Github: https://github.com/wenxinxu/resnet_in_tensorflow\n# ==============================================================================\nimport tensorflow as tf\n\nFLAGS = tf.app.flags.FLAGS\n\n## The following flags are related to save paths, tensorboard outputs and screen outputs\n\ntf.a...
[ [ "tensorflow.app.flags.DEFINE_boolean", "tensorflow.app.flags.DEFINE_string", "tensorflow.app.flags.DEFINE_integer", "tensorflow.app.flags.DEFINE_float" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jinczing/AudioCLIP
[ "45327aa203839bfeb58681dd36c04fd493ee72f4" ]
[ "utils/transforms.py" ]
[ "import math\n\nimport numpy as np\n\nimport torch\nimport torchvision as tv\n\nimport ignite_trainer as it\n\n\ndef scale(old_value, old_min, old_max, new_min, new_max):\n old_range = (old_max - old_min)\n new_range = (new_max - new_min)\n new_value = (((old_value - old_min) * new_range) / old_range) + ne...
[ [ "torch.mean", "torch.ones", "torch.zeros", "torch.rand", "numpy.random.rand", "torch.arange", "torch.full_like", "numpy.random.uniform", "torch.log10", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zsyOAOA/VIRNet
[ "b66bea114d240f51a0c709fd132607c875c1ddc2" ]
[ "loss/loggamma_op.py" ]
[ "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n# Power by Zongsheng Yue 2020-03-30 14:59:29\n\nimport torch\nfrom scipy.special import gammaln\nfrom torch.autograd import Function as autoF\n\nclass LogGamma(autoF):\n '''\n Implement of the logarithm of gamma Function.\n '''\n @staticmethod\n def for...
[ [ "torch.digamma", "torch.from_numpy", "scipy.special.gammaln" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.18", "0.19" ], "tensorflow": [] } ]
dhm-org/dhm_suite
[ "19f803fbe973bebf9bd63994e58ea94f475ba3f6" ]
[ "dhmsw/dhmsw/interface.py" ]
[ "\"\"\"\n###############################################################################\n# Copyright 2019, by the California Institute of Technology. ALL RIGHTS RESERVED.\n# United States Government Sponsorship acknowledged. Any commercial use must be\n# negotiated with the Office of Technology Transfer at the\...
[ [ "numpy.reshape", "numpy.fromstring", "numpy.dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
idolumbantobing/vit-pytorch
[ "eb70d8dca041cc387b3e1f72d965d8814eeab29a" ]
[ "vit_pytorch/cct.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# Pre-defined CCT Models\n__all__ = ['cct_2', 'cct_4', 'cct_6', 'cct_7', 'cct_8', 'cct_14', 'cct_16']\n\n\ndef cct_2(*args, **kwargs):\n return _cct(num_layers=2, num_heads=2, mlp_ratio=1, embedding_dim=128,\n *args, **kwargs...
[ [ "torch.nn.Dropout", "torch.linspace", "torch.sin", "torch.cat", "torch.nn.init.trunc_normal_", "torch.zeros", "torch.nn.init.constant_", "torch.nn.Flatten", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.nn.Identity", "torch.nn.MaxPool2d", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vikingMei/incubator-mxnet
[ "02f1e23a0cc36d3d6cf4eba4db7103b8967f9b8d" ]
[ "example/rnn/nce/src/loader/corpusiter.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n#\n# Usage: \n# Author: wxm71(weixing.mei@aispeech.com)\n\nimport pdb\nimport logging\nimport threading\nimport multiprocessing\n\nimport numpy as np\nimport mxnet as mx\n\nfrom .utils import batchify\n\n\nclass CorpusIter(mx.io.DataIter):\n def __init__(self, source, bat...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lechatquidanse/bicing-prediction-api
[ "cc71f9a57d1151fa768ad2b3769b9a4df77289f6" ]
[ "src/user_interface/rest/flask/response/FlaskPredictByStationIdResponse.py" ]
[ "\"\"\"\nIn charge of response handle for predictions by station\n\"\"\"\nfrom flask import jsonify\nfrom pandas import DataFrame, DatetimeIndex\n\nfrom application.use_case.query.StationAvailabilitiesPredictionByDateTimeInPeriodFilterView import \\\n StationAvailabilitiesPredictionByDateTimeInPeriodFilterView\n...
[ [ "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": [] } ]
GidLev/cepy
[ "98fee44c9cb17e228c77b35f107702c0eaf0d8f0" ]
[ "cepy/embed_align.py" ]
[ "import numpy as np\nfrom collections.abc import Iterable\nimport copy\n\ndef align(base_ce, target_ce, base_index = 0, target_indices ='all'):\n '''\n Aligned connectome embeddings originated from independent fitting iteration\n\n Parameters\n ----------\n base_ce : CE\n Containes the latent ...
[ [ "numpy.linalg.pinv", "numpy.dot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zlinao/COMP5212-project1
[ "fa6cb10d238de187fbb891499916c6b44a0cd7b7" ]
[ "neural_network.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 1 13:05:41 2018\n\n@author: lin\n\"\"\"\nimport numpy as np\nfrom sklearn.metrics import accuracy_score,confusion_matrix,classification_report,log_loss\nimport matplotlib.pyplot as plt\nfrom sklearn.model_selection import GridSearchCV\nfr...
[ [ "sklearn.neural_network.MLPClassifier", "sklearn.model_selection.GridSearchCV", "sklearn.metrics.confusion_matrix", "sklearn.metrics.log_loss", "numpy.load", "sklearn.metrics.classification_report", "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
boronhub/tensorflow
[ "0c98d8b8e2971d312d46fdcb739e6ce333aafe5a" ]
[ "tensorflow/python/data/experimental/ops/readers.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.data.ops.dataset_ops.MapDataset", "tensorflow.python.framework.dtypes.int64.as_numpy_dtype", "tensorflow.python.ops.gen_experimental_dataset_ops.sql_dataset", "tensorflow.python.data.ops.dataset_ops.get_legacy_output_types", "tensorflow.python.framework.dtypes.int32.as_numpy...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.2", "1.13", "2.3", "2.4", "2.5", "2.6" ] } ]
lantunes/deepdab
[ "0e30f102b9d7c37d3691540496b1649f2704d586" ]
[ "deepdab/util/plotter_multiple2.py" ]
[ "import matplotlib.pyplot as plt\nimport pylab\n\ndata = pylab.loadtxt('../out/plotdata.txt', delimiter=',', usecols=(0, 1, 2, 3, 4, 5, 6))\n\npylab.plot(data[:, 0], data[:, 1], linestyle='solid', linewidth=0.5, marker='.', markersize=2, label='L0', color='blue')\npylab.plot(data[:, 0], data[:, 2], linestyle='dashe...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
latasianguy/progressive-learning
[ "c15299cf3c87f431250722e7f682f4abb43b5c0c" ]
[ "proglearn/forest.py" ]
[ "\"\"\"\nMain Author: Will LeVine\nCorresponding Email: levinewill@icloud.com\n\"\"\"\nfrom .progressive_learner import ClassificationProgressiveLearner\nfrom .transformers import TreeClassificationTransformer\nfrom .voters import TreeClassificationVoter\nfrom .deciders import SimpleArgmaxAverage\nimport numpy as n...
[ [ "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tensorflow-pool/insightface
[ "d27ad2d3e8b15a9abaddc86dc12c59437db6ee80" ]
[ "src/image_iter.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport logging\nimport numbers\nimport os\nimport random\nimport sys\nfrom io import BytesIO\n\nimport mxnet as mx\nimport numpy as np\nfrom PIL import Image\nfrom mxnet import io\nfrom mxnet import nd...
[ [ "numpy.asarray", "numpy.fliplr", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
htung0101/pytorch-dense-correspondence
[ "5a6eb07e4fec63d0d24a25712c0094255fb310e3" ]
[ "dense_correspondence/correspondence_tools/correspondence_finder.py" ]
[ "# torch\nimport torch\n\n# system\nimport numpy as numpy\nimport numpy as np\nfrom numpy.linalg import inv\nimport random\nimport warnings\n\n# io\nfrom PIL import Image\n\n# torchvision\nimport sys\nsys.path.insert(0, '../pytorch-segmentation-detection/vision/') # from subrepo\nfrom torchvision import transforms\...
[ [ "numpy.dot", "torch.abs", "torch.cat", "torch.ones", "torch.from_numpy", "numpy.copy", "torch.rand", "torch.nonzero", "torch.index_select", "numpy.zeros", "torch.ones_like", "torch.squeeze", "torch.LongTensor", "torch.floor", "numpy.linalg.inv", "tor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
UFSCar-CS/operating-systems-2
[ "c966ce65cfcc24697dbf114b4af29609f46a4fdd" ]
[ "projects/quick-parallel/tests/quick_parallel_tests.py" ]
[ "from unittest import TestCase\n\nimport time\nimport numpy as np\nfrom numpy import testing\n\nfrom quick_parallel import Sort\n\n\nclass QuickParallelTest(TestCase):\n def test_is_quick_sorting_correctly(self):\n for i in range(1, 1001, 100):\n x = np.random.rand(i)\n sorted_x = So...
[ [ "numpy.random.rand", "numpy.sort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tanglef/keops
[ "58b2c5f7822a7468a6da2ce439939e7dad04d7f3" ]
[ "pykeops/torch/cluster/matrix.py" ]
[ "import torch\n\ndef from_matrix( ranges_i, ranges_j, keep ) :\n r\"\"\"Turns a boolean matrix into a KeOps-friendly **ranges** argument.\n\n This routine is a helper for the **block-sparse** reduction mode of KeOps,\n allowing you to turn clustering information (**ranges_i**,\n **ranges_j**) and a clus...
[ [ "torch.arange", "torch.Tensor", "torch.IntTensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
milot-mirdita/alphafold
[ "8a24cc8d22feb2b7ae9bf78f910ce97e9d4403e8", "8a24cc8d22feb2b7ae9bf78f910ce97e9d4403e8" ]
[ "alphafold/model/all_atom_test.py", "alphafold/model/tf/input_pipeline.py" ]
[ "# Copyright 2021 DeepMind Technologies Limited\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applic...
[ [ "numpy.expand_dims", "numpy.ones_like", "numpy.asarray", "numpy.ones", "numpy.deg2rad", "numpy.zeros_like", "numpy.array", "numpy.zeros" ], [ "tensorflow.compat.v1.constant", "tensorflow.compat.v1.range" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
desam47/Machine_Learning_Project-2
[ "f7ab069179879650859467f451b9997a495833a2" ]
[ "Adam.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# https://github.com/duaraanalytics/bankmarketing/blob/master/Analyzing%20Employee%20Churn%20with%20Keras.ipynb\n\n\"\"\"\nCreated on Wed Mar 6 08:51:19 2019\n\n@author: dipesh\n\"\"\"\n\n# Import necessary libraries\n\nimport numpy as np\nimport pandas as pd\nim...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "sklearn.model_selection.cross_val_score", "matplotlib.pyplot.title", "pandas.get_dummies", "numpy.set_printoptions", "sklearn.metrics.accuracy_score", "sklearn.model_selection.train_test_split", "sklearn.metrics.confusion_matrix",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chnghia/pytorch-lightning-gan
[ "3e484ea8eca2a3365a6b209a979a95a5b2e4a6f2" ]
[ "models/pix2pixHD_model.py" ]
[ "import os\nfrom argparse import ArgumentParser, Namespace\nfrom collections import OrderedDict\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\nimport torchvision.transforms as transforms\nfrom torch.optim import lr_scheduler\nfrom torch.autograd impo...
[ [ "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mys007/awesome-semantic-segmentation-pytorch
[ "fa83563d45ce85a9deb0284de85e75b5aa24883a" ]
[ "tests/test_model.py" ]
[ "\"\"\"Model overfitting test\"\"\"\nimport argparse\nimport time\nimport os\nimport sys\n\nimport torch\nimport torch.nn as nn\nimport torch.backends.cudnn as cudnn\nimport numpy as np\n\ncur_path = os.path.abspath(os.path.dirname(__file__))\nroot_path = os.path.split(cur_path)[0]\nsys.path.append(root_path)\n\nfr...
[ [ "numpy.array", "torch.from_numpy", "torch.cuda.is_available", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RobertArbon/NMpathAnalysis
[ "f428d6b11ebefcf080de5737448963ed251b18c2" ]
[ "nmpath/ensembles.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nfrom copy import deepcopy\nimport networkx as nx\nfrom math import log\n\nfrom interval import Interval\nfrom auxfunctions import get_shape, weighted_choice\nfrom auxfunctions import reverse_sort_lists\nfrom mfpt import directional_mfpt\nfrom mfpt import direct_mfpts\n\...
[ [ "numpy.random.uniform", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kuronekodaisuki/pytorch
[ "459270ac01f1bfcbeaffb20f1c94622561af94e0" ]
[ "test/test_quantization.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom torch.testing._internal.common_utils import run_tests\n\n# Quantization core tests. These include tests for\n# - quantized kernels\n# - quantized functional operators\n# - quantized workflow modules\n# - quantized workflow operators\n# - quantized tensor\n\n# 1. Quantized Kernels\n#...
[ [ "torch.testing._internal.common_utils.run_tests" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ForrestHurley/compPhys
[ "34c2d93b77858150a1c099deff812d961ab6378d" ]
[ "hmwk/0/4.py" ]
[ "import numpy as np\nfrom matplotlib import pyplot as plt\nfrom abc import ABC, abstractmethod\n\nclass integrator(ABC):\n def __init__(self,\n minimum = 0,\n maximum = 1,\n steps = 10):\n self.minimum = minimum\n self.maximum = maximum\n self.steps = steps\n self...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.cumsum", "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Zabamund/misc
[ "e1a2bec1b8e36b039807ec02c53ee3970bb4e255" ]
[ "scripts/demos/activation_funcs.py" ]
[ "#!/bin/python\n\nimport numpy as np\n\ndef binary_step(x):\n return np.where(x < 0, 0, 1)\n\ndef binary_step_(x):\n return np.where(x != 0, 0, np.inf)\n\ndef linear(x, a=1):\n return a * x\n\ndef linear_(x, a=1):\n return a\n\ndef sigmoid(x):\n return 1 / (1 + np.exp(-x))\n \ndef sigmoid_(x):\n ...
[ [ "numpy.exp", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pimax1/DrQA
[ "a4940b38c3491d5e9a06f48ef90ea3ab65019e98" ]
[ "scripts/pipeline/interactive.py" ]
[ "#!/usr/bin/env python3\n# Copyright 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Interactive interface to full DrQA pipeline.\"\"\"\n\nimport torch\nimport argparse\nimport co...
[ [ "torch.cuda.set_device", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
forkbabu/BS-Nets-Implementation-Pytorch
[ "5375456639f18ef25915df5a2e368b922fdf2aaf" ]
[ "global_module/train.py" ]
[ "import time\nimport torch\nimport numpy as np\nimport sys\nsys.path.append('../global_module/')\nimport d2lzh_pytorch as d2l\n\n\ndef evaluate_accuracy(data_iter, net, loss, device):\n acc_sum, n = 0.0, 0\n with torch.no_grad():\n for X, y in data_iter:\n test_l_sum, test_num = 0, 0\n ...
[ [ "torch.no_grad", "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
edeneault/pyfe_capstone_hikingtrails
[ "849328a47095933f2e8ce8a8a5a0d56d04dd3807" ]
[ "visualpass.py" ]
[ "################################################################################\r\n# #### visualpass.py ##### #\r\n# #### written by: Etienne Deneault ##### #\r\n###############################################################...
[ [ "pandas.read_sql_query", "pandas.read_excel", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
degtiarev/hexapod
[ "71c451e13b534e798d8dc02b0478a9660e97d6b7", "71c451e13b534e798d8dc02b0478a9660e97d6b7", "71c451e13b534e798d8dc02b0478a9660e97d6b7" ]
[ "examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py", "examples/pybullet/gym/pybullet_envs/bullet/kukaCamGymEnv.py", "examples/pybullet/gym/pybullet_envs/robot_pendula.py" ]
[ "\"\"\"This file implements the gym environment of minitaur.\n\n\"\"\"\n\nimport os, inspect\ncurrentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\nparentdir = os.path.dirname(os.path.dirname(currentdir))\nos.sys.path.insert(0,parentdir)\n\n\nimport math\nimport time\nimport gym\nf...
[ [ "numpy.asarray", "numpy.random.normal", "numpy.array" ], [ "numpy.reshape", "numpy.array", "numpy.finfo" ], [ "numpy.clip", "numpy.cos", "numpy.isfinite", "numpy.sin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CharlieKC/ACE
[ "ba8909e49dd5408881684f080f2de81b6ec224c2" ]
[ "flair/trainers/finetune_trainer.py" ]
[ "\"\"\"\r\nFine-tune trainer: a trainer for finetuning BERT and able to be parallelized based on flair\r\nAuthor: Xinyu Wang\r\nContact: wangxy1@shanghaitech.edu.cn\r\n\"\"\"\r\n\r\nfrom .distillation_trainer import *\r\nfrom transformers import (\r\n\tAdamW,\r\n\tget_linear_schedule_with_warmup,\r\n)\r\nfrom flair...
[ [ "torch.optim.lr_scheduler.LambdaLR", "torch.utils.tensorboard.SummaryWriter", "torch.optim.lr_scheduler.ExponentialLR" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Guangyi-Zhang/low-expected-cost-decision-trees
[ "745138d4c6637dc5fc5fe4fa13de7de0e09611e2" ]
[ "util.py" ]
[ "import numpy as np\nfrom itertools import groupby, accumulate\nfrom collections import Counter\n\n########## Incense ##########\nfrom incense import ExperimentLoader\n\n# Try to locate config file for Mongo DB\nimport importlib\nspec = importlib.util.find_spec('mongodburi')\nif spec is not None:\n from mongodbu...
[ [ "numpy.arange", "numpy.sort", "numpy.random.rand", "numpy.bincount", "numpy.argsort", "numpy.array", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
db12138/Online_Courses_and_Materials
[ "6a113056f4fd2667556942b3bcc9608bdf9c2968" ]
[ "Stanford_CS224n NLP with Deep Learning/lec6/tensorflow_toturial_code/word2vec_starter.py" ]
[ "\"\"\" starter code for word2vec skip-gram model with NCE loss\nCS 20: \"TensorFlow for Deep Learning Research\"\ncs20.stanford.edu\nChip Huyen (chiphuyen@cs.stanford.edu)\nLecture 04\n\"\"\"\n\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL']='2'\n\nimport numpy as np\nfrom tensorflow.contrib.tensorboard.plugins imp...
[ [ "tensorflow.TensorShape", "tensorflow.summary.FileWriter", "tensorflow.random_uniform_initializer", "tensorflow.zeros", "tensorflow.truncated_normal_initializer", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", "tensorflow.Session", "tens...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
chrmertz/synth_train_data
[ "181fca14ed7b92953ff977cc3a7924311d145a97", "181fca14ed7b92953ff977cc3a7924311d145a97" ]
[ "syndata-generation/dataset_generator.py", "traffic_sign/tools/im2mask.py" ]
[ "import argparse\nimport glob\nimport sys\nimport os\nfrom xml.etree.ElementTree import Element, SubElement, tostring\nimport xml.dom.minidom\nimport cv2\nimport numpy as np\nimport random\nfrom PIL import Image\nfrom PIL import ImageEnhance\nfrom PIL import ImageFilter\nimport PIL.ImageOps \nimport scipy\nfrom ...
[ [ "numpy.linspace", "numpy.any", "numpy.array", "numpy.where", "numpy.zeros" ], [ "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
amanjha8100/alibi-detect
[ "13b2664dca601aebc25c774fd6814bd5d380d6e7" ]
[ "alibi_detect/utils/fetching.py" ]
[ "import cloudpickle as cp\nimport logging\nimport os\nimport pickle\nimport tensorflow as tf\nfrom tensorflow.python.keras import backend\nfrom typing import Tuple, Union\nfrom urllib.request import urlopen\nfrom alibi_detect.base import BaseDetector\nfrom alibi_detect.ad import AdversarialAE, ModelDistillation\nfr...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.utils.get_file" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
navn-r/scikit-learn
[ "24babc68d510a827ced4159f313edf8488f41b15" ]
[ "sklearn/ensemble/_hist_gradient_boosting/tests/test_binning.py" ]
[ "import numpy as np\nimport scipy.sparse as sp\nfrom numpy.testing import assert_array_equal, assert_allclose\nimport pytest\n\nfrom sklearn.ensemble._hist_gradient_boosting.binning import (\n _BinMapper,\n _find_binning_thresholds,\n _map_to_bins,\n)\nfrom sklearn.ensemble._hist_gradient_boosting.common i...
[ [ "numpy.linspace", "numpy.all", "numpy.zeros_like", "sklearn.ensemble._hist_gradient_boosting.binning._map_to_bins", "sklearn.ensemble._hist_gradient_boosting.binning._BinMapper", "numpy.allclose", "numpy.unique", "sklearn.utils._openmp_helpers._openmp_effective_n_threads", "num...
[ { "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"...
Silicon-He/Speech-enhancement-and-separation
[ "7524941c19f3950b88abab6dc74edd26541d325b" ]
[ "speech_separation_RNN.py" ]
[ "# -*- coding = utf-8 -*-\r\n# @Author:何欣泽\r\n# @Time:2020/10/18 19:14\r\n# @File:speech_separation_IRM.py\r\n# @Software:PyCharm\r\n\r\n\r\nimport librosa\r\nimport librosa.display\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom tensorflow.keras.models import load_model\r\n\r\n\r\ndef get_audio_se...
[ [ "tensorflow.keras.models.load_model", "numpy.abs", "numpy.multiply", "numpy.reshape", "numpy.shape", "numpy.angle", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
sumersumerdjl/kozistr-Awesome-GANs
[ "9add33fdfcb9fead75c37dd7afdbede625a303c9" ]
[ "AdaGAN/adagan_model.py" ]
[ "import tensorflow as tf\n\nimport sys\n\nsys.path.append('../')\nimport tfutil as t\n\n\ntf.set_random_seed(777) # reproducibility\n\n\nclass AdaGAN:\n\n def __init__(self, s, batch_size=64, height=28, width=28, channel=1, n_classes=10,\n sample_num=64, sample_size=8,\n n_input=...
[ [ "tensorflow.summary.FileWriter", "tensorflow.nn.sigmoid", "tensorflow.reshape", "tensorflow.placeholder", "tensorflow.trainable_variables", "tensorflow.summary.merge_all", "tensorflow.variable_scope", "tensorflow.train.AdamOptimizer", "tensorflow.set_random_seed", "tensorfl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
XianyuanLiu/EPIC-KITCHENS-100_UDA_TA3N
[ "30e1c494eadb165e5c71c6f89406707d58153308" ]
[ "dataset.py" ]
[ "import torch.utils.data as data\n\nimport os\nimport os.path\nimport numpy as np\nfrom numpy.random import randint\nimport torch\nimport pickle\nimport pandas as pd\nfrom colorama import init\nfrom colorama import Fore, Back, Style\n\ninit(autoreset=True)\n\n\nclass VideoRecord(object):\n def __init__(self, i, ...
[ [ "numpy.expand_dims", "numpy.ones", "numpy.append", "torch.stack", "pandas.read_pickle", "numpy.zeros", "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": [] } ]
cswarth/whylogs
[ "6805b252f1d07efde84836d3924949f7ec2d97b1", "6805b252f1d07efde84836d3924949f7ec2d97b1" ]
[ "src/whylogs/core/datasetprofile.py", "tests/unit/app/test_segments.py" ]
[ "\"\"\"\nDefines the primary interface class for tracking dataset statistics.\n\"\"\"\nimport datetime\nimport io\nimport logging\nfrom typing import Dict, List, Mapping, Optional, Union\nfrom uuid import uuid4\n\nimport numpy as np\nimport pandas as pd\nfrom google.protobuf.internal.decoder import _DecodeVarint32\...
[ [ "numpy.ndim", "numpy.arange", "numpy.asanyarray", "pandas.DataFrame" ], [ "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": [] }, { "matplotlib": [], "nump...
bluebibi/rl_book_codes
[ "ef7fc9993eb66618e4b4e80e59cc2879a8db3522" ]
[ "chapter_11/REINFORCE.py" ]
[ "import torch\nimport gym\nimport numpy as np\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport matplotlib.pyplot as plt\n\n# Constants\nGAMMA = 0.99\n\n\nclass PolicyNetwork(nn.Module):\n def __init__(self, num_inputs, num_actions, ...
[ [ "torch.from_numpy", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "torch.nn.Linear", "matplotlib.pyplot.ylabel", "torch.autograd.Variable", "torch.FloatTensor", "matplotlib.pyplot.grid", "torch.stack", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.rcParams.upd...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
agorshk/daal4py
[ "58a9b2301c47cd2d5144a403a59c210e10b75f8f" ]
[ "examples/multivariate_outlier_batch.py" ]
[ "\n#*******************************************************************************\n# Copyright 2014-2020 Intel Corporation\n# All Rights Reserved.\n#\n# This software is licensed under the Apache License, Version 2.0 (the\n# \"License\"), the following terms apply:\n#\n# You may not use this file except in compli...
[ [ "pandas.read_csv", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
lurosenb/Swap_Auditor
[ "63f1ba22a1c834ad2cb961e5e25b9c3a36c12cec" ]
[ "fairness/data/objects/ProcessedData.py" ]
[ "import pandas as pd\nimport numpy\nimport numpy.random\n\nTAGS = [\"original\"]#, \"numerical\", \"numerical-binsensitive\", \"categorical-binsensitive\"]\nTRAINING_PERCENT = 2.0 / 3.0\n\nclass ProcessedData():\n def __init__(self, data_obj):\n self.data = data_obj\n self.dfs = dict((k, pd.read_cs...
[ [ "numpy.arange", "numpy.random.shuffle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nestauk/mapping_parenting_tech
[ "17ae403e2eb6be7c73092bc49bc62f9a24fdf0de", "17ae403e2eb6be7c73092bc49bc62f9a24fdf0de" ]
[ "mapping_parenting_tech/analysis/prototyping/visualisation_app_landscape.py", "mapping_parenting_tech/analysis/prototyping/archived/clustering_reviews.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# cell_metadata_filter: -all\n# comment_magics: true\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.13.8\n# kernelspec:\n# display_name: Py...
[ [ "pandas.read_csv", "numpy.random.random", "numpy.sqrt", "sklearn.cluster.KMeans", "numpy.random.seed", "scipy.spatial.distance.cdist", "pandas.DataFrame", "numpy.round", "numpy.argmax", "pandas.read_json" ], [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "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...
italogsfernandes/emg-moviments-classifier
[ "7a58f162fa6c5bc1a2906c539dac3e0210115522" ]
[ "python-hand-movements-classifier/convert_database_to_new_format.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCoding at 6:48 and listening to:\n Rock is Dead - Marylin Manson\n Dance D'Amour - The 69 Eyes\n Wake Up - Rage Against the Machine\n Clubbed to Death - Robert D.\n@author: italo\n\"\"\"\n#%% Importing the libraries\nimport pandas as pd # reading...
[ [ "pandas.concat", "numpy.arange", "matplotlib.pyplot.ylim", "pandas.DataFrame", "numpy.ones", "matplotlib.pyplot.plot", "pandas.read_table", "matplotlib.pyplot.subplot", "numpy.diff", "matplotlib.pyplot.grid", "numpy.array", "numpy.zeros", "matplotlib.pyplot.show...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
dolcos/driverlessai-recipes
[ "e1eb2787daeaae387d80ce24d4d3398c4fddb585" ]
[ "models/mli/model_gam.py" ]
[ "\"\"\"Generalized Additive Model\"\"\"\n\nimport uuid\nimport os\nimport datatable as dt\nimport numpy as np\nfrom h2oaicore.models import CustomModel\nfrom sklearn.preprocessing import LabelEncoder\nfrom h2oaicore.systemutils import physical_cores_count\nfrom h2oaicore.systemutils import user_dir, remove, config,...
[ [ "numpy.isin", "matplotlib.pyplot.title", "numpy.random.choice", "numpy.isnan", "sklearn.preprocessing.OneHotEncoder", "pandas.DataFrame", "numpy.array", "sklearn.preprocessing.LabelEncoder", "numpy.isinf", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "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": [] } ]
ii-research-ranking/ptranking
[ "2794e6e086bcd87ce177f40194339e9b825e9f4c" ]
[ "ptranking/ltr_adhoc/listwise/st_listnet.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Description\nauthor = {Bruch, Sebastian and Han, Shuguang and Bendersky, Michael and Najork, Marc},\ntitle = {A Stochastic Treatment of Learning to Rank Scoring Functions},\nyear = {2020},\nbooktitle = {Proceedings of the 13th International Conference on Web ...
[ [ "torch.nn.functional.softmax", "torch.log", "torch.nn.functional.log_softmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
williamthegrey/ml-agents
[ "c75eacbdc40f9afffaedfd79d861b83a88cf3b8d" ]
[ "ml-agents/mlagents/trainers/ppo/trainer.py" ]
[ "# # Unity ML-Agents Toolkit\n# ## ML-Agent Learning (PPO)\n# Contains an implementation of PPO as described in: https://arxiv.org/abs/1707.06347\n\nfrom collections import defaultdict\nfrom typing import cast\n\nimport numpy as np\n\nfrom mlagents_envs.logging_util import get_logger\nfrom mlagents_envs.base_env im...
[ [ "numpy.append", "numpy.mean", "numpy.zeros_like", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Azmarie/COVID-Doctor-Chatbot
[ "e516fc9b722713b450b73c6c1d004977b2e265b1" ]
[ "Transformer/transformer_perplexity.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch.utils.data import TensorDataset, DataLoader\nimport numpy as np\nfrom transformers import AdamW, get_linear_schedule_with_warmup\nfrom transformers_model import transformers_model\n\nimport fire\nimport time\nimport os\n\n# uses allennlp modules\nfrom allen...
[ [ "torch.load", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.no_grad", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isLinXu/DatasetMarkerTool
[ "b324315ed5c679f9dc764a6b1d88be246ee7f2db" ]
[ "dataset/core/tools/crop/crop_bounds.py" ]
[ "import argparse\nimport cv2\nimport numpy as np\nimport os\nimport shutil\n\ndef crop_image_only_outside(img,tol=0):\n # img is 2D or 3D image data\n # tol is tolerance\n mask = img>tol\n if img.ndim==3:\n mask = mask.all(2)\n m,n = mask.shape\n mask0,mask1 = mask.any(0),mask.any(1)\n ...
[ [ "numpy.int0", "numpy.median", "numpy.ones", "numpy.array", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
moldis-group/DesignBODIPY
[ "92d06bc7fdb070760588e96e6c8c1b5f6359636c", "92d06bc7fdb070760588e96e6c8c1b5f6359636c" ]
[ "GenerateSLATM.py", "DesignBodipy_Bayes.py" ]
[ "from qml.representations import get_slatm_mbtypes\nfrom qml import Compound\nimport numpy as np\n\n\nclass GenerateSLATM:\n \"\"\"\n Simple class wrapper to initialize qml SLATM routines\n call dunder overloaded for generating slatm descriptor\n \"\"\"\n\n def __init__(self):\n # Declare mbty...
[ [ "numpy.array" ], [ "numpy.abs", "sklearn.gaussian_process.kernels.RBF", "numpy.random.choice", "scipy.stats.norm.cdf", "scipy.stats.norm.pdf", "numpy.squeeze", "numpy.max", "sklearn.gaussian_process.GaussianProcessRegressor", "scipy.optimize.minimize", "numpy.random...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", ...
aaysan/facenet
[ "ba0d690e137b89c5d76f22bcc7a12deab98325d9" ]
[ "src/facenet.py" ]
[ "\"\"\"Functions for building the face recognition network.\n\"\"\"\n# MIT License\n#\n# Copyright (c) 2016 David Sandberg\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without ...
[ [ "numpy.sqrt", "tensorflow.control_dependencies", "tensorflow.cast", "sklearn.model_selection.KFold", "numpy.concatenate", "numpy.max", "tensorflow.train.ExponentialMovingAverage", "numpy.mean", "tensorflow.image.decode_image", "tensorflow.train.AdamOptimizer", "tensorfl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.19", "0.18", "1.2", "0.12", "1.0", "0.17", "0.16" ], "tensorflow": [] } ]
mcgill-cpslab/spiral
[ "22290a0684f8f1f276db2b05569452fbbe0e125d" ]
[ "nineturn/dtdg/models/decoder/torch/sequentialDecoder/rnnFamily.py" ]
[ "# Copyright 2022 The Nine Turn 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 requi...
[ [ "torch.randn", "torch.nn.GRU", "torch.nn.RNN", "torch.nn.LSTM" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mreitm/neurokernel
[ "8195a500ba1127f719e963465af9f43d6019b884" ]
[ "neurokernel/pattern.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nRepresent connectivity pattern using pandas DataFrame.\n\"\"\"\n\nfrom collections import OrderedDict\nimport itertools\nimport re\n\nimport networkx as nx\nimport numpy as np\nimport pandas as pd\n\nfrom plsel import Selector, SelectorMethods\nfrom pm import BasePortMapper\n\nclas...
[ [ "pandas.merge", "pandas.read_csv", "pandas.DataFrame.from_csv", "pandas.isnull", "pandas.MultiIndex", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "numpy.isscalar", "numpy.iterable" ] ]
[ { "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": [] } ]
xdr940/TSLa
[ "97f8626cb29e956f77fc34d84100771ab84bea52" ]
[ "components/measurement.py" ]
[ "\nimport pandas as pd\nimport numpy as np\nfrom collections import Counter\nimport matplotlib.pyplot as plt\nimport math\n\n\nclass Measurer:\n def __init__(self,procedures):\n self.procedures = procedures\n self.alg_cnt = Counter([item[4:] for item in list(self.procedures.keys())])\n\n\n def ...
[ [ "numpy.array", "numpy.ones_like", "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": [] } ]
Lion-HuangGz/CS231nAssignment
[ "9adfdeda1c892c468c7bab9661fe8eb4d1063510" ]
[ "assignment1/cs231n/classifiers/linear_svm.py" ]
[ "import numpy as np\n\n\ndef svm_loss_naive(W, X, y, reg):\n \"\"\"\n Structured SVM loss function, naive implementation (with loops).\n\n Inputs have dimension D, there are C classes, and we operate on minibatches\n of N examples.\n\n Inputs:\n - W: A numpy array of shape (D, C) containing weight...
[ [ "numpy.arange", "numpy.zeros", "numpy.sum", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
stlukyanenko/mne-python
[ "89647f3363fcb5de306cc18e55e7b9fa89fe0315", "89647f3363fcb5de306cc18e55e7b9fa89fe0315", "89647f3363fcb5de306cc18e55e7b9fa89fe0315", "89647f3363fcb5de306cc18e55e7b9fa89fe0315" ]
[ "mne/io/proj.py", "mne/forward/_field_interpolation.py", "mne/time_frequency/tfr.py", "mne/rank.py" ]
[ "# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>\n# Denis Engemann <denis.engemann@gmail.com>\n# Teon Brooks <teon.brooks@gmail.com>\n#\n# License: BSD (3-clause)\n\nfrom copy import deepcopy\nfrom itertools import count\nfrom math...
[ [ "numpy.dot", "scipy.linalg.svd", "numpy.unique", "numpy.eye", "numpy.ones", "numpy.all", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ], [ "numpy.logical_not", "numpy.dot", "scipy.linalg.svd", "numpy.linspace", "numpy.cumsum", "numpy....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0.10" ], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0...
amirsaleh-salehzadeh/BehaveNet
[ "1dcdfa3d9efd022f29f37495be15f9657c5e7374" ]
[ "DeepEEGSingleElectrode/models/HAR_CNN/HAR_CNN.py" ]
[ "import sys\nsys.path.insert(0, \"/home/cirl/Amir/Human-Activity-EEG-Accelerometer\")\nimport numpy as np\nimport os\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense, Activation, Dropout, Flatten\nimport time\n\nimport tensorflow as tf\nimport random as rn\nfrom keras import backend as K, o...
[ [ "tensorflow.ConfigProto", "tensorflow.get_default_graph", "numpy.random.seed", "tensorflow.set_random_seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
KumarLabJax/deep-hrnet-mouse
[ "13014885861f87bf9fd5a99afdfe3153cca852a5", "13014885861f87bf9fd5a99afdfe3153cca852a5" ]
[ "lib/core/evaluate.py", "tools/rendervidoverlay.py" ]
[ "# ------------------------------------------------------------------------------\n# Copyright (c) Microsoft\n# Licensed under the MIT License.\n# Written by Bin Xiao (Bin.Xiao@microsoft.com)\n# ------------------------------------------------------------------------------\n\nfrom __future__ import absolute_import\...
[ [ "numpy.less", "numpy.linalg.norm", "numpy.ones", "numpy.not_equal", "numpy.array", "numpy.zeros" ], [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sonsus/vtt_qa_pipeline
[ "23fc8e19b094c76113ac91d7b49212246984f00f" ]
[ "startup/model/temporal_graph.py" ]
[ "import torch\nfrom torch import nn\nimport torch.nn.functional as F\n\nfrom .modules import Conv1dIn, MultiHeadAttention\nfrom .acc_model import Encoder, Decoder\n\n\nclass TemporalGraph(nn.Module):\n def __init__(self, vocab, n_dim, image_dim, layers, dropout):\n super().__init__()\n\n self.vocab...
[ [ "torch.nn.Linear", "torch.nn.functional.relu", "torch.nn.Embedding", "torch.nn.LayerNorm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AmitNikhade/Vision-Transformer
[ "f8d5b02670ca7d3f9ec365c6944a9411c70efec8" ]
[ "src/test.py" ]
[ "import torch\nimport sys\nimport matplotlib.pyplot as plt\nimport numpy as np\nsys.path.append(\"VIT/src/utils\")\nfrom utils.preprocess import test_loader\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\nmodel=torch.load('VIT/src/data/model_weight_MNIST.pt')\nmodel.eval()\n\n\n\npredi...
[ [ "torch.max", "torch.load", "torch.no_grad", "torch.cuda.is_available", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ZHTushar23/breaching
[ "3e4d336ed3c631b8bf70974a9a5e1f923ddb039a", "3e4d336ed3c631b8bf70974a9a5e1f923ddb039a" ]
[ "breaching/attacks/auxiliaries/conv2circulant.py", "breaching/attacks/auxiliaries/make_functional.py" ]
[ "\"\"\"This is the file conv2circulant from https://github.com/JunyiZhu-AI/R-GAP/blob/main/conv2circulant.py\"\"\"\n\nimport numpy as np\n\n\ndef generate_coordinates(x_shape, kernel, stride, padding):\n assert len(x_shape) == 4\n assert len(kernel.shape) == 4\n assert x_shape[1] == kernel.shape[1]\n k_...
[ [ "numpy.array", "numpy.zeros" ], [ "torch.stack", "torch.nn.Parameter", "torch.empty_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
alexisperakis/arviz
[ "edfbcf9c177f6be25139e20317400133ab1180ed" ]
[ "arviz/plots/backends/bokeh/distplot.py" ]
[ "\"\"\"Bokeh Distplot.\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom ....stats.density_utils import get_bins, histogram\nfrom ...kdeplot import plot_kde\nfrom ...plot_utils import _scale_fig_size, set_bokeh_circular_ticks_labels, vectorized_to_hex\nfrom .. import show_layout\nfrom . import back...
[ [ "numpy.asarray", "numpy.deg2rad", "numpy.diff", "numpy.cumsum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wqi18433/text-to-text-transfer-transformer
[ "56fbff6d26af1ded529f598dd4eaa4a506002e32" ]
[ "t5/data/preprocessors.py" ]
[ "# Copyright 2020 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agr...
[ [ "tensorflow.compat.v1.not_equal", "tensorflow.compat.v1.logical_and", "tensorflow.compat.v1.random.uniform", "tensorflow.compat.v1.strings.regex_replace", "tensorflow.compat.v1.equal", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.logging.warn", "tensorflow.compat.v1.strings...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
daniel-zeng/SegSort
[ "7a50e6253df23a7719f962b34acff2626c916354" ]
[ "pyscripts/inference/prototype_embedding_rgb.py" ]
[ "from __future__ import print_function\n\nimport argparse\nimport os\nimport time\nimport math\nfrom tqdm import tqdm\n\nimport tensorflow as tf\nimport numpy as np\nimport scipy.io\nimport scipy.misc\nimport network.vmf.common_utils as common_utils\nimport network.vmf.eval_utils as eval_utils\nfrom PIL import Imag...
[ [ "tensorflow.concat", "numpy.linspace", "tensorflow.global_variables", "numpy.concatenate", "tensorflow.ConfigProto", "tensorflow.gather", "tensorflow.name_scope", "tensorflow.Session", "tensorflow.train.Saver", "numpy.zeros", "tensorflow.image.resize_bilinear", "ten...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
low-sky/otfmap
[ "d9b6b776cff36931a527f5066bc4e036f7f62955" ]
[ "setup.py" ]
[ "from distutils.core import setup\nfrom Cython.Build import cythonize\nimport numpy as np\n\nsetup(\n name = \"On-the-Fly Gridder\",\n ext_modules = cythonize(\"src/*.pyx\", include_path = [np.get_include()]),\n include_dirs = [np.get_include()]\n)\n" ]
[ [ "numpy.get_include" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Savioor/pepsiWorkshop2
[ "b2cfcd80381d068d927dda3ef01d31592a63df72" ]
[ "question_4.py" ]
[ "from rocket_pather import *\nfrom constants import *\nimport math\nimport matplotlib.pyplot as plt\n\nif __name__ == '__main__':\n data = RocketData(0, 0, ROCKET_VEL, 0, 0)\n theta_50_rocket = RocketData(0, 0, ROCKET_VEL, math.radians(50), 0)\n theta_70_rocket = RocketData(0, 0, ROCKET_VEL, math.radians(7...
[ [ "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
julimueller/dtld_parsin
[ "f9575de42a1951017db44fcf07584b4ef143b397" ]
[ "python/dtld_parsing/calibration.py" ]
[ "from __future__ import print_function\n\n__author__ = \"Andreas Fregin, Julian Mueller and Klaus Dietmayer\"\n__maintainer__ = \"Julian Mueller\"\n__email__ = \"julian.mu.mueller@daimler.com\"\n\nimport yaml\nimport numpy as np\n\n\nclass IntrinsicCalibration:\n \"\"\"\n Intrinsic calibration\n\n Attribut...
[ [ "numpy.reshape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NRathod-tech/ga-learner-dst-repo
[ "b3c6b545e08951388c12c3fb2a24ed029daee2c3" ]
[ "Superhero-Statistics-data/code.py" ]
[ "# --------------\n#Header files\r\nimport pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n\r\n#Reading of the file\r\ndata=pd.read_csv(path)\r\ndata.head()\r\ndata.isnull().sum()\r\n# Code starts here\r\ndata['Gender'].value_counts()\r\ndata['Gender'] = data['Gender'].replace('-', 'Age...
[ [ "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
JasonLiJT/SF2-image-processing-python
[ "1752382c43986ed49f2d835ce147b6aa3110b14f" ]
[ "SF2_Python/helpers_jpeg.py" ]
[ "# Authors:\n# Jason Li - jl944@cam.ac.uk,\n# Karthik Suresh - ks800@cam.ac.uk\n# 2019 SF2 Group 7\n\nimport numpy as np\nfrom helpers import *\nimport scipy.io as sio\n\n############# Initial provided methods #############\n\n\nclass HuffmanHelper:\n '''Base Helper class for Huffman coding'''\n\n def __init_...
[ [ "numpy.concatenate", "numpy.max", "numpy.round", "numpy.all", "numpy.argmin", "numpy.any", "numpy.where", "numpy.square", "numpy.ix_", "numpy.reshape", "numpy.arange", "numpy.block", "numpy.zeros", "numpy.delete", "numpy.array", "numpy.sum", "num...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
andreanelli/scikit-cosmo
[ "97adbd5459bc738f994ded2ac385a13d4ad20afb" ]
[ "tests/test_standard_flexible_scaler.py" ]
[ "import unittest\nfrom skcosmo.preprocessing.flexible_scaler import StandardFlexibleScaler\nfrom sklearn.preprocessing import StandardScaler\nimport sklearn\nimport numpy as np\n\n\nclass ScalerTests(unittest.TestCase):\n def test_fit_transform_pf(self):\n \"\"\"Checks that in the case of normalization by...
[ [ "numpy.sqrt", "numpy.around", "numpy.random.uniform", "sklearn.preprocessing.StandardScaler", "numpy.array", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ntunlp/ptrnet-depparser
[ "2b6ebdb63825eafd63d86700bbbc278cabfafeb2", "2b6ebdb63825eafd63d86700bbbc278cabfafeb2" ]
[ "neuronlp2/io/conllx_data.py", "neuronlp2/nn/modules/skipconnect_rnn.py" ]
[ "__author__ = 'max'\n\nimport os.path\nimport random\nimport numpy as np\nfrom .alphabet import Alphabet\nfrom .logger import get_logger\nfrom . import utils\nimport torch\n\n# Special vocabulary symbols - we always put them at the start.\nPAD = b\"_PAD\"\nPAD_POS = b\"_PAD_POS\"\nPAD_TYPE = b\"_<PAD>\"\nPAD_CHAR =...
[ [ "torch.randperm", "numpy.arange", "numpy.random.random_sample", "numpy.random.shuffle", "numpy.random.binomial", "torch.from_numpy", "torch.device", "numpy.zeros", "numpy.empty" ], [ "torch.nn.init.constant_", "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TakahitoMotoki/qiskit-terra
[ "531e62f3a3c218fee6db116f54ed41ce4e88d9a9" ]
[ "qiskit/quantum_info/states/utils.py" ]
[ "# 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-2.0.\n#\n# Any modificatio...
[ [ "numpy.log", "numpy.log2", "scipy.linalg.svd", "numpy.reshape", "numpy.eye", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0.10" ], "tensorflow": [] } ]
pierrefdz/dino
[ "8adde6022bdfcb27f20f5938e25d541aa2d6e112" ]
[ "main_dino.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\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 ...
[ [ "torch.nn.functional.softmax", "torch.max", "numpy.linspace", "torch.zeros", "torch.utils.data.DataLoader", "torch.sum", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.cuda.amp.autocast", "torch.no_grad", "torch.nn.PairwiseDistance", "torch.cuda.synchronize", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Frmissjing/berryconda
[ "0207e46ff539728d5077196470fa9ce85887834d" ]
[ "recipes/scipy/run_test.py" ]
[ "import sys\nimport os\n\n# Use OpenBLAS with 1 thread only as it seems to be using too many\n# on the CIs apparently.\n\nimport scipy\nimport scipy.cluster._hierarchy\nimport scipy.cluster._vq\nimport scipy.fftpack._fftpack\nimport scipy.fftpack.convolve\nimport scipy.integrate._dop\nimport scipy.integrate._odepac...
[ [ "scipy.test" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AidanKosik/HiveMind
[ "385006e1777e475d8ed8d71bb26e53b8a76acdd5" ]
[ "src/QLearningTable.py" ]
[ "import numpy as np\nimport pandas as pd\n\n\n# Stolen from https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow\nclass QLearningTable:\n def __init__(self, actions, learning_rate=0.01, reward_decay=0.9, e_greedy=0.9):\n self.actions = actions # a list\n self.lr = learning_rate\n ...
[ [ "numpy.random.uniform", "numpy.random.permutation", "pandas.DataFrame", "numpy.random.choice" ] ]
[ { "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": [] } ]