repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
djhn75/RNAEditor
[ "5fa841400014ce18e3b6ac6789dbf08897ef45ed" ]
[ "VariantSet.py" ]
[ "'''\nCreated on 05.06.2014\n\n@author: david\n'''\nfrom Helper import Helper\nfrom collections import defaultdict, OrderedDict\nimport os\nimport operator\nfrom copy import copy\n#from exceptions import KeyError\nfrom Genome import Genome\nimport collections\nimport numpy as np\nfrom random import shuffle\nimport ...
[ [ "numpy.where", "numpy.ones", "numpy.asarray" ] ]
JBris/time_series_anomaly_detection_examples
[ "c0bb36be4d20128c3aca911dcce156f7e36ae6da" ]
[ "python/shampoo_sales/dataset.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport os\nimport pandas as pd\nfrom sklearn.preprocessing import MinMaxScaler\n\ndef load_date_series():\n dirname = os.path.dirname(os.path.realpath(__file__))\n return pd.read_csv(dirname + '/data/shampoo.csv', header=0, parse_dates=[0], index_col=0, squeeze=Tr...
[ [ "numpy.array", "pandas.concat", "pandas.DataFrame", "sklearn.preprocessing.MinMaxScaler", "pandas.Series", "pandas.read_csv" ] ]
psAI-clOps/psAI-clOps
[ "48db87c2c0e6b7b7532ff44d9f3338d4f1ed5f2f", "48db87c2c0e6b7b7532ff44d9f3338d4f1ed5f2f" ]
[ "vanilla_GAN/infer.py", "image_classifier/infer.py" ]
[ "from tensorflow.keras.models import load_model\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom PIL import Image\n\n\ndef test(gen_model_path: str, i: int):\n gen = load_model(gen_model_path)\n noise = np.random.normal(0, 1, (1, 100))\n image = np.squeeze(gen.predict(noise), axis=0)\n plt.ims...
[ [ "tensorflow.keras.models.load_model", "numpy.random.normal" ], [ "numpy.divide", "tensorflow.keras.preprocessing.image.load_img", "numpy.asarray", "tensorflow.keras.models.load_model", "numpy.argmax" ] ]
ezhan94/calibratable-style-consistency
[ "460c9a9f6e7350fc3d25f324fcc80762f33a5b16" ]
[ "scripts/check_dynamics_loss.py" ]
[ "import argparse\nimport json\nimport os\nimport math\nimport numpy as np\nimport random\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\n\n\nimport sys\nsys.path.append(sys.path[0] + '/..')\n\nfrom lib.models import get_model_class\nfrom util.datasets import load_dataset\n\n...
[ [ "matplotlib.use", "torch.cat", "matplotlib.pyplot.xlim", "numpy.median", "matplotlib.pyplot.xlabel", "torch.no_grad", "matplotlib.pyplot.title", "numpy.ones", "numpy.mean", "torch.abs", "matplotlib.ticker.PercentFormatter", "torch.utils.data.DataLoader", "matplo...
ZM-Zhou/MDE_Platform_Pytorch
[ "d86efe061bf14a6eed3352cc45e1437e46c138b1" ]
[ "_Costfunc/base_confunc.py" ]
[ "import numpy as np\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n\r\n##############################################################################\r\n# reprojection loss\r\n##############################################################################\r\ndef compute_reproj...
[ [ "torch.cat", "torch.nn.ReplicationPad2d", "torch.nn.AvgPool2d", "torch.clamp", "torch.from_numpy", "torch.abs", "torch.nn.Parameter", "torch.ones", "numpy.stack", "torch.nn.ReflectionPad2d", "torch.matmul", "torch.exp" ] ]
herenvarno/gsbn
[ "47ed0932b605d8b3cf9661f9308908364ad5892e" ]
[ "tools/plot/plot_trace_t_fp32.py" ]
[ "import os\nimport sys\nimport re\nimport glob\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import cm\nfrom google.protobuf import text_format\nsys.path.append(os.path.dirname(os.path.realpath(__file__))+\"/../../build\")\nimport gsbn_pb2\n\n# command: ./plot_trace_t.py <description> <snaps...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "numpy.zeros" ] ]
surajp92/NIROM_SST
[ "1efc2c9ec74015e95195b5039cb0dc062ce44b7b" ]
[ "post_processing.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Nov 25 17:31:32 2020\n\n@author: suraj\n\"\"\"\nimport numpy as np\n\ndata = np.load('progress_19.npz')\n\npopulation = data['population']\nfitness = data['fitness']\npopulation_old = data['population_old']\n\n#%%\ndata = np.load('results_noaa...
[ [ "numpy.load" ] ]
videodanchik/audio
[ "c22962d125e929dd8d4c171e76f5aa48baac3d49" ]
[ "torchaudio/prototype/emformer.py" ]
[ "import math\nfrom typing import List, Optional, Tuple\n\nimport torch\n\n\n__all__ = [\"Emformer\"]\n\n\ndef _lengths_to_padding_mask(lengths: torch.Tensor) -> torch.Tensor:\n batch_size = lengths.shape[0]\n max_length = int(torch.max(lengths).item())\n padding_mask = torch.arange(\n max_length, de...
[ [ "torch.nn.Linear", "torch.zeros", "torch.cat", "torch.nn.Dropout", "torch.nn.AvgPool1d", "torch.nn.LayerNorm", "torch.arange", "torch.max", "torch.nn.SiLU", "torch.nn.init.xavier_uniform_", "torch.bmm", "torch.clamp", "torch.nn.ReLU", "torch.ones", "torc...
KirillRnd/gcc-nmf
[ "2bf235e9da0d04f603b8d6d383e3c25c4dc428ff" ]
[ "gccNMF/realtime/gccNMFInterface.py" ]
[ "'''\nThe MIT License (MIT)\n\nCopyright (c) 2017 Sean UN Wood\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy,...
[ [ "numpy.max", "numpy.exp", "numpy.mean", "numpy.arange", "numpy.abs" ] ]
id9502/RLFrame
[ "a6fe99c6578e74f74767720b9212365e10f0cefd" ]
[ "examples/mcpo_rlbench.py" ]
[ "#!/usr/bin/env python3\nimport os\nimport sys\nimport torch\n\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))\n\nfrom core.logger import Logger\nfrom core.filter.zfilter import ZFilter\nfrom core.algorithm.mcpo import mcpo_step\nfrom core.agent import Agent_sync as Agent\nfrom core...
[ [ "torch.cat", "torch.sqrt", "torch.multiprocessing.set_start_method" ] ]
sehomi/pyCFTrackers
[ "4dbd550fbac78f4e7e35fdb4a1761b5b0cf9b096" ]
[ "ltr/models/target_classifier/residual_modules.py" ]
[ "import torch\nimport torch.nn as nn\nimport math\nimport ltr.models.layers.filter as filter_layer\nimport ltr.models.layers.activation as activation\nfrom ltr.models.layers.distance import DistanceMap\nfrom pytracking import TensorList\n\n\nclass LinearFilterLearnGen(nn.Module):\n def __init__(self, feat_stride...
[ [ "torch.arange", "torch.nn.Sigmoid", "torch.nn.Sequential", "torch.ones", "torch.nn.Conv2d", "torch.zeros_like", "torch.tanh", "torch.exp" ] ]
nikunjpansari/stochastic-optimization
[ "a01e95e9168dd8f87751c29f94bb382f83567e71" ]
[ "ClinicalTrials/ClinicalTrialsDriverScriptSolutionQ5.py" ]
[ "\"\"\"\nClinical Trials Driver Script class\n\nRaluca Cobzaru (c) 2018\n\n\"\"\"\n\nfrom collections import namedtuple\nimport numpy as np\nimport scipy\nimport pandas as pd\nfrom ClinicalTrialsModel import ClinicalTrialsModel\nfrom ClinicalTrialsPolicy import ClinicalTrialsPolicy\nimport matplotlib.pyplot as plt\...
[ [ "numpy.random.seed", "matplotlib.pyplot.plot", "pandas.ExcelFile", "numpy.arange", "matplotlib.pyplot.show" ] ]
aditi2795/NOPaxos
[ "c650eda207090534b34f6521ed3d420f36ba186f" ]
[ "bench/createFig8.py" ]
[ "# Arguments in order: protocol, #replicas, #threads per client, #client machines\n# EX: python ./bench/runBench.py unreplicated 5 1 1\n# To run with batching, use protocol \"batch\"\nimport sys, string\nimport subprocess\nimport os\nfrom runBench import runTest\nimport matplotlib.pyplot as plt\nfrom matplotlib.tic...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.ticker.FormatStrFormatter", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gca" ] ]
chunxiaosz/CNTK
[ "a7453ed0791ae797bcf9e8d8fbc287332a430db4" ]
[ "bindings/python/cntk/ops/tests/reshaping_test.py" ]
[ "# Copyright (c) Microsoft. All rights reserved.\n\n# Licensed under the MIT license. See LICENSE.md file in the project root\n# for full license information.\n# ==============================================================================\n\n\"\"\"\nUnit tests for reshaping operations.\n\"\"\"\n\nfrom __future__ ...
[ [ "numpy.ones_like", "numpy.array_equal", "numpy.copy", "numpy.tile", "numpy.mean", "numpy.sort", "numpy.random.random", "numpy.full", "numpy.zeros_like", "numpy.prod", "numpy.arange", "numpy.transpose", "numpy.random.randint", "numpy.expand_dims", "numpy....
sharanmayank/ShillingAttack
[ "783f135a4fcc709e7ce478c2e6f2e7e6c5ad2ace" ]
[ "Leg-UP/models/recommender/Recommender.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 2020/11/27 17:20\n# @Author : chensi\n# @File : Recommender.py\n# @Software : PyCharm\n# @Desciption : None\n\nimport os\n# os.environ[\"KMP_DUPLICATE_LIB_OK\"]=\"TRUE\"\n\n# def available_GPU():\n# import subprocess\n# import numpy as np\n# nDevice ...
[ [ "tensorflow.matmul", "tensorflow.train.AdagradOptimizer", "numpy.mean", "tensorflow.reshape", "numpy.where", "tensorflow.nn.embedding_lookup", "tensorflow.global_variables_initializer", "tensorflow.random_normal", "tensorflow.set_random_seed", "numpy.zeros_like", "tenso...
MatthewRicks/hand_eye_calibration
[ "1454db380aee79139cae185d288d7450dedf52e4" ]
[ "hand_eye_calibration/bin/tf_to_csv.py" ]
[ "#!/usr/bin/env python\nimport argparse\nimport math\nimport sys\nimport time\n\nimport numpy as np\n\nimport rosbag\nimport rospy\nimport tf\nfrom tf2_msgs.msg import TFMessage\nimport warnings\n\nimport tf.transformations as tfs\n\n\ndef write_transformation_to_csv_file(bag_file, target_frame, source_frame,\n ...
[ [ "numpy.array" ] ]
jeffdshen/oneshotNN
[ "d50be01032336a17e07b80752bbdd7a8d716b0ab" ]
[ "common.py" ]
[ "from abc import abstractmethod\nfrom abc import ABCMeta\nimport prettytensor as pt\nimport tensorflow as tf\n\n\nclass Model(metaclass=ABCMeta):\n def __init__(self, inputs, labels):\n self.inputs = inputs\n self.labels = labels\n self.model = self._make(inputs, labels)\n self.softmax = self.model.sof...
[ [ "tensorflow.train.GradientDescentOptimizer" ] ]
realfastvla/rfpipe
[ "47ae24972d8aace0d44c6be2bced8b4768e5efa2" ]
[ "tests/test_search.py" ]
[ "from __future__ import print_function, division, absolute_import, unicode_literals\nfrom builtins import bytes, dict, object, range, map, input, str\nfrom future.utils import itervalues, viewitems, iteritems, listvalues, listitems\nfrom io import open\n\nimport rfpipe, rfpipe.search\nimport pytest\nfrom astropy im...
[ [ "numpy.allclose" ] ]
leddartech/pioneer.das.api
[ "35f2c541ea8d1768d5f4612ea8d29cb2ba8345b7" ]
[ "pioneer/das/api/samples/annotations/box_3d.py" ]
[ "from pioneer.common import platform, linalg, IoU3d\nfrom pioneer.common.logging_manager import LoggingManager\nfrom pioneer.common import platform as platform_utils\nfrom pioneer.das.api import categories\nfrom pioneer.das.api.samples.sample import Sample\n\nfrom transforms3d import euler\nimport numpy as np\n\n\n...
[ [ "numpy.max", "numpy.array", "numpy.copy", "numpy.eye", "numpy.vstack" ] ]
shaolei-wang/mindspore
[ "2d50a43be9d17269f6adb41e51b8f7a540ebc9f1" ]
[ "tests/ut/python/dataset/test_random_horizontal_flip_bbox.py" ]
[ "# Copyright 2020 Huawei Technologies Co., Ltd\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...
[ [ "matplotlib.pyplot.subplot", "numpy.array", "matplotlib.pyplot.show", "matplotlib.patches.Rectangle", "matplotlib.pyplot.imshow" ] ]
tody411/PaletteSelection
[ "8e8f4192557dad7075f1539b0cfe816541bf9874" ]
[ "palette/core/palette_selection.py" ]
[ "# -*- coding: utf-8 -*-\n## @package palette.core.palette_selection\n#\n# Implementation of automatic color palette selection.\n# @author tody\n# @date 2015/08/20\n\nimport os\nimport numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\n\nfrom palette.np.norm import normVectors\n\n\n## Implementati...
[ [ "numpy.array", "numpy.zeros", "numpy.argmin", "numpy.exp", "numpy.argmax" ] ]
radovankavicky/pymaclab
[ "21da758f64ed0b62969c9289576f677e977cfd98" ]
[ "pymaclab/filters/cffilter.py" ]
[ "from pymaclab.filters._cffilter import cffilter as cff\nimport numpy as np\n\ndef cffilter(data=None,low=6,high=32,drift=True):\n if type(data) == type(np.matlib.matrix([1,2,3])) and len(data.shape) == 2:\n if data.shape[0] < data.shape[1]: data = data.__array__().T\n else: data = data.__array__()...
[ [ "numpy.matlib.matrix", "numpy.array" ] ]
dongkwonjin/Semantic-Line-DRM
[ "0f20ca85ca80bc9e7c9157932343dfad6f7fdbd5" ]
[ "Reflection_symmetry_axes_detection/DNet/code/libs/load_model.py" ]
[ "import torch\nfrom networks.detector import DNet\nfrom networks.loss import *\n\ndef load_DNet_for_test(cfg, dict_DB):\n\n if cfg.run_mode == 'test_paper':\n checkpoint = torch.load(cfg.paper_weight_dir + 'checkpoint_DNet_paper')\n else:\n # select ckpt from output_dir\n checkpoint = tor...
[ [ "torch.load", "torch.optim.lr_scheduler.MultiStepLR" ] ]
Czaki/numcodecs
[ "673b7b4f2ae5b15a624404e65fbed9704ebf6fc5" ]
[ "numcodecs/compat.py" ]
[ "# flake8: noqa\nimport sys\nimport codecs\nimport array\nfrom functools import reduce\n\nimport numpy as np\n\n\ndef ensure_ndarray(buf):\n \"\"\"Convenience function to coerce `buf` to a numpy array, if it is not already a\n numpy array.\n\n Parameters\n ----------\n buf : array-like or bytes-like\...
[ [ "numpy.array", "numpy.copyto" ] ]
dimang777/CalorieEstimator
[ "f4be77e789790785ba9394e4e66e5a18a678b0be" ]
[ "scripts/model/rf.py" ]
[ "import time\nimport pickle\nfrom sklearn.metrics import accuracy_score\nimport numpy as np\nfrom sklearn.model_selection import RandomizedSearchCV\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.ensemble import RandomForestClassifier\n\n##############################################################...
[ [ "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.RandomizedSearchCV", "sklearn.metrics.accuracy_score", "sklearn.model_selection.GridSearchCV", "numpy.linspace" ] ]
joy-rosie/ibis
[ "d5b19398f4fdbcf33e1da88d8fcf9e34c64680b7" ]
[ "ibis/impala/tests/test_udf.py" ]
[ "import unittest\nfrom decimal import Decimal\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom posixpath import join as pjoin\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.rules as rules\nimport ibis.expr.types as ir\nimport ibis.impala as ap...
[ [ "numpy.testing.assert_allclose" ] ]
LiborKudela/pipe_physics
[ "73774d3d9a2fea3f253bdc9842dd899a74c03c34" ]
[ "csv_to_modelica.py" ]
[ "import pandas as pd\nimport numpy as np\n\ndef write_lookup_function(name, x_key, y_key):\n code = f\"\"\"\nfunction {name}\n input Real x;\n output Real y;\nalgorithm\n for i in 1:size({x_key}, 1) loop\n if {x_key}[i+1] > x then\n y := {y_key}[i] + (x - {x_key}[i]) * ({y_key}[i] - {y_key}[i + 1]) / ...
[ [ "pandas.read_csv", "numpy.arange", "numpy.interp", "numpy.append" ] ]
MrtnMndt/OCDVAEContinualLearning
[ "2c5f778dc7f94ff696b923a84246a56c391a8eff" ]
[ "main.py" ]
[ "########################\n# Importing libraries\n########################\n# System libraries\nimport os\nimport random\nfrom time import gmtime, strftime\nimport numpy as np\nimport pickle\n\n# Tensorboard for PyTorch logging and visualization\nfrom torch.utils.tensorboard import SummaryWriter\n\n# Torch librarie...
[ [ "numpy.random.permutation", "numpy.load", "torch.cuda.is_available", "torch.load", "torch.utils.tensorboard.SummaryWriter", "torch.nn.DataParallel" ] ]
nikgetas/brain_parcellation_project
[ "59fa6b976b23250d111f0e2a8683152639be5051" ]
[ "HMM clustering/em.py" ]
[ "import copy\nimport distributions\nimport kmeans\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport sys\nfrom matplotlib.mlab import bivariate_normal\nfrom numpy import newaxis as nax\nfrom numpy.linalg import det, inv\n\nfrom IPython.core.debugger import Tracer\n\ndef log_likelihood(X, obs_distr, pi):\n...
[ [ "numpy.dot", "numpy.eye", "numpy.argmax", "numpy.arange", "numpy.sqrt", "numpy.vstack", "numpy.zeros", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.loadtxt", "matplotlib.mlab.bivariate_normal", "matplotlib.pyplot.contour", "matplotlib.pyplot.xla...
pozhijisi/Feature-Extraction-for-Speech-Recognition
[ "8c6fa2859e2ef6f91eb39c5b563dd25ffd02089b" ]
[ "feature_extraction_template.py" ]
[ "import tensorflow as tf\nimport wavefile\nimport numpy as np\n\nimport sys\nsys.path.append(\"./utils\")\n\nimport fft2melmx\nimport deltas\nimport extract_window\n\n\n# BLOCK: input and output files/folders\n\n\n# feature extraction arguments\nepsilon = 1e-40\n\nnum_bins = 80\n\nsamp_freq = 16000\nlow_freq = 20\n...
[ [ "numpy.empty", "tensorflow.concat", "numpy.matmul", "numpy.iinfo", "tensorflow.Session", "tensorflow.log", "numpy.fft.fft", "tensorflow.placeholder", "numpy.absolute", "tensorflow.reduce_mean", "numpy.squeeze" ] ]
Wilder-Wonka/Coloring-greyscale-images
[ "84e6ac0482fab00201055d5580e64c36c02fc876" ]
[ "GAN-version/lib/data_utils.py" ]
[ "import numpy as np\nfrom keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img\nfrom keras.preprocessing import image\nimport tensorflow as tf\nfrom keras.callbacks import TensorBoard\nfrom keras.layers import Input, Dense\nfrom keras.models import Model\nimport os\nfrom skimage...
[ [ "numpy.concatenate", "tensorflow.Summary", "numpy.array", "numpy.zeros", "numpy.ones", "numpy.fliplr" ] ]
chienerh/OverlapNet
[ "5e40476444cb0a950ff21f3343017426c6e6415e" ]
[ "src/two_heads/ImagePairOverlapFunctionAngleOrientationSequence.py" ]
[ "#!/usr/bin/env python3\n# Developed by Xieyuanli Chen and Thomas Läbe\n# This file is covered by the LICENSE file in the root of this project.\n# Brief: A generator which generates batches for keras training: Special version\nimport os\nimport random\nimport numpy as np\n\nfrom keras.utils import Sequence\n\n\ncla...
[ [ "numpy.asarray", "numpy.zeros", "numpy.load", "numpy.roll", "numpy.hstack" ] ]
eahogue/pandas
[ "201ef537dd5003f28c0f56863da9fc817b70392a" ]
[ "pandas/core/frame.py" ]
[ "# pylint: disable=E1101\n# pylint: disable=W0212,W0703,W0622\n\"\"\"\nDataFrame\n---------\nAn efficient 2D container for potentially mixed-type time series or other\nlabeled data series.\n\nSimilar to its R counterpart, data.frame, except providing automatic data\nalignment and a host of useful data manipulation ...
[ [ "pandas.core.ops.add_flex_arithmetic_methods", "pandas.compat.OrderedDict", "pandas.core.common.asarray_tuplesafe", "pandas.core.dtypes.common.is_float_dtype", "pandas.compat.lzip", "pandas.core.dtypes.cast.maybe_convert_platform", "pandas.core.common._unpickle_array", "numpy.empty...
Rumiachang/keras-examples
[ "467ac2e693930980bb21315fb33b298fff852a31" ]
[ "vgg16/test_vgg16/test_vgg16.py" ]
[ "from keras.applications.vgg16 import VGG16, preprocess_input, decode_predictions\nfrom keras.preprocessing import image\nimport numpy as np\nimport sys\n\n\"\"\"\nImageNetで学習済みのVGG16モデルを使って入力画像のクラスを予測する\n\"\"\"\n\nif len(sys.argv) != 2:\n print(\"usage: python test_vgg16.py [image file]\")\n sys.exit(1)\n\nf...
[ [ "numpy.expand_dims" ] ]
maxfrei750/fvcore
[ "4ede864f410e204ce1b40284852aa238a85f2e64" ]
[ "tests/test_common.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nimport numpy as np\nimport time\nimport unittest\n\nfrom fvcore.common.config import CfgNode\nfrom fvcore.common.history_buffer import HistoryBuffer\nfrom fvcore.common.registry import Registry\nfrom fvcore.common.ti...
[ [ "numpy.random.seed", "numpy.median", "numpy.mean", "numpy.arange", "numpy.random.randint" ] ]
ShiNik/marathon_machine_learning
[ "9320e161a2e25eb3772f6eeb3ba5a292177ec6e7" ]
[ "src/my_package/data_cleanup.py" ]
[ "import pandas as pd\nimport numpy as np\n\ndef distance_calculation (df):\n df['Time'] = pd.to_datetime(df['Time'])\n df['Pace'] = pd.to_datetime(df['Pace'])\n time = pd.to_timedelta(df['Time'].dt.strftime(\"%H:%M:%S\")).dt.total_seconds().astype(int).to_numpy()\n # convert %H:%M to %M:%S by dividing b...
[ [ "pandas.to_datetime" ] ]
vijayphugat/Practice
[ "7d8560d62a5d6bfa9488526da318973295a25255", "7d8560d62a5d6bfa9488526da318973295a25255" ]
[ "healthcareai/common/table_archiver.py", "healthcareai/tests/test_cardinality_checks.py" ]
[ "import time\r\nimport datetime\r\nimport pandas as pd\r\n\r\nfrom healthcareai.common.healthcareai_error import HealthcareAIError\r\n\r\n\r\ndef table_archiver(server, database, source_table, destination_table, timestamp_column_name='ArchivedDTS'):\r\n \"\"\"\r\n Takes a table and archives a complete copy of...
[ [ "pandas.read_sql_table" ], [ "pandas.DataFrame" ] ]
ms802x/CarND-Capstone
[ "efd6606090b2395cb49f71b0eb53393f859a5e39" ]
[ "ros/src/tl_detector/tl_detector.py" ]
[ "#!/usr/bin/env python\nimport rospy\nfrom std_msgs.msg import Int32\nfrom geometry_msgs.msg import PoseStamped, Pose\nfrom styx_msgs.msg import TrafficLightArray, TrafficLight\nfrom styx_msgs.msg import Lane\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge\nfrom light_classification.tl_classifier...
[ [ "scipy.spatial.KDTree" ] ]
SeanSyue/TensorflowReferences
[ "2c93f4c770e2713ef4769f287e022d03e7097188" ]
[ "MorvanZhou/tf19_saver.py" ]
[ "from __future__ import print_function\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\n# # Save to file\r\n# # remember to define the same dtype and shape when restore\r\n# W = tf.Variable([[1,2,3],[3,4,5]], dtype=tf.float32, name='weights')\r\n# b = tf.Variable([[1,2,3]], dtype=tf.float32, name='biases')\r...
[ [ "numpy.arange", "tensorflow.Session", "tensorflow.train.Saver" ] ]
loaywael/ObjectDetection
[ "9006cfdb2284a83426510a70c894824b27f40566" ]
[ "2D_ObjectDetectors/yolov1/network/test/test_loss.py" ]
[ "from network.loss import YoloLoss\nfrom unittest import TestCase\nimport numpy as np\nimport torch\n\nfrom network.dataset import VOCDataset\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nimport os \n\n\ntorch.manual_seed(13)\nDATA_DIR = \"data/pascal_voc_yolo/\"\nIMG_DIR = DATA_DIR+\"imag...
[ [ "torch.manual_seed", "torch.set_printoptions", "torch.zeros" ] ]
AmolShahh/examples
[ "9321bae747548a70d9667752a5334e5330b1ce49", "9321bae747548a70d9667752a5334e5330b1ce49" ]
[ "tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/efficientdet_keras.py", "lite/examples/pose_estimation/raspberry_pi/visualizer.py" ]
[ "# Copyright 2020 Google Research. 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...
[ [ "tensorflow.zeros_initializer", "tensorflow.concat", "numpy.log", "tensorflow.keras.layers.AveragePooling2D", "tensorflow.initializers.variance_scaling", "tensorflow.vectorized_map", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras....
LazyBanker/robinhood-resiliant-trader
[ "551026f1e25610e5b0efb66438fabcb10101ab18" ]
[ "app.py" ]
[ "from flask import Flask, request, render_template, session, flash, redirect, \\\n url_for, jsonify, make_response\n\n\n\napp = Flask(__name__)\n\n@app.route('/')\ndef index():\n import datetime\n import io\n import random\n\n from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanva...
[ [ "matplotlib.figure.Figure", "matplotlib.dates.DateFormatter", "matplotlib.backends.backend_agg.FigureCanvasAgg" ] ]
BoPang1996/Semi-Coupled-Structure-for-visual-sequental-tasks
[ "c6fe7c77d08928bb30cc8683123f978b0e877394" ]
[ "src/network.py" ]
[ "import torch\nimport torch.nn as nn\nimport numpy as np\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nfrom sync_batchnorm import SynchronizedBatchNorm2d\nimport random\n\n\nclass SCS(nn.Module):\n def __init__(self, batch_norm, num_action, dropout, q, test_scheme=1, img_size=112, syn_bn...
[ [ "torch.nn.LogSoftmax", "torch.sigmoid", "torch.nn.Dropout", "torch.cat", "torch.zeros", "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.nn.Sigmoid", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.functional.relu", "torch.nn.init.xavier...
sahilparekh/imgclsmob
[ "74d52457b4bf00c82d063b3f4a1a73fb6ba3863a", "74d52457b4bf00c82d063b3f4a1a73fb6ba3863a", "74d52457b4bf00c82d063b3f4a1a73fb6ba3863a" ]
[ "tensorflow2/tf2cv/models/wrn.py", "pytorch/pytorchcv/models/others/oth_regnet.py", "tensorflow2/tf2cv/models/proxylessnas.py" ]
[ "\"\"\"\n WRN for ImageNet-1K, implemented in TensorFlow.\n Original paper: 'Wide Residual Networks,' https://arxiv.org/abs/1605.07146.\n\"\"\"\n\n__all__ = ['WRN', 'wrn50_2']\n\nimport os\nimport tensorflow as tf\nimport tensorflow.keras.layers as nn\nfrom .common import Conv2d, MaxPool2d, flatten, is_channe...
[ [ "tensorflow.keras.layers.AveragePooling2D", "tensorflow.keras.layers.Dense", "tensorflow.keras.Sequential", "tensorflow.keras.backend.get_value", "tensorflow.keras.layers.ReLU" ], [ "numpy.divide", "torch.nn.Identity", "numpy.log", "torch.nn.init.kaiming_normal_", "torc...
GT-ZhangAcer/iann
[ "b5640c4909ea7fbd3f88c4d4245c2b49d7ea0b89" ]
[ "eiseg/controller.py" ]
[ "import time\nimport json\nimport paddle\nimport cv2\nimport numpy as np\nimport paddleseg.transforms as T\nfrom skimage.measure import label\n\nfrom inference import clicker\nfrom inference.predictor import get_predictor\nimport util\nfrom util.vis import draw_with_blend_and_clicks\nfrom util import MODELS, LabelL...
[ [ "numpy.bincount", "numpy.array", "numpy.zeros_like", "numpy.zeros" ] ]
dkamotsky/addons
[ "56ff850785c6caa8c18c2859e32a32c8902defea" ]
[ "tensorflow_addons/seq2seq/tests/beam_search_ops_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.ones_like", "tensorflow.test.is_gpu_available", "numpy.where", "numpy.random.randint", "numpy.transpose", "tensorflow.device", "numpy.squeeze" ] ]
Progitiel/Slideways
[ "64b8672860893eea6be245b5138f5ec48e97ed8c" ]
[ "src/App.py" ]
[ "import copy\nimport os\nimport random\nimport time\nimport numpy as np\n\nfrom Config import *\nfrom Record import Record\nfrom AI import AI\n\n\ndef valid_input_case(board, currentPlayerNumber, last_play, prev_boards, line, column):\n \"\"\"\n Vérifie si les données sont correctes selon les règles du jeu po...
[ [ "numpy.rot90", "numpy.roll", "numpy.shape", "numpy.diagonal", "numpy.flipud" ] ]
xvalad/ML
[ "baf71a32fe5c5cf8e9f79a7ec46f59b878f87965" ]
[ "LinearRegressionWithSyntheticData.py" ]
[ "#!/usr/bin/python3\n# LinearRegressionWIthSyntheticData by Google\n# https://colab.research.google.com/github/google/eng-edu/blob/master/ml/cc/exercises/linear_regression_with_synthetic_data.ipynb\n#\nimport pandas as pd \nimport tensorflow as tf\nfrom matplotlib import pyplot as plt\n#\n## DEFINE FUNCTIONS THAT B...
[ [ "pandas.DataFrame", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "tensorflow.keras.layers.Dense", "tensorflow.keras.metrics.RootMeanSquaredError", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "tensorf...
vigilancetrent/chatbot-advanced
[ "2e0c72c4df2e1434da995b7105f8f0414aba6248" ]
[ "TTS/utils/data.py" ]
[ "import numpy as np\n\n\ndef _pad_data(x, length):\n _pad = 0\n assert x.ndim == 1\n return np.pad(\n x, (0, length - x.shape[0]), mode='constant', constant_values=_pad)\n\n\ndef prepare_data(inputs):\n max_len = max((len(x) for x in inputs))\n return np.stack([_pad_data(x, max_len) for x in i...
[ [ "numpy.pad" ] ]
delosrogers/clustergrammer-web
[ "14102cfca328214d3bc8285e8331663fe0e5fad4" ]
[ "clustergrammer/upload_pages/clustergrammer/load_data.py" ]
[ "def load_file(net, filename):\n import StringIO\n f = open(filename, 'r')\n buff = StringIO.StringIO(f.read())\n f.close()\n net.load_tsv_to_net(buff)\n\ndef load_tsv_to_net(net, file_buffer):\n import pandas as pd\n import categories\n\n lines = file_buffer.getvalue().split('\\n')\n num_labels = categori...
[ [ "pandas.read_table" ] ]
seo-inyoung/tensorflow
[ "e5dfc3bc38696060922b4d8a04d6e773467b9f08" ]
[ "tensorflow/lite/python/lite_test.py" ]
[ "# Lint as: python2, python3\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 License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/...
[ [ "tensorflow.python.ops.variables.Variable", "tensorflow.python.ops.nn_ops.top_k", "tensorflow.python.ops.variable_scope.get_variable", "tensorflow.python.ops.math_ops.matmul", "tensorflow.python.ops.array_ops.ones", "tensorflow.lite.python.convert.mlir_quantize", "tensorflow.python.ker...
yDon96/pepper_assistant
[ "cc079e9c6e93afae513625ee4803e3c5c75ce5b6" ]
[ "src/utils/utils.py" ]
[ "import numpy as np\n\ndef batch_cosine_similarity(x1, x2):\n '''\n x1,x2 must be l2 normalized\n '''\n\n # https://en.wikipedia.org/wiki/Cosine_similarity\n # 1 = equal direction ; -1 = opposite direction\n mul = np.multiply(x1, x2)\n s = np.sum(mul, axis=1)\n\n # l1 = np.sum(np.multipl...
[ [ "numpy.max", "numpy.array", "numpy.sum", "numpy.min", "numpy.mean", "numpy.multiply", "numpy.argmax" ] ]
MandoGuardado/2022-01-04-Python
[ "abceb619c1fad9c55e6023b57fbb35d9a8f0e640" ]
[ "pandas_23/pandabear03.py" ]
[ "#!/usr/bin/python3\n\nimport pandas as pd\n\n\ndef main():\n # create a dataframe ciscocsv\n ciscocsv = pd.read_csv(\"ciscodata.csv\")\n # create a dataframe ciscojson\n ciscojson = pd.read_json(\"ciscodata2.json\")\n\n # The line below concats and reapplies the index value\n ciscodf = pd.concat(...
[ [ "pandas.read_csv", "pandas.read_json", "pandas.concat" ] ]
thabbott/RRTMG_SW
[ "1a3fb6a9aac3d602280e6979a1791a7e54cf3916" ]
[ "python/test.py" ]
[ "import rrtmg_sw_wrapper as sw\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Constants\ncp = 1e3\ng = 9.80\nLv = 2.5e6\nRv = 460e0\nRd = 287e0\ne0 = 610e0\nT0 = 273e0\nMair = 29e0\nMh2o = 18e0\nMco2 = 44e0\nh = 6.626e-34\nkB = 1.381e-23\nc = 3.00e8\nNUM_BANDS = 14\nNUM_AER = 6\n\n\n# Atmospheric profile...
[ [ "numpy.array", "numpy.zeros", "matplotlib.pyplot.savefig", "numpy.sum", "numpy.exp", "matplotlib.pyplot.subplots", "matplotlib.pyplot.rc", "numpy.stack", "numpy.argsort", "matplotlib.pyplot.show", "numpy.linspace" ] ]
ItzBraveNoob/sports-betting
[ "521d4ef6bd0e079d508f40609681124edc2c6805" ]
[ "sportsbet/datasets/_soccer/_dummy.py" ]
[ "\"\"\"\nDataloder for dummy data.\n\"\"\"\n\n# Author: Georgios Douzas <gdouzas@icloud.com>\n# License: MIT\n\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import ParameterGrid\n\nfrom sportsbet.datasets._base import _BaseDataLoader\n\n\nclass DummySoccerDa...
[ [ "sklearn.model_selection.ParameterGrid", "pandas.Timestamp", "pandas.to_timedelta" ] ]
bruceli-rw0/edge2pic-generation
[ "e9ee6f89361d1a12b044c0ab665a09fca4a47089", "e9ee6f89361d1a12b044c0ab665a09fca4a47089" ]
[ "generator/models/networksHD.py", "generator/util/visualizer.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom .helper import *\n\n###############################################################################\n# Functions\n###############################################################################\ndef define_G(\n in...
[ [ "numpy.ceil", "torch.nn.Dropout", "torch.nn.MSELoss", "torch.nn.ReplicationPad2d", "torch.nn.Sequential", "torch.nn.AvgPool2d", "torch.nn.Tanh", "torch.autograd.Variable", "torch.nn.ConvTranspose2d", "torch.nn.LeakyReLU", "torch.nn.Sigmoid", "torch.nn.L1Loss", "...
ggapp1/microinfl-instagram
[ "e3fefbc09f9ee1bc5010618ccae647e4d763f503" ]
[ "models/dataset.py" ]
[ "from torch.utils.data import Dataset, DataLoader, SubsetRandomSampler\nimport numpy as np\nimport networkx as nx\nimport random\nimport pickle as pk\nimport torch\nimport torch.nn.functional as F\n\n\nclass Node:\n\tdef __init__(self, node, embedding, features, walk):\n\t\tself.node = node\n\t\tself.embedding = em...
[ [ "numpy.concatenate", "numpy.random.shuffle", "torch.utils.data.SubsetRandomSampler", "torch.tensor", "torch.utils.data.DataLoader", "numpy.floor" ] ]
ShaikAsifullah/distributed-tellurium
[ "007e9b3842b614edd34908c001119c6da1d41897" ]
[ "tellurium/tests/test_examples.py" ]
[ "\"\"\"\nUnittests for examples.\nAll examples are executed to check against latest code base.\n\"\"\"\nfrom __future__ import print_function, division\nimport unittest\n\nimport os\nimport imp\nfrom helpers import filesInDirectory\n\n# ----------------------------------------------------------------\n# List of pyt...
[ [ "matplotlib.pyplot.switch_backend" ] ]
detecttechnologies/datumaro
[ "a00a4ec6807787d341c71f75f5e337c3cb7be119" ]
[ "tests/test_image_dir_format.py" ]
[ "import numpy as np\n\nfrom unittest import TestCase\n\nfrom datumaro.components.project import Dataset\nfrom datumaro.components.extractor import DatasetItem\nfrom datumaro.plugins.image_dir import ImageDirConverter\nfrom datumaro.util.test_utils import TestDir, test_save_and_load\n\n\nclass ImageDirFormatTest(Tes...
[ [ "numpy.ones" ] ]
crb479/mcdevitt-trauma-ml
[ "9ed7ed7cd1e4be0071a18f9bbf375414088d5ed2", "9ed7ed7cd1e4be0071a18f9bbf375414088d5ed2" ]
[ "mtml/modeling/vte/mixed_models.py", "PubMed/pubmed_movePDF.py" ]
[ "__doc__ = \"\"\"Training routines containing mixed classifier types.\n\n.. note::\n\n This file has the potential to get cluttered like the\n :mod:`mtml.modeling._vte_models` module that is now deprecated.\n\nMixed classifier training.\n\"\"\"\n\n# pylint: disable=import-error\nimport numpy as np\nimport panda...
[ [ "sklearn.ensemble.BaggingClassifier", "sklearn.preprocessing.StandardScaler", "sklearn.ensemble.RandomForestClassifier", "pandas.DataFrame", "sklearn.metrics.precision_score", "sklearn.svm.SVC", "sklearn.metrics.accuracy_score", "sklearn.linear_model.LogisticRegression", "panda...
johndpope/ext3DLBP
[ "0704ae6a9dda7e74f1f52b45acd71d1b6f622efd" ]
[ "python_wrapper/test_functional/test_RD_LBP_P252g_R3.py" ]
[ "'''\r\n=========================================================================\r\nAuthor: Leonardo Citraro\r\nCompany:\r\nFilename: \r\nLast modifed: 06.04.2017 by Leonardo Citraro\r\nDescription: Functional test\r\n\r\n=========================================================================\r\n\r\n=======...
[ [ "numpy.array" ] ]
rfcx/audio-feature-visuals
[ "b2a0ce2e38b477647142c63e008eca3e4e08af7b" ]
[ "datavis/audio_io.py" ]
[ "import os\nimport re\nimport glob\nimport logging\nimport pandas as pd\nfrom io import StringIO\nfrom typing import Generator, Tuple\nfrom joblib import Parallel, delayed\nfrom datetime import datetime\nfrom pathlib import Path, PosixPath\n\n\nclass AudioIOException(Exception):\n pass\n\n\ndef get_all_waves_gen...
[ [ "pandas.to_datetime", "pandas.date_range", "pandas.read_csv" ] ]
marx1992620/cnn_keras_filtercars
[ "415eb629069d13f7e2c661bf6f6d7fb5a96e16de" ]
[ "CnnModel_identifyCar_pred.py" ]
[ "# --coding:utf-8--\n\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.preprocessing import image\nfrom keras.models import load_model\nimport numpy as np\nfrom PIL import Image\nimport matplotlib.pyplot as plt\n\ntrain_dir = r'E:\\car_pic\\training_in_out'\nvalidation_dir = r'E:\\car_pic\\vali...
[ [ "numpy.asarray", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.expand_dims", "matplotlib.pyplot.show", "matplotlib.pyplot.axis", "matplotlib.pyplot.imshow" ] ]
tzmhuang/chess-nn
[ "ecd2188063155544dc7759e72602df9a8bcf76c1", "ecd2188063155544dc7759e72602df9a8bcf76c1" ]
[ "preprocess/combine_data.py", "models/evl_NN_Adam.py" ]
[ "import numpy as np\nimport pandas as pd\n\n\ndef file_combine(start,finish):\n combine_df = pd.DataFrame()\n for i in range(start,finish,500):\n temp = pd.read_csv(\"~/Desktop/Chess/data/train_data{}\".format(i), index_col = 0)\n combine_df = combine_df.append(temp, ignore_index=True)\n ...
[ [ "numpy.concatenate", "pandas.DataFrame", "pandas.read_csv", "numpy.empty" ], [ "tensorflow.reduce_min", "numpy.random.choice", "tensorflow.matmul", "tensorflow.sqrt", "tensorflow.nn.softmax", "tensorflow.global_variables_initializer", "numpy.concatenate", "tenso...
Sivatejareddyseelam/spark_cnn
[ "f25a79a4d00bf03c7e94e29e78e669271e024120" ]
[ "naive_test.py" ]
[ "# test the performance of learnt CNN on its corresponding training data\nimport sys\nimport numpy as np\nfrom spark.utils import *\nfrom spark.cnn import CNN\nfrom time import time\n\ndef test(size):\n print('Testing naive CNN for %d testing images' % (size))\n start = time()\n cnn = CNN(0)\n X, Y = lo...
[ [ "numpy.concatenate", "numpy.argmax" ] ]
krzysztoffiok/twitter_sentiment_to_usnavy
[ "673e01336242348d9aa79e6e9b3385222bcd62d7", "673e01336242348d9aa79e6e9b3385222bcd62d7" ]
[ "roberta_mbs_optim/usnavy_tweet_sentiment_sh.py", "semeval_data_splitter.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn.metrics import classification_report\nfrom sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier\nfrom sklearn.naive_bayes import BernoulliNB, GaussianNB\nimport sklearn\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.model_sel...
[ [ "numpy.random.seed", "matplotlib.pyplot.savefig", "pandas.read_excel", "sklearn.ensemble.RandomForestClassifier", "pandas.DataFrame", "pandas.concat", "sklearn.model_selection.KFold" ], [ "numpy.random.seed", "sklearn.model_selection.KFold" ] ]
kflu/benchmark
[ "4bf35cf7034a5319d402fa046558cb1a8c6d1a11" ]
[ "run.py" ]
[ "\"\"\"\nA lightweight runner that just sets up a model and runs one of its functions in a particular configuration.\n\nIntended for debugging/exploration/profiling use cases, where the test/measurement harness is overhead.\n\nDANGER: make sure to `python install.py` first or otherwise make sure the benchmark you a...
[ [ "torch.profiler.tensorboard_trace_handler", "torch.cuda.synchronize", "torch.cuda.Event", "torch.cuda.stream", "torch.profiler.schedule", "torch.cuda.Stream" ] ]
tommccoy1/tpdn
[ "a4ea54030056a49e5fd00a700eb71790157bc697" ]
[ "binding_operations.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch import optim\nimport torch.nn.functional as F\n\nimport numpy as np\nimport pickle\n\n# Defines various functions for binding fillers and roles\n\n# Defines the tensor product, used in tensor product representations\nclass SumFlat...
[ [ "torch.cat", "torch.sum" ] ]
KCL-BMEIS/ExeTeraEval
[ "c6ef1485aff08fba17cd328a76fcc398c757255d" ]
[ "exeteraeval/execute_hdf_pandas_t_to_p_join_scenario.py" ]
[ "import resource\nimport sys\nimport time\nimport numpy as np\nimport pandas as pd\n\n\ndef go(l_filename, r_filename):\n\n t0 = time.time()\n l_df = pd.read_hdf(l_filename)\n left_read = time.time() - t0\n print(\"left dataframe read in {}\".format(left_read))\n\n t0 = time.time()\n r_df = pd.read_hdf(r_file...
[ [ "pandas.read_hdf", "pandas.merge" ] ]
VITA-Group/CV_A-FAN
[ "d5cc54bfea4636868b192ac2a628ac74446db88f", "d5cc54bfea4636868b192ac2a628ac74446db88f", "d5cc54bfea4636868b192ac2a628ac74446db88f" ]
[ "Classification/attack_algo.py", "Detection/py/train_aug_final_muti_advtrain.py", "Segmentation/main_advtrain.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nfrom torch.autograd import Variable\r\nimport torch.nn.functional as F\r\n\r\nimport pdb\r\nimport numpy as np\r\n\r\ndef tensor_clamp(t, min, max, in_place=True):\r\n if not in_place:\r\n res = t.clone()\r\n else:\r\n res = t\r\n idx = res.data < min...
[ [ "torch.autograd.grad", "torch.rand", "torch.sign" ], [ "torch.cuda.device_count" ], [ "numpy.concatenate", "torch.device", "torch.optim.lr_scheduler.StepLR", "numpy.random.seed", "torch.nn.CrossEntropyLoss", "torch.manual_seed", "torch.cuda.is_available", "t...
mcps5601/TimeGAN-tensorflow2
[ "6f68f9ae9d9eb6f7f9e0992a5dde75c697fc0655", "6f68f9ae9d9eb6f7f9e0992a5dde75c697fc0655" ]
[ "hider/timegan/modules/model_utils.py", "data/data_preprocess.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom .layer_norm_module import LSTMLNCell, LSTMLN\nimport json\n\n\ndef train_test_divide(data_x, data_x_hat, data_t, data_t_hat, train_rate = 0.8):\n \"\"\"Divide train and test data for both original and synthetic data.\n Args:\n data_x: original_data\n ...
[ [ "numpy.max", "tensorflow.convert_to_tensor", "tensorflow.keras.layers.GRUCell", "numpy.zeros", "numpy.random.permutation", "numpy.min", "numpy.random.uniform", "tensorflow.keras.layers.GRU", "tensorflow.keras.layers.LSTMCell", "tensorflow.keras.layers.LSTM", "tensorflow...
jbschroder/pymgrit
[ "5c866c633dea3ebccf812550e0303f47771c4faf" ]
[ "src/pymgrit/heat/vector_heat_1d_2pts.py" ]
[ "\"\"\"\nVector class for 1D heat problem\n\nNote: values at two consecutive time points are grouped as pairs\n\"\"\"\n\nimport numpy as np\n\nfrom pymgrit.core.vector import Vector\n\n\nclass VectorHeat1D2Pts(Vector):\n \"\"\"\n Vector class for grouping values at two consecutive time points\n \"\"\"\n\n ...
[ [ "numpy.array", "numpy.random.rand", "numpy.zeros", "numpy.append" ] ]
jasongwq/MTCNN
[ "168d346461fd7e7c59e4f911296cfa6133dc2ea5" ]
[ "train/jfda/detector.py" ]
[ "# pylint: disable=bad-indentation, no-member, invalid-name, line-too-long\nimport math\nimport cv2\nimport caffe\nimport numpy as np\nfrom utils import crop_face, Timer\n\n\nclass JfdaDetector:\n '''JfdaDetector\n '''\n\n def __init__(self, nets):\n assert len(nets) in [2, 4, 6, 8], 'wrong number of nets'\n ...
[ [ "numpy.zeros", "numpy.minimum", "numpy.logical_and", "numpy.where", "numpy.vstack", "numpy.maximum" ] ]
leon1330/Tensorflow
[ "b9f548d041ba8d66102c6d195e645051f1bee52f" ]
[ "tensorflow/python/framework/test_util.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.core.protobuf.config_pb2.ConfigProto", "numpy.testing.assert_allclose", "tensorflow.python.eager.context.graph_mode", "tensorflow.python.platform.googletest.GetTempDir", "tensorflow.python.util.protobuf.compare.ProtoEq", "tensorflow.python.framework.ops._default_graph_stack.res...
lkeegan/spikeinterface
[ "237cc6f6119a5365be1d9e1c235d8410ceb482d3" ]
[ "spikeinterface/sortingcomponents/motion_correction.py" ]
[ "import numpy as np\nimport scipy.interpolate\n\nfrom tqdm import tqdm\n\n\ndef correct_motion_on_peaks(peaks, peak_locations, times,\n motion, temporal_bins, spatial_bins,\n direction='y', progress_bar=False):\n \"\"\"\n Given the output of estimate_motion() apply inverse motion on peak locatio...
[ [ "numpy.searchsorted", "numpy.diff" ] ]
overlordmax/PaddleRec
[ "b4d6ac77450d98a935c6a5d0eba6abbb21b9d06a" ]
[ "core/metrics/precision_recall.py" ]
[ "# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.array" ] ]
Seifar/ChitAnalysis
[ "9444dce96954c546333d5aecc92a06c3bfd19aa5" ]
[ "venv/lib/python3.6/site-packages/numpy/core/numerictypes.py" ]
[ "\"\"\"\nnumerictypes: Define the numeric type objects\n\nThis module is designed so \"from numerictypes import \\\\*\" is safe.\nExported symbols include:\n\n Dictionary with all registered number types (including aliases):\n typeDict\n\n Type objects (not all will be available, depends on platform):\n s...
[ [ "numpy.core.multiarray.empty", "numpy.core.multiarray.dtype", "numpy.core.multiarray.array", "numpy.core.multiarray.typeinfo.items" ] ]
tongni1975/tf-explain
[ "1d13fbac19389630f4d25473fda10687635dcd6a" ]
[ "tests/callbacks/test_grad_cam.py" ]
[ "import numpy as np\nfrom tf_explain.callbacks.grad_cam import GradCAMCallback\n\n\ndef test_should_call_grad_cam_callback(\n random_data, convolutional_model, output_dir, mocker\n):\n mock_explainer = mocker.MagicMock(explain=mocker.MagicMock(return_value=0))\n mocker.patch(\"tf_explain.callbacks.grad_cam...
[ [ "numpy.array" ] ]
wgcban/spin_roadmapper
[ "2c1c8f22073d989753dc6f95d1f547198a76414b" ]
[ "model/unet.py" ]
[ "import torch\nimport torchvision\nfrom torch import nn\nfrom torchvision.utils import save_image\nimport torch.nn.functional as F\n\nclass unet(nn.Module):\n def __init__(self, in_channels=3, num_classes=2):\n super(unet, self).__init__()\n \n self.encoder1 = nn.Conv2d(in_channels, 32, 3, s...
[ [ "torch.nn.Conv2d", "torch.add", "torch.nn.Softmax" ] ]
Daiver/np_draw_tools
[ "091f09aba090263aee29b941b91bb7c96600018f" ]
[ "examples/grid_example.py" ]
[ "import numpy as np\nimport cv2\nimport np_draw_tools\n\n\ndef main():\n img1 = np.zeros((256, 128, 3), dtype=np.uint8)\n img2 = np.zeros((256, 128, 3), dtype=np.uint8)\n img3 = np.zeros((256, 128, 3), dtype=np.uint8)\n\n cv2.circle(img1, (64, 40), radius=10, color=(0, 255, 0), thickness=-1)\n\n img2...
[ [ "numpy.zeros" ] ]
SaVoAMP/stumpy
[ "d63963caaf6a8b64448953f638c1d3345e05a36a" ]
[ "tests/test_gpu_mpdist.py" ]
[ "import numpy as np\nimport numpy.testing as npt\nfrom stumpy import gpu_mpdist, config\nfrom numba import cuda\n\ntry:\n from numba.errors import NumbaPerformanceWarning\nexcept ModuleNotFoundError:\n from numba.core.errors import NumbaPerformanceWarning\nimport pytest\nimport naive\n\nconfig.THREADS_PER_BLO...
[ [ "numpy.testing.assert_almost_equal", "numpy.array", "numpy.random.uniform" ] ]
ashiqimran/CNTK
[ "22c7c3cbf95f5bcb239d3d956f08efdf43253ab2" ]
[ "bindings/python/cntk/tests/onnx_op_test.py" ]
[ "# Copyright (c) Microsoft. All rights reserved.\n# Licensed under the MIT license. See LICENSE.md file in the project root\n# for full license information.\n# ==============================================================================\n\nimport os\nimport numpy as np\nimport cntk as C\nimport pytest\nonnx = pyt...
[ [ "numpy.array", "numpy.random.standard_normal", "numpy.random.rand", "numpy.asarray", "numpy.random.seed", "numpy.ones", "numpy.tile", "numpy.random.randn", "numpy.shape", "numpy.allclose", "numpy.random.uniform", "numpy.arange", "numpy.prod" ] ]
RaphaelaHeil/strikethrough-removal-cyclegans
[ "91555b22cac6b6a379597aa94c23bdf02c9970a7" ]
[ "strikethrough_identification/src/utils.py" ]
[ "\"\"\"\nUtility module.\n\"\"\"\nfrom math import ceil\n\nimport torch\nfrom PIL import Image, ImageOps\nfrom torchvision import models\nfrom torchvision.transforms import Resize, Grayscale, ToTensor, Compose\n\nfrom .configuration import Configuration, ModelName\n\n\nclass PadToSize:\n \"\"\"\n Custom trans...
[ [ "torch.nn.Conv2d" ] ]
dgrechka/bengaliai-cv19
[ "9ef15c5b140628337ae6efe0d76e7ec5d291dc17" ]
[ "code/dgrechka/train_mobileNetV2_bottleneck.py" ]
[ "import tensorflow as tf\n\nimport sys\nimport os\nsys.path.append(os.path.join(__file__,'..','..'))\n\nfrom tfDataIngest import tfDataSetParquet as tfDsParquet\nfrom tfDataIngest import tfDataSetParquetAnnotateTrain as tfDsParquetAnnotation\nimport os\nimport pandas as pd\nfrom tqdm import tqdm\nfrom glob import g...
[ [ "tensorflow.image.resize", "tensorflow.zeros", "tensorflow.keras.callbacks.TerminateOnNaN", "tensorflow.expand_dims", "tensorflow.random.set_seed", "tensorflow.math.reduce_sum", "tensorflow.keras.losses.categorical_crossentropy", "tensorflow.one_hot", "tensorflow.reshape", ...
usertianqin/X2Paddle
[ "b554a8094ca3e255ef4bd2e80337222a35625133" ]
[ "x2paddle/project_convertor/pytorch/torch2paddle/vision_transforms.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "numpy.array", "numpy.expand_dims" ] ]
huhuzwxy/keras_classfication
[ "0a2c801f210141e447ef3c5346ce44e2e33125bb" ]
[ "data_gen_label.py" ]
[ "# -*- coding: utf-8 -*-\nimport codecs\nimport math\nimport os\nimport random\nfrom glob import glob\n\nimport keras\nimport numpy as np\nfrom PIL import Image\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.utils import np_utils, Sequence\nfrom sklearn.model_selection import train_test_split...
[ [ "sklearn.model_selection.train_test_split", "numpy.full", "numpy.array", "numpy.random.shuffle" ] ]
mt-edwards/classy-text
[ "5d33f935e4879f4649d08d927d8428a3cec11a29" ]
[ "classy_text/train_ngram_model.py" ]
[ "\"\"\"Module to train n-gram model.\n\nVectorizes training and validation texts into n-grams and uses that for\ntraining a n-gram model - a simple multi-layer perceptron model. We use n-gram\nmodel for text classification when the ratio of number of samples to number of\nwords per sample for the given dataset is v...
[ [ "tensorflow.keras.optimizers.Adam", "tensorflow.keras.callbacks.EarlyStopping" ] ]
HarrySpearing/GPflow
[ "02cd9000f72f4302f24a9fa1b28237f86140e04e", "02cd9000f72f4302f24a9fa1b28237f86140e04e" ]
[ "tests/gpflow/conditionals/test_multioutput.py", "tests/gpflow/quadrature/test_quadrature_equivalence.py" ]
[ "import numpy as np\nimport pytest\nimport scipy\nimport tensorflow as tf\n\nimport gpflow\nimport gpflow.inducing_variables.multioutput as mf\nimport gpflow.kernels.multioutput as mk\nfrom gpflow import set_trainable\nfrom gpflow.conditionals import sample_conditional\nfrom gpflow.conditionals.util import (\n f...
[ [ "numpy.testing.assert_allclose", "tensorflow.debugging.assert_shapes", "tensorflow.ones", "tensorflow.reshape", "numpy.mean", "numpy.cos", "numpy.sin", "scipy.linalg.block_diag", "tensorflow.transpose", "numpy.eye", "numpy.testing.assert_array_almost_equal", "numpy....
nldias/chapel
[ "3a63044cd50b639dca8e851d4a505546b57bc299" ]
[ "third-party/llvm/llvm-src/tools/clang/utils/analyzer/CmpRuns.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nCmpRuns - A simple tool for comparing two static analyzer runs to determine\nwhich reports have been added, removed, or changed.\n\nThis is designed to support automated testing using the static analyzer, from\ntwo perspectives:\n 1. To monitor changes in the static analyzer's rep...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.hist" ] ]
sx-zhang/HOZ
[ "7be117f078a34c6f97ea6c64f60d7df7b47bef49" ]
[ "models/hoztpn.py" ]
[ "from __future__ import division\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torchvision.models as models\r\nfrom utils.model_util import norm_col_init, weights_init\r\n\r\nfrom .model_io import ModelOutput\r\n\r\nimport scipy.sparse as sp\r\nimport numpy as np\r\nimpor...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.LSTM", "numpy.min", "torch.squeeze", "torch.topk", "numpy.max", "torch.mul", "torch.nn.LayerNorm", "scipy.sparse.diags", "numpy.log", "torch.nn.MaxPool2d", "torch.nn.Softmax", "torch.nn.functional.pairwise_distance",...
nkgwer/tensorflow
[ "60028072a1c3b4376e145b6fea8e4ccd3324377f" ]
[ "tensorflow/python/training/tracking/tracking_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.training.tracking.tracking.AutoTrackable", "tensorflow.python.training.tracking.util.list_objects", "tensorflow.python.training.tracking.util.Checkpoint", "numpy.zeros", "tensorflow.python.training.tracking.tracking.resource_tracker_scope", "tensorflow.python.training.tr...
Mickey253/spherical-mds
[ "5c96f5ec0273233ac81adcd90a39ec35cfc83557" ]
[ "experiments.py" ]
[ "import numpy as np\nimport graph_tool.all as gt\nfrom graph_functions import apsp,sphere_stress, distortion\nfrom graph_io import write_to_json\nfrom SGD_MDS_sphere import SMDS\nfrom HMDS import HMDS\nfrom SGD_MDS2 import SGD\nimport pylab\nimport s_gd2\n\nsin,cos, acos, sqrt = np.sin, np.cos, np.arccos, np.sqrt\n...
[ [ "numpy.linalg.norm", "numpy.empty", "numpy.savetxt", "numpy.zeros", "sklearn.metrics.pairwise_distances", "numpy.loadtxt", "numpy.arange", "numpy.argsort", "numpy.append", "numpy.linspace" ] ]
AllisonShen/MalConv-Pytorch
[ "08f2a00890fcf5ec11e455bf949741ea845a24f5" ]
[ "hexcnn_train.py" ]
[ "# coding: utf-8\nimport os\nimport time\nimport sys\nimport yaml\nimport numpy as np\nimport pandas as pd\nfrom src.util import HexDumpDataset,write_pred\nfrom src.cnn_model import CNN_Model\nfrom torch.utils.data import DataLoader\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.autog...
[ [ "numpy.bincount", "torch.nn.Sigmoid", "numpy.random.seed", "torch.save", "numpy.mean", "torch.manual_seed", "torch.tensor", "torch.nn.BCEWithLogitsLoss", "torch.load", "pandas.read_csv" ] ]
sparsh-ai/recohut
[ "4121f665761ffe38c9b6337eaa9293b26bee2376", "4121f665761ffe38c9b6337eaa9293b26bee2376", "4121f665761ffe38c9b6337eaa9293b26bee2376", "4121f665761ffe38c9b6337eaa9293b26bee2376" ]
[ "recohut/datasets/movielens.py", "recohut/models/ccpm.py", "recohut/utils/data.py", "recohut/visualization/eda.py" ]
[ "# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/datasets/datasets.movielens.ipynb (unless otherwise specified).\n\n__all__ = ['ML1mDataset', 'ML1mDataModule', 'ML1mDataset_v2', 'ML1mDataModule_v2', 'ML1mDataset_v3',\n 'ML1mDataModule_v3', 'ML1mDataset_v4', 'ML100kDataset', 'sparseFeature', 'create_ml_1m_...
[ [ "pandas.to_datetime", "tensorflow.keras.preprocessing.sequence.pad_sequences", "numpy.array", "pandas.DataFrame", "pandas.Categorical", "torch.LongTensor", "pandas.concat", "numpy.in1d", "pandas.read_csv" ], [ "torch.nn.Linear", "torch.nn.Sigmoid", "torch.nn.Seq...
mxgnsr/pyleecan
[ "2b0a04e4ae67c073a91362ab42332908fef53bdd", "2b0a04e4ae67c073a91362ab42332908fef53bdd", "2b0a04e4ae67c073a91362ab42332908fef53bdd" ]
[ "Tests/Validation/Simulation/test_CEFC_001.py", "pyleecan/GUI/Tools/MachinePlotWidget.py", "pyleecan/Methods/Output/OutElec/get_Nr.py" ]
[ "# -*- coding: utf-8 -*-\nimport pytest\nfrom pyleecan.Classes.Simu1 import Simu1\nfrom pyleecan.Classes.InputCurrent import InputCurrent\nfrom pyleecan.Classes.ImportGenVectLin import ImportGenVectLin\nfrom pyleecan.Classes.ImportMatrixVal import ImportMatrixVal\nfrom pyleecan.Classes.MagFEMM import MagFEMM\nfrom ...
[ [ "numpy.array" ], [ "matplotlib.backends.backend_qt5agg.FigureCanvas", "matplotlib.pyplot.subplots" ], [ "numpy.ones" ] ]
rflperry/double_descent
[ "5001613791b3bbfa77c86f8426458253e8989bea", "5001613791b3bbfa77c86f8426458253e8989bea" ]
[ "partition_decode/network.py", "PGDL/sample_code_submission/internal_rep/matrix_funcs.py" ]
[ "import numpy as np\nimport torch\nfrom torch import nn\n\nimport os\n\n## Network functions\n\n# Model\nclass Net(nn.Module):\n \"\"\"\n A class for a deep neural net architecture.\n\n Parameters\n ----------\n in_dim: int\n Input dimension.\n\n out_dim: int\n Output dimension.\n\n ...
[ [ "torch.nn.Linear", "torch.nn.ModuleList", "torch.nn.Sequential", "torch.nn.ReLU", "torch.nn.BatchNorm1d", "torch.nn.BCEWithLogitsLoss" ], [ "scipy.stats.kendalltau", "numpy.array", "numpy.linalg.norm", "numpy.zeros", "pandas.DataFrame", "numpy.multiply", "nu...
AIprogrammer/Detailed-virtual-try-on
[ "25691ef097a3e82d108a8dbf596ba635092a8301" ]
[ "data/demo_dataset.py" ]
[ "import os\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.dataset import Dataset\nimport os.path as osp\nfrom PIL import Image\nimport numpy as np\nfrom torchvision import transforms\nfrom torchvision import utils\nfrom utils import pose_utils\nfrom PIL import I...
[ [ "numpy.array", "numpy.seterr", "torch.from_numpy" ] ]
OvJat/LoadData
[ "2ed1d65b91c534ebf999e272cb067e60275a7318" ]
[ "demo3.py" ]
[ "#!/usr/bin/env python\r\n# -*- coding:utf-8 -*-\r\n\r\n\"\"\"\r\n Support Python 3.8\r\n @author: Lou Xiao(louxiao@i32n.com)\r\n @maintainer: Lou Xiao(louxiao@i32n.com)\r\n @copyright: Copyright 2018~2021\r\n @created time: 2021-10-17 19:26:32 CST\r\n @updated time: 2021-10-17 19:26:32 CST\r\n\"\...
[ [ "torch.rand", "torch.randint", "torch.utils.data.DataLoader" ] ]
Sandeepa1995/cylon
[ "a42d04ad9a65b20c84a15d649f9d849f18676183" ]
[ "python/test/test_frame.py" ]
[ "##\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 to in writing, software\n# distri...
[ [ "pandas.DataFrame", "numpy.array" ] ]
psmaAaron/keras-fcn
[ "90843ef7465e0ce289f0a45a62d2d176a932e7ab" ]
[ "keras_fcn/encoders.py" ]
[ "from __future__ import (\n absolute_import,\n unicode_literals\n)\nimport tensorflow.keras\nimport tensorflow.keras.backend as K\n\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.utils import get_file, convert_all_kernels_in_model\n\nfrom keras_fcn.blocks import (\n vgg_conv,\n vgg_fc...
[ [ "tensorflow.keras.backend.batch_set_value", "tensorflow.keras.backend.image_data_format", "tensorflow.keras.utils.convert_all_kernels_in_model" ] ]