repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
GNovich/CBIS-DDSM_alpha | [
"fe0ce942473af9f7bff3b0bd3b2306e1da41cb03"
] | [
"one_pixle_Adversery_CIFAR.py"
] | [
"from config import get_config\nimport argparse\nfrom ShapeLearner import ShapeLearner\nfrom ShapeLoader import ShapeDataSet\nfrom torch.utils.data import DataLoader, RandomSampler\nimport numpy as np\nimport pickle\nimport torch\nimport os\nimport pathlib\nimport sys\nfrom itertools import product\nimport re\nfrom... | [
[
"numpy.hstack",
"torch.nn.Softmax",
"torch.chunk",
"torch.max",
"torch.load",
"torch.cat",
"numpy.arange",
"torch.utils.data.DataLoader",
"torch.utils.data.sampler.SubsetRandomSampler",
"numpy.max",
"numpy.argmax",
"torch.device",
"torch.nn.DataParallel",
"n... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shawnwang18/nvtx-plugins | [
"12ea33203cc18ccd546f835e228359e3eecbdb14"
] | [
"nvtx_plugins/python/nvtx/plugins/tf/ops.py"
] | [
"# ! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2019, NVIDIA CORPORATION. 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.ap... | [
[
"tensorflow.compat.v1.get_variable",
"tensorflow.compat.v1.variable_scope",
"tensorflow.python.framework.ops.RegisterGradient"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"1.12",
"2.6",
"2.2",
"1.13",
"2.3",
"2.4",
"1.4",
"2.9",
"1.5",
"1.7",
"2.5",
"0.12",
"1.0",
"2.8",
"1... |
MeteSertkan/newsrec | [
"fc3b8803e6334aeba81f7cf212fa88ca2d1440d8"
] | [
"project/models/sentirec/__init__.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport pytorch_lightning as pl\nfrom torchmetrics import MetricCollection\nfrom models.sentirec.news_encoder import NewsEncoder\nfrom models.sentirec.user_encoder import UserEncoder\nfrom models.utils import TimeDistributed\nfrom models.metrics ... | [
[
"torch.nn.Linear",
"torch.sigmoid",
"torch.nn.functional.cross_entropy",
"torch.nn.functional.softmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vguizilini/packnet-sfm | [
"fec6d0b493b784cabe5e6bf9c65b996a83c63fe1",
"fec6d0b493b784cabe5e6bf9c65b996a83c63fe1"
] | [
"scripts/train_sfm_utils.py",
"monodepth/datasets/image_sequence.py"
] | [
"# Copyright 2020 Toyota Research Institute. All rights reserved.\n\nimport torch\nfrom monodepth.models import monodepth_beta, load_net_from_checkpoint\nfrom monodepth.functional.image import scale_image\nimport os\n\n\ndef load_dispnet_with_args(args):\n \"\"\"\n Loads a pretrained depth network\n \"\"\... | [
[
"torch.mean",
"torch.abs",
"torch.max",
"torch.load",
"torch.zeros",
"torch.median",
"torch.tensor",
"torch.log",
"torch.squeeze"
],
[
"numpy.arange",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sus304/RockVis | [
"171298006057af63f5ef01b149324c9f0623e0dc"
] | [
"RockVis.py"
] | [
"'''\r\nMIT License\r\nCopyright (c) 2017 Susumu Tanaka\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, co... | [
[
"matplotlib.pyplot.legend",
"numpy.radians",
"numpy.sqrt",
"numpy.rad2deg",
"scipy.integrate.odeint",
"matplotlib.pyplot.plot",
"numpy.arctan2",
"scipy.integrate.cumtrapz",
"numpy.arcsin",
"numpy.sin",
"scipy.interpolate.interp1d",
"numpy.argmax",
"matplotlib.py... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"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",
"0.17",
"0.16",
"1.8"
... |
oxu2/flyingsquid | [
"07c38f259d962fa2b3581793045af4687f91be93"
] | [
"examples/tutorials/tutorial_helpers.py"
] | [
"import numpy as np\nfrom numpy.random import seed, rand\nimport itertools\n\ndef exponential_family (lam, y, theta, theta_y):\n # without normalization\n return np.exp(theta_y * y + y * np.dot(theta, lam))\n\n# create vector describing cumulative distribution of lambda_1, ... lambda_m, Y\ndef make_pdf(m, v, ... | [
[
"numpy.dot",
"numpy.random.seed",
"numpy.cumsum",
"numpy.random.random_sample",
"numpy.random.rand",
"numpy.where",
"numpy.sum",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
matthias95/CNN_ImageSegmentation | [
"3eff992a2789af9a33a6e24e6f3ff5d3e600b395"
] | [
"cnn_image_segmentation/resnet_segmentation_model.py"
] | [
"# -*- coding: utf-8 -*-\nimport tensorflow as tf\nimport numpy as np\n\ndef getBuildInResNet50(trainable=False, pretrained=True):\n resnet50 = tf.keras.applications.resnet50.ResNet50(include_top=False, weights=('imagenet' if pretrained else None)) # 'imagenet'\n \n for layer in resnet50.layers:\n l... | [
[
"tensorflow.keras.applications.resnet50.ResNet50",
"tensorflow.keras.layers.ReLU",
"tensorflow.keras.Input",
"tensorflow.shape",
"tensorflow.keras.layers.Conv2D",
"tensorflow.reshape",
"tensorflow.expand_dims",
"tensorflow.keras.Model",
"tensorflow.keras.layers.MaxPooling2D",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rainyuxia0112/K-Nearest-Neighbors-Classifier-using-sql-and-datalog | [
"4391734464d8f548bfb64af0893a73f3ee6f7c1e"
] | [
"knn/datapreprocessing.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Dec 14 18:33:50 2019\n\n@author: rain\n\"\"\"\nimport requests\nfrom bs4 import BeautifulSoup as bs\nfrom urllib import request\n\ndef get_data(url, name): \n \"\"\"\n url - website\n name - csv name\n \"\"\"\n rq = request.urlo... | [
[
"pandas.concat",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
semihyagcioglu/allennlp | [
"cb179a6d71285d7dff9120d980e6656f48aab489"
] | [
"allennlp/modules/seq2seq_encoders/bidirectional_language_model_transformer.py"
] | [
"\"\"\"\nThe BidirectionalTransformerEncoder from Calypso.\nThis is basically the transformer from http://nlp.seas.harvard.edu/2018/04/03/attention.html\nso credit to them.\n\nThis code should be considered \"private\" in that we have several\ntransformer implementations and may end up deleting this one.\nIf you us... | [
[
"torch.nn.functional.softmax",
"torch.nn.Dropout",
"torch.sin",
"torch.zeros",
"torch.cat",
"torch.from_numpy",
"numpy.ones",
"torch.matmul",
"torch.nn.Linear",
"torch.arange",
"torch.nn.init.xavier_uniform",
"torch.cos"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
magnusross/Deep-LFM | [
"9f6a6c22a1af0ef949607603352b1d3f07c1bb97"
] | [
"tests/test_features.py"
] | [
"from deepLFM import features\nimport torch\n\n\ndef test_I1():\n ans = torch.complex(torch.Tensor([2.53379]), torch.Tensor([0.514595]))\n ours = features.I1(\n torch.Tensor([0.1]),\n torch.Tensor([0.2]),\n torch.Tensor([0.3]),\n torch.Tensor([0.4]),\n torch.Tensor([0.5]),\n... | [
[
"torch.Tensor",
"torch.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
koki0702/deep-learning-from-zero | [
"0aac172fa272160ab691a2b66248fcabb0f82186"
] | [
"ch06/batch_norm_test.py"
] | [
"import sys, os\nsys.path.append(os.pardir)\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom dataset.mnist import load_mnist\nfrom common.multi_layer_net_extend import MultiLayerNetExtend\nfrom common.optimizer import SGD, Adam\n\n\n(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True)\n\nx_tr... | [
[
"matplotlib.pyplot.legend",
"numpy.random.choice",
"numpy.logspace",
"numpy.arange",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.show",
"matplotlib.pyplot.xti... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
uwdata/boba | [
"80ff10ffd9a2ae99002bc7e88d173869b86c736c"
] | [
"example/fertility/template.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy as np\nimport pandas as pd\nimport statsmodels.api as sm\nimport statsmodels.formula.api as smf\n# --- (BOBA_CONFIG)\n{\n \"graph\": [\n \"NMO1->ECL1->A\",\n \"NMO2->ECL2->A\",\n \"NMO1->A\",\n \"NMO2->A\",\n \"A->B\",\n \"A->EC->B\"\n ],\n \"decisions\":... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"numpy.clip",
"numpy.around",
"pandas.Timedelta",
"numpy.timedelta64"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yangbang18/video-classification-3d-cnn | [
"47be83a234475dee109d62d448eb441c128b0895"
] | [
"models/resnext.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport math\nfrom functools import partial\n\n__all__ = ['ResNeXt', 'resnet50', 'resnet101']\n\n\ndef conv3x3x3(in_planes, out_planes, stride=1):\n # 3x3x3 convolution with padding\n return nn.Conv3d(in... | [
[
"torch.nn.AvgPool3d",
"torch.nn.Sequential",
"torch.cat",
"torch.nn.MaxPool3d",
"torch.nn.Conv3d",
"torch.nn.Linear",
"torch.nn.functional.avg_pool3d",
"torch.nn.ReLU",
"torch.nn.BatchNorm3d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jareducherek/tutor-grad-mlp | [
"5998137fcb0a8ec1c76b6f98cb74f8b2039f3426"
] | [
"mlp.py"
] | [
"import numpy as np\n\nclass DenseLayer:\n def __init__(\n self, \n n_units, \n input_size=None, \n activation=None, \n name=None):\n self.n_units = n_units\n self.input_size = input_size\n self.W = None\n self.name = name\n ... | [
[
"numpy.sum",
"numpy.einsum",
"numpy.random.seed",
"numpy.trace",
"numpy.ones",
"numpy.argmax",
"numpy.shape",
"numpy.random.randn",
"numpy.apply_along_axis",
"numpy.exp",
"numpy.zeros",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zlpure/cs224w | [
"03fc4d179e430454632e1eeaf457626b3ba18a4e"
] | [
"hw1-bundle/q2.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 7 18:34:38 2020\n\n@author: zlpure\n\"\"\"\nimport snap\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef calcFeaturesNode(Node, Graph):\n \"\"\"\n return: 1. the degree of v, i.e., deg(v);\n 2. the number of ... | [
[
"numpy.dot",
"numpy.zeros",
"numpy.sqrt",
"numpy.linalg.norm"
]
] | [
{
"matplotlib": [],
"numpy": [
"1.10",
"1.12",
"1.11",
"1.19",
"1.24",
"1.13",
"1.16",
"1.9",
"1.18",
"1.23",
"1.21",
"1.22",
"1.20",
"1.7",
"1.15",
"1.14",
"1.17",
"1.8"
],
"pandas": [],
... |
jmhayesesq/Open-Chem | [
"e612d5cd471079c64e61ceda946c3dc7cf095bd8"
] | [
"openchem/models/vanilla_model.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\n\nimport numpy as np\n\nfrom sklearn.ensemble import RandomForestRegressor as RFR\nfrom sklearn.ensemble import RandomForestClassifier as RFC\nfrom sklearn.svm import SVC\nfrom sklearn.svm import SVR\nfrom sklearn.externals import joblib\nfrom... | [
[
"sklearn.ensemble.RandomForestRegressor",
"sklearn.metrics.r2_score",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.metrics.auc",
"sklearn.metrics.roc_curve",
"numpy.save",
"numpy.concatenate",
"sklearn.svm.SVR",
"sklearn.svm.SVC",
"numpy.load",
"numpy.array"
]
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
avr248/Serving | [
"bd12b303d3e490278dd94461fa8f70dc24c81ec0"
] | [
"examples/Pipeline/PaddleDetection/faster_rcnn/web_service.py"
] | [
"# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.fromstring"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AmarisAI/tia | [
"a7043b6383e557aeea8fc7112bbffd6e36a230e9"
] | [
"tia/util/mplot.py"
] | [
"\"\"\"\nCommon matplotlib utilities\n\"\"\"\nimport uuid\nimport os\n\nfrom matplotlib.ticker import FuncFormatter\nfrom matplotlib.dates import DateFormatter\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas\n\nimport tia.util.fmt as fmt\nfrom tia.util.decorator import DeferredExecutionMixin\n\n... | [
[
"matplotlib.pyplot.gca",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.tight_layout",
"pandas.to_datetime",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.close",
"matplotlib.ticker.FuncFormatter"
]
] | [
{
"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": []
}
] |
Jokerming-MJ/CDLab | [
"bfe1262f14dea2d386108e949b7987a7d21d421f"
] | [
"src/models/siamunet_diff.py"
] | [
"# Implementation of\n# Daudt, R. C., Le Saux, B., & Boulch, A. \"Fully convolutional siamese networks for change detection\". In 2018 25th IEEE International Conference on Image Processing (ICIP) (pp. 4063-4067). IEEE.\n\n# Adapted from https://github.com/rcdaudt/fully_convolutional_change_detection/blob/master/si... | [
[
"torch.abs",
"torch.nn.Dropout2d",
"torch.nn.functional.pad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
IcarusWizard/Deep-Generative-Models | [
"4117c11ad944bdeff106a80adbb3642a076af64e"
] | [
"degmo/gan/wgan.py"
] | [
"import torch\nfrom torch.functional import F\nimport numpy as np\n\nfrom .modules import ConvGenerator, ConvDiscriminator, MLPGenerator, MLPDiscriminator\nfrom .utils import weights_init\nfrom .trainer import AdversarialTrainer\n\nclass WGAN(torch.nn.Module):\n def __init__(self, c, h, w, mode, latent_dim,\n ... | [
[
"torch.randn"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jni/gala | [
"975ed783a6cb3c0afe24a921afdacf2f27184fcf"
] | [
"gala/features/convex_hull.py"
] | [
"# python standard library\nimport logging\nimport itertools as it\n\n# numpy/scipy\nimport numpy as np\nfrom scipy import ndimage as nd\nfrom scipy.misc import factorial\nfrom numpy.linalg import det\ntry:\n from scipy.spatial import Delaunay\nexcept ImportError:\n logging.warning('Unable to load scipy.spati... | [
[
"scipy.ndimage.binary_erosion",
"numpy.nonzero",
"scipy.spatial.Delaunay",
"scipy.misc.factorial",
"numpy.concatenate",
"numpy.linalg.det",
"numpy.zeros_like",
"numpy.repeat",
"numpy.array"
]
] | [
{
"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": []
}
] |
shinya1024/rate_equation_test | [
"044edd9665554f1b665de39994c654160160914b"
] | [
"exabibunn4.py"
] | [
"from scipy.integrate import solve_ivp\n\ndef upward_cannon(t,y):\n return [y[1],-0.5]\ndef hit_ground(t,y):\n return y[0]\n\nhit_ground.terminal = True\nhit_ground.direction = -1\ndef apex(t,y):\n return y[1]\n\nsol = solve_ivp(upward_cannon,[0,100],[0,10],events = (hit_ground,apex),dense_output = True)\n... | [
[
"scipy.integrate.solve_ivp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.9",
"1.5",
"1.2",
"1.7",
"1.0",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
nextfortune/modelbricks | [
"5aee91cf5acb439cafcac89d96bee9c8a71f65cc"
] | [
"tests/test_transformlayer.py"
] | [
"\"\"\"Unit Test for TransformLayer\"\"\"\nimport unittest\nimport tensorflow as tf\nfrom modelbricks.layers.layers import TransformLayer\n\nimport common_base_test as cbt\n\nclass TestTransformLayer(cbt.TestBase):\n \"\"\"Test Case for Transform Layer\"\"\"\n def setUp(self):\n super().setUp()\n\n ... | [
[
"tensorflow.TensorShape"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"1.12",
"2.6",
"2.2",
"1.13",
"2.3",
"2.4",
"1.4",
"2.9",
"1.5",
"1.7",
"2.5",
"0.12",
"1.0",
"2.8",
"1... |
kumagallium/pyklab | [
"67bb8f1f088d7e6f217c3e16583c51416589b073"
] | [
"pyklab/develop/structures.py"
] | [
"import pandas as pd\nimport numpy as np\nimport os\nimport plotly.graph_objects as go\nfrom scipy.spatial import Delaunay\nimport pymatgen.core as mg\nfrom pymatgen.ext.matproj import MPRester\nfrom pymatgen.symmetry.analyzer import SpacegroupAnalyzer\nfrom pymatgen.analysis.local_env import IsayevNN, MinimumDista... | [
[
"matplotlib.pyplot.gca",
"scipy.spatial.Delaunay",
"pandas.DataFrame",
"numpy.sort",
"matplotlib.pyplot.grid",
"numpy.array",
"numpy.sum",
"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": []
}
] |
d00d/quantNotebooks | [
"a3d954ef543697f04b9960009ab9cc0b990dc578"
] | [
"Notebooks/strategies/from quantopian.algorithm import attach_pipeline,.py"
] | [
"from quantopian.algorithm import attach_pipeline, pipeline_output\nfrom quantopian.pipeline import Pipeline\nfrom quantopian.pipeline.data.builtin import USEquityPricing\nfrom quantopian.pipeline.factors import CustomFactor, SimpleMovingAverage\nfrom quantopian.pipeline.data import morningstar\n\nimport pandas as ... | [
[
"numpy.log",
"numpy.mean",
"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": []
}
] |
gregreen/deep-potential | [
"115897f8cc51c2ea2af0662449ff280ac1aa4e11"
] | [
"scripts/serializers_tf.py"
] | [
"#!/usr/bin/env python\n\nfrom __future__ import print_function, division\n\nimport tensorflow as tf\nprint(f'Tensorflow version {tf.__version__}')\nfrom tensorflow import keras\nimport numpy as np\nimport re\n\n\ndef weights_as_list(layer):\n \"\"\"\n Returns a (possibly nested) list containing\n the weig... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mostafanorouzi/Video-Synopsis | [
"baf871eb962f63c62e98b86120f71358b9291cee"
] | [
"Video_synopsis_Video1.py"
] | [
"import cv2\nimport numpy as np\nimport copy\nimport Car\nfrom Car import isOverLabCar, getBG, gradientline, setColor , isOverLabRects\n\nvideo_path = 'Video1.avi'\n\n# Open video file\ncap = cv2.VideoCapture(video_path)\n\n# Define the codec and create VideoWriter object\nfourcc = cv2.VideoWriter_fourcc(*'XVID')\n... | [
[
"numpy.array",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
michellab/bgflow | [
"46c1f6035a7baabcbaee015603d08b8ce63d9717"
] | [
"tests/distribution/energy/test_linlogcut.py"
] | [
"\nimport pytest\nimport torch\nfrom bgflow import Energy, LinLogCutEnergy\n\n\nclass StrongRepulsion(Energy):\n def __init__(self):\n super().__init__([2, 2])\n\n def _energy(self, x):\n dist = torch.cdist(x, x)\n return (dist ** -12)[..., 0, 1][:, None]\n\n\ndef test_linlogcut(ctx):\n ... | [
[
"torch.allclose",
"torch.cdist",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zhoufu945/Transport-Mode-GPS-CNN | [
"8db5f83f593a004a7af280bfd6668cc6032e8338"
] | [
"Keras_Data_Creation.py"
] | [
"import numpy as np\r\nimport pickle\r\nimport os\r\nfrom scipy.signal import savgol_filter\r\n\r\nfilename = '../Combined Trajectory_Label_Geolife/Revised_InstanceCreation+NoJerkOutlier+Smoothing.pickle'\r\n# Each of the following variables contain multiple lists, where each list belongs to a user\r\nwith open(fil... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MitchellAcoustics/rsd-engineeringcourse | [
"43769a849e02983f3fb334eb10d6d8e9ec259eac"
] | [
"ch01data/greengraph/map.py"
] | [
"import numpy as np\nfrom io import BytesIO\nimport imageio as img\nimport requests\n\n\nclass Map:\n def __init__(\n self, lat, long, satellite=True, zoom=10, size=(400, 400), sensor=False\n ):\n base = \"https://static-maps.yandex.ru/1.x/?\"\n\n params = dict(\n z=zoom,\n ... | [
[
"numpy.logical_and"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alibh95/PyBaMM | [
"351183b2e8bd6fd11da998625d0fc029d8f99c1b"
] | [
"pybamm/simulation.py"
] | [
"#\n# Simulation class\n#\nimport pickle\nimport pybamm\nimport numpy as np\nimport copy\nimport warnings\nimport sys\n\n\ndef is_notebook():\n try:\n shell = get_ipython().__class__.__name__\n if shell == \"ZMQInteractiveShell\": # pragma: no cover\n # Jupyter notebook or qtconsole\n ... | [
[
"numpy.round",
"numpy.diff"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tkoyama010/pyvista | [
"edbd004db13c2e771b8bd0553565febfafc8f7c7"
] | [
"pyvista/demos/logo.py"
] | [
"\"\"\"Generate the pyvista logo.\n\nLogos generated with:\nplot_logo(screenshot='pyvista_logo.png', window_size=(1920, 1080))\nplot_logo(screenshot='pyvista_logo_sm.png', window_size=(960, 400), off_screen=True)\n\n# different camera angle for square plot\ncpos = [(-0.3654543687422538, 1.1098808905156292, 9.073223... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
materialsinnovation/pydem | [
"966a9e2467469f285b16d81aac47d82e75a4927c"
] | [
"pydem.py"
] | [
"import numpy as np\nimport time\nfrom scipy.spatial import ConvexHull\nfrom scipy.spatial import Delaunay\nimport sympy\ntry:\n import matplotlib.pyplot as plt\n from mpl_toolkits.mplot3d import Axes3D\n from matplotlib.text import Text\n enable_plotting = True\nexcept ImportError:\n enable_plotting... | [
[
"numpy.split",
"numpy.sqrt",
"numpy.asarray",
"matplotlib.pyplot.hold",
"numpy.concatenate",
"numpy.all",
"numpy.max",
"numpy.mean",
"numpy.any",
"numpy.ravel_multi_index",
"numpy.where",
"numpy.unique",
"numpy.reshape",
"matplotlib.colors.LinearSegmentedCol... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
leeliang/machine-learning-notes | [
"57c6081e2dec4df843e638cc5c44b5bdab99f6f1"
] | [
"other/KNN/plot_kdtree.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\"\"\"\nCreated on 2017-08\n@author: LI Liang\n\"\"\"\n\nimport networkx as nx\nimport matplotlib.pyplot as plt \n\ndef binary_tree_layout(G, root, width=1., vert_gap = 0.2, vert_loc = 0, xcenter = 0.5, \n pos = None, parent = None):\n '''If there is a c... | [
[
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.axvline",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.annotate",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.tex... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
marcomussi/RecommenderSystemPolimi | [
"ce45b1eee2231abe1a844697648e94b98dadabea"
] | [
"DataReaderWithoutValid_new.py"
] | [
"\r\nimport numpy as np\r\nimport scipy.sparse as sps\r\nimport time, sys\r\nimport pandas as pd\r\nimport csv\r\n\r\nfrom math import log\r\nimport math\r\n\r\n\r\n\r\nclass dataReader:\r\n\r\n def __init__(self):\r\n super(dataReader, self).__init__()\r\n\r\n # Lettura degli input\r\n trac... | [
[
"numpy.logical_not",
"scipy.sparse.coo_matrix",
"pandas.read_csv",
"numpy.random.choice",
"scipy.sparse.csr_matrix",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"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"... |
bbeale/PyPortfolioOpt | [
"caace2c18e6d7b7a310df3bbf2e0d4d66175f15b"
] | [
"tests/test_efficient_cvar.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pytest\nfrom pypfopt import (\n risk_models,\n expected_returns,\n EfficientCVaR,\n objective_functions,\n)\nfrom tests.utilities_for_tests import setup_efficient_cvar, get_data\nfrom pypfopt.exceptions import OptimizationError\n\n\ndef test_cvar_example(... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.arange",
"numpy.random.multivariate_normal",
"numpy.full",
"numpy.testing.assert_almost_equal",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ndricke/kmc_ML | [
"630fd51005428c2ea3108306cd4b8a94381e6a46"
] | [
"kmc_NN.py"
] | [
"\nimport os\nimport sys\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom pylab import rcParams\n\nimport sklearn.preprocessing as skprep\nimport sklearn.model_selection as skms\nimport sklearn.metrics as skm\nfrom sklearn.neural_network import MLPRegressor... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"sklearn.metrics.r2_score",
"matplotlib.pyplot.scatter",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.show",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.plot",
"numpy.max",
"matplotlib.pyplot.ylab... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
wenjunyoung/PAN_PLUS | [
"c893ff4775c8ff137a21c15d34fb93b9394dbfe5"
] | [
"dataset/pan/pan_synth.py"
] | [
"import numpy as np\nfrom PIL import Image\nfrom torch.utils import data\nimport cv2\nimport random\nimport torchvision.transforms as transforms\nimport torch\nimport pyclipper\nimport Polygon as plg\nimport math\nimport string\nimport scipy.io as scio\n\nsynth_root_dir = './data/SynthText/'\nsynth_train_data_dir =... | [
[
"numpy.unique",
"numpy.reshape",
"numpy.min",
"scipy.io.loadmat",
"numpy.linalg.norm",
"torch.from_numpy",
"numpy.full",
"numpy.ones",
"numpy.max",
"numpy.where",
"numpy.flip",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
kynk94/torch-firewood | [
"8ecd03c166bcadaae22a6cb2c1457a82f2c644eb",
"8ecd03c166bcadaae22a6cb2c1457a82f2c644eb"
] | [
"firewood/trainer/callbacks/image.py",
"tests/helpers/datasets.py"
] | [
"import math\r\nimport os\r\nfrom typing import Any, Iterator, Optional, Tuple, cast\r\n\r\nimport torch\r\nimport torchvision.transforms.functional_tensor as TFT\r\nimport torchvision.utils as TU\r\nfrom pytorch_lightning import Callback, LightningModule, Trainer\r\nfrom torch import Tensor\r\nfrom torch.utils.dat... | [
[
"torch.no_grad"
],
[
"torch.randn",
"torch.utils.data.DataLoader"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Kamalhsn/deraining | [
"9d91abe8178ae654e2b75d987070b684ee478507"
] | [
"train_model.py"
] | [
"\"\"\"\nModel training script\n\"\"\"\nimport os\nimport os.path as ops\nimport argparse\nimport time\n\nimport tensorflow as tf\ntf.compat.v1.disable_v2_behavior()\nimport numpy as np\nimport glog as log\nimport sys\n\nimport data_feed_pipline\nimport global_config\n#import derain_drop_net2\nimport derain_drop_ne... | [
[
"tensorflow.device",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.image.ssim",
"tensorflow.compat.v1.train.Saver",
"tensorflow.compat.v1.train.AdamOptimizer",
"tensorflow.Variable",
"tensorflow.compat.v1.summary.merge",
"tensorflow.compat.v1.trainable_var... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
a-taniguchi/SpCoTMHP | [
"785c6fd5d33c37a6779ab2fde36bb2df274764bd"
] | [
"src/planning/albert_b_spconavi_viterbi_path_calculate.py"
] | [
"#!/usr/bin/env python\n#coding:utf-8\nimport os\nimport time\nimport numpy as np\nfrom scipy.stats import multivariate_normal,multinomial\nimport collections\n#from itertools import izip\nimport spconavi_read_data\nimport spconavi_save_data\nfrom __init__ import *\nfrom submodules import *\n\ntools = spconavi_... | [
[
"numpy.log",
"numpy.argmax",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"scipy.stats.multivariate_normal.pdf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
collincr/ini_team_13 | [
"dca3d88fc31515ec0127cfd03963ce0b5ed735d8"
] | [
"task_scripts/task4.py"
] | [
"import geopandas as gpd\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nif __name__ == \"__main__\":\n \n x_bounds=(-124, -120)\n y_bounds=(37, 39)\n \n gdf = gpd.read_file(\"../data/geojson/calif_nev_ncei_grav.geojson\")\n \n gdf_subset = gdf[(gdf[\"latitude\"] ... | [
[
"numpy.arange",
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dpsnewailab/adou | [
"bea7412202cb17893347e4ff63aab0fb8399bd3b"
] | [
"adou/image/network/EfficientNet.py"
] | [
"import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom adou.image.network.feature import (\n relu_fn,\n round_filters,\n round_repeats,\n drop_connect,\n get_same_padding_conv2d,\n get_model_params,\n efficientnet_params,\n load_pretrained_weights,\n)\n\n\nclass MB... | [
[
"torch.sigmoid",
"torch.nn.ModuleList",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
niketanpatel/mds-provider-services | [
"230c14dac1cbc3e22bf07751ea2d796b78c0a0d2"
] | [
"analytics/query.py"
] | [
"from mds.db.load import data_engine\nimport os\nimport pandas\n\n\ndef parse_db_env():\n \"\"\"\n Gets the required database configuration out of the Environment.\n\n Returns dict:\n - user\n - password\n - db\n - host\n - port\n \"\"\"\n try:\n user, passwo... | [
[
"pandas.read_sql"
]
] | [
{
"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": []
}
] |
DMIU-ShELL/deeprl-shell | [
"a7845ab1c4967ba2af9486625086c3d0b176d293"
] | [
"run_shell.py"
] | [
"#######################################################################\n# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\n# Permission given to modify the code as long as you keep this #\n# declaration at the top #\n#######################... | [
[
"matplotlib.use"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
labdoyon/declarativeTask | [
"bb66bee338009c43f123863941ea64ec38237366"
] | [
"src/ld_example.py"
] | [
"import sys\n\nimport numpy as np\nfrom expyriment import control, stimuli, io, design, misc\nfrom expyriment.misc import constants\nfrom expyriment.misc._timer import get_time\n\nfrom ld_matrix import LdMatrix\nfrom ld_utils import setCursor, newRandomPresentation, readMouse, path_leaf\nfrom config import *\n\nif ... | [
[
"numpy.random.permutation"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Aamer98/cdfsl-benchmark | [
"9464f04269372362b6989b2de701b4496c7e19d8"
] | [
"backbone.py"
] | [
"import torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport math\nimport numpy as np\nimport torch.nn.functional as F\nfrom torch.nn.utils.weight_norm import WeightNorm\n\ndef init_layer(L):\n # Initialization using fan-in\n if isinstance(L, nn.Conv2d):\n n = L.kernel_size[0]*L.ke... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tqslj2/openspeech | [
"10307587f08615224df5a868fb5249c68c70b12d"
] | [
"tests/test_acoustic_models/test_quartznet10x5.py"
] | [
"import unittest\nimport torch\nimport torch.nn as nn\nimport logging\n\nfrom openspeech.criterion.ctc.ctc import CTCLossConfigs\nfrom openspeech.models import QuartzNet10x5Model, QuartzNet10x5Configs\nfrom openspeech.utils import DUMMY_INPUTS, DUMMY_INPUT_LENGTHS, DUMMY_TARGETS, DUMMY_TARGET_LENGTHS, build_dummy_c... | [
[
"torch.nn.CTCLoss"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cheginit/spotpy | [
"38feaf7dbb0ddcbf31e138519ef649f07ac0cded",
"38feaf7dbb0ddcbf31e138519ef649f07ac0cded"
] | [
"tests/test_database.py",
"spotpy/algorithms/dds.py"
] | [
"# -*- coding: utf-8 -*-\n'''\nCopyright (c) 2018 by Tobias Houska\nThis file is part of Statistical Parameter Optimization Tool for Python(SPOTPY).\n:author: Tobias Houska\n'''\nimport unittest\nimport os\nimport glob\nimport spotpy\nimport spotpy.database as db\nimport numpy as np\n\n#https://docs.python.org/3/li... | [
[
"numpy.random.uniform",
"numpy.array"
],
[
"numpy.log",
"numpy.round",
"numpy.all",
"numpy.int",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dulkith/gradio | [
"cf3923e307930965dfc200068e0399bc4ab103f7"
] | [
"gradio/processing_utils.py"
] | [
"from PIL import Image, ImageOps\nfrom io import BytesIO\nimport base64\nimport tempfile\nimport scipy.io.wavfile\nfrom scipy.fftpack import dct\nimport numpy as np\nimport skimage\n\n\n#########################\n# IMAGE PRE-PROCESSING\n#########################\ndef decode_base64_to_image(encoding):\n content =... | [
[
"numpy.dot",
"numpy.abs",
"numpy.linspace",
"numpy.fft.rfft",
"numpy.arange",
"numpy.finfo",
"numpy.sin",
"scipy.fftpack.dct",
"numpy.append",
"numpy.log10",
"numpy.hamming",
"numpy.mean",
"numpy.floor",
"numpy.zeros"
]
] | [
{
"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"... |
CodeOfCognition/Twitter_Vaxx_Sentiment_Analysis | [
"e3cf50c01acf7ce08810e8fa478a599034377264"
] | [
"src/analyze_sentiment.py"
] | [
"import argparse\nimport json\nimport pandas\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n parser.add_argument('-i', help='<annotated_data.csv>', required=True)\n args = parser.parse_args()\n\n return args.i\n\n#checks whether there are any invalid labels\ndef check_label_validity(df, labe... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
LiChenyang-Github/mmclassification | [
"557a364d256b069978ad068adc74ce39a2e375c2"
] | [
"mmcls/datasets/pipelines/transforms.py"
] | [
"import math\nimport random\n\nimport mmcv\nimport numpy as np\n\nfrom ..builder import PIPELINES\n\n\n@PIPELINES.register_module()\nclass RandomCrop(object):\n \"\"\"Crop the given Image at a random location.\n\n Args:\n size (sequence or int): Desired output size of the crop. If size is an\n ... | [
[
"numpy.array",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mdehollander/atlas | [
"805af79ecda60c9a0e86502cacda52206fa9ee10"
] | [
"atlas/report/assembly_report.py"
] | [
"import argparse\nimport os,sys\nf = open(os.devnull, 'w'); sys.stdout = f # block cufflinks to plot strange code\nimport pandas as pd\nimport plotly.graph_objs as go\nfrom plotly import offline\nfrom cufflinks import iplot\nfrom snakemake.utils import report\n\nPLOTLY_PARAMS = dict(\n include_plotlyjs=False, sh... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
klarman-cell-observatory/pegasus | [
"d308540453cd1614ae564e466060fd0d332d6b7e"
] | [
"pegasus/tools/batch_correction.py"
] | [
"import time\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_categorical_dtype\nfrom scipy.sparse import issparse\nfrom pegasusio import MultimodalData\n\nfrom pegasus.tools import estimate_feature_statistics, select_features, X_from_rep\n\nimport logging\nlogger = logging.getLogger(__name... | [
[
"numpy.logical_not",
"pandas.api.types.is_categorical_dtype",
"numpy.reshape",
"pandas.Categorical",
"numpy.ones",
"numpy.concatenate",
"numpy.zeros",
"numpy.isin"
]
] | [
{
"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": []
}
] |
TomHodson/scipy | [
"8de4fa75b126416627978baaf137c05cb00f847e"
] | [
"scipy/stats/__init__.py"
] | [
"\"\"\"\n.. _statsrefmanual:\n\n==========================================\nStatistical functions (:mod:`scipy.stats`)\n==========================================\n\n.. currentmodule:: scipy.stats\n\nThis module contains a large number of probability distributions as\nwell as a growing library of statistical functi... | [
[
"scipy._lib._testutils.PytestTester"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
YZNIU/Cirq | [
"6c996e9fd57d0898c31c8ebbe7fe23f88aa96cf9"
] | [
"cirq/ops/partial_reflection_gate_test.py"
] | [
"# Copyright 2018 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"numpy.diag"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
danielwilczak101/EasyNN | [
"89319e974c324dda228c6ecff7c39d723eda3ca2"
] | [
"EasyNN/model/activation/abc.py"
] | [
"from __future__ import annotations\nfrom abc import ABC\nimport numpy as np\nfrom EasyNN.model.abc import Model_1D\nfrom EasyNN.typing import Array1D\n\n\nclass Activation(Model_1D, ABC):\n \"\"\"\n Activation Models typically involve vectorized\n functions applied over the last dimension.\n \"\"\"\n ... | [
[
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Europium248/captum | [
"ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc",
"ac02fae2651b8d68a44bcb9d03b91cbb3959f2fc"
] | [
"captum/attr/_core/guided_grad_cam.py",
"tests/attr/neuron/test_neuron_conductance.py"
] | [
"#!/usr/bin/env python3\nimport warnings\nfrom typing import Any, List, Union\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Module\n\nfrom captum.log import log_usage\n\nfrom ..._utils.common import _format_input, _format_output, _is_tuple\nfrom ..._utils.typing import TargetType, TensorOrTupleOfT... | [
[
"torch.empty"
],
[
"torch.randn",
"torch.sum",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mahaarbo/casclik | [
"21689c8f09388ef41b95943fa7c9e9bf07ae9207"
] | [
"examples/notebooks/common_plots.py"
] | [
"from matplotlib import pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nimport casadi as cs\n\n\ndef joints(simres, axs=None, max_speed=None, label_suffix=\"\", lstyle=\"-\"):\n \"\"\"Plot joint states wrt time from a simres dictionary.\n\n If given 2 axes, it will plot joints in the first and joint s... | [
[
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
steveschmidt95-neu/mcmi | [
"199029b1efc319850bb128bb19992082f28001d1"
] | [
"src/mcmi_step2.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Jul 15 17:37:21 2021\n\n@author: stephenschmidt\n\"\"\"\n\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 6 13:12:13 2021\n\n@author: stephenschmidt\n\n\nuses the undertraining on the total dataset and then applie... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.imshow",
"matplotlib.colors.BoundaryNorm",
"matplotlib.pyplot.title",
"numpy.min",
"numpy.reshape",
"numpy.random.choice",
"matplotlib.pyplot.savefig",
"numpy.max",
"matplotlib.pyplot.colorbar",
"numpy.argmax",
"matplotlib... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Gustavo029/GridReader | [
"7edc950c469b06c3de0093e5fd8bf6cfd59af354"
] | [
"workspace/geomechanics/cryer/cryer.py"
] | [
"print(\"\"\"\n\tESFERA DE CRYER DRENADO - SEM GRAVIDADE:\n\t(EXEMPLO DO RELATÓRIO)\n\t\t3D\n\t\tRaio = 1m\n\t\tMalha de Tetraedros\n\t\t1852 Nós\n\t\t8046 Elementos\n\n\t\t1MPa aplicado na superfície\n\t\t\n\t\ttimeStep = 10s\n\t\tfinalTime = 1000s\n\t\t100 time steps\n\"\"\")\n\nload = 1.0e+6\ngravity = 0.0 #+\n\... | [
[
"numpy.array",
"pandas.read_csv",
"numpy.linalg.solve",
"numpy.linspace",
"numpy.einsum",
"numpy.logspace",
"numpy.matmul",
"matplotlib.pyplot.subplots",
"numpy.concatenate",
"numpy.repeat",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Shadownox/cogsci-beliefmodeling | [
"8fda3a03207745cfa99435295c87d7aa8695872b"
] | [
"models/Random.py"
] | [
"import ccobra\nimport numpy as np\n\nclass RandomModel(ccobra.CCobraModel):\n def __init__(self, name='Random'):\n super(RandomModel, self).__init__(name, ['syllogistic-belief'], ['verify'])\n\n def predict(self, item, **kwargs):\n return np.random.choice([True, False])\n\n def predict_ratin... | [
[
"numpy.random.randint",
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
james-muriithi/coding-jobs-scrapper | [
"f47c9f402f37756a785317e3e12998d1c93e0f88"
] | [
"brightermodays/main.py"
] | [
"# import packages\nimport requests\nimport pandas as pd\nimport time\nfrom .functions import *\nfrom datetime import datetime\nimport os\nimport json\n\n# give the filename the name of the current folder\nfolder = os.path.join(os.getcwd(), 'jobs')\nfile_name = os.path.join(folder, 'brightermondays-' +\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": []
}
] |
qilei123/DAFNe | [
"6ae6c17ecef6b88e21843969e456fc83b34da0fe"
] | [
"dafne/data/datasets/dafne_dataset_mapper.py"
] | [
"#!/usr/bin/env python3\n\nfrom detectron2.data.detection_utils import filter_empty_instances\nfrom detectron2.structures.instances import Instances\nimport numpy as np\nimport torch\n\nfrom detectron2.config import configurable\nfrom detectron2.data import DatasetMapper\nfrom dafne.utils.sort_corners import sort_q... | [
[
"torch.empty",
"numpy.stack",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MaXXXXfeng/flask-scaffolding | [
"5edf6bb0b28dafc22a492ab085d5720a489c92e1"
] | [
"flask_scaffolding/scaffoldings/basic/proj/handlers/main.py"
] | [
"# -*- coding: utf-8 -*-\nimport urllib.parse\n\nfrom flask import Blueprint, request, make_response\nimport pandas as pd\nimport tablib\n\nfrom proj.utils import ok_jsonify, fail_jsonify, check_file_suffix\nfrom proj.tasks.download import download_result\n\nbp_main = Blueprint('main', __name__, url_prefix=None)\n\... | [
[
"pandas.read_excel",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
eribean/girth_mcmc | [
"911376eabf693b517683af8372984b589d6f7e09"
] | [
"girth_mcmc/polytomous/multidimensional_pcm.py"
] | [
"import pymc3 as pm\nfrom numpy import linspace, zeros, unique\n\nimport theano\nfrom theano import tensor as tt\n\nfrom girth.multidimensional import initial_guess_md\nfrom girth_mcmc.utils import get_discrimination_indices\nfrom girth_mcmc.distributions import PartialCredit\n\n\n__all__= [\"multidimensional_credi... | [
[
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Shubham18091998/Supply-Bot | [
"971c3615697d5c3137caaa3aa9d96faf91968cb9"
] | [
"SB#2726_Task1/Task1.3/Codes/aruco_generation.py"
] | [
"import numpy as np\nimport cv2\nimport cv2.aruco as aruco\n \n \n'''\n drawMarker(...)\n drawMarker(dictionary, id, sidePixels[, img[, borderBits]]) -> img\n'''\n \naruco_dict = aruco.Dictionary_get(aruco.DICT_5X5_50) #creating aruco dictionary...250 markers and a marker size of 6x6 bits\nprint(aruco_dic... | [
[
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
abdur4373/ROS_depth_pred | [
"63ed4d97df8b49a43aad53c4c6bf01441f05153d"
] | [
"pytorch/resize_test.py"
] | [
"import numpy as np\nimport skimage.io as io\n# from depth import*\nfrom predict import *\nfrom scipy import interpolate\n\n\ndef resize_depth_pred(out_img_pred_np):\n x = [x for x in range(160)]\n y = [y for y in range(128)]\n\n f = interpolate.interp2d(x, y, out_img_pred_np)\n\n xnew = np.linspace(0, ... | [
[
"numpy.amax",
"numpy.linspace",
"numpy.amin",
"scipy.interpolate.interp2d",
"numpy.empty"
]
] | [
{
"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"
... |
theompek/Autonomous_Vehicle | [
"5566d54e9379335919841d5dc32c7dd37117d348"
] | [
"src/src/control/src/controller.py"
] | [
"#!/usr/bin/env python\nfrom __future__ import print_function\n\"\"\"\nThe module corresponds to the low level control system of the vehicle, contains the path following algorithms so at to the\nvehicle follows the determined path and the algorithms for the speed control\n\"\"\"\n\n# ===============================... | [
[
"scipy.signal.lfilter",
"scipy.signal.butter",
"numpy.hypot",
"numpy.degrees"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"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",
"0.17",
"0.16",
"1.8"
... |
FlySkyPigg/ShapeSegmentation | [
"1969de6ea884aa500cf6082e296cb986a2ac7c41"
] | [
"scripts_closerlook3d/eval_shapenetpart_ssg_pointnetpp.py"
] | [
"\"\"\"\nEvaluate the trained model and compute iou.\n\nAsk, what is iou? oh, my god.\n\nThe evaluation is proceeded in two-folds.\n1. Semantic class level iou.\n2. Instance level iou.\nAnd therefore we need to compute the semantic confusion matrix for each object.\n\"\"\"\n\nfrom datasets.ShapeNetPart import Shape... | [
[
"torch.zeros",
"numpy.arange",
"torch.utils.data.DataLoader",
"numpy.stack",
"torch.unsqueeze",
"torch.no_grad",
"numpy.mean",
"numpy.array",
"numpy.diagonal",
"numpy.sum",
"torch.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
csj777/Captcha_Recognition | [
"6eb5aebe817305783560a623f50fdcba9166f2c6"
] | [
"predict.py"
] | [
"from keras.models import load_model\nfrom image_fit import resize_to_fit\nfrom imutils import paths\nimport numpy as np\nimport imutils\nimport cv2\nimport pickle\nimport os\n# import matplotlib.pyplot as plt\n\n\n# 计算邻域非白色个数\ndef calculate_noise_count(img_obj, w, h):\n \"\"\"\n 计算邻域非白色的个数\n Args:\n ... | [
[
"numpy.expand_dims",
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ankane/faiss | [
"2f7fcd8766d348391f080d060dedb839b9f99c23"
] | [
"test/support/pca.py"
] | [
"import faiss\nimport numpy as np\n\nmt = np.random.rand(1000, 40).astype('float32')\nmat = faiss.PCAMatrix(40, 10)\nmat.train(mt)\ntr = mat.apply_py(mt)\n\nprint((tr ** 2).sum(0))\n"
] | [
[
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
didriknielsen/argmax_flows | [
"4ffff4bd6f7b25e20292eff6bad2bf5a962e8d39"
] | [
"data/vocab.py"
] | [
"import os\nimport json\nimport warnings\nimport torch\nimport torch.nn as nn\nimport numpy as np\n\n\nclass Vocab():\n\n def __init__(self, stoi={}):\n self.fill(stoi)\n\n def fill(self, stoi):\n self.stoi = stoi\n self.itos = {i:s for s,i in stoi.items()}\n\n def save_json(self, path... | [
[
"torch.is_tensor",
"torch.nn.utils.rnn.pad_sequence",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
atreyasha/mimic3_benchmarks_occlusion | [
"b80a92463757259fa9cba774b03d8b5b82fe863d"
] | [
"utils/readers.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport os\nimport numpy as np\nimport random\n\n\nclass Reader(object):\n def __init__(self, dataset_dir, listfile=None):\n self._dataset_dir = dataset_dir\n self._cu... | [
[
"numpy.array",
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yitongx/baconian-public | [
"a67e23c6bc6bfe7019ec9532a3d18f06aed6bbbb",
"e84508da60877e387344133a11039edaac35c5bf"
] | [
"baconian/common/special.py",
"baconian/common/spaces/dict.py"
] | [
"\"\"\"\nThis script is from garage\n\"\"\"\nimport gym.spaces\nimport numpy as np\nimport scipy\nimport scipy.signal\nfrom typeguard import typechecked\nimport baconian.common.spaces as mbrl_spaces\n\n\ndef weighted_sample(weights, objects):\n \"\"\"\n Return a random item from objects, with the weighting de... | [
[
"numpy.log",
"numpy.minimum",
"numpy.nonzero",
"numpy.asarray",
"numpy.cumsum",
"numpy.concatenate",
"numpy.max",
"numpy.random.rand",
"numpy.prod",
"numpy.var",
"numpy.array",
"numpy.exp",
"numpy.zeros",
"numpy.sum",
"numpy.isclose"
],
[
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
taskina-alena/selene | [
"3d86c61346909cdae5a3a4d9559e60e0736cf6b0"
] | [
"selene_sdk/train_model.py"
] | [
"\"\"\"\nThis module provides the `TrainModel` class and supporting methods.\n\"\"\"\nimport logging\nimport math\nimport os\nimport shutil\nfrom time import strftime\nfrom time import time\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.optim.lr_scheduler... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.Tensor",
"torch.load",
"torch.set_num_threads",
"torch.no_grad",
"torch.nn.DataParallel",
"numpy.average",
"numpy.vstack",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PontusHultkrantz/statarb | [
"521017c6f099e1bd7ea0f31df918abd83a0c8be7"
] | [
"src/optimal_controls/z_spread_model_parameters.py"
] | [
"import numpy as np\nimport pandas as pd\n\nfrom src.estimation.ou_parameter_estimation import (\n estimate_ln_coint_params\n)\n\n\nclass ZSpreadModelParameters:\n\n def __init__(self, gamma=None, rho=None, rho_0=None, sigma_0=None, sigma=None,\n mu_0=None, mu=None, beta=None, delta=None, b=No... | [
[
"numpy.sqrt",
"numpy.concatenate",
"numpy.copy",
"numpy.zeros_like",
"numpy.diff",
"numpy.zeros",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ndai093/UtilityBasedRegression | [
"1af262ab5b2b0645eda247ca63ef0b2f24fe18dd"
] | [
"packaging/src/ImbalancedUtilityBasedSampler/utility_based_random_under_sampler.py"
] | [
"from PhiRelevance.PhiUtils import phiControl,phi\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nclass UtilityBasedRandomUnderSampler:\n \"\"\"\n Class UtilityBasedRandomUnderSampler takes arguments as follows:\n data - Pandas data frame with target value as last column;... | [
[
"pandas.concat",
"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": []
}
] |
vishalbelsare/AutoTS-1 | [
"9b08d42c6f80ee92b7838ede5a6fa45e239c8ca8"
] | [
"test.py"
] | [
"\"\"\"Informal testing script.\"\"\"\nfrom time import sleep\nimport timeit\nimport platform\nimport pandas as pd\nfrom autots.datasets import ( # noqa\n load_daily,\n load_hourly,\n load_monthly,\n load_yearly,\n load_weekly,\n load_weekdays,\n load_zeroes,\n load_linear,\n load_sine,\... | [
[
"matplotlib.pyplot.show",
"pandas.date_range"
]
] | [
{
"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": []
}
] |
JamesJeffryes/kb_ke_apps | [
"a4b568787a50c33e284ca697e24ab9162e75e3c7"
] | [
"lib/kb_ke_apps/Utils/KnowledgeEngineAppsUtil.py"
] | [
"import time\nimport json\nimport os\nimport errno\nimport uuid\nimport shutil\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport itertools\n\nfrom kb_ke_util.kb_ke_utilClient import kb_ke_util\nfrom DataFileUtil.DataFileUtilClient import DataFileUtil\nfrom Workspace.WorkspaceCli... | [
[
"numpy.random.seed",
"matplotlib.pyplot.switch_backend",
"matplotlib.pyplot.savefig",
"numpy.random.rand",
"pandas.read_json",
"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": []
}
] |
techunison-software/data-science-trials | [
"46c9e7bfcda8270573e49a7be8cee3b9c445c2cf"
] | [
"Aswath/visualization.py"
] | [
"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport inspect, os.path\n# filePath=os.path.dirname(os.path.abspath(__file__))+'\\\\DataSets\\\\train.csv'\n# print(filePath)\n\nfilename = inspect.ge... | [
[
"pandas.concat",
"pandas.read_csv",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
VirtualRoyalty/Text-level-GCN | [
"4351d4595f47cf8e7574d0f22e22dc5bbc384ffa"
] | [
"preprocess/general.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport networkx as nx\nfrom tqdm import tqdm, tqdm_notebook\n\nfrom preprocess.graph import doc2graph\n\n\ndef prepare2gcn(doc,\n max_nodes,\n window_size,\n term2id,\n is_directed=True,\n is_wei... | [
[
"numpy.array",
"numpy.zeros",
"numpy.fill_diagonal",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
opent03/gym-games | [
"47cdbe522d5845676eadab1ec1a21f9c23eb5b95"
] | [
"gym_exploration/envs/sparse_mountain_car.py"
] | [
"import math\nimport numpy as np\nfrom gym.envs.classic_control.mountain_car import MountainCarEnv\n\n\nclass SparseMountainCarEnv(MountainCarEnv):\n ''' Modified based on Mountain Car.\n The only difference is the reward function: \n the agent gets 0 reward every step until it reaches the goal with 1 reward... | [
[
"numpy.array",
"numpy.clip"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
charx7/MachineLearning | [
"527602a40092f1458b6b99f2de48c10d323e8ea4"
] | [
"FeatureSelection/Label_Onehot_Encoding_module.py"
] | [
"#Implement for OneHotEncoder\n\n# author : Haibin\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.preprocessing import OneHotEncoder\n\ndef LabelEncoder_OneHotEncoder(Whole_Dataframe):\... | [
[
"pandas.concat",
"numpy.isnan",
"sklearn.preprocessing.OneHotEncoder",
"sklearn.impute.SimpleImputer",
"sklearn.preprocessing.LabelEncoder"
]
] | [
{
"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": []
}
] |
NuxDD/pyrate | [
"01e61027813d4eaf674dd5ce5db6898ea5ca22aa"
] | [
"doc/SM/PythonOuput/SM.py"
] | [
"#########################################################\n## This file was automatically generated by PyR@TE 3 ##\n### ###\n## ##\n# Model : SM #\n# Author : Lohan Sa... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"numpy.imag",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"numpy.real",
"numpy.vectorize",
"matplotlib.pyplot.suptitle",
"numpy.array",
"numpy.zeros",
"scipy.integrate.ode",
"matplotlib.pyplot.figure"
]
] | [
{
"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"... |
alexrockhill/autoreject | [
"20e5b346bf85eb63a1db6b5134b4f8227d3694ed"
] | [
"examples/plot_visualize_bad_epochs.py"
] | [
"\"\"\"\n===============================\nVisualize bad sensors per trial\n===============================\n\nThis example demonstrates how to use :mod:`autoreject` to\nvisualize the bad sensors in each trial\n\"\"\"\n\n# Author: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Denis A. Engemann <denis.engem... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.title",
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
anantgupta129/Fine-DE-TR-Object-Detection-Panoptic-Segmentation-with-Transformers | [
"6720f8e7e2530a67fd7ae31d2fa9aef7c914a7bb"
] | [
"autolabellingstuff.py"
] | [
"# !pip install git+https://github.com/cocodataset/panopticapi.git\n# !pip install imantics\n# !python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'\n\nimport io\nimport itertools\nimport json\nimport os\nimport warnings\n\nimport cv2\nimport numpy as np\nimport torch\nimport torchvision.t... | [
[
"torch.zeros",
"torch.set_grad_enabled",
"torch.cuda.is_available",
"torch.stack",
"numpy.array",
"torch.hub.load",
"torch.as_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Super-Dainiu/DATA130007.01-Community-Detection-Link-Prediction-and-Node-Classification-on-Ego-Facebook-and-Cites | [
"1b5077342756ba6dc587a2af49abd2451319e5df"
] | [
"link-prediction/GIC/gic-dgl/train.py"
] | [
"\"Implementation is based on https://github.com/dmlc/dgl/tree/master/examples/pytorch/dgi\"\n\nimport argparse, time\nimport numpy as np\nimport networkx as nx\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom dgl import DGLGraph\nfrom dgl.data import register_data_args, load_data, Coauth... | [
[
"torch.BoolTensor",
"torch.LongTensor",
"torch.max",
"torch.cuda.set_device",
"numpy.unique",
"torch.load",
"torch.manual_seed",
"torch.nn.PReLU",
"sklearn.preprocessing.OneHotEncoder",
"torch.sum",
"torch.nn.functional.nll_loss",
"torch.no_grad",
"numpy.bincoun... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
anonymouscjc/Computational-Cost-Aware-Control-Using-Hierarchical-Reinforcement-Learning | [
"e554bbc267328b1d3c6d815189a62b81b1ba0edf"
] | [
"stable_baselines/deepq/dqn.py"
] | [
"from functools import partial\n\nimport tensorflow as tf\nimport numpy as np\nimport gym\nimport os\n\nfrom stable_baselines import logger\nfrom stable_baselines.common import tf_util, OffPolicyRLModel, SetVerbosity, TensorboardWriter\nfrom stable_baselines.common.vec_env import VecEnv\nfrom stable_baselines.commo... | [
[
"tensorflow.Graph",
"numpy.log",
"numpy.ones_like",
"numpy.abs",
"numpy.arange",
"tensorflow.RunOptions",
"tensorflow.RunMetadata",
"tensorflow.placeholder",
"tensorflow.summary.merge_all",
"numpy.random.rand",
"tensorflow.train.AdamOptimizer",
"numpy.mean",
"nu... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
indra622/FBK-fairseq | [
"4357af09ef2ad1594f75a5b7bcc02d5b10cad2e5"
] | [
"fairseq/modules/dynamic_convolution.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\r\n#\r\n# This source code is licensed under the MIT license found in the\r\n# LICENSE file in the root directory of this source tree.\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom fairseq import utils\r\nfrom fairseq.incr... | [
[
"torch.nn.functional.softmax",
"torch.Tensor",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.bmm",
"torch.cuda.is_available",
"torch.nn.init.xavier_uniform_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rah9eu/p3 | [
"530628be7b7a8dd3e6199c3bebebdbf104005e5f"
] | [
"nnvm/tvm/topi/tests/python/test_topi_pooling.py"
] | [
"\"\"\"Test code for pooling\"\"\"\nimport numpy as np\nimport tvm\nimport topi\nimport math\nfrom topi.util import get_const_tuple\n\ndef verify_pool(n, ic, ih, kh, sh, padding, pool_type, ceil_mode):\n iw = ih\n kw = kh\n sw = sh\n ph, pw = padding\n A = tvm.placeholder((n, ic, ih, iw), name='A')\n... | [
[
"numpy.ix_",
"numpy.maximum",
"numpy.max",
"numpy.mean",
"numpy.random.uniform",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ankdesh/cadl | [
"f791cd0efc5a0787b058fa4f39c873dbdadb97a0"
] | [
"session-5/libs/deepdream.py"
] | [
"\"\"\"Deep Dream using the Inception v5 network.\n\nCreative Applications of Deep Learning w/ Tensorflow.\nKadenze, Inc.\nCopyright Parag K. Mital, June 2016.\n\"\"\"\nimport os\nimport numpy as np\nimport tensorflow as tf\nfrom scipy.ndimage.filters import gaussian_filter\nfrom skimage.transform import resize\nfr... | [
[
"numpy.max",
"tensorflow.nn.l2_loss",
"scipy.ndimage.filters.gaussian_filter",
"tensorflow.Graph",
"tensorflow.import_graph_def",
"tensorflow.Variable",
"tensorflow.gradients",
"numpy.std",
"tensorflow.initialize_all_variables",
"tensorflow.Session",
"tensorflow.square"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"0.15",
"1.4",
"0.16",
"1.0",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"0.10",
"0.17",
"1.3"
],
"tensorflow": [... |
issagaliyeva/udacity_deep_learning | [
"ffe8783a3b4f502aa47cab9196be9a4099dfcafd"
] | [
"intro-to-pytorch/fc_model.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass Network(nn.Module):\n def __init__(self, input_size, output_size, hidden_layers, drop_p=0.5):\n ''' Builds a feedforward network with arbitrary hidden layers.\n \n Arguments\n ---------\n ... | [
[
"torch.nn.Dropout",
"torch.nn.functional.log_softmax",
"torch.exp",
"torch.nn.Linear",
"torch.FloatTensor",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
asistradition/inferelator_ng | [
"56ef2ce3b1ace35b9b2b2821a0e78746563c309a"
] | [
"inferelator_ng/tests/test_bbsr.py"
] | [
"import unittest, os\nimport pandas as pd\nimport pandas.util.testing as pdt\nimport numpy as np\nfrom inferelator_ng import kvs_controller\nfrom inferelator_ng import bbsr_python\nfrom inferelator_ng import bayes_stats\nfrom inferelator_ng import regression\n\nmy_dir = os.path.dirname(__file__)\n\nclass TestBBSRru... | [
[
"numpy.matrix",
"numpy.array",
"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": []
}
] |
Moon-sung-woo/VAE_Tacotron_korean | [
"1029665edb7edf382704b7dde97693699045ba5d"
] | [
"f0/yin.py"
] | [
"# adapted from https://github.com/patriceguyot/Yin\n\nimport numpy as np\n\n\ndef differenceFunction(x, N, tau_max):\n \"\"\"\n Compute difference function of data x. This corresponds to equation (6) in [1]\n This solution is implemented directly with Numpy fft.\n\n\n :param x: audio data\n :param N... | [
[
"numpy.fft.rfft",
"numpy.cumsum",
"numpy.argmin",
"numpy.insert",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
boristown/tpu-master | [
"99e65ce1b9376e6b2c1e8ce9defd2d80cf197bb5"
] | [
"models/official/resnet/resnet_model.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.compat.v1.assign_sub",
"tensorflow.compat.v1.sqrt",
"tensorflow.compat.v1.zeros_initializer",
"tensorflow.compat.v1.shape",
"tensorflow.compat.v1.identity",
"tensorflow.compat.v1.nn.sigmoid",
"tensorflow.compat.v1.reshape",
"tensorflow.compat.v1.reduce_sum",
"tensor... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
janatalab/GEM-Experiments-POC | [
"06056b8f1639b0d49fc00c4993dcd3c0299013d3"
] | [
"Analysis_Code/GEM_powerAnalysis.py"
] | [
"'''\nA priori power analysis for single player GEM experiment.\nThis experiment involves solo tapper with adaptive metronome to make\nsure that we can replicate the single-tapper results of Fairhurst, Janata, and\nKeller, 2012, with the GEM system. The original Fairhurst et al. paper and\nsupplemental information ... | [
[
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
XingqunHe/XenonPy | [
"5141598d043d85d2fb8da1cea07d96dcd20d7798"
] | [
"xenonpy/contrib/sample_codes/iQSPR_V/iQSPR_V.py"
] | [
"# IQSPR with focus on molecule variety: bring in new initial molecules from reservoir in every step of SMC\n\nimport numpy as np\n\nfrom xenonpy.inverse.base import BaseSMC, BaseProposal, BaseLogLikelihood\n\nclass SMCError(Exception):\n \"\"\"Base exception for SMC classes\"\"\"\n pass\n\nclass IQSPR_V(Base... | [
[
"numpy.dot",
"numpy.log",
"numpy.random.choice",
"numpy.max",
"numpy.delete",
"numpy.repeat",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rmlarose/OpenFermion-FQE | [
"54489126725fe3bb83218b6fde9d44f6cf130359",
"54489126725fe3bb83218b6fde9d44f6cf130359"
] | [
"src/fqe/hamiltonians/hamiltonian.py",
"src/fqe/algorithm/davidson.py"
] | [
"# Copyright 2020 Google LLC\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ... | [
[
"numpy.empty"
],
[
"numpy.sum",
"numpy.einsum",
"numpy.eye",
"numpy.linalg.norm",
"numpy.linalg.eigh",
"numpy.zeros_like",
"numpy.reciprocal",
"numpy.array",
"numpy.zeros",
"numpy.diagonal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hackenjoe/requirements | [
"003f1b49cb14ca4ae655b94fa003c70b2a63d8e7"
] | [
"sentimental_class.py"
] | [
"from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline\nfrom typing import List\nimport torch\nimport re\nimport numpy as np\n\nclass SentimentModel():\n def __init__(self, model_name: str):\n self.model = AutoModelForSequenceClassification.from_pretrained(model_name)\n ... | [
[
"torch.argmax",
"torch.no_grad",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.