repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
abhi20sc/autoClim
[ "b131a19e935e8ba7778a2c73107a183df37e92da" ]
[ "createGlobalMap.py" ]
[ "import cartopy.crs as ccrs\nimport cartopy.feature as cf\nfrom matplotlib import pyplot as plt\nfrom matplotlib import image as img\n\ndef createMap():\n\tfig = plt.figure()\n\tax = plt.axes(projection=ccrs.PlateCarree())\n\tax.coastlines(linewidth=1)\n\tax.add_feature(cf.BORDERS,linestyle='-',linewidth=1)\n\tfig....
[ [ "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jpatanooga/kfserving
[ "99c604e71fa7355434e13798b0c76bba507e91a2" ]
[ "test/e2e/predictor/test_pytorch.py" ]
[ "# Copyright 2019 kubeflow.org.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed...
[ [ "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
heraclex12/text-to-text-transfer-transformer
[ "0f95124f49b7e3139489b62a8747ab32969780e7" ]
[ "t5/data/preprocessors_test.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.v2.data.Dataset.from_generator", "tensorflow.compat.v2.data.Dataset.from_tensor_slices", "tensorflow.compat.v2.equal", "tensorflow.compat.v2.compat.v1.enable_eager_execution", "tensorflow.compat.v2.cast", "tensorflow.compat.v2.range", "tensorflow.compat.v2.random.set...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
firemark/eye-detector
[ "1efc4ccd0f0fc5d52e16b130d336eefd14324a02" ]
[ "eye_detector/gen_to_train/data_loader/op_face.py" ]
[ "from glob import glob\nfrom numpy import count_nonzero\n\nfrom eye_detector.gen_to_train.data_loader.base import GenericLoader\n\n\nclass FaceDataLoader(GenericLoader):\n\n def __init__(self, patch_size):\n self.paths = glob(\"indata/face_data/bioid_face/*.png\", recursive=True)\n self.patch_size ...
[ [ "numpy.count_nonzero" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pdeboer/Spearmint
[ "54d615e0541d457f7947787aaec7260667a34ab8" ]
[ "spearmint/launcher.py" ]
[ "# -*- coding: utf-8 -*-\n# Spearmint\n#\n# Academic and Non-Commercial Research Use Software License and Terms\n# of Use\n#\n# Spearmint is a software package to perform Bayesian optimization\n# according to specific algorithms (the “Software”). The Software is\n# designed to automatically run experiments (thus t...
[ [ "numpy.isnan", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PaLeroy/pymarl
[ "113320598a67c9093c9109b8fd64517acf358259" ]
[ "src/runners/parallel_runner_multi.py" ]
[ "from envs import REGISTRY as env_REGISTRY\nfrom functools import partial\nfrom components.episode_buffer import EpisodeBatch\nfrom multiprocessing import Pipe, Process\nimport numpy as np\nfrom runners import ParallelRunner\n\nimport torch as th\n\n\n# Based (very) heavily on SubprocVecEnv from OpenAI Baselines\n#...
[ [ "numpy.std", "numpy.array", "numpy.zeros", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ayhanfuat/scheduler
[ "43178cc5e4631f17d2854863389dab52e05ae688" ]
[ "exams/report_views.py" ]
[ "import os\n\nfrom django.conf import settings\nfrom django.contrib.auth.decorators import user_passes_test\nfrom django.db.models import Func\nfrom django.http import HttpResponse\nfrom django.utils import timezone\nfrom django.utils.text import slugify\nfrom reportlab.lib import colors\nfrom reportlab.lib.enums i...
[ [ "pandas.DataFrame.from_records", "pandas.pivot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
qtweng/f1tenth-gym
[ "f5e86ffe84f9a3c81fb935343eac795a5ee13eac" ]
[ "f1tenth_gym_ros/scripts/gym_bridge_bare.py" ]
[ "#!/usr/bin/env python3\nimport rospy\nimport os\nfrom sensor_msgs.msg import LaserScan\nfrom ackermann_msgs.msg import AckermannDriveStamped\n\nfrom f1tenth_gym_ros.msg import RaceInfo\n\ncurrent_dir = os.path.abspath(os.path.dirname(__file__))\npackage_dir = os.path.abspath(os.path.join(current_dir, \"..\"))\n\ni...
[ [ "numpy.array", "numpy.radians" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Epistimio/orion
[ "a77128df8c5c1a6fd83b545b95e3de8cf028e3e4" ]
[ "tests/unittests/algo/test_evolution_es.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Tests for :mod:`orion.algo.evolution_es`.\"\"\"\n\nimport copy\nimport hashlib\n\nimport numpy as np\nimport pytest\nfrom test_hyperband import (\n compare_registered_trial,\n create_rung_from_points,\n create_trial_for_hb,\n force_observe,\n)\n\nfr...
[ [ "numpy.cumsum", "numpy.linspace", "numpy.power" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
centre-for-humanities-computing/danish-foundation-models
[ "1cc0950fab55650fd92f56b4bad0b13a5be73061" ]
[ "src/dfm/data/load.py" ]
[ "\"\"\"\nLoading scripts for HF type datasets\n\"\"\"\nimport os\nimport sys\n\nfrom typing import Set, Union, List\n\n\nfrom datasets import (\n load_dataset,\n interleave_datasets,\n Dataset,\n IterableDataset,\n Features,\n Value,\n DatasetDict,\n)\nfrom wasabi import msg\nfrom dfm.data.util...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hieuvecto/CASIA-SURF_CeFA
[ "71dfd846ce968b3ed26974392a6e0c9b40aa12ae" ]
[ "at_learner_core/at_learner_core/datasets/casia_video_dataset.py" ]
[ "from PIL import Image\nfrom PIL import Image\nimport pandas as pd\nimport numpy as np\nimport torch.utils.data\nfrom collections import OrderedDict\nimport torch\n\n\ndef rgb_loader(path):\n return Image.open(path).convert('RGB')\n\n\nclass VideoDataset(torch.utils.data.Dataset):\n\n def __init__(self, datal...
[ [ "pandas.read_csv", "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
gipsa-lab-uav/uav_control_ai
[ "0eb02c3d5b6a94385b2ca9fd61db9516f3e8214b" ]
[ "nodes/display.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport rospy\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom tkinter import TclError\n\nimport tf.transformations\nfrom nav_msgs.msg import Odometry\nfrom mavros_msgs.msg import AttitudeTarget\nfrom trajectory_msgs.msg import JointTrajectory, JointTraje...
[ [ "numpy.linspace", "numpy.append", "matplotlib.pyplot.ion", "numpy.zeros", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chris4540/DD2418-LangEng
[ "c14f20781eccdddc5269f47f30b512f69da18314" ]
[ "extra-assign/question1/trunk/example.py" ]
[ "from gensim.models import Word2Vec\n\nfrom nltk.cluster import KMeansClusterer\nimport nltk\nimport numpy as np\n\nfrom sklearn import cluster\nfrom sklearn import metrics\n\n# training data\n\nsentences = [['this', 'is', 'the', 'one','good', 'machine', 'learning', 'book'],\n ['this', 'is', 'another', ...
[ [ "matplotlib.pyplot.scatter", "sklearn.cluster.KMeans", "sklearn.metrics.silhouette_score", "numpy.asarray", "numpy.set_printoptions", "matplotlib.pyplot.annotate", "matplotlib.pyplot.savefig", "sklearn.manifold.TSNE", "numpy.add" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ThomasMrY/RF-VAE
[ "cb5aa8e0ff8a5ab62bdb38438d1ea9bde5309c7f" ]
[ "model.py" ]
[ "\"\"\"model.py\"\"\"\n\nimport torch.nn as nn\nimport torch.nn.init as init\n\n\nclass Discriminator(nn.Module):\n def __init__(self, z_dim):\n super(Discriminator, self).__init__()\n self.z_dim = z_dim\n self.net = nn.Sequential(\n nn.Linear(z_dim, 1000),\n nn.LeakyRe...
[ [ "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.LeakyReLU", "torch.nn.ReLU", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
innodatalabs/tbert
[ "84c1c9507b3b1bffd2a08a86efaf9bc9955271e0" ]
[ "tbert/transformer.py" ]
[ "# The MIT License\n# Copyright 2019 Innodata Labs and Mike Kroutikov\n#\n# PyTorch port of\n# https://github.com/google-research/bert/modeling.py\n#\n# Original code copyright follows:\n#\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Module.__init__", "torch.nn.LayerNorm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SomeoneSerge/trieste
[ "a160d2400a2dc092cac599554d32217840c06e3d" ]
[ "trieste/acquisition/function/multi_objective.py" ]
[ "# Copyright 2021 The Trieste Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "tensorflow.zeros", "tensorflow.debugging.assert_positive", "tensorflow.reduce_sum", "tensorflow.minimum", "tensorflow.cast", "tensorflow.debugging.Assert", "tensorflow.Variable", "tensorflow.squeeze", "tensorflow.gather", "tensorflow.shape", "tensorflow.debugging.asser...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
dormrod/matplotlib_wrapper
[ "40ef4c20ac0d394cbbbfcb91da92c2c919271c6b" ]
[ "examples/examples_2d_grid.py" ]
[ "import numpy as np\nimport sys\nfrom mpl_scipub.dataset import DataSet\nfrom mpl_scipub.plotter import Plot\n\n\n##### Example data #####\n\nx_mesh,y_mesh = np.meshgrid(np.arange(-5,5.1,0.1),np.arange(-5,5.1,0.1))\nz = (x_mesh**2+y_mesh**2)*np.exp(-(x_mesh**2+y_mesh**2)) # Arbitrary radially symmetric function\nz ...
[ [ "numpy.arange", "numpy.exp", "numpy.cos" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rupeshshrestha123/ASR
[ "858a48e257ef2e8b0c7fea08af665e15d76a4e70" ]
[ "speechvalley/utils/visualization.py" ]
[ "# encoding: utf-8\n# ******************************************************\n# Author : zzw922cn\n# Last modified: 2017-12-23 11:00\n# Email : zzw922cn@gmail.com\n# Filename : visualization.py\n# Description : Some common functions for visualization\n# ********************************************...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "numpy.fromstring", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kavyadevd/Perception-673
[ "e6b440c56093506a63923caf382e43a010df9b5e" ]
[ "Hw1/Problem2/LSS.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# ## ENPM673 – Perception for Autonomous Robots\n# #### Homework 1 Problem 2\n# #### Standard Least Squares to fit curves to the given videos\n\n# ##### Part 1 Plot the graphs\n\n# In[12]:\n\n\nimport matplotlib.pyplot as plot\nimport csv\n\n# Variables to store x and y c...
[ [ "numpy.linalg.solve", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
[ { "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": [], ...
karempudi/narsil
[ "fca16277712812183100154c10566b7c0890c293" ]
[ "narsil/liverun/gui/ViewerWindow.py" ]
[ "\nfrom PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox, QFileDialog\nfrom PySide6.QtCore import QFile, QIODevice, QTimer, Signal, Qt, QThread \nfrom PySide6.QtGui import QIntValidator\nfrom PySide6.QtUiTools import QUiLoader\n\nfrom narsil.liverun.ui.ui_ViewerWindow import Ui_ViewerWindow\n\nfrom p...
[ [ "numpy.asarray", "numpy.concatenate", "numpy.max", "numpy.random.normal", "numpy.logical_and", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Weaam758/rdp
[ "4fe6358f6fb3d52279c32f43fbcbc2a2d12ee0c0" ]
[ "rdp/__init__.py" ]
[ "\"\"\"\nrdp\n~~~\n\nPython implementation of the Ramer-Douglas-Peucker algorithm.\n\n:copyright: 2014-2016 Fabian Hirschmann <fabian@hirschmann.email>\n:license: MIT, see LICENSE.txt for more details.\n\n\"\"\"\nfrom math import sqrt\nfrom functools import partial\nimport numpy as np\nimport sys\n\nif sys.version_...
[ [ "numpy.linalg.norm", "numpy.ones", "numpy.equal", "numpy.cross", "numpy.array", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
22037/22037-Camera
[ "77d543399ef0e0adef719c93ff4bd956d7057b94" ]
[ "qt.py" ]
[ "__author__ = 'Devesh Khosla - github.com/dekhosla'\r\n\r\nimport sys\r\nimport tkinter\r\nimport serial\r\nimport serial.tools.list_ports\r\nimport warnings\r\nimport cv2\r\nimport logging\r\nimport time\r\nimport numpy as np\r\n\r\nfrom turtle import back, pd\r\nfrom cv2 import detail_SeamFinder\r\nfrom xmlrpc.cl...
[ [ "numpy.sqrt", "numpy.multiply", "numpy.arange", "numpy.subtract", "numpy.empty", "numpy.argmin", "numpy.shape", "numpy.zeros", "numpy.sum", "numpy.loadtxt", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jieqin-ai/AMR
[ "de391682626990deebe8eb217b7eed6ec4d7fd3d" ]
[ "misc/torchutils.py" ]
[ "\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.utils.data import Subset\nimport numpy as np\nimport math\n\n\nclass PolyOptimizer(torch.optim.SGD):\n\n def __init__(self, params, lr, weight_decay, max_step, momentum=0.9):\n super().__init__(params, lr, weight_decay)\n\...
[ [ "torch.sigmoid", "torch.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kotori-y/ShapSth
[ "ddf43007d8890aedfb1490aac9a329bf3efcf977" ]
[ "ShapSth/GetSHAP.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Sep 30 14:35:21 2019\n\n@Author: Zhi-Jiang Yang, Dong-Sheng Cao\n@Institution: CBDD Group, Xiangya School of Pharmaceutical Science, CSU, China\n@Homepage: http://www.scbdd.com\n@Mail: yzjkid9@gmail.com; oriental-cds@163.com\n@Blog: https://blog.moyule.me\n\n♥I love ...
[ [ "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": [] } ]
duncanmmacleod/cwinpy
[ "fe4c2002f9fd129e6a4eece32b888e1f3e58327e" ]
[ "cwinpy/utils.py" ]
[ "\"\"\"\nA selection of general utility functions.\n\"\"\"\n\nimport ctypes\nimport os\nimport string\nimport subprocess\nfrom functools import reduce\nfrom math import gcd\n\nimport lalpulsar\nimport numpy as np\nfrom astropy import units as u\nfrom lalpulsar.PulsarParametersWrapper import PulsarParametersPy\nfrom...
[ [ "numpy.asarray", "numpy.array", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
geometrikal/IIC-1
[ "6b337670d58fcb5c34b6ec34236ea2ed472e1d92" ]
[ "data.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport tensorflow_datasets as tfds\nfrom parser import *\n\nfrom filenames_dataset import FilenamesDataset\nfrom image_dataset import ImageDataset\nfrom tf_generator import TFGenerator\n\n\ndef mnist_x(x_orig, mdl_input_dims, is_training):\n\n # rescale to [0, 1]\n ...
[ [ "tensorflow.image.random_brightness", "tensorflow.transpose", "tensorflow.image.random_contrast", "tensorflow.image.random_hue", "tensorflow.zeros", "tensorflow.shape", "tensorflow.stack", "tensorflow.cast", "tensorflow.image.random_saturation", "tensorflow.map_fn", "te...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
binhmuc/faced
[ "cbc18f552da9c53628d61d56de7dfda451a6e25f" ]
[ "faced/detector.py" ]
[ "import tensorflow as tf\r\nimport cv2\r\nimport numpy as np\r\nimport os\r\n\r\nfrom faced.const import YOLO_TARGET, YOLO_SIZE, CORRECTOR_SIZE, MODELS_PATH\r\nfrom faced.utils import iou\r\n\r\n\r\nclass FaceDetector(object):\r\n\r\n def __init__(self):\r\n self.load_model(os.path.join(MODELS_PATH, \"fac...
[ [ "tensorflow.Graph", "numpy.expand_dims", "tensorflow.train.latest_checkpoint", "tensorflow.import_graph_def", "numpy.reshape", "tensorflow.gfile.GFile", "numpy.full", "tensorflow.Session", "tensorflow.get_default_graph", "tensorflow.GraphDef", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Rachel0911/categorical-encoding
[ "31bf1e713f2fda10203ac34c3d74bccff18641fd" ]
[ "category_encoders/m_estimate.py" ]
[ "\"\"\"M-probability estimate\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom category_encoders.ordinal import OrdinalEncoder\nimport category_encoders.utils as util\nfrom sklearn.utils.random import check_random_state\n\n__author__ = 'Jan Motl'\n\n\ncl...
[ [ "sklearn.utils.random.check_random_state" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yubuyuabc/ark-nlp
[ "165d35cfacd7476791c0aeba19bf43f4f8079553", "165d35cfacd7476791c0aeba19bf43f4f8079553" ]
[ "ark_nlp/factory/utils/conlleval.py", "ark_nlp/nn/text_level_gcn.py" ]
[ "# From: https://github.com/spyysalo/conlleval.py\n\n\nimport sys\nimport re\nimport codecs\nimport torch\nfrom collections import Counter\nfrom collections import defaultdict, namedtuple\n\n\nANY_SPACE = '<SPACE>'\n\n\nclass FormatError(Exception):\n pass\n\n\nMetrics = namedtuple('Metrics', 'tp fp fn prec rec ...
[ [ "torch.gt", "torch.sum", "torch.argmax" ], [ "torch.nn.Dropout", "torch.nn.init.uniform_", "torch.ones", "torch.nn.Embedding", "torch.nn.Linear", "torch.nn.Embedding.from_pretrained", "torch.nn.init.xavier_uniform_", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
westinrc/Anchor-Capstone
[ "643804e78269bf2701327cc5eda339a89fcdf43d" ]
[ "api/anchor_explorer/utils/random_patient_generation.py" ]
[ "import sys\nfrom xml.dom.minidom import parseString\nfrom dicttoxml import dicttoxml\nimport string\nimport random\nimport shelve\nimport numpy as np \nimport scipy.sparse as sparse\nimport pickle as pickle\nfrom collections import defaultdict, namedtuple\nimport os\n\ndef randomString(length=16):\n\treturn \"\".j...
[ [ "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jamesbungay/cv-tremor-amplitude
[ "c46a8f03ab6b8bd8be1101b7d43d55c21f59853d" ]
[ "hand_tremor_amplitude.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom enum import Enum\nimport yaml\nimport csv\nimport sys\nimport os\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport cv2\nimport math\n\nimport mediapipe as mp\nmp_hands = mp.solutions.hands\nmp_drawing = mp.solutions.drawing_utils\nmp_drawing_styles = mp.solutions.drawing_...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.axhline", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "numpy.median", "matplotlib.pyplot.savefig", "matplotlib.pyplot.gcf", "matplotlib.pyplot.plot", "numpy.std", "matplotlib.pyplot.subplots_adjust", "matpl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LinghengMeng/Stochastic-Ensemble-Value-Expansion
[ "ad13c0d2f0e8314d25f2a8db771b8329b9227706" ]
[ "agent.py" ]
[ "from __future__ import print_function\nfrom builtins import zip\nfrom builtins import range\nfrom builtins import object\n# 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 L...
[ [ "numpy.random.random", "numpy.random.seed", "numpy.clip", "numpy.stack", "tensorflow.global_variables_initializer", "numpy.any", "tensorflow.Session", "numpy.prod", "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" ] } ]
vltmedia/QuickMocap-BlenderAddon
[ "ef152a87a8738d505555db2d3ec8ff851847983b" ]
[ "templates/smpl_import.py" ]
[ "# -*- coding: utf-8 -*-\r\n# This Class implimentation is written by Justin Jaro of VLT Media LLC\r\n# Contact: Github VLTMedia\r\n# Copyright©2021 Justin Jaro\r\n# Original non class code license copright below.\r\n\r\n\r\n# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is\r\n# holder of all...
[ [ "numpy.asarray", "numpy.eye", "numpy.cos", "numpy.linalg.norm", "numpy.sin", "numpy.load", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
planetlabs/planet-tmask
[ "f1f46e07c7ee45c3d11e066795e110a0019518e5" ]
[ "tmask/setup.py" ]
[ "#\n# Copyright 2018, Planet Labs, Inc.\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.get_include" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rsesha/stochasticmutatortuner
[ "ed41dec17f811d91cd92b140e9b91600d5ed679d" ]
[ "examples/compare_to_random_search.py" ]
[ "from tensorflow import keras\nimport numpy as np\nfrom tensorflow.keras.layers import Dense, Activation\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.optimizers import SGD, Adam\nfrom tuner import Tuner\n\nepochs = 50\ntrials_per_mode = 10\niters_per_trial = 100\n\n\ndef build_model(hp):\n...
[ [ "tensorflow.keras.layers.Activation", "numpy.reshape", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.keras.datasets.mnist.load_data", "numpy.std", "numpy.mean", "tensorflow.keras.models.Sequential" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
sally20921/MonoDepth-to-ManyDepth
[ "ef058839e16b277b4ffa6a890d03cd90b6c36283", "ef058839e16b277b4ffa6a890d03cd90b6c36283" ]
[ "all4depth/utils/reduce.py", "all4depth/networks/depth/PackNet01.py" ]
[ "\nimport torch\nimport numpy as np\nfrom collections import OrderedDict\nfrom all4depth.utils.horovod import reduce_value\nfrom all4depth.utils.logging import prepare_dataset_prefix\n\n\ndef reduce_dict(data, to_item=False):\n \"\"\"\n Reduce the mean values of a dictionary from all GPUs\n\n Parameters\n ...
[ [ "torch.stack", "torch.mean", "torch.zeros" ], [ "torch.nn.init.xavier_uniform_", "torch.nn.PixelShuffle", "torch.nn.Upsample", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
WiseDoge/YOLO-v3-PyTorch
[ "2bf37705f745c85152ac46fd0e6465f083c82181", "2bf37705f745c85152ac46fd0e6465f083c82181" ]
[ "yolo/layers.py", "yolo/darknet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom .util import predict_transform\n\n\nclass MaxPoolStride1(nn.Module):\n def __init__(self, kernel_size):\n super().__init__()\n self.kernel_size = kernel_size\n self.pad = kernel_size - 1\n\n def forward(self, x):\...
[ [ "torch.nn.MaxPool2d", "torch.nn.functional.pad" ], [ "torch.cat", "torch.nn.functional.interpolate", "torch.IntTensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Ultimawashi/CMC-CPS
[ "883f0589f4c3f8e3c249c7eece3e368b44c9ba68" ]
[ "markov_chain.py" ]
[ "import numpy as np\nfrom tools import gauss\n\ndef gauss(Y, m1, sig1, m2, sig2):\n \"\"\"\n :param Y: Le signal bruité\n :param m1: La moyenne de la première gaussienne\n :param sig1: L'écart type de la première gaussienne\n :param m2: La moyenne de la deuxième gaussienne\n :param sig2: L'écart t...
[ [ "numpy.stack", "numpy.ones", "numpy.random.multinomial", "numpy.argmax", "numpy.where", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
davebulaval/bert_score
[ "2975c93d28ed075a55cdaea74de1272cf7d9a145" ]
[ "bert_score/utils.py" ]
[ "import sys\nimport os\nimport torch\nfrom math import log\nfrom itertools import chain\nfrom collections import defaultdict, Counter\nfrom multiprocessing import Pool\nfrom functools import partial\nfrom tqdm.auto import tqdm\nfrom torch.nn.utils.rnn import pad_sequence\nfrom distutils.version import LooseVersion\...
[ [ "torch.norm", "torch.isnan", "torch.cat", "torch.nn.ModuleList", "torch.nn.utils.rnn.pad_sequence", "torch.tensor", "torch.any", "torch.no_grad", "torch.arange", "torch.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HamiltonLabUT/ridge
[ "789401e8d2e96a7323589e5d93c25f3f04724463" ]
[ "ridge.py" ]
[ "import numpy as np\nimport logging\nfrom utils import mult_diag, counter\nimport random\nimport itertools as itools\n\nzs = lambda v: (v-v.mean(0))/v.std(0) ## z-score function\n\nridge_logger = logging.getLogger(\"ridge_corr\")\n\ndef ridge(stim, resp, alpha, singcutoff=1e-10, normalpha=False, logger=ridge_logger...
[ [ "numpy.diag", "numpy.dot", "numpy.nan_to_num", "numpy.max", "numpy.mean", "numpy.linalg.svd", "numpy.ones_like", "numpy.unique", "numpy.argmax", "numpy.zeros", "numpy.nonzero", "numpy.isnan", "numpy.linalg.eigh", "numpy.array", "numpy.sum", "numpy.ab...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
meshtag/dace
[ "e6751ee6a4f6356b47b93065d43cefb3fd54ebaa" ]
[ "samples/optimization/matmul.py" ]
[ "# Copyright 2019-2022 ETH Zurich and the DaCe authors. All rights reserved.\n\"\"\"\nSample showcasing transformations applied on a naive matrix multiplication program, yielding performance that competes\nwith Intel MKL and NVIDIA CUBLAS.\n\"\"\"\nimport click\nimport dace\nimport numpy as np\nfrom typing import L...
[ [ "numpy.random.rand", "numpy.zeros", "numpy.ndarray", "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": [], ...
nidebroux/lumbosacral_segmentation
[ "3217960c6f0f5c3886dfdf46e1286ad2f737f4aa" ]
[ "sct_custom/unit_testing/test_aggregate_slicewise.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8\n# pytest unit tests for spinalcordtoolbox.aggregate_slicewise\n\n\n\n\nimport sys\nimport os\nimport pytest\nimport csv\n\nimport numpy as np\nimport nibabel as nib\n\nfrom spinalcordtoolbox import __sct_dir__, __version__\nsys.path.append(os.path.join(__sct_dir__, 'scri...
[ [ "numpy.array", "numpy.eye", "numpy.expand_dims", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tawiesn/sclblonnx
[ "0cf73112db5df13009cd2ddb5d49744689096209" ]
[ "test/test_merge.py" ]
[ "from sclblonnx import add_output, add_input, add_node, node, empty_graph, add_constant, display, merge, run\nimport numpy as np\n\n\ndef test_merge():\n\n # Subgraph 1\n sg1 = empty_graph(\"Graph 1\")\n n1 = node('Add', inputs=['x1', 'x2'], outputs=['sum'])\n sg1 = add_node(sg1, n1)\n sg1 = add_inpu...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mdaros2016/CarND-Advanced-Lane-Lines
[ "b27d57f1c6730f302f18fb6b8cbbfcb9361d57bf" ]
[ "src/cameraCalibrator.py" ]
[ "import glob\n\nimport cv2\nimport numpy as np\n\n\nclass CameraCalibrator:\n '''\n Class for correcting the distortion of the pictures taken from the camera.\n '''\n\n def __init__(self, calibration_pictures_path_pattern='../camera_cal/calibration*.jpg'):\n '''\n :param calibration_pictur...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
geekpwn/caad2018
[ "a788132f74cbfdd3d09a0a75fada135f50ae9a8b" ]
[ "winners/nontargeted-attack/teaflow/attack_iter.py" ]
[ "\"\"\"Implementation of sample attack.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport time\n\nfrom cleverhans.attacks import MultiModelIterativeMethod\nimport numpy as np\nfrom PIL import Image\n\nimport tensorflow as tf\...
[ [ "tensorflow.Graph", "tensorflow.gfile.Open", "tensorflow.flags.DEFINE_string", "tensorflow.train.MonitoredSession", "tensorflow.global_variables", "tensorflow.placeholder", "numpy.round", "tensorflow.train.ChiefSessionCreator", "tensorflow.contrib.slim.nets.inception.inception_...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
nicob15/StateRepresentationLearning_with_RoboticsPriors
[ "a5bf33b3bafe2cdd55f9f2de5ecd1736c3165656" ]
[ "SRL_RoboticsPriors_ContinuousActions.py" ]
[ "\"\"\"\nThis is the code associated to the paper \"Low Dimensional State Representation Learning with Robotics Priors in Continuous Action Spaces\"\nBotteghi N., et al, published in the International Conference of Intelligent Systems and Robots (IROS), September 2021.\n\nThe StateRepresentation class includes the ...
[ [ "tensorflow.layers.conv1d", "tensorflow.concat", "tensorflow.control_dependencies", "tensorflow.reduce_sum", "tensorflow.train.AdamOptimizer", "tensorflow.keras.initializers.he_normal", "numpy.random.randint", "tensorflow.Graph", "numpy.trunc", "tensorflow.layers.batch_norm...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
schuppic/python-control
[ "da27d3572c016750ce4776d0379aec72f433d54c" ]
[ "control/iosys.py" ]
[ "# iosys.py - input/output system module\n#\n# RMM, 28 April 2019\n#\n# Additional features to add\n# * Allow constant inputs for MIMO input_output_response (w/out ones)\n# * Add support for constants/matrices as part of operators (1 + P)\n# * Add unit tests (and example?) for time-varying systems\n# * Allo...
[ [ "numpy.dot", "scipy.optimize.OptimizeResult", "numpy.split", "numpy.allclose", "numpy.unique", "numpy.asarray", "numpy.reshape", "numpy.eye", "scipy.integrate.solve_ivp", "scipy.optimize.root", "numpy.ones", "numpy.concatenate", "numpy.isscalar", "numpy.sear...
[ { "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": [] } ]
huynhtnhut97/SNIPER
[ "581c7cb0b271fdc90fb9b93c612431a67ed12df2" ]
[ "main_train.py" ]
[ "# --------------------------------------------------------------\n# SNIPER: Efficient Multi-Scale Training\n# Licensed under The Apache-2.0 License [see LICENSE for details]\n# Training Module\n# by Mahyar Najibi and Bharat Singh\n# --------------------------------------------------------------\nimport init\nimpor...
[ [ "matplotlib.use" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
suhaspillai/DSRG
[ "91efdf7d4b3b63615e8ef38af58f8dce4d89b7cd" ]
[ "pylayers/pylayers/pylayers.py" ]
[ "import caffe\n\nimport numpy as np\nfrom scipy.ndimage import zoom\n\nimport theano\nimport theano.tensor as T\n\nimport cPickle\nimport yaml\nimport cv2\nimport os.path as osp\nimport multiprocessing\nfrom numpy.random import shuffle\n\nfrom krahenbuhl2013 import CRF\nimport CC_labeling_8\nfrom sklearn.cluster im...
[ [ "numpy.log", "numpy.sum", "numpy.unique", "numpy.random.choice", "numpy.random.shuffle", "numpy.round", "numpy.max", "numpy.delete", "numpy.argmax", "numpy.zeros_like", "numpy.transpose", "numpy.ndenumerate", "numpy.array", "numpy.exp", "numpy.zeros", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
talendteams/Data-Science-with-Python
[ "cd5e1bd30a886d8b4ae3e4835bf3c657c29a52a3" ]
[ "Chapter03/Exercises/Exercise_22.py" ]
[ "# Exercise 2: Fitting a simple linear regression model and determining the intercept and coefficient\n\n# continuing from Exercise 1:\n\n# instantiate linear regression model\nfrom sklearn.linear_model import LinearRegression\nmodel = LinearRegression()\n\n# fit model to training data\nmodel.fit(X_train[['Humidity...
[ [ "sklearn.linear_model.LinearRegression" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FridayJK/google_landmark_retrieval_2020_1st_place_solution
[ "85d235ddc4163c4071fbe4a5ca0ceace6ed674e7" ]
[ "notebooks/v2clean_train_softmax_v3.3.py" ]
[ "# !pip install -q efficientnet\n# 1-----------------------\nimport math, re, os\nimport numpy as np\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nimport tensorflow as tf\nimport tensorflow_probability as tfp\nimport tensorflow.keras.layers as L\nimport tensorflow.keras.backend as K\nimport efficientn...
[ [ "tensorflow.nn.compute_average_loss", "tensorflow.cast", "tensorflow.distribute.cluster_resolver.TPUClusterResolver", "tensorflow.image.random_crop", "tensorflow.keras.optimizers.SGD", "pandas.read_csv", "tensorflow.image.random_flip_left_right", "tensorflow.keras.Input", "tens...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ScriptBox99/DeepSpeed
[ "fead387f7837200fefbaba3a7b14709072d8d2cb" ]
[ "tests/unit/common.py" ]
[ "import os\nimport time\n\nimport torch\nimport torch.distributed as dist\nfrom torch.multiprocessing import Process\n\nimport deepspeed\n\nimport pytest\n\nfrom pathlib import Path\n\n# Worker timeout *after* the first worker has completed.\nDEEPSPEED_UNIT_WORKER_TIMEOUT = 120\n\n\ndef get_xdist_worker_id():\n ...
[ [ "torch.cuda.set_device", "torch.distributed.barrier", "torch.cuda.is_available", "torch.distributed.destroy_process_group", "torch.multiprocessing.Process" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DataScientist-GustavoAguiar/Disaster_Response_App
[ "4655b5145603300ac3ee2ee9a3379d3fdc8610e7" ]
[ "models/train_classifier.py" ]
[ "\"\"\"\nClassifier Trainer\nProject: Disaster Response Pipeline\n\nSample Script Syntax:\n> python train_classifier.py <path to sqllite destination db> <path to the pickle file>\n\nSample Script Execution:\n> python train_classifier.py ../data/disaster_response_db.db classifier.pkl\n\nArguments:\n 1) Path to S...
[ [ "sklearn.model_selection.GridSearchCV", "sklearn.linear_model.LogisticRegression", "pandas.read_sql_table", "sklearn.metrics.balanced_accuracy_score", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.metrics...
[ { "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": [] } ]
IMTEK-Simulation/phasefield-fracture
[ "ba1cf31916cf3939f5d0b6ba775f6e7a37cf73dc" ]
[ "postprocessing/phasefield_ex.py" ]
[ "#\n# Copyright 2021 W. Beck Andrews\n#\n# MIT License\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "numpy.roll", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mattEhall/FloatingSE
[ "f13e0f38a7742ea00a8f446a9ebf505dcf7acd42" ]
[ "src/floatingse/map_mooring.py" ]
[ "from openmdao.api import Component\nimport numpy as np\nimport os\nimport sys\nfrom pymap import pyMAP\n\nfrom commonse import gravity, Enum\nfrom commonse.utilities import assembleI, unassembleI\n\nAnchor = Enum('DRAGEMBEDMENT SUCTIONPILE')\nNLINES_MAX = 15\nNPTS_PLOT = 20\n\nclass MapMooring(Component):\n ...
[ [ "numpy.dot", "numpy.sqrt", "numpy.linspace", "numpy.gradient", "numpy.arange", "numpy.eye", "numpy.cos", "numpy.sin", "numpy.deg2rad", "numpy.mean", "numpy.outer", "numpy.array", "numpy.zeros", "numpy.trapz" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kyvipro113/Speed_Monitoring_System
[ "3ce877c87644bfe20a1d59f3cd6c0435c772e5c5" ]
[ "GUI/Monitoring.py" ]
[ "from PyQt5.QtWidgets import QFrame\nfrom GUI.Ui_Monitoring import Ui_Monitoring\nfrom PyQt5 import QtWidgets\nfrom PyQt5.QtCore import pyqtSlot, pyqtSignal, QThread, Qt, pyqtSlot\nfrom PyQt5.QtGui import QImage, QPixmap\nfrom PyQt5.QtWidgets import QFileDialog\nimport cv2\nfrom pathlib import Path\nimport os.path\...
[ [ "numpy.where", "torch.from_numpy", "torch.Tensor", "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sbonner0/pykeen
[ "df5beab80772a08d595ace1b39c7fd4df7164a39" ]
[ "tests/test_early_stopping.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Tests of early stopping.\"\"\"\n\nimport unittest\nfrom typing import List\n\nimport numpy\nimport pytest\nimport torch\nfrom torch.optim import Adam\n\nfrom pykeen.datasets import Nations\nfrom pykeen.evaluation import RankBasedEvaluator\nfrom pykeen.models import Model, TransE\nf...
[ [ "torch.manual_seed", "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JotinhaBR/Hackathon-Health-2019-Antisseptico
[ "cafd96f04568e9e9ed778c0bcf196da1ea909c31" ]
[ "algorithm/algorithm_app.py" ]
[ "#Libraries\nimport pandas as pd\nimport numpy as np\nimport datetime\nimport random\nimport json\nimport requests\nfrom flask import Flask, url_for\n\n\n# End-Point \napp = Flask(__name__)\n@app.route('/classifier', methods=['GET'])\ndef classifier():\n gets = request.get_json()\n pacient_id = gets['pacient_...
[ [ "sklearn.tree.DecisionTreeClassifier", "pandas.read_csv", "sklearn.model_selection.cross_val_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Lee-Gihun/AdaptiveComp
[ "e3b20d74e3cc2b9cb39b83bd72b9611b2d946ffc" ]
[ "models/MobileNet.py" ]
[ "from torch import nn\n\n\n__all__ = ['MobileNetV2', 'mobilenet_v2']\n\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Block(nn.Module):\n '''expand + depthwise + pointwise'''\n def __init__(self, in_planes, out_planes, expansion, stride):\n super(Block, self).__init_...
[ [ "torch.nn.Sequential", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
barbagroup/petibm-examples
[ "794de3613967c14750c750aed386602c988cff05", "794de3613967c14750c750aed386602c988cff05" ]
[ "examples/decoupledibpm/flatplate3dRe100_GPU/aoa90/scripts/create_body.py", "examples/ibpm/cylinder2dRe40/scripts/plot_vorticity.py" ]
[ "\"\"\"Create a flat plate with aspect ratio 2 and a 90-degree inclination.\"\"\"\n\nimport numpy\nimport pathlib\n\nimport petibmpy\n\n\n# Flat-plate's parameters.\nL = 1.0 # chord length\nAR = 2.0 # aspect ratio\nxc, yc, zc = 0.0, 0.0, 0.0 # center's coordinates\naoa = 90.0 # angle of inclination in degrees\n...
[ [ "numpy.ceil", "numpy.radians", "numpy.linspace" ], [ "matplotlib.pyplot.show", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fniksic/diffstream
[ "82a7a6cf85e13f381cc9d87ac95a6de191c82148" ]
[ "data/topic-count/plot.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\n\nSMALL_SIZE = 10\nMEDIUM_SIZE = 12\nBIGGER_SIZE = 14\n\nplt.rc('font', size=MEDIUM_SIZE) # controls default text sizes\nplt.rc('axes', titlesize=BIGGER_SIZE) # fontsize of the axes title\nplt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x...
[ [ "matplotlib.pyplot.figure", "matplotlib.pyplot.rc", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
katherinelihanyu/MultiPointPushing
[ "68da19e65aa2813382490b51d77358206344db10" ]
[ "state.py" ]
[ "import imageio\nimport os\nimport pygame\nimport random\nimport matplotlib.pyplot as plt\n\nfrom Box2D import (b2Distance, b2PolygonShape, b2Transform, b2World)\nfrom helpers import *\nfrom math import isclose\n\n\"\"\"Display variables.\"\"\"\nSCREEN_WIDTH, SCREEN_HEIGHT = 720, 720\nPPM = 60.0 # pixels per meter...
[ [ "matplotlib.pyplot.cm.get_cmap" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
julycrow/IST-GCN
[ "99e054377af4e054d61f2f043e8cacdeb2de73b8" ]
[ "net/st_gcn_learnA.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nfrom net.utils.tgcn_learnA import ConvTemporalGraphical\nfrom net.utils.graph import Graph\n\n\n\nclass Model(nn.Module):\n r\"\"\"Spatial temporal graph convolutional networks.\n\n Args:\n in_...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.tensor", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pipehappy1/random_python_example_for_linear_algebra
[ "7d344b1ae7d50c520539e54b2d7003d63eaf877d" ]
[ "src/python_linear_algebra/chap4/pca2.py" ]
[ "'''\r\n主成份分析 principal component analysis PCA\r\n先求解 协方差矩阵\r\n再求解 协方差矩阵的特征值和特征向量\r\n'''\r\nimport numpy as np\r\nimport matplotlib\r\n\r\n# 载入文件数据 文件名 分隔符\r\ndef loadDataSet(fileName, delim='\\t'):\r\n fr = open(fileName)\r\n stringArr = [line.strip().split(delim) for line in fr.readlines()]\r\n dat...
[ [ "numpy.isnan", "numpy.cov", "numpy.mean", "numpy.shape", "numpy.argsort", "matplotlib.pyplot.show", "numpy.mat", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Sophieqqq/DCRNN
[ "25b4591ae3bb5e6ff35e2e62ed108e5b742ae516" ]
[ "model/dcrnn_supervisor.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\nimport os\nimport sys\nimport tensorflow as tf\nimport time\nimport yaml\n\nfrom lib import utils, metrics\nfrom lib.AMSGrad import AMSGrad\nfrom lib.metrics import masked_mae_loss\...
[ [ "tensorflow.global_variables", "numpy.concatenate", "numpy.mean", "tensorflow.train.AdamOptimizer", "numpy.asscalar", "tensorflow.gradients", "tensorflow.train.get_or_create_global_step", "tensorflow.name_scope", "tensorflow.trainable_variables", "numpy.min", "tensorflo...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
jongablop/cctbx_project
[ "5aa9da46eadf4b806cef423218228c4ffdcf2873" ]
[ "simtbx/diffBragg/tests/tst_diffBragg_hopper_refine.py" ]
[ "from __future__ import division\nfrom argparse import ArgumentParser\nparser = ArgumentParser()\nparser.add_argument(\"--cuda\", action=\"store_true\")\nparser.add_argument(\"--plot\", action='store_true')\nparser.add_argument(\"--curvatures\", action='store_true')\nparser.add_argument(\"--readout\", type=float, d...
[ [ "scipy.spatial.transform.Rotation.random", "numpy.random.random", "numpy.random.seed", "numpy.subtract", "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": [], ...
jschmidtnj/cs584
[ "d1d4d485d1fac8743cdbbc2996792db249dcf389" ]
[ "assignment2/src/sgd.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nstochastic gradient descent\n\"\"\"\n\n# Save parameters every a few SGD iterations as fail-safe\nimport os.path as op\nimport numpy as np\nimport random\nimport glob\nimport pickle\nSAVE_PARAMS_EVERY = 5000\n\n\ndef load_saved_params():\n \"\"\"\n A helper function that loads ...
[ [ "numpy.load", "numpy.sum", "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JasonMohabir/mhc-shake
[ "6d049693dcfc74df11fb982179430691b72f7431" ]
[ "pca.py" ]
[ "OA#11.25.19 extract n-mer from mutated protein \n\nimport pandas as pd\nimport numpy as np\nfrom Bio.Seq import Seq\nfrom Bio.Seq import Seq\nfrom Bio import Alphabet\nfrom Bio.Alphabet import IUPAC, ProteinAlphabet\n\ndef get_prot(swissprot):\n\n uni_prot = swissprot\n\n import httplib2 as http\n import ...
[ [ "numpy.array", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
banderlog/daugman
[ "c0cadccdbe48b4ef8853735f0e13f36e9e35a7d8" ]
[ "daugman.py" ]
[ "import cv2\nimport numpy as np\nimport itertools\nimport math\nfrom typing import Tuple, List\n\n\ndef daugman(gray_img: np.ndarray, center: Tuple[int, int],\n start_r: int, end_r: int, step: int = 1) -> Tuple[float, int]:\n \"\"\" The function will calculate pixel intensities for the circles\n ...
[ [ "numpy.add.reduce", "numpy.array", "numpy.zeros_like", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
StineGustavsen/Fidora
[ "005afc4ce1c4980c772b52ab6db13172048ac622" ]
[ "Profile_functions.py" ]
[ "#-----------------------------------------------------------------------------------\r\n#\r\n# Version 17.08.20\r\n# \r\n# Fuctions used in relation to the tab Profiles\r\n#-----------------------------------------------------------------------------------\r\n\r\nimport Globals\r\nimport tkinter as tk\r\nfrom tkin...
[ [ "numpy.swapaxes", "matplotlib.cm.viridis", "numpy.sqrt", "numpy.linspace", "matplotlib.figure.Figure", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.clip", "numpy.round", "numpy.max", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.s...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yanzhaochang/PSATools-Python
[ "7524d7eeed26db9fba93c0ea03a7c8c0bfee7410" ]
[ "src/powerflow/branch.py" ]
[ "import sys\r\nsys.path.append('..')\r\nimport numpy as np\r\n\r\nimport apis\r\nfrom apis import apis_system\r\nfrom apis import apis_basic\r\n\r\nfrom .hvdc import calculate_dc_line_power\r\n\r\n\r\ndef init_powerflow_solution():\r\n '''\r\n Initial power flow solution with flat start.\r\n Args: None\r\n...
[ [ "numpy.cos", "numpy.sin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dbradf/disaster-tweets
[ "b2c92f03453da155acd84400cc46aefecc9b99f8" ]
[ "src/disaster_tweets/deep.py" ]
[ "from datetime import datetime\n\nimport click\nimport torch\nfrom torch.utils.data.dataloader import DataLoader\nfrom tqdm import tqdm\nimport torch.nn as nn\nimport torch.optim as optim\n\nfrom disaster_tweets.tweet_data import DisasterTweetDataset, SplitType\n\n\nclass LinearTweetClassifier(nn.Module):\n def ...
[ [ "torch.nn.CrossEntropyLoss", "torch.sigmoid", "torch.cat", "torch.eq", "torch.from_numpy", "torch.tensor", "torch.nn.Linear", "torch.cuda.is_available", "torch.device", "torch.utils.data.dataloader.DataLoader", "torch.nn.EmbeddingBag" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
piotrsobecki/ISMIS17
[ "336e64c9313019ee19574af5ded031b08567127f" ]
[ "voting.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn import metrics\nfrom functools import partial\n\nfrom commons import *\nfrom classifier import *\nfrom sklearn.model_selection import KFold, StratifiedKFold\nimport numpy as np\n\n\ndef crossvalidation_transformed( X, Y, Y_pred, K=10):\n score = np.zeros(K)\...
[ [ "numpy.mean", "numpy.zeros", "pandas.DataFrame.from_csv", "sklearn.model_selection.StratifiedKFold" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "0.19", "0.24", "0.20" ], "scipy": [], "tensorflow": [] } ]
AlphaGit/hypermax
[ "7135c208acc3c44c18856d82308c51a38b8d95be" ]
[ "research/atpe_research_2/simulation.py" ]
[ "import hyperopt\nimport math\nimport json\nimport random\nimport numpy\nimport functools\nimport concurrent.futures\nimport os\nimport sys\nimport time\nimport datetime\nimport subprocess\nimport scipy.stats\nimport csv\nimport pickle\nimport matplotlib.pyplot as plt\nfrom scipy.stats import norm\nimport scipy.int...
[ [ "numpy.linspace", "matplotlib.pyplot.subplots", "numpy.percentile", "matplotlib.ticker.LinearLocator", "numpy.std", "matplotlib.ticker.FormatStrFormatter", "numpy.array", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wangzhe3224/Realtime_PyAudio_FFT
[ "108144c22839ec2f330f77ef9e0340cee2fbfc0e" ]
[ "src/visualizer.py" ]
[ "import numpy as np\nimport time, sys, math\nimport pygame\nfrom collections import deque\nfrom src.utils import Button\nfrom matplotlib import cm\n\nclass Spectrum_Visualizer:\n \"\"\"\n The Spectrum_Visualizer visualizes spectral FFT data using a simple PyGame GUI\n \"\"\"\n def __init__(self, ear):\n...
[ [ "numpy.zeros", "numpy.linspace", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xphter/PythonMachineLearning
[ "7d763f210152f43d1fad16838762bccd21199762" ]
[ "LinearRegression.py" ]
[ "import sys;\nimport abc;\nimport math;\nimport multiprocessing;\nimport psutil;\nimport numpy as np;\nfrom scipy.stats import t, f;\n\nimport DataHelper;\n\n\nclass LinearRegression:\n __DEFAULT_SIG_LEVEL = 0.05;\n\n\n @staticmethod\n def calcVIF(X):\n if X is None:\n raise ValueError(\"...
[ [ "numpy.diag", "numpy.hstack", "numpy.ones_like", "numpy.linalg.matrix_rank", "numpy.multiply", "numpy.logical_and", "numpy.quantile", "numpy.empty", "scipy.stats.f.cdf", "scipy.stats.t.ppf", "numpy.linalg.pinv", "numpy.ones", "numpy.delete", "numpy.identity"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
glcLucky/dccapp
[ "e05c760c4843dd06b8ef81eb44e2da5148994572" ]
[ "dccapp/src/convSDAE.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.init as init\n\n# The model definition for training convolutional Stacked Denoising AE.\n# This model is used during the pretraining stage.\nclass convSDAE(nn.Module):\n def __init__(self, dim, output_padding, numpen, dropout=0.2, slope=0.0...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.ConvTranspose2d", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.functional.leaky_relu", "torch.nn.BatchNorm2d", "torch.nn.MSELoss", "torch.nn.init.kaiming_normal_"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cristianbg11/climaapp
[ "82e1d50382bbe3c1b3ffd05dda3aaaa3cecc80b3" ]
[ "frontend/views/site/prediccion.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Prototype with variables inputs (FBProphet Model)\n\n# In[1]:\n\n\n#Defining the Function\ndef function_FBProphet_Forecast(column_name, no_of_days, start_date, end_date):\n import warnings\n warnings.filterwarnings('ignore')\n import pandas as pd\n pd.set_o...
[ [ "pandas.set_option", "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
kxdan/can-scrapers
[ "a0641976ce59e710cec30f065276a4ddd804e9b3", "a0641976ce59e710cec30f065276a4ddd804e9b3", "a0641976ce59e710cec30f065276a4ddd804e9b3" ]
[ "can_tools/scrapers/official/TN/tn_state.py", "can_tools/scrapers/official/PA/pa_vaccines.py", "can_tools/scrapers/official/IL/il_vaccine.py" ]
[ "import pandas as pd\nimport requests\nimport us\n\nfrom can_tools.scrapers.base import CMU\nfrom can_tools.scrapers.official.base import StateDashboard\nfrom can_tools.scrapers.util import requests_retry_session\n\n\nclass TennesseeBase(StateDashboard):\n state_fips = int(us.states.lookup(\"Tennessee\").fips)\n...
[ [ "pandas.read_excel" ], [ "pandas.DataFrame.from_records" ], [ "pandas.to_datetime", "pandas.to_numeric", "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...
Attaullah-brohi/pytorch3d
[ "628ee83d34e408a695b2890b613a849ce230cccd" ]
[ "pytorch3d/structures/pointclouds.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport torch\n\nfrom .. import ops\nfrom . import utils as struct_utils\n\n\nclass Pointclouds(object):\n \"\"\"\n This class provides functions for working with batches of 3d point clouds,\n and converting between representations....
[ [ "torch.ones", "torch.zeros", "torch.cat", "torch.allclose", "torch.is_tensor", "torch.tensor", "torch.arange", "torch.stack", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
darshitsharma/jax
[ "90f926ac6b4962cfc23779b44e04202e22373f4d" ]
[ "tests/qdwh_test.py" ]
[ "# Copyright 2021 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.linspace", "numpy.eye", "numpy.linalg.norm", "numpy.testing.assert_array_equal", "numpy.testing.assert_almost_equal", "scipy.linalg.polar" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15" ], "tensorflow": [] } ]
Adelashl6/mask_transformers
[ "2a2e4d1b40ae3ed546cb850d041af246806b63e7" ]
[ "src/rtransformer/beam_search.py" ]
[ "\"\"\"\nhttps://github.com/OpenNMT/OpenNMT-py/blob/master/onmt/translate/beam_search.py\n\"\"\"\nimport torch\n\nfrom src.rtransformer.decode_strategy import DecodeStrategy, length_penalty_builder\n\n\nimport logging\nlogger = logging.getLogger(__name__)\n\n\nclass BeamSearch(DecodeStrategy):\n \"\"\"Generation...
[ [ "torch.div", "torch.empty", "torch.full", "torch.zeros", "torch.tensor", "torch.mul", "torch.arange", "torch.topk" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hardworkingLHM/new
[ "a221bbae61c6ef45ea8dd5284654bab5e7b943b5" ]
[ "driver.py" ]
[ "import numpy as np\nimport os\nimport sys\nfrom scipy.io import loadmat\nfrom run_12ECG_classifier import load_12ECG_model, run_12ECG_classifier\n\n\ndef load_challenge_data(filename):\n\n x = loadmat(filename)\n data = np.asarray(x['val'], dtype=np.float64)\n\n new_file = filename.replace('.mat', '.hea')...
[ [ "numpy.asarray", "scipy.io.loadmat" ] ]
[ { "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"...
ronggong/audio-synchronization
[ "c9141c0d8a68df246deb462d7a4c91d513ac9cf8" ]
[ "align.py" ]
[ "import numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nfrom matplotlib.patches import ConnectionPatch\n\nimport librosa\nimport librosa.display\nfrom dlnco.DLNCO import dlnco\nfrom parser.txt_parser import sv_score_parser\nfrom operator import itemgetter\n\nn_...
[ [ "numpy.abs", "numpy.asarray", "matplotlib.patches.Rectangle", "matplotlib.pyplot.subplots", "matplotlib.patches.ConnectionPatch", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rodluger/Z-dependent-DWDs
[ "d61cf2b883ed5ef204cd65aae42c2cb690189251" ]
[ "src/figures/Mc_vs_dist.py" ]
[ "from matplotlib.ticker import AutoMinorLocator\nimport legwork.utils as utils\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport astropy.units as u\nimport seaborn as sns\n\nresolved_dat_FZ = pd.read_hdf(\n \"../data/resolved_DWDs_{}.hdf\".format(\"FZ\"), key=\"resolved\"\n)\nreso...
[ [ "matplotlib.ticker.AutoMinorLocator", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
changrunner/zeppos_ms_sql_server_proxy
[ "a32464c5d2bde425322534aacf30669b909ac984" ]
[ "tests/test_upsert_sql.py" ]
[ "import unittest\nfrom zeppos_ms_sql_server_proxy.upsert_sql import UpsertSql\nimport pandas as pd\n\nclass TestTheProjectMethods(unittest.TestCase):\n def test_get_execute_methods(self):\n upsert_sql = UpsertSql.execute(\n connection_string=\"DRIVER={ODBC Driver 13 for SQL Server}; SERVER=loca...
[ [ "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": [] } ]
octaexon/DeepTrafficSigns
[ "91a0ddee18db6aad72189131dd76ae4bcdd94fea" ]
[ "scripts/generate_tfrecords.py" ]
[ "import argparse\nimport os\nimport pandas as pd\nimport tensorflow as tf\nimport json\n\n''' generate_tfrecords.py\n\n generate train and eval tfrecords combining metadata and image data\n'''\n\n__author__ = 'James Ryan'\n__copyright__ = 'Copyright 2018'\n__credits__ = ['James Ryan']\n__license__ = 'MIT'\n__ver...
[ [ "pandas.read_csv", "tensorflow.python_io.TFRecordWriter", "tensorflow.train.FloatList", "tensorflow.train.BytesList", "tensorflow.train.Int64List" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
chao1224/n_gram_graph
[ "3acf580fe4b5835409abcbd566aadcba6f63fdb8" ]
[ "datasets/prepare_cep.py" ]
[ "from __future__ import print_function\r\n\r\nimport pandas as pd\r\nfrom rdkit import Chem\r\nfrom rdkit.Chem import AllChem, MolFromSmiles, MolFromMolBlock, MolToSmarts\r\nfrom sklearn.model_selection import KFold\r\nfrom data_preprocess import *\r\nimport os\r\n\r\n\r\nnp.random.seed(123)\r\nmax_atom_num = 55\r\...
[ [ "sklearn.model_selection.KFold" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gbeltzmo/Corrfunc
[ "1e5214fb4ee19c374e11eaa74c806dd0b781809a", "1e5214fb4ee19c374e11eaa74c806dd0b781809a" ]
[ "paper/scripts/get_speedups.py", "theory/python_bindings/call_correlation_functions.py" ]
[ "#!/usr/bin/env python\nfrom __future__ import print_function, division\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as mcolors\nimport matplotlib.cm as cm\ntry:\n import pandas as pd\nexcept ImportError:\n pd = None\n\ntry:\n import cPickle as pickle\ne...
[ [ "pandas.read_csv", "numpy.linspace", "matplotlib.style.use", "numpy.random.choice", "numpy.empty_like", "numpy.cumsum", "numpy.dtype", "matplotlib.pyplot.axes", "numpy.histogram2d", "matplotlib.pyplot.close", "numpy.argsort", "numpy.meshgrid", "numpy.where", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1...
angrySloth357/objectDetection
[ "5eaaab9c5d9a0ad2cfb167984cb4c9ccd13d7038" ]
[ "test_caption/test_graph.py" ]
[ "'''\nTest frozen tf graph\nShreeya\n'''\n\nimport tensorflow as tf\nimport vocabulary\nimport caption_generator\nimport timeit\nimport math\nfrom PIL import Image\nimport numpy as np\n\nMODEL = './show_and_tell_2m.pb'\nMODEL2 = './frozen_graph_new.pb'\nMODEL3 = './optimized_graph.pb'\nTEST_IMAGE_PATHS = ['./image7...
[ [ "tensorflow.Graph", "tensorflow.import_graph_def", "tensorflow.gfile.GFile", "tensorflow.Session", "tensorflow.GraphDef" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
OpenJarbas/little_questions
[ "c1ae7634856521ff6315e8f22c6d198604718916" ]
[ "train_scripts/train_ca.py" ]
[ "from os.path import join, dirname\n\nfrom little_questions.classifiers.base import *\nfrom sklearn.metrics import classification_report\nfrom sklearn.model_selection import train_test_split\nfrom xdg import BaseDirectory as XDG\n\nDATA_PATH = join(dirname(__file__), \"clean_data\")\nREPORTS_PATH = join(dirname(__f...
[ [ "sklearn.metrics.classification_report", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
VinAIResearch/Point-Unet
[ "ee632a70aa8a45616dad36dda7e6d286d7c11cf5" ]
[ "PointSegment/utils/cvt_CT.py" ]
[ "\n\n\"\"\"\n获取可用于训练网络的训练数据集\n需要四十分钟左右,产生的训练数据大小3G左右\n\"\"\"\n\nimport os\nimport sys\nsys.path.append(os.path.split(sys.path[0])[0])\nimport shutil\nfrom time import time\n\nimport numpy as np\nfrom tqdm import tqdm\nimport SimpleITK as sitk\nimport scipy.ndimage as ndimage\n\ntraining_set_path = '/home/ubuntu/Res...
[ [ "scipy.ndimage.zoom", "numpy.flip" ] ]
[ { "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"...
ChengYeung1222/traditional_classifiers
[ "a13b2ed03be49384a67d80d8d16e4d9ae2c1d348" ]
[ "baggingClf.py" ]
[ "from sklearn.model_selection import train_test_split\nimport numpy as np\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.pipeline import Pipeline\nimport pandas as pd\nfrom sklearn import metrics\nfrom sklearn.ensemble import BaggingClassifier\nfrom sklearn.tree import DecisionTreeClassifier\n\nif ...
[ [ "sklearn.metrics.roc_auc_score", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.tree.DecisionTreeClassifier", "sklearn.preprocessing.StandardScaler" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
fringe-ai/tensorrtx
[ "d0c1f6b0ad6cb5c5090e4013d2d9da7dbf9216b2" ]
[ "efficientnet/run_inference.py" ]
[ "\"\"\"\nAn example that uses TensorRT's Python api to make inferences.\n\"\"\"\nfrom logging import raiseExceptions\nimport os\nimport random\nimport time\nimport cv2\nfrom skimage.io import imread\nimport numpy as np\nimport pycuda.autoinit\nimport pycuda.driver as cuda\nimport tensorrt as trt\n\n\n\ndef get_img_...
[ [ "numpy.expand_dims", "numpy.reshape", "numpy.ascontiguousarray", "numpy.argmax", "numpy.transpose", "numpy.copyto", "numpy.array", "numpy.exp", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
malariagen/vector-tools
[ "9b471887ebb7809cffe894fa678108ee6a9f7921" ]
[ "scripts/estimate_contamination.py" ]
[ "import zarr\nimport allel\nimport pandas as pd\nimport numpy as np\nimport sys\nimport argparse\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom itertools import product\nfrom scipy.optimize import minimize_scalar\n\n\n# This defines the probabilities of obser...
[ [ "numpy.take", "numpy.squeeze", "pandas.DataFrame", "numpy.all", "numpy.concatenate", "numpy.exp", "numpy.where", "numpy.arange", "scipy.optimize.minimize_scalar", "numpy.matmul", "numpy.stack", "numpy.count_nonzero", "numpy.zeros", "numpy.log", "numpy.ar...
[ { "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": [ "0.13", "1.6", "0.14", "1.10", "0...
DuanShengqi/pointnet.pytorch
[ "7a1d5e72c71bc06bf0cbf5a2e2d277e7a7c1b83b" ]
[ "utils/train_segmentation.py" ]
[ "'''\n使用MLP可以进行部分分割,数据集是基于ShapeNet的部分数据集\n其实点云的分割是给点云中的每一个点进行一个分类,因此在一维的卷积网络中其实是对每一个点进行卷积操作的\n该网络可改性很大,该程序自带的一些3D点云的显示很垃圾,目前想结合open3d进行一个显示\n\n下一步计划:\n1. open3d是可以输入RGB图像的,但是数据集中应该没有RGB图,但是自己构建3D模型太复杂并且容易缺失\n2. 自己提取的点云模型如何进行一个标注也是一个问题,目前还没有查找相关的资料\n3. 实现点云分割后如何与抓取相结合也是一个很大的问题,匹配? 多视图? 还需要阅读相关的三维抓取论文\n4. 并且相关的点云分割论文...
[ [ "torch.nn.functional.nll_loss", "torch.load", "torch.manual_seed", "numpy.logical_or", "numpy.mean", "numpy.logical_and", "torch.optim.lr_scheduler.StepLR" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
malarinv/plume-asr
[ "79aa5e85788070aad688d41fbbf9f8b1f8aa8fb5" ]
[ "src/plume/models/wav2vec2_transformers/asr.py" ]
[ "from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC\n\n# import soundfile as sf\nfrom io import BytesIO\nimport torch\n\nfrom plume.utils import lazy_module\n\nsf = lazy_module(\"soundfile\")\n\n\nclass Wav2Vec2TransformersASR(object):\n \"\"\"docstring for Wav2Vec2TransformersASR.\"\"\"\n\n def __ini...
[ [ "torch.cuda.is_available", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xuzhao9/benchmark
[ "ebf5ead0cf4a514e5898d370f4d208f0d46648b9" ]
[ "torchbenchmark/models/BERT_pytorch/bert_pytorch/trainer/pretrain.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.optim import Adam\nfrom torch.utils.data import DataLoader\n\nfrom ..model import BERTLM, BERT\nfrom .optim_schedule import ScheduledOptim\n\nimport tqdm\n\n\nclass BERTTrainer:\n \"\"\"\n BERTTrainer make the pretrained BERT model with two LM training method.\...
[ [ "torch.nn.NLLLoss", "torch.nn.DataParallel", "torch.cuda.is_available", "torch.device", "torch.cuda.device_count", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lllukehuang/FracNet
[ "5d29bea26ca07ab073f9bfbd58938a5223661207" ]
[ "dataset/fracnet_dataset.py" ]
[ "import os\nfrom itertools import product\n\nimport nibabel as nib\nimport numpy as np\nimport torch\nfrom skimage.measure import regionprops\nfrom torch.utils.data import DataLoader, Dataset\n\n\nclass FracNetTrainDataset(Dataset):\n\n def __init__(self, image_dir, label_dir=None, crop_size=64,\n tra...
[ [ "torch.cat", "torch.utils.data.DataLoader", "numpy.stack", "torch.tensor", "torch.FloatTensor", "torch.stack", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nbirillo/Kotlin-Analysis
[ "73c3b8a59bf40ed932bb512f30b0ff31f251af40" ]
[ "scripts/analysis/ranges/statistics_printer.py" ]
[ "from collections import defaultdict\nimport argparse\nimport pandas as pd\n\nTOTAL = \"TOTAL\"\nOTHER = \"other\"\n\n\ndef main():\n args = parse_args()\n ranges_df = pd.read_csv(args.input, sep='\\t')\n\n ranges_dict = defaultdict(dict)\n for column_name in ranges_df.columns[1:]:\n range, conte...
[ [ "pandas.read_csv", "pandas.Index", "pandas.DataFrame.from_dict" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]