repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
yvorobey/adversarialMI
[ "8950623c3946ee917ecf21262c52c98a8689b1a1" ]
[ "l2_attack.py" ]
[ "# modified by Huahong Zhang <huahong.zhang@vanderbilt.edu> to fit the L2 algorithm mentioned in the paper\n# original copyright license follows.\n\n# Copyright (c) 2016 Nicholas Carlini\n#\n# LICENSE\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided th...
[ [ "numpy.arctanh", "tensorflow.reduce_sum", "tensorflow.global_variables", "tensorflow.variables_initializer", "tensorflow.placeholder", "numpy.ones", "tensorflow.tanh", "tensorflow.train.AdamOptimizer", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
edges-collab/edges-analysis
[ "b5165c55b7ae4334f6ac0578ade76ad875612605" ]
[ "examples/mid_band_polychord.py" ]
[ "#!/usr/bin/python\n\"\"\"\nAn example of running polychord for mid-band data.\n\nHow to run::\n\n python mid_band_polychord.py 0 5\n\"\"\"\n\nimport sys\nfrom os import makedirs\nfrom os.path import exists\n\nimport numpy as np\nimport PyPolyChord\nfrom PyPolyChord.settings import PolyChordSettings\n\nfrom edge...
[ [ "numpy.dot", "numpy.log", "numpy.isnan", "numpy.arange", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Fieldhunter/2020-ZhanJiang-Underwater-Object-Detection-Algorithm-Contest
[ "b3d5e756766cff352acd2a0636e167f09f225514" ]
[ "data_augmention/getTransmissionMap.py" ]
[ "import numpy as np\r\ndef getMinChannel(img,AtomsphericLight):\r\n imgGrayNormalization = np.zeros((img.shape[0], img.shape[1]), dtype=np.float16)\r\n for i in range(0, img.shape[0]):\r\n for j in range(0, img.shape[1]):\r\n localMin = 1\r\n for k in range(0, 3):\r\n ...
[ [ "numpy.max", "numpy.float16", "numpy.zeros", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AmanVirmani/LucasKanadeTracker
[ "c64c858d1cffe0957a0b35e0aede9414593eea4c" ]
[ "InverseCompositionAffine.py" ]
[ "#!/usr/bin/python3\n\n'''\n16-720B Computer Vision (Fall 2018)\nHomework 3 - Lucas-Kanade Tracking and Correlation Filters\n'''\n\n__author__ = \"Heethesh Vhavle\"\n__credits__ = [\"Simon Lucey\", \"16-720B TAs\"]\n__version__ = \"1.0.1\"\n__email__ = \"heethesh@cmu.edu\"\n\nimport numpy as np\nfrom scipy.ndimage ...
[ [ "numpy.linspace", "numpy.gradient", "numpy.asarray", "numpy.linalg.inv", "numpy.matmul", "numpy.linalg.norm", "numpy.ones", "numpy.flip", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
liammagee/data-analytics
[ "ef7d47603427856030d85aedea0ffec7ffbf54e5" ]
[ "common.py" ]
[ "# Imports\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport savReaderWriter\nimport seaborn as sns\n\n\n\n\nclass DataSet:\n def __init__(self, filename = None):\n self.data = {}\n self.metadata = {}\n if filename != None:\n self.load_spss_files(fi...
[ [ "numpy.split", "numpy.asarray", "numpy.arange", "numpy.isnan", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.subplots", "numpy.round", "numpy.size", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.show", "numpy.sum", "matplotlib.pyplot.ylabel" ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rsmith6559/workspace
[ "82a686dfe956fe2434b873af6b44a42108d93b55" ]
[ "testGUI.py" ]
[ "#!/usr/bin/python3\n\nimport tkinter as tk\nfrom tkinter import colorchooser, messagebox\n\nfrom matplotlib.backends.backend_tkagg import(\n FigureCanvasTkAgg, NavigationToolbar2Tk )\nfrom matplotlib.backend_bases import key_press_handler\nfrom matplotlib.figure import Figure\n\nimport numpy as np\n\n\ndef new...
[ [ "matplotlib.figure.Figure", "numpy.arange", "numpy.sin", "matplotlib.backends.backend_tkagg.NavigationToolbar2Tk", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
st3107/19st_tio2b_notebooks
[ "ff1f87cbfebaef2fe298ea50e4f94de1e96e8ef6" ]
[ "utils.py" ]
[ "import math\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pdffitx.modeling as md\nimport pdffitx.parsers as ps\nfrom diffpy.srfit.fitbase import FitResults\nfrom diffpy.srfit.fitbase.parameter import Parameter\nfrom diffpy.srfit.fitbase.fitresults import initializeRecipe\nfrom diffpy.srfit.fitbase...
[ [ "matplotlib.pyplot.gca", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
firojalam/transformers
[ "58282c10f887a90932cbc0fd0dec0c556b98c19d" ]
[ "examples/transformers/data/metrics/__init__.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, 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...
[ [ "numpy.array", "sklearn.metrics.roc_auc_score", "scipy.stats.pearsonr", "sklearn.metrics.matthews_corrcoef", "sklearn.metrics.confusion_matrix", "sklearn.metrics.precision_recall_fscore_support", "scipy.stats.spearmanr", "sklearn.metrics.f1_score", "numpy.average", "sklearn...
[ { "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" ...
Rachananagavelli/IR-detction
[ "e8c746edad6aa8c5dfc8c46c4aa6d36e6f17368b" ]
[ "localization.py" ]
[ "import numpy as np\nimport cv2 as cv\nimport glob\nimport matplotlib.pyplot as plt\nimport sys\nfrom PIL import Image\nimport argparse\nimport os\n\n# convenience code to annotate calibration points by clicking\n# python localization.py dataset/beach/map.png dataset/beach/calib_map.txt --click\nif '--click' in sys...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.imshow", "numpy.nonzero", "matplotlib.pyplot.plot", "numpy.round", "matplotlib.pyplot.clf", "numpy.mean", "numpy.savetxt", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros", "numpy.sum", "numpy.loadtxt", "matp...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
agamemnonc/pyqtgraph
[ "ed6586c7ddd3ad95eadd40cb8fda7c4c1d4c746b" ]
[ "pyqtgraph/graphicsItems/AxisItem.py" ]
[ "from ..Qt import QtGui, QtCore\nfrom ..python2_3 import asUnicode\nimport numpy as np\nfrom ..Point import Point\nfrom .. import debug as debug\nimport weakref\nfrom .. import functions as fn\nfrom .. import getConfigOption\nfrom .GraphicsWidget import GraphicsWidget\n\n__all__ = ['AxisItem']\nclass AxisItem(Graph...
[ [ "numpy.log", "numpy.abs", "numpy.isnan", "numpy.arange", "numpy.concatenate", "numpy.ceil", "numpy.log10", "numpy.floor", "numpy.array", "numpy.isinf" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hetaShah27/metriks
[ "a0e62df847b8997bfc32b337d7e41db16d0a8ce4" ]
[ "tests/test_confusion_matrix_at_k.py" ]
[ "import numpy as np\nimport metriks\n\n\ndef test_confusion_matrix_at_k_wikipedia():\n \"\"\"\n Tests the wikipedia example.\n\n https://en.wikipedia.org/wiki/Mean_reciprocal_rank\n \"\"\"\n\n # Flag indicating which is actually relevant\n y_true = np.array([\n [0, 0, 1],\n [0, 1, 0]...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ProgrammerWaterworth/Mastering-OpenCV-4-with-Python
[ "c90305898f1413267404f1ac83075133299060bb", "c90305898f1413267404f1ac83075133299060bb" ]
[ "Chapter12/01-chapter-content/tensorflow/introduction_tensorflow/tensorflow_basic_op.py", "Chapter12/01-chapter-content/opencv/blob_from_images/blob_from_images_cropping.py" ]
[ "\"\"\"\nBasic Operations example using TensorFlow library.\n\"\"\"\n\n# Import required packages:\nimport tensorflow as tf\n\n# path to the folder that we want to save the logs for Tensorboard\nlogs_path = \"./logs\"\n\n# Define placeholders:\nX_1 = tf.placeholder(tf.int16, name=\"X_1\")\nX_2 = tf.placeholder(tf.i...
[ [ "tensorflow.multiply", "tensorflow.summary.FileWriter", "tensorflow.placeholder", "tensorflow.Session" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "numpy.reshape", "numpy.uint8", "matplotlib.pyplot.subplot", "matplotlib.pyplot.axis", "matplotlib.pypl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
artdreamer/stable-baselines3
[ "198d8a02a296a67898d54c3acb19dafea18ccd27" ]
[ "stable_baselines3/ppo/ppo.py" ]
[ "import warnings\nfrom typing import Any, Dict, Optional, Type, Union\n\nimport numpy as np\nimport torch as th\nfrom gym import spaces\nfrom torch.nn import functional as F\n\nfrom stable_baselines3.common.on_policy_algorithm import OnPolicyAlgorithm\nfrom stable_baselines3.common.policies import ActorCriticPolicy...
[ [ "torch.mean", "torch.abs", "torch.min", "torch.exp", "torch.nn.functional.mse_loss", "torch.no_grad", "numpy.mean", "torch.clamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pollen-robotics/reachy-2.0
[ "1721c2d93737e576e328bfdb78376d1b0163d3d6" ]
[ "software/reachy/utils/__init__.py" ]
[ "\"\"\"Utility toolbox submodules.\"\"\"\n\nimport numpy as np\n\nfrom scipy.spatial.transform import Rotation as R\n\n\ndef rot(axis, deg):\n \"\"\"Compute 3D rotation matrix given euler rotation.\"\"\"\n return R.from_euler(axis, np.deg2rad(deg)).as_matrix()\n" ]
[ [ "numpy.deg2rad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rootroom100/study-picamera-examples
[ "a991f92f5bc6a2be2b53308b8205d0fd65a53ba0" ]
[ "camera/processor/face_detector.py" ]
[ "from __future__ import print_function\r\nfrom imutils.video.pivideostream import PiVideoStream\r\nimport imutils\r\nimport time\r\nimport numpy as np\r\nimport cv2\r\n\r\nclass FaceDetector(object):\r\n def __init__(self, flip = True):\r\n self.vs = PiVideoStream(resolution=(800, 608)).start()\r\n ...
[ [ "numpy.flip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
astromid/pandemicdatahack-track3
[ "0812dad4ed08c4bb952d80d0610b2fa92d27901a" ]
[ "src/base_regressor.py" ]
[ "import random\nimport numpy as np\nfrom sklearn.model_selection import StratifiedKFold\nfrom sklearn.metrics import mean_squared_error\nfrom lightgbm import LGBMRegressor\nfrom .base_preprocessor import BasePreprocessor\nSEED = 1377\nN_FOLDS = 10\n\nrandom.seed(SEED)\nnp.random.seed(SEED)\n\n\nclass BaseRegressor:...
[ [ "numpy.random.seed", "sklearn.model_selection.StratifiedKFold", "numpy.std", "numpy.mean", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ArsamAryandoust/BEVPO
[ "7763e28c1fa895c6689f394b7d99f9fd878cd5b2", "7763e28c1fa895c6689f394b7d99f9fd878cd5b2" ]
[ "src/bevpo/datasets/prep_ubermovement.py", "src/bevpo/save_results.py" ]
[ "import pandas as pd\nimport numpy as np\nimport math\n\ndef create_city_zone_coordinates(path_to_json_data):\n\n \"\"\" Calls the functions import_geojson and calc_centroids to get\n a list of city cone coordinates and created a pandas DataFrame in the \n required format, i.e. wiht columns zone_lat and zo...
[ [ "pandas.read_csv", "numpy.mean", "pandas.read_json" ], [ "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "numpy.arange", "pandas.DataFrame", "matplotlib.pyplot.savefig", "matplotlib.pyplot.axes", "numpy.round", "matplotlib.pyp...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", ...
Owen718/sea-thru
[ "4f5bb54f75b39bef7fdf9cb2e58b7676d5ae6402" ]
[ "seathru.py" ]
[ "import collections\nimport sys\nimport argparse\nimport numpy as np\nimport sklearn as sk\nimport scipy as sp\nimport scipy.optimize\nimport scipy.stats\nimport math\nfrom PIL import Image\nimport rawpy\nimport matplotlib\nfrom matplotlib import pyplot as plt\nfrom skimage import exposure\nfrom skimage.restoration...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "numpy.minimum", "numpy.linspace", "numpy.round", "numpy.max", "numpy.mean", "numpy.zeros_like", "numpy.any", "numpy.exp", "numpy.where", "numpy.roll", "matplotlib.pyplot.tight_layout", "numpy.unique", "nu...
[ { "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" ...
balamurali-m/Feature-Selection
[ "23291f4ec2a963946b1e5f3fec48b93f675736c2" ]
[ "Feature Selection - Tree Based.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nFeature Selection - Tree Based\r\nAuthor: Balamurali.M\r\n##\r\n\"\"\"\r\n\r\nimport numpy as np\r\nfrom sklearn.ensemble import ExtraTreesClassifier\r\nfrom sklearn.feature_selection import SelectFromModel\r\n\r\nimport warnings\r\nwarnings.filterwarnings('ignore')\r\n\r\n#Gen...
[ [ "sklearn.feature_selection.SelectFromModel", "sklearn.ensemble.ExtraTreesClassifier", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
beproxy/tf_checkpoint_vs_pickle
[ "a40ec0134da8ffd215654f2a110f5684372389c3" ]
[ "machinery.py" ]
[ "from sklearn.preprocessing import MinMaxScaler\nimport numpy as np\nimport pandas as pd\nimport math\nfrom sklearn.metrics import mean_squared_error\n\n\nclass Machinery:\n def __init__(self, filename, seqlen):\n self.seqlen = seqlen\n self.filename = filename\n self.dataset = self.open_dat...
[ [ "pandas.concat", "pandas.read_csv", "numpy.reshape", "sklearn.metrics.mean_squared_error", "numpy.array", "sklearn.preprocessing.MinMaxScaler" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
urielsinger/CDMF
[ "bfa5bacc3aedf71b34cd457b20ca5d649df435b6" ]
[ "CDMF/dataset.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.utils.data.dataloader import default_collate\nimport pytorch_lightning as pl\n\n\nclass CDMFDataModule(pl.LightningDataModule):\n \"\"\"\n Example of a DataModule handling data for the CDMF model.\n ...
[ [ "torch.BoolTensor", "torch.range", "torch.randint", "torch.Tensor", "torch.randn", "torch.utils.data.DataLoader", "torch.unique", "torch.argsort", "torch.nn.functional.pad", "torch.utils.data.dataloader.default_collate" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Ashafix/yolo-tf2
[ "5ca83ba411ba1f1a0091464381ee5dc3a4a582d6" ]
[ "yolo_tf2/utils/common.py" ]
[ "import logging\nimport os\nfrom logging import handlers\nfrom pathlib import Path\nfrom time import perf_counter\nfrom xml.etree import ElementTree\nfrom xml.etree.ElementTree import SubElement\n\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\nimport tensorflow_addons as tfa\nfrom lxml import et...
[ [ "tensorflow.concat", "tensorflow.stack", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.minimum", "tensorflow.equal", "pandas.DataFrame", "tensorflow.where", "pandas.read_csv", "tensorflow.config.experimental.set_memory_growth", "tensorflow.python.util.tf_expor...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Moving-AI/action-recognition
[ "75249dd4e2a3f6f949f40311d911ab716d2145a5" ]
[ "source/dataprocessing/__init__.py" ]
[ "import logging\nimport os\nimport re\nfrom itertools import chain\nfrom pathlib import Path\n\nimport cv2\nimport imutils\nimport numpy as np\nimport pandas as pd\n\nimport source.funciones as funciones\nfrom source.entities.person import Person\nfrom source.entities.person_frames import PersonMovement\nfrom sourc...
[ [ "pandas.concat", "numpy.vstack", "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": [] } ]
elehcim/spectral-cube
[ "0b64e9e3c2a71c5e8ff99eaa8d0e2f433de96087" ]
[ "spectral_cube/tests/test_performance.py" ]
[ "\"\"\"\nPerformance-related tests to make sure we don't use more memory than we should\n\"\"\"\n\nfrom __future__ import print_function, absolute_import, division\n\nimport numpy as np\n\nimport pytest\nimport tempfile\nimport sys\n\ntry:\n import tracemalloc\n tracemallocOK = True\nexcept ImportError:\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jkennedy-usgs/sgp-gsadjust
[ "929d650674b942d33168bcdaae7da07db175a1c4" ]
[ "gsadjust/data/adjustment.py" ]
[ "\"\"\"\r\ndata/adjustment.py\r\n===============\r\n\r\nGSadjust objects for Adjustment | AdjustmentOptions | AdjustmentResults: The first\r\ncontains instances of the latter two. Holds the input data, options, and results of\r\nthe network adjustment.\r\n\r\nThis software is preliminary, provisional, and is subjec...
[ [ "numpy.log", "numpy.sqrt", "numpy.linalg.inv", "numpy.transpose", "numpy.array", "numpy.diagonal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
garyhowarth/deid2_dpsyn
[ "f8e9f30797f633254a3639378f8b318c1e2f655e" ]
[ "method/dpsyn.py" ]
[ "import copy\nimport multiprocessing as mp\nfrom typing import List, Tuple, Dict, KeysView\n\nimport numpy as np\nimport pandas as pd\nimport yaml\nfrom loguru import logger\nfrom numpy import linalg as LA\n\nfrom lib_dpsyn.consistent import Consistenter\nfrom lib_dpsyn.record_synthesizer import RecordSynthesizer\n...
[ [ "numpy.mean", "numpy.sum", "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": [], ...
mragungsetiaji/alsi
[ "c33f0e1ca1ee148ff3c95474dd4c36166ece583a" ]
[ "alsi/recommender_base.py" ]
[ "\nimport itertools\nfrom abc import ABCMeta, abstractmethod\nimport numpy as np\n\nclass RecommenderBase(object):\n\n __metaclass__ = ABCMeta\n\n @abstractmethod\n def fit(self, item_users):\n pass\n\n @abstractmethod\n def recommend(self, userid, user_items,\n N=10, filter_a...
[ [ "numpy.linalg.norm", "numpy.argpartition" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
markveillette/data-driven-advection
[ "1535b792d8196f25837c51cda7a152ab405f6f81" ]
[ "datadrivenpdes/core/tensor_ops.py" ]
[ "# python3\n# Copyright 2018 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...
[ [ "tensorflow.convert_to_tensor", "tensorflow.concat", "tensorflow.transpose", "tensorflow.maximum", "tensorflow.compat.v1.extract_image_patches", "tensorflow.cast", "tensorflow.squeeze", "tensorflow.reshape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
drewoldag/astropy
[ "2023292bc5f1d29e95dbef9e978cdb307ae1ba3d" ]
[ "astropy/coordinates/representation.py" ]
[ "\"\"\"\nIn this module, we define the coordinate representation classes, which are\nused to represent low-level cartesian, spherical, cylindrical, and other\ncoordinates.\n\"\"\"\n\nimport abc\nimport functools\nimport operator\nfrom collections import OrderedDict\nimport inspect\nimport warnings\n\nimport numpy a...
[ [ "numpy.logical_not", "numpy.abs", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.arctan2", "numpy.broadcast", "numpy.ones", "numpy.broadcast_to", "numpy.any", "numpy.broadcast_arrays", "numpy.moveaxis", "numpy.array2string", "numpy.hypot", "numpy.zeros"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
salukadev/FDM-Mini-Project
[ "300f13bac438d15aaa09bac466c9063db0885a7a" ]
[ "app/dashboard/layout.py" ]
[ "from dash import dcc\nfrom dash import html\nimport dash_bootstrap_components as dbc\nfrom ..Plots import alzheimer_clusterringPlot as ac\nimport plotly.graph_objs as go\n\nimport plotly.express as px\nimport pandas as pd\nimport os\n# navbar = \nfig2 = ac.alzheimer_clusterPlot()\nfig2.update_layout({\n\"plot_bgco...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
GabCaz/Fixed-Income
[ "340538ec55f721527c5b3080fb5b438df9f7ce62" ]
[ "black_prices.py" ]
[ "'''\nFile to compute Black values for securities where a closed-form solution exists (caplets, caps...)\n'''\nimport numpy as np\nfrom utils import count_days\nfrom scipy.stats import norm\n\ndef hull_white_caplet(sigma, kappa, discount_factor, discount_factor_prev, d_settlement, strike, d_prev, d_mat, nominal=1):...
[ [ "numpy.exp", "numpy.log", "scipy.stats.norm.cdf", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
haohaoxiao/Deep-Reinforcement-Learning-Hands-On-Second-Edition
[ "1cbdff216fdc5cec02cc0da8664b788941f025c1" ]
[ "Chapter23/lib/mcts.py" ]
[ "\"\"\"\nMonte-Carlo Tree Search\n\"\"\"\nimport math as m\nimport numpy as np\n\nfrom lib import game, model\n\nimport torch.nn.functional as F\n\n\nclass MCTS:\n \"\"\"\n Class keeps statistics for every state encountered during the search\n \"\"\"\n def __init__(self, c_puct=1.0):\n self.c_puc...
[ [ "torch.nn.functional.softmax", "numpy.argmax", "numpy.random.dirichlet" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cnwangfeng/algorithm-reference-library
[ "9605eb01652fbfcb9ff003cc12b44c84093b7fb1", "9605eb01652fbfcb9ff003cc12b44c84093b7fb1" ]
[ "processing_components/skymodel/operations.py", "processing_components/visibility/operations.py" ]
[ "\"\"\"Function to manage skymodels.\n\n\"\"\"\n\nimport logging\n\nimport matplotlib.pyplot as plt\nimport numpy\nfrom astropy.wcs.utils import skycoord_to_pixel\n\nfrom data_models.memory_data_models import SkyModel, GainTable\nfrom processing_library.image.operations import copy_image\nfrom ..calibration.operati...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "numpy.min", "matplotlib.pyplot.plot", "numpy.max", "matplotlib.pyplot.clf", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "numpy.angle", "numpy.exp", "matplotlib.pyplot.show", "matplotlib.pyplot.ylab...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ADraginda/pandas
[ "f58d8151299ae6804a5e1bc7786c84ec4c0aa333" ]
[ "pandas/core/arrays/datetimelike.py" ]
[ "from __future__ import annotations\n\nfrom datetime import datetime, timedelta\nimport operator\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Optional,\n Sequence,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n)\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs...
[ [ "pandas.Series", "pandas._libs.tslibs.Timestamp", "numpy.asarray", "pandas.core.dtypes.common.is_extension_array_dtype", "pandas.core.dtypes.common.is_dtype_equal", "pandas._libs.lib.is_scalar", "pandas.core.dtypes.common.is_datetime64tz_dtype", "pandas.core.arrays.TimedeltaArray",...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.0", "1.3" ], "scipy": [], "tensorflow": [] } ]
Butters-cloud/Denoising-Normalizing-Flow
[ "2aeafbaebc9b49737b602ccf65bbb60499c0119e" ]
[ "experiments/training/trainer.py" ]
[ "import logging\nimport numpy as np\nimport torch\nfrom torch import optim, nn\nfrom torch.autograd import grad\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.sampler import SubsetRandomSampler\nfrom torch.nn.utils import clip_grad_norm_\n\nimport random\n\nlogger = logging.getLogger(__name__)\n\n\...
[ [ "torch.set_default_tensor_type", "numpy.sqrt", "torch.utils.data.DataLoader", "numpy.mean", "torch.cuda.is_available", "torch.device", "torch.norm", "torch.randn", "torch.tensor", "numpy.std", "numpy.zeros", "torch.ones_like", "torch.utils.data.sampler.SubsetRan...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Julia2505/image-segmentation-keras
[ "8c474da49e36cb8c18f1b5fe657ea5c7db83d4b8" ]
[ "keras_segmentation/models/mobilenet.py" ]
[ "import tensorflow.keras.backend as K\nfrom tensorflow.keras.models import *\nfrom tensorflow.keras.layers import *\nfrom tensorflow.keras.utils import get_file\n\nfrom .config import IMAGE_ORDERING\n\nBASE_WEIGHT_PATH = ('https://github.com/fchollet/deep-learning-models/'\n 'releases/download/v0...
[ [ "tensorflow.keras.utils.get_file", "tensorflow.keras.backend.relu", "tensorflow.keras.backend.image_data_format" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
benellis3/REFIL
[ "fe3d6ea5a6eb307128cf8a47ddc6e59cb126a52a" ]
[ "src/controllers/basic_controller.py" ]
[ "from modules.agents import REGISTRY as agent_REGISTRY\nfrom components.action_selectors import REGISTRY as action_REGISTRY\nimport torch as th\n\n\n# This multi-agent controller shares parameters between agents\nclass BasicMAC:\n def __init__(self, scheme, groups, args):\n self.n_agents = args.n_agents\n...
[ [ "torch.nn.functional.softmax", "torch.cat", "torch.eye", "torch.zeros_like", "torch.ones_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chaddy1004/pytorch-lightning
[ "c93b92deb8443bfa80614e498380d2a58b35aa0e" ]
[ "tests/accelerators/test_accelerator_connector.py" ]
[ "# Copyright The PyTorch Lightning team.\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...
[ [ "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Drakeblaze10/Surf_up
[ "85137b96d12b5fdf45f62a2fa1b1ca4a08523833" ]
[ "app.py" ]
[ "#Import dependencies\nimport datetime as dt\nimport json\nimport numpy as np\nimport pandas as pd\n\nimport sqlalchemy\nfrom sqlalchemy.ext.automap import automap_base\nfrom sqlalchemy.orm import Session\nfrom sqlalchemy import create_engine, func\n\nfrom flask import Flask, jsonify\n\n# Set up database\nengine = ...
[ [ "numpy.ravel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Shihab-Shahriar/scikit-clean
[ "1f5d4266c91ca7074f1833de78526c39d97a5648" ]
[ "skclean/utils/_utils.py" ]
[ "import os\nfrom pathlib import Path\nfrom time import ctime, perf_counter\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import cross_val_score, check_cv\nfrom sklearn.preprocessing import MinMaxScaler, LabelEncoder\nfrom sklearn.utils import shuffle, check_random_state\n\n_intervals = (\...
[ [ "pandas.read_csv", "sklearn.model_selection.cross_val_score", "numpy.unique", "sklearn.utils.shuffle", "sklearn.model_selection.check_cv", "pandas.DataFrame", "pandas.isna", "sklearn.preprocessing.LabelEncoder", "sklearn.utils.check_random_state", "sklearn.preprocessing.Min...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
verg1lio/ross
[ "d4456f42c7906b52963341fcbed88b9c25dafd34" ]
[ "ross/bearing_seal_element.py" ]
[ "\"\"\"Bearing Element module.\n\nThis module defines the BearingElement classes which will be used to represent the rotor\nbearings and seals. There're 6 different classes to represent bearings options,\nand 2 element options with 8 or 12 degrees of freedom.\n\"\"\"\n# fmt: off\nimport os\nimport warnings\nfrom pa...
[ [ "numpy.hstack", "scipy.interpolate.UnivariateSpline", "numpy.allclose", "numpy.linspace", "numpy.cos", "scipy.interpolate.interp1d", "numpy.insert", "numpy.isscalar", "numpy.array", "numpy.divide" ] ]
[ { "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" ...
Niels-NTG/GDMC2022
[ "515f4b7dd6f04af9714e7773f36cc9b3f1da1b95" ]
[ "SettlementBuilder.py" ]
[ "import numpy as np\nimport mapUtils\nfrom Node import Node\n\n\nclass SettlementBuilder:\n\n def __init__(self):\n\n # DEBUG\n # central RNG generator\n rng = np.random.default_rng()\n\n buildArea = mapUtils.getBuildArea()\n startingPos = (10, 10)\n\n # DEBUG\n m...
[ [ "numpy.random.default_rng", "numpy.full" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ShaneSmiskol/Konverter
[ "76995e1b30a1cdf3fb1568f8aa468e68a15aad69" ]
[ "tests/test_konverter.py" ]
[ "import warnings\nimport os\nwarnings.filterwarnings('ignore', category=DeprecationWarning)\nwarnings.filterwarnings('ignore', category=FutureWarning)\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n\nimport konverter\nimport importlib\nimport numpy as np\nimport tensorflow as tf\nfrom packaging import version\nfrom uti...
[ [ "numpy.random.uniform", "numpy.array", "numpy.subtract" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rantahar/Growing_neural_network
[ "1cc9ff6b7b96c8386f32a003b2a594d5e71e0f3f" ]
[ "train_dynamic.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport time\n\nfrom dynamic_networks import (\n DynamicModel,\n DynamicDenseLayer,\n DynamicConv2DLayer,\n DynamicConv2DToDenseLayer,\n)\n\n#################################################\n# A simple test for training the dynamic network\n# Builds a standa...
[ [ "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.keras.datasets.cifar10.load_data", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.optimizers.Adam", "tensorflow.GradientTape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "2.9", "2.5", "2.8", "2.10" ] } ]
j-bac/skcontrib-id-estimators
[ "b8f60c8aca7382cdd11ea910714f762fac5910f6" ]
[ "skdim/id/_DANCo.py" ]
[ "#\n# BSD 3-Clause License\n#\n# Copyright (c) 2020, Jonathan Bac\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright no...
[ [ "numpy.log", "scipy.special.i1", "numpy.abs", "sklearn.utils.validation.check_array", "numpy.clip", "numpy.isnan", "numpy.arange", "scipy.special.i0", "numpy.arccos", "numpy.cos", "numpy.sin", "numpy.argmax", "numpy.mean", "sklearn.utils.validation.check_ran...
[ { "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" ...
j9ac9k/signalworks
[ "ca1c9ea77f6fc6d26c1e1b3a21eb9d9465041fb5" ]
[ "signalworks/dsp.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nDigital Signal Processing\n\"\"\"\nfrom math import ceil, log2\nfrom typing import Tuple, Union\n\nimport numba\nimport numpy as np\nfrom numpy.fft import fft, ifft, irfft, rfft\nfrom scipy import signal, stats\nfrom signalworks.tracking import TimeValue, Wave\n\n# TODO: make this ...
[ [ "numpy.abs", "numpy.fft.rfft", "numpy.clip", "numpy.min", "numpy.arange", "numpy.median", "numpy.tile", "numpy.fft.ifft", "numpy.max", "scipy.stats.scoreatpercentile", "numpy.mean", "numpy.log10", "scipy.signal.hann", "numpy.angle", "numpy.correlate", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.19", "0.18", "0.12", "1.0", "0.17", "0.16" ], "tensorflow": [] } ]
pha-nguyen/siam-mot
[ "868c244a8d0d6aa79b1fbaf09c226fa0335307f3" ]
[ "siammot/modelling/track_head/EMM/xcorr.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport torch\nimport torch.nn.functional as F\n\n\ndef xcorr_slow(x, kernel):\n \"\"\"for loop to calculate cross correlation, slow version\n \"\"\"\n ...
[ [ "torch.nn.functional.conv2d", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wilsonjwcsu/contrastive-unpaired-translation
[ "d08a4b08ed8247a2cc897ba4d9bfbdb3487db7fa" ]
[ "models/cut_model.py" ]
[ "import numpy as np\nimport torch\nfrom .base_model import BaseModel\nfrom . import networks\nfrom .patchnce import PatchNCELoss\nimport util.util as util\nfrom scipy.stats import pearsonr\n\n\nclass CUTModel(BaseModel):\n \"\"\" This class implements CUT and FastCUT model, described in the paper\n Contrastiv...
[ [ "numpy.random.random", "torch.cat", "numpy.random.rand", "torch.flip", "torch.nn.L1Loss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhuangzi926/KnowledgeDistillation-pytorch
[ "4785bd9afa5d79a744c127851e316caf8469a10e" ]
[ "nets/resnet.py" ]
[ "\"\"\"\n Ref: https://github.com/huyvnphan/PyTorch_CIFAR10\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport os\nimport sys\n\nsys.path.append(\"..\")\nimport settings\nimport utils\n\n__all__ = [\n \"ResNet\",\n \"resnet18\",\n \"resnet34\",\n \"resnet50\",\n \"resnet101\",\n \"resnet152...
[ [ "torch.nn.Sequential", "torch.load", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AdaptiveAvgPool2d", "torch.arange", "torch.nn.ReLU", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
seinsinnes/pynndescent
[ "e71d8e7ad5d7749d3e22ac969e6b7a9391d14c20" ]
[ "pynndescent/tests/test_pynndescent_.py" ]
[ "import os\nimport io\nimport re\nimport pytest\nfrom contextlib import redirect_stdout\n\nimport numpy as np\nfrom sklearn.neighbors import KDTree\nfrom sklearn.neighbors import NearestNeighbors\nfrom sklearn.preprocessing import normalize\nimport pickle\nimport joblib\n\nfrom pynndescent import NNDescent, PyNNDes...
[ [ "numpy.testing.assert_equal", "numpy.allclose", "numpy.unique", "numpy.in1d", "sklearn.neighbors.KDTree", "numpy.ones", "numpy.all", "sklearn.preprocessing.normalize", "sklearn.neighbors.NearestNeighbors", "numpy.argsort", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
peterger8y/Airbnb-rental-price-predictor
[ "32175783292a044b0cfab1c7274ff15c2eea4fd4" ]
[ "neighbors_model.py" ]
[ "from sklearn.pipeline import make_pipeline\nfrom sklearn.neighbors import KNeighborsRegressor\nfrom sklearn.impute import SimpleImputer\nfrom category_encoders import OneHotEncoder\nfrom sklearn.preprocessing import StandardScaler\n\ndef bathroom_text_encoder(df):\n df1 = df.copy()\n df1['bathrooms_text'] = df['...
[ [ "sklearn.neighbors.KNeighborsRegressor", "sklearn.preprocessing.StandardScaler", "sklearn.impute.SimpleImputer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xiaojingyi/embedView
[ "1078f77cd4f452be528c361fee8f11f720bb54f0" ]
[ "t-sne.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: 2015 Jingyi Xiao\n# FileName: t-sne.py\n# Date: 2019 2019年06月10日 14:33:51\n# Encoding: utf-8\n# Author: Jingyi Xiao\n\n__author__=\"Jingyi\"\n\nimport os, sys, time\nimport argparse\nimport numpy as np\nfrom tensorflow.contrib.tensorboard.plugins import pr...
[ [ "tensorflow.device", "tensorflow.summary.FileWriter", "tensorflow.InteractiveSession", "tensorflow.gfile.DeleteRecursively", "tensorflow.gfile.Exists", "tensorflow.gfile.MkDir", "tensorflow.stack", "numpy.random.shuffle", "tensorflow.global_variables_initializer", "tensorfl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
evalf/povplot
[ "c74e2767387d8c2e591932f6b2db574ffa024418" ]
[ "tests.py" ]
[ "import unittest, tempfile, io, collections, pathlib\nimport numpy, matplotlib.image, matplotlib.cm, matplotlib.figure, matplotlib.backends.backend_agg\nimport povplot\n\nclass common:\n\n def render_square(self, *, focal_length=50, **kwargs):\n defaults = dict(vertices=[[-9,-9,focal_length],[-9,9,focal_length]...
[ [ "numpy.arange", "numpy.ones", "numpy.full_like", "numpy.max", "numpy.equal", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
askamenik/PyGromosTools
[ "1aacfb87e4b3368f4fbf1dec74f83ec3806a5ca2" ]
[ "pygromos/files/trajectory/_general_trajectory.py" ]
[ "\"\"\"\nFUNCTIONLIB: trajectory template with pandas\nDescription:\n in this parent class for all trajectories the general parsing to a pandas database is handeled.\n This class is intended as quick data evaluation in python without gromos++ programs like ene_ana\n\n Specific block structures a...
[ [ "pandas.DataFrame", "pandas.DataFrame.from_dict" ] ]
[ { "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": [] } ]
not-jenni/iree-samples
[ "c726345c95cb3efa4ee622482c16c6ec4a3187d0" ]
[ "tflitehub/mobilebert_tf2_quant_test.py" ]
[ "# RUN: %PYTHON %s\n\nimport absl.testing\nimport numpy as np\nimport squad_test_data\nimport test_util\n\nmodel_path = \"https://storage.googleapis.com/iree-model-artifacts/mobilebert-baseline-tf2-quant.tflite\"\n\nclass MobileBertTest(test_util.TFLiteModelTest):\n def __init__(self, *args, **kwargs):\n super(...
[ [ "numpy.asarray", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Belhoussine/Moodzik
[ "0e7f85244e86d7f54d112742b38c3b8bcd0d925f" ]
[ "WebApp/GenerateSong/utils.py" ]
[ "\n\"\"\"Transform utilities.\"\"\"\nimport numpy as np\nimport tensorflow.compat.v1 as tf # pylint: disable=import-error\ntf.disable_v2_behavior()\n\nfrom tensor2tensor.data_generators import text_encoder\n\nimport magenta.music as mm \nfrom magenta.models.score2perf import score2perf\n\nLOGGER = tf.compat.v1.logg...
[ [ "numpy.array", "numpy.zeros", "tensorflow.compat.v1.disable_v2_behavior" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
stfcsciml/sciml-benchmarks
[ "636aefb0089f79f57be3025b3acb902571117e6f" ]
[ "sciml_bench/benchmarks/dms_classifier/data_loader.py" ]
[ "import h5py\nimport tensorflow as tf\nimport numpy as np\nfrom pathlib import Path\nimport horovod.tensorflow as hvd\n\nfrom sciml_bench.core.data_loader import DataLoader\nfrom sciml_bench.benchmarks.dms_classifier.constants import IMG_HEIGHT, IMG_WIDTH, N_CHANNELS\n\n\nclass DMSDataset(DataLoader):\n\n def __...
[ [ "tensorflow.TensorShape", "numpy.array", "tensorflow.data.Dataset.from_generator" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
WoodoLee/TorchCraft
[ "999f68aab9e7d50ed3ae138297226dc95fefc458", "999f68aab9e7d50ed3ae138297226dc95fefc458", "c20483a437c82936cb0fb8080925e37b9c4bba87" ]
[ "3rdparty/pytorch/caffe2/python/operator_test/transpose_op_test.py", "3rdparty/pytorch/caffe2/python/onnx/test_onnxifi.py", "3rdparty/pytorch/caffe2/python/regularizer_test.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom caffe2.python import core, workspace\nfrom hypothesis import given\n\nimport caffe2.python.hypothesis_test_util as hu\nimport caffe2.python.serialized_test.serialized_test_util as serial\nimport h...
[ [ "numpy.arange", "numpy.random.shuffle", "numpy.transpose" ], [ "numpy.maximum", "numpy.testing.assert_almost_equal", "numpy.random.randn", "numpy.testing.assert_allclose", "numpy.array" ], [ "numpy.square", "numpy.sqrt", "numpy.clip", "numpy.hsplit", "nu...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Hira63S/KnightRyder
[ "5eadc04f2fb056b04db59a658d5914ea847be7d2" ]
[ "models/regnet.py" ]
[ "import torch\nimport torch.nn as nn\n\n__all__ = ['regnetx_002', 'regnetx_004', 'regnetx_006', 'regnetx_008', 'regnetx_016', 'regnetx_032',\n 'regnetx_040', 'regnetx_064', 'regnetx_080', 'regnetx_120', 'regnetx_160', 'regnetx_320']\n\ndef conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):\n ...
[ [ "torch.nn.Sequential", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.flatten", "torch.nn.ReLU", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mistermoutan/ModelsGenesis
[ "98af7075b93311fe655e9692773eb1ce015b8bd0" ]
[ "pytorch/ACSConv/experiments/mylib/utils.py" ]
[ "import os\nfrom sklearn.metrics import roc_auc_score\nfrom tqdm import tqdm\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets, transforms\nimport torch\nimport torch.nn as nn\nimport pandas as pd\nimport os\nimport time\nimport random\nimport torch.nn.functional as F\nimport numpy as np\nf...
[ [ "numpy.expand_dims", "torch.max", "numpy.random.seed", "torch.cuda.manual_seed", "torch.Tensor", "matplotlib.pyplot.switch_backend", "torch.manual_seed", "torch.zeros", "torch.nn.init.kaiming_uniform_", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "numpy...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vb7401/pytorch-image-models
[ "d1d1115b1e07103cd97c21a63fb9dfe5af9c2047", "d1d1115b1e07103cd97c21a63fb9dfe5af9c2047" ]
[ "timm/optim/adafactor.py", "timm/models/hrnet.py" ]
[ "\"\"\" Adafactor Optimizer\n\nLifted from https://github.com/pytorch/fairseq/blob/master/fairseq/optim/adafactor.py\n\nOriginal header/copyright below.\n\n\"\"\"\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root dir...
[ [ "torch.mul", "torch.zeros_like", "torch.zeros" ], [ "torch.nn.Sequential", "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.Identity", "torch.nn.Upsample", "torch.nn.BatchNorm2d", "torch.nn.ReLU", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Mesitis/luminoth
[ "8c334a7f7a105e7a6f79085dbc521d9cc4151786" ]
[ "sonnet/python/modules/layer_norm.py" ]
[ "# Copyright 2017 The Sonnet 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 required ...
[ [ "tensorflow.ones_initializer", "tensorflow.nn.moments", "tensorflow.zeros_initializer", "tensorflow.nn.batch_normalization" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yigitozgumus/IACV_Project
[ "0e012139a33c76ca88505c28270f1250181ec701" ]
[ "train.py" ]
[ "import tensorflow as tf\nfrom utils.utils import get_args\nfrom utils.config import process_config\nfrom utils.factory import create\nfrom utils.dirs import create_dirs\nfrom utils.logger import Logger\nfrom utils.copy_codebase import copy_codebase\nimport os\n\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\nos.env...
[ [ "tensorflow.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
qai222/ATMOxide
[ "42702c1ce299233569c8a3c0a9712b0e62ef6b16" ]
[ "Floats/Figure_1/amine_occurance_class.py" ]
[ "import pandas as pd\nfrom collections import Counter\nfrom AnalysisModule.routines.util import read_jsonfile\n\ninput_df = pd.read_csv(\"../../DataGeneration/5_SimpleInput/input.csv\")\nsmi2cluster = read_jsonfile(\"../../DataGeneration/6_AmineCluster/smiles_labeled_umap.json\")\n\nimport matplotlib.pyplot as plt\...
[ [ "matplotlib.pyplot.rcParams.update", "pandas.read_csv", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ttumiel/interpret
[ "aeecb00bf65376668a48895cb707beb6dd8fb7ab" ]
[ "test/test_transforms.py" ]
[ "import pytest\nimport torch\nfrom PIL import Image\nimport numpy as np\n\nfrom interpret.transforms import scale, translate, shear, rotate, RandomTransform, _random_params\n\n@pytest.fixture(scope='module')\ndef tensor():\n d = 'cuda' if torch.cuda.is_available() else 'cpu'\n return torch.arange(4).view(2,2)...
[ [ "torch.all", "torch.tensor", "torch.cuda.is_available", "torch.arange", "torch.stack", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joshim5/CRISPR-Library-Designer
[ "2def1e4351c82056587620f7520ec922761ac8f3" ]
[ "static/data/pre_processed/additional_scripts/generation/compile_exome_2.py" ]
[ "# pool exome into single file\nimport os\nimport pandas as pd\nimport gzip\nfrom Bio import SeqIO\n\nAPP_STATIC = \"/home/joshm/GUIDES/CRISPR-Library-Designer/static\"\n\nccds_coords = os.path.join(APP_STATIC, 'data/pre_processed/CDS', 'CCDS_coords.csv')\n\nchrom_seq_base = os.path.join(APP_STATIC, \"data/GRCh37/H...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
boxdot/xgboost
[ "1a0801238e06f64e0bcdd882081c36bb20e188b9" ]
[ "tests/python/test_predict.py" ]
[ "'''Tests for running inplace prediction.'''\nimport unittest\nfrom concurrent.futures import ThreadPoolExecutor\nimport numpy as np\nfrom scipy import sparse\n\nimport xgboost as xgb\n\n\ndef run_threaded_predict(X, rows, predict_func):\n results = []\n per_thread = 20\n with ThreadPoolExecutor(max_worker...
[ [ "numpy.random.seed", "scipy.sparse.csr_matrix", "numpy.all", "numpy.random.randn", "numpy.testing.assert_allclose" ] ]
[ { "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"...
tomeasure/gpt-2-Pytorch
[ "52ee85b212325b48c9db6913fe7df12226b939a9" ]
[ "GPT2/sample.py" ]
[ "'''\n code by TaeHwan Jung(@graykode)\n Original Paper and repository here : https://github.com/openai/gpt-2\n GPT2 Pytorch Model : https://github.com/huggingface/pytorch-pretrained-BERT\n'''\nimport torch\nimport torch.nn.functional as F\nfrom tqdm import trange\n\ndef top_k_logits(logits, k):\n if k ...
[ [ "torch.nn.functional.softmax", "torch.full", "torch.cat", "torch.multinomial", "torch.tensor", "torch.no_grad", "torch.topk", "torch.ones_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jairocollante/sr
[ "f395c0f9aef804ec0100edcfe1a1c6ccab2494a1" ]
[ "webproject/taller1/algoritmosCII.py" ]
[ "import pandas as pd\nimport sqlalchemy\n\nclass SimilitudCosenoII():\n predictions = None\n def __init__(self):\n # Se cargan las predicciones\n engine = sqlalchemy.create_engine('postgresql://ugrupo06:grupo06@localhost:5432/t1')\n conn = engine.connect()\n\n sql_command = 'SELECT user_id, art_id, r...
[ [ "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": [] } ]
lqdev/DLWPython
[ "9d411b3e20c45e20b9f3641c58b7f5dcc2a2e439" ]
[ "Listings/5.py" ]
[ "\"\"\"\nListing 5.1 Instantiating a small convnet\n\"\"\"\n\nfrom keras import layers\nfrom keras import models\n\nmodel = models.Sequential()\nmodel.add(layers.Conv2D(32,(3,3),activation='relu',input_shape=(28,28,1)))\nmodel.add(layers.MaxPooling2D((2,2)))\nmodel.add(layers.Conv2D(64,(3,3),activation='relu'))\nmo...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "numpy.expand_dims", "matplotlib.pyplot.plot", "numpy.max", "numpy.mean", "matplotlib.pyplot.matshow", "numpy.clip", "numpy.reshape", "numpy.uint8", "numpy.argmax", "numpy.zeros", "matplotlib.pyplot.figure"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bouchraamirouche/bouchra
[ "ac1257bef933ac0a8872ca310623ae017b62124f" ]
[ "scripts/select_folds.py" ]
[ "\"\"\"Split the training set into K folds.\n\nThis script requires three command-line arguments:\n\n * metadata_path: Path to training set metadata.\n * output_path: Output file path.\n * n_folds: Number of folds to use.\n\nThe output is a new metadata file that assigns each example to a fold.\n\"\"\"\n\nimport...
[ [ "pandas.read_csv", "sklearn.model_selection.StratifiedKFold" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
MingtaoGuo/Pytorch_Learning_Diary
[ "6910fe8ce0f780b456dd2a8b3ec6de9b46b11c9d" ]
[ "Day 6/GANs.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torch.autograd as autograd\r\nimport numpy as np\r\nimport scipy.io as sio\r\nfrom PIL import Image\r\n\r\nbatchsize = 128\r\n\r\n\r\nclass Generator(nn.Module):\r\n def __init__(self):\r\n super(Generator, self).__init__()\r\n self.linear = nn.Seque...
[ [ "torch.mean", "torch.sigmoid", "torch.norm", "torch.nn.ConvTranspose2d", "torch.randn", "torch.nn.Conv2d", "scipy.io.loadmat", "torch.nn.Tanh", "torch.tensor", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d", "numpy.transpose", "torch.rand", ...
[ { "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"...
dah33/visions
[ "381b9c1aa700bf0b352a014a50af4d8159c2d0e7" ]
[ "src/visions/application/summaries/series/email_address_summary.py" ]
[ "import pandas as pd\n\n\ndef email_address_summary(series: pd.Series) -> dict:\n summary = {}\n\n local = []\n fqdn = []\n for v in series.drop().values:\n local.append(v.local)\n fqdn.append(v.fqdn)\n\n summary[\"local_counts\"] = pd.Series(local).value_counts().to_dict()\n summary...
[ [ "pandas.Series" ] ]
[ { "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": [] } ]
IIMarch/ssd
[ "79361ed185f0bbd750e3af8fb281bb6deb27be73" ]
[ "train.py" ]
[ "from data import *\nfrom utils.augmentations import SSDAugmentation\nfrom layers.modules import MultiBoxLoss\nfrom ssd import build_ssd\nimport os\nimport sys\nimport time\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.backends.cudnn as cudnn\ni...
[ [ "torch.set_default_tensor_type", "torch.ones", "torch.Tensor", "torch.load", "torch.zeros", "torch.utils.data.DataLoader", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.nn.init.xavier_uniform", "torch.autograd.Variable" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chrisspen/speaker-recognition-1
[ "d55b600bbebef2199cab2180eaa6033e078af4cc" ]
[ "speaker_recognition/test/test-nperson.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# $File: test-nperson.py\n# $Date: Fri Dec 27 03:08:25 2013 +0000\n# $Author: Xinyu Zhou <zxytim[at]gmail[dot]com>\n\nimport glob\nimport traceback\nimport sys\nimport random\nimport os\nimport time\nimport numpy as np\nimport multiprocessing\nimport operator\nfrom c...
[ [ "numpy.concatenate" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
paulirish/covid-data-model
[ "b93ae5d598b8378f9c1f2698e3162f87136cde74" ]
[ "pyseir/inference/model_fitter.py" ]
[ "import logging\nimport iminuit\nimport numpy as np\nimport us\nimport pickle\nfrom pprint import pformat\nimport pandas as pd\nfrom scipy.stats import gamma, norm\nfrom copy import deepcopy\nfrom matplotlib import pyplot as plt\nfrom datetime import datetime, timedelta\nfrom multiprocessing import Pool\nfrom pysei...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.fill_betweenx", "matplotlib.pyplot.gca", "numpy.argmax", "numpy.interp", "matplotlib.pyplot.errorbar", "matplotlib.pyplot.close", "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": [] } ]
dushyantkhosla/dataviz
[ "05a004a390d180d87be2d09873c3f7283c2a2e27" ]
[ "99-Miscel/AnatomyOfMatplotlib-master/solutions/4.2-spines_ticks_and_subplot_spacing.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\n\ndata = [('dogs', 4, 4), ('frogs', -3, 1), ('cats', 1, 5), ('goldfish', -2, 2)]\nanimals, friendliness, popularity = zip(*data)\n\n\ndef plot_and_setup_spines(ax, animals, y, ylabel):\n x = np.arange(len(animals))\n ax.bar(x, y, align='center', color='gra...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ksuarz/monary
[ "e8775ef11a8f9f020bacbaa2d8e802da1c0b4c19" ]
[ "monary/monary.py" ]
[ "# Monary - Copyright 2011-2014 David J. C. Beach\n# Please see the included LICENSE.TXT and NOTICE.TXT for licensing information.\n\nimport atexit\nimport os.path\nimport platform\nimport sys\nfrom copy import deepcopy\nfrom ctypes import *\n\nPY3 = sys.version_info[0] >= 3\nif PY3:\n # Python 3\n bytes_type...
[ [ "numpy.ma.masked_array", "numpy.zeros", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ictnlp/STEMM
[ "e3ae1903be5534f860fcd71ea9c9ef1c0f6267e9" ]
[ "fairseq/data/audio/audio_utils.py" ]
[ "from pathlib import Path\nfrom typing import BinaryIO, Optional, Tuple, Union, List\n\nimport os\nimport numpy as np\nimport torch\nimport torchaudio\n\n\nSF_AUDIO_FILE_EXTENSIONS = {\".wav\", \".flac\", \".ogg\"}\nFEATURE_OR_SF_AUDIO_FILE_EXTENSIONS = {\".npy\", \".wav\", \".flac\", \".ogg\"}\n\n\ndef _convert_to...
[ [ "torch.from_numpy" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joaopaulocastro/resnetkeras
[ "8c65bd386e77b91a67fac4433cb3497f91875e41" ]
[ "DataGenerator.py" ]
[ "\"\"\"\n This is the class used to provide trainning examples to the model in real time, during trainning\n\n Is this implementation, it gets data from pre-processed files (resulting of the pre-processing and data augmentation steps)\n\"\"\"\n\n# imports\nimport keras\nimport Constants as const\nimport numpy...
[ [ "numpy.arange", "numpy.append", "numpy.zeros", "numpy.random.shuffle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fugokidi/block_transform
[ "752041f3681776e335e442fa53ce294d008cf024", "752041f3681776e335e442fa53ce294d008cf024" ]
[ "cifar10/keydefense.py", "imagenet/keydefense.py" ]
[ "\"\"\"\nThis module contains all the key-based transformation for adversarial defense.\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\nimport pyffx\n\n__all__ = [\"Shuffle\", \"NP\", \"FFX\"]\n\n\nclass BlockTransform(nn.Module):\n \"\"\"\n Generic class for block-wise transformation.\n ...
[ [ "torch.clamp", "torch.Tensor", "torch.randperm", "torch.manual_seed", "numpy.arange", "torch.from_numpy", "numpy.vectorize", "torch.argsort" ], [ "torch.clamp", "torch.Tensor", "torch.randperm", "torch.manual_seed", "numpy.arange", "torch.from_numpy", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TaoSunVoyage/fastcluster
[ "4414d9402db127140cbafa7d063d10967fc04c9b" ]
[ "src/python/tests/vectortest.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# TBD test single on integer matrices for hamming/jaccard\nprint('''\nTest program for the 'fastcluster' package.\nCopyright:\n * Until package version 1.1.23: (c) 2011 Daniel Müllner <http://danifold.net>\n * All changes from version 1.1.24 on: (c) Google Inc. <...
[ [ "numpy.minimum", "numpy.nanmin", "numpy.all", "numpy.seterr", "numpy.max", "numpy.mean", "numpy.fill_diagonal", "numpy.any", "scipy.spatial.distance.squareform", "numpy.random.randint", "numpy.square", "numpy.ix_", "numpy.arange", "numpy.min", "numpy.isn...
[ { "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" ...
hugh-braico/skug-stamper
[ "9eae67441dd7d3e20b84e7bba91dfe4f9d3a0e3e" ]
[ "utils/cv2.py" ]
[ "import cv2 as cv\r\nimport numpy as np\r\nimport sys\r\nimport logging\r\nfrom pathlib import Path\r\n\r\n# Read a frame at a specific time from a video\r\ndef get_frame_from_video(capture, seconds, GAME_X, GAME_Y, GAME_SIZE):\r\n capture.set(cv.CAP_PROP_POS_MSEC,(seconds*1000)) \r\n success, image = captu...
[ [ "numpy.array", "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": [], ...
choiwb/Computer_Vision_for_Smart_Factory
[ "af182570009beedef75b12a9fc6233f4d0cbdbea", "af182570009beedef75b12a9fc6233f4d0cbdbea" ]
[ "object_tracker_v5.0.py", "object_tracke_v1.0.py" ]
[ "######################################################################\n######################################################################\n# Object Tracking & Object Counting by Line\n# bounding box, label box 좌표 수정\n\n# TEST #\n'''\nmaking csv\nmaking function\n'''\n##########################################...
[ [ "numpy.array", "torch.no_grad", "pandas.DataFrame" ], [ "numpy.array", "torch.no_grad" ] ]
[ { "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...
chomd90/snip
[ "04aa8ca76364c61c3f6013832827fa292402652b" ]
[ "train_utils.py" ]
[ "import torch\n\nclass AverageMeter(object):\n \"\"\"Computes and stores the average and current value\"\"\"\n def __init__(self):\n self.reset()\n\n def reset(self):\n self.val = 0\n self.avg = 0\n self.sum = 0\n self.count = 0\n\n def update(self, val, n=1):\n ...
[ [ "torch.no_grad", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
stevievb/s3dataviewer
[ "c96a57c03cfdc15e9808632c465db9f4c2b33bbe" ]
[ "bokeh-backend/s3DataViewerPlotServer/apps/image.py" ]
[ "from bokeh.application.handlers import FunctionHandler, DirectoryHandler\nfrom bokeh.application import Application\n\nimport numpy as np\nimport holoviews as hv\nimport boto3\nfrom PIL import Image\nimport holoviews.plotting.bokeh # important\nfrom bokeh.io import show, curdoc\nfrom bokeh.layouts import layout\n...
[ [ "numpy.asarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aluckyi/FASNet
[ "aefd3da73a7bc8aa1389b13b5a823fba5995ac3f" ]
[ "networks/fasnet.py" ]
[ "import torch.nn as nn\nimport torch\n\nimport torch.nn.functional as F\nfrom .module import MSFA\nfrom .enet import backbone_net\n\n\n# add MSFA + FSLoss\nclass FASNet(nn.Module):\n def __init__(self, num_classes=3):\n super(FASNet, self).__init__()\n\n self.backbone = backbone_net()\n self...
[ [ "torch.nn.Conv2d", "torch.nn.functional.interpolate", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jinfagang/alfred
[ "adffe076ce4c64dbaf1533e1bd11fb46f30431d8" ]
[ "alfred/dl/evaluator/yolo_evaluator.py" ]
[ "import os\r\nimport json\r\nimport glob\r\nfrom alfred.utils.log import logger\r\nfrom PIL import Image\r\nimport numpy as np\r\nimport cv2\r\nimport shutil\r\nfrom tqdm import tqdm\r\n\r\n\r\n__all__ = ['YoloEvaluator']\r\n\r\n\r\n\"\"\"\r\n\r\nParsing any dataset in Yolo format.\r\nYou can simply change classes ...
[ [ "numpy.array", "numpy.mean", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kl-31/batterycat
[ "c4956cb4a64fb3fc35df6ba193c9e40245410a05" ]
[ "helpers.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Apr 25 05:28:51 2019\n\n@author: KCLIANG\nHelper functions for biophotobot.\n\"\"\"\nfrom sklearn.feature_extraction.text import HashingVectorizer\nfrom sklearn.externals import joblib\nimport pandas as pd\nimport numpy as np\nfrom unidecode import unidecode\nimport ...
[ [ "sklearn.feature_extraction.text.HashingVectorizer", "sklearn.externals.joblib.load", "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": [] } ]
IsnainiNurul/backup_ta
[ "4dea359aef8277b9ccbe0938a2a97f698fa34b2d" ]
[ "public/predict.py" ]
[ "import pickle\nimport pandas as pd\nimport nltk\nfrom nltk.corpus import stopwords\nfrom nltk.tokenize import punkt\nfrom flask import Flask\nfrom nltk.corpus.reader import wordnet\nfrom nltk.stem import WordNetLemmatizer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nimport sys\n\n\npath_models = \...
[ [ "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": [] } ]
tensorflow/transform
[ "f4dd0395fddc0bfdb4912c4cf871e494e6a3d0a6" ]
[ "tensorflow_transform/analyzer_nodes.py" ]
[ "# Copyright 2018 Google Inc. 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 required by appl...
[ [ "tensorflow.compat.v1.get_default_graph", "tensorflow.raw_ops.PlaceholderWithDefault", "tensorflow.constant", "tensorflow.TensorShape", "tensorflow.strings.as_string", "tensorflow.io.gfile.GFile", "tensorflow.identity", "tensorflow.python.framework.ops.get_default_graph", "tens...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DiMesq/olfaction-prediction
[ "eda9ca029d3c78718afc6c1ba78f2831068de168" ]
[ "opc_python/gerkin/fit2.py" ]
[ "import warnings\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.ensemble import RandomForestRegressor,ExtraTreesRegressor\nfrom sklearn.model_selection import ShuffleSplit,cross_val_score\nfrom sklearn.linear_model import RandomizedLasso,Ridge\n\nfrom opc_python import * # Import constants. \nfrom opc_py...
[ [ "sklearn.ensemble.RandomForestRegressor", "sklearn.linear_model.RandomizedLasso", "sklearn.model_selection.ShuffleSplit", "numpy.sqrt", "numpy.array_equal", "numpy.logspace", "pandas.DataFrame", "numpy.std", "sklearn.linear_model.Ridge", "numpy.mean", "pandas.MultiIndex...
[ { "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": [] } ]
venclov/PSMNet
[ "77d2a4ea46f55b7dee44258c80917228d2c3f212", "77d2a4ea46f55b7dee44258c80917228d2c3f212" ]
[ "main.py", "dataloader/trimbotLoader.py" ]
[ "from __future__ import print_function\nimport argparse\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport numpy as np\nimport time\nimport math\nfrom dataloader import listflowfile as lt\nfrom dat...
[ [ "torch.cuda.manual_seed", "torch.load", "torch.squeeze", "torch.manual_seed", "torch.nn.functional.l1_loss", "torch.exp", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", "torch.nn.functional.smooth_l1_loss", "torch.cuda.memory_alloca...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
michalk8/NeuralEE
[ "8946abf919770e2f75ee68c27fc66f96c290f871" ]
[ "neuralee/_aux/error.py" ]
[ "import torch\nimport math\n\n\n@torch.no_grad()\ndef error_ee(X, Wp, Wn, lam):\n \"\"\"Elastic embedding loss function.\n\n It's quite straightforward, may unapplicable when size is large,\n and the alternative error_ee_cpu and error_ee_cuda are designed to\n release computation stress.\n\n :param X...
[ [ "torch.exp", "torch.no_grad", "torch.arange", "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scopatz/openmc
[ "689d7b31677bc945aa21fa710801ac85562f1e87" ]
[ "openmc/mgxs/mgxs.py" ]
[ "from __future__ import division\n\nfrom collections import Iterable, OrderedDict\nfrom numbers import Integral\nimport warnings\nimport os\nimport sys\nimport copy\nimport abc\n\nimport numpy as np\n\nimport openmc\nimport openmc.checkvalue as cv\nfrom openmc.mgxs import EnergyGroups\n\n\nif sys.version_info[0] >=...
[ [ "numpy.add.reduceat", "numpy.swapaxes", "numpy.allclose", "numpy.sqrt", "numpy.unique", "numpy.reshape", "numpy.arange", "numpy.squeeze", "numpy.nan_to_num", "numpy.tile", "numpy.atleast_1d", "numpy.atleast_2d", "numpy.repeat", "numpy.zeros", "numpy.wher...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Kyumin-Park/CRAFT-pytorch
[ "d62ad78f94f98a52cb0828bd57fb9291964d221f" ]
[ "imgproc.py" ]
[ "\"\"\" \nCopyright (c) 2019-present NAVER Corp.\nMIT License\n\"\"\"\n\n# -*- coding: utf-8 -*-\nimport numpy as np\n# from skimage import io\nimport cv2\n\n\ndef loadImage(img_file):\n # img = io.imread(img_file) # RGB order\n img = cv2.imread(img_file)\n if img.shape[0] == 2:\n img = i...
[ [ "numpy.array", "numpy.zeros", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
qzhao2018/samantha
[ "da422556d7dbf8de456c0078fc1950d686e4b559" ]
[ "tools/tensorflow/src/models/metrics_test.py" ]
[ "\nimport unittest\nimport random\nimport numpy as np\nimport tensorflow as tf\n\nfrom src.models.metrics import *\n\n\nclass MetricsTest(unittest.TestCase):\n\n def test_compute_map_metrics(self):\n graph = tf.Graph()\n with graph.as_default():\n session = tf.Session(graph=graph)\n ...
[ [ "tensorflow.Graph", "tensorflow.constant", "tensorflow.local_variables_initializer", "tensorflow.global_variables_initializer", "tensorflow.Session", "tensorflow.variable_scope" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
lightsilver/asdae
[ "c751e4124e97082aa2aee2abd8bdf6528b910da1", "c751e4124e97082aa2aee2abd8bdf6528b910da1" ]
[ "tfrecords_train.py", "MLPrec.py" ]
[ "# -*- coding: utf8 -*-\nimport tensorflow as tf\nimport sys\nimport ast\nimport os\n\nfrom utils import *\nfrom MLPclassify import *\nfrom tfrecords_SDAE import *\nfrom readData import *\nimport kmeans\n\n# SDAE网络参数\nsdae_args = {\n \"noise\" : .1, # 噪声水平0-1.0\n \"n_...
[ [ "tensorflow.Session" ], [ "tensorflow.layers.dropout", "tensorflow.placeholder", "tensorflow.constant_initializer", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", "tensorflow.variable_scope", "tensorflow.trainable_variables", "tensor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensor...
PHYST480/homeworks-elphiesk8s
[ "1d48dda80a69897bed296d52ba2dae9b7b700614" ]
[ "code/sklearn_ex1.py" ]
[ "# G. Richards 2016, based on sgd_separator.py by Jake Vanderplas\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.linear_model import SGDClassifier\nfrom sklearn.datasets.samples_generator import make_blobs\n\n# we create 50 separable points\nX, Y = make_blobs(n_samples=50, centers=2, random_st...
[ [ "numpy.array", "numpy.linspace", "matplotlib.pyplot.scatter", "sklearn.linear_model.SGDClassifier", "matplotlib.pyplot.show", "matplotlib.pyplot.contour", "matplotlib.pyplot.axis", "numpy.ndenumerate", "sklearn.datasets.samples_generator.make_blobs", "numpy.meshgrid", "...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
an-dhyun/DeepLearningStudy
[ "bf4d6d72cdf443bb66c4a408f51c2d744dc52f65" ]
[ "ch08/deep_convnet.py" ]
[ "# coding: utf-8\nimport sys, os\nsys.path.append(os.pardir) # 부모 디렉터리의 파일을 가져올 수 있도록 설정\nimport pickle\nimport numpy as np\nfrom collections import OrderedDict\nfrom common.layers import *\n\n\nclass DeepConvNet:\n \"\"\"정확도 99% 이상의 고정밀 합성곱 신경망\n\n 네트워크 구성은 아래와 같음\n conv - relu - conv- relu - pool -\...
[ [ "numpy.sqrt", "numpy.argmax", "numpy.random.randn", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]