repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
ClaudiaRaffaelli/Protein-subcellular-localization | [
"38a40c7389ee717954c254114959368223a55e43"
] | [
"utils/models.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras import layers, optimizers\nfrom tensorflow import keras\nimport matplotlib.pyplot as plt\nimport itertools\nfrom sklearn.metrics import classification_report, confusion_matrix, matthews_corrcoef\nimpo... | [
[
"tensorflow.keras.layers.Conv1D",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.text",
"numpy.argmin",
"tensorflow.keras.initializers.Orthogonal",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"tensorflow.keras.layers.LSTM",
"matplotlib.pyplot.xticks",
... |
AlexTsagas/Quality-Graphs | [
"eb03f0baf84db4343d6048143ababa724813de94"
] | [
"Transformer/B-H-Diagram.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import rc\nimport pandas as pd\nfrom scipy import integrate\n\n# Write with LaTeX\nrc('text', usetex=True)\nrc('font', family='serif')\n\n# Read .csv file\nB_s, B_e = [], []\nH_s, H_e = [], []\nm_s, m_e = [], []\n\nfile = pd.read_csv('D2-Measurme... | [
[
"scipy.integrate.simps",
"matplotlib.pyplot.subplots",
"matplotlib.rc",
"numpy.arange",
"matplotlib.pyplot.show",
"pandas.read_csv"
]
] |
kamilmlodzikowski/ggcnn_ur5_grasping | [
"8604813360357aef82ab2516fef0d66e55d4b6ef"
] | [
"scripts/run_ggcnn_with_detection.py"
] | [
"#! /home/kamil/robot40human_ws/src/ggcnn_ur5_grasping/python_ggcnn/bin/python3\n\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom keras.models import load_model\nfrom tensorflow.keras.models import Sequential\n\nimport cv2\nimport scipy.ndimage as ndimage\nfrom skimage.draw import circle\nfrom s... | [
[
"numpy.array",
"numpy.isnan",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.median",
"tensorflow.compat.v1.get_default_graph",
"numpy.round",
"scipy.ndimage.filters.gaussian_filter",
"numpy.where",
"numpy.argmax",
"numpy.arctan2",
"numpy.abs",
"numpy.clip"
]
] |
lotrus28/TaboCom | [
"b67d66e4c410375a9efa08c5e637301e78e9204b"
] | [
"qiime_16s/combine_collapsed_otu_tables.py"
] | [
"import sys\nimport re\nimport pandas as pd\n\ndef combine_otu_tables(path_to_files):\n\n with open(path_to_files) as a:\n filenames = a.read().splitlines()\n\n separated = {re.search(r'ERR\\d+?(?=_)',x).group(0):pd.read_table(x, sep = '\\t', index_col = 1, header = None,engine='python')\n ... | [
[
"pandas.read_table"
]
] |
footoredo/dreamerv2 | [
"493e1c0b92cf667a4b4fdcaf8f805273beeb165f"
] | [
"dreamerv2/agent.py"
] | [
"from genericpath import exists\nimport re\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import mixed_precision as prec\n\nimport common\nimport expl\n\n\nclass Agent(common.Module):\n\n def __init__(self, config, logger, step, shapes):\n self.config = config\n self._logger ... | [
[
"tensorflow.keras.mixed_precision.global_policy",
"tensorflow.ones",
"tensorflow.ones_like",
"tensorflow.function",
"tensorflow.zeros_like",
"tensorflow.stack",
"tensorflow.nn.softmax",
"tensorflow.identity",
"tensorflow.cast",
"tensorflow.concat",
"tensorflow.GradientT... |
plandes/deepnlp | [
"49820084ccf797d59535d5920559ab768bf2ec73",
"49820084ccf797d59535d5920559ab768bf2ec73"
] | [
"src/python/zensols/deepnlp/vectorize/vectorizers.py",
"test/python/test_featnorm.py"
] | [
"\"\"\"Generate and vectorize language features.\n\n\"\"\"\n__author__ = 'Paul Landes'\n\nfrom typing import List, Tuple, Set, Union, Dict\nfrom dataclasses import dataclass, field\nimport logging\nimport sys\nfrom functools import reduce\nimport torch\nfrom torch import Tensor\nfrom zensols.deeplearn.vectorize imp... | [
[
"torch.cat",
"torch.stack",
"torch.min",
"torch.sum"
],
[
"torch.tensor",
"torch.sum"
]
] |
wusq121/wavenet | [
"98e9328292f5d5a72355027f88867e12d121d43f"
] | [
"wavenet/data.py"
] | [
"\"\"\"\ndata load and preprocess\n\"\"\"\nimport os\nimport librosa\nimport numpy as np\n\nimport torch\nimport torch.utils.data as data\n\n\ndef load_audio(filename, sample_rate=22500, trim=True, trim_frame_length=2048):\n audio, _ = librosa.load(filename, sr=sample_rate, mono=True)\n audio = audio.reshape(... | [
[
"numpy.pad",
"numpy.log",
"numpy.zeros",
"torch.autograd.Variable",
"numpy.digitize",
"torch.from_numpy",
"numpy.sign",
"torch.cuda.is_available",
"numpy.argmax",
"numpy.arange",
"numpy.abs",
"numpy.linspace",
"torch.utils.data.ravel"
]
] |
chosj95/SSD-Zoomed | [
"0e8fd9829406e6b903c974733cb6976b8e0fd968"
] | [
"layers/modules/multibox_loss.py"
] | [
"# -*- coding: utf-8 -*-\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom data import coco as cfg\nfrom ..box_utils import match, log_sum_exp\n\n\nclass MultiBoxLoss(nn.Module):\n \"\"\"SSD Weighted Loss Function\n Compute Targets:\n 1) Pr... | [
[
"torch.nn.functional.smooth_l1_loss",
"torch.autograd.Variable",
"torch.nn.functional.cross_entropy",
"torch.LongTensor",
"torch.Tensor"
]
] |
benmo009/ros-simulations | [
"dc25f285a06658f88a9852e349bffe9b4b505484",
"dc25f285a06658f88a9852e349bffe9b4b505484"
] | [
"mobile_bot/mobile_bot_ekf/scripts/plot_pose.py",
"robot_collaboration/scripts/load_tf_publisher.py"
] | [
"#!/usr/bin/env python\n\nimport rospy\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom gazebo_msgs.srv import GetModelState\nfrom geometry_msgs.msg import Pose\nfrom tf.transformations import euler_from_quaternion\n\nclass PosePlotter:\n def __init__(self, name):\n # Initialize ROS node\n ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots"
],
[
"numpy.arctan2",
"numpy.sin",
"numpy.zeros",
"numpy.cos"
]
] |
juliangarcia/pyevodyn | [
"79091f0a50e1dd834b8697e3158dfe75acd2efc1"
] | [
"PyEvoDyn/pyevodyn/tests/moran_process_simulation_test.py"
] | [
"'''\nCreated on Oct 3, 2012\n\n@author: garcia\n'''\nimport unittest\nfrom pyevodyn import games\nimport numpy as np\nfrom pyevodyn.simulation import MoranProcess\nimport pyevodyn.simulation as sim\n\n\nclass Test(unittest.TestCase):\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n\n ... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.random.rand",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.random.randint"
]
] |
michaelaesquire/stargan-morpheus | [
"022eab14d26e06c24de91091fe06a207e199fb53"
] | [
"solver.py"
] | [
"from model import Generator\nfrom model import Discriminator\nfrom torch.autograd import Variable\nfrom torchvision.utils import save_image\nfrom torchvision.utils import make_grid\nimport torch\nimport torch.nn.functional as F\nimport numpy as np\nimport os\nimport time\nimport datetime\nfrom PIL import Image\nim... | [
[
"torch.zeros",
"torch.nn.functional.binary_cross_entropy_with_logits",
"torch.cat",
"torch.square",
"torch.no_grad",
"torch.abs",
"torch.autograd.grad",
"torch.nn.functional.cross_entropy",
"torch.cuda.is_available",
"numpy.arange",
"torch.load",
"torch.mean",
"... |
thu-fit/DCGAN-anime | [
"da549bd45a6ca3c4c5a8894945d3242c59f823a0"
] | [
"Project2Manifold.py"
] | [
"from model import DCGAN\nimport tensorflow as tf\nfrom utils import *\nfrom ops import *\nimport numpy as np\nfrom utils_extended import *\nimport os\n\nclass Project2Manifold:\n def __init__(self, dcgan, FLAGS):\n self.dcgan = dcgan\n self.FLAGS = FLAGS\n self.output_height = FLAGS.output_height\n se... | [
[
"tensorflow.trainable_variables",
"tensorflow.train.AdamOptimizer",
"tensorflow.initialize_all_variables",
"tensorflow.reshape",
"tensorflow.variable_scope",
"numpy.random.uniform",
"tensorflow.placeholder",
"tensorflow.nn.tanh",
"tensorflow.global_variables_initializer",
"... |
c1a1o1/ByteSing-tf1.10 | [
"5ad0c76bd5bae8515108bd1811fcd589ac46300a"
] | [
"preprocess.py"
] | [
"# coding:utf-\nimport argparse\nimport os\nfrom multiprocessing import cpu_count\nimport wave\nfrom pydub import AudioSegment\nimport music21 as m21\nfrom concurrent.futures import ProcessPoolExecutor\nimport numpy as np\nfrom functools import partial\nfrom tqdm import tqdm\n\nfrom myData import pinyin\nfrom datas... | [
[
"numpy.abs"
]
] |
Arunken/PythonScripts | [
"702d0a3af7a9be3311f9da0afc5285d453f15484",
"702d0a3af7a9be3311f9da0afc5285d453f15484"
] | [
"10_Other/Cuda Benchmarking/1_matrixMul.py",
"1_Basics/Projects/pycharmpro1/demo.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Oct 14 09:44:05 2018\n\n@author: arken\n\"\"\"\n# ============== no cuda ==================================================\nfrom tensorflow.python.client import device_lib\nprint(device_lib.list_local_devices())\n\nimport os\nos.environ[\"CUD... | [
[
"tensorflow.OptimizerOptions",
"tensorflow.Session",
"tensorflow.matmul",
"tensorflow.ones",
"tensorflow.python.client.device_lib.list_local_devices",
"tensorflow.device",
"tensorflow.global_variables_initializer"
],
[
"matplotlib.pyplot.text",
"numpy.random.rand",
"num... |
gaofujie1997/ECG-ADGAN | [
"ee48bd4c8e5992d0e1180fb7bdf85b126ceba146"
] | [
"S4_3_Unknown_AD/cnn_lstm.py"
] | [
"import pickle\nimport numpy as np\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import confusion_matrix\n\nX_N = pickle.load(open(\"../data/X_AMMI_N.pkl\", \"rb\"))[0:1000]\nprint(np.shape(X_N))\nX_N_label = np.zeros([np.shape(X_N)[0], 1])\n\nX_S = pickle.load(open(\"../data/X_AMM... | [
[
"tensorflow.keras.layers.Conv1D",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.annotate",
"matplotlib.pyplot.matshow",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.LSTM",
"sklearn.metrics.f1_score",
"numpy.concatenate... |
benywon/ComQA | [
"6731d63d16b731d6c3654b2dc7d2503cf333127f"
] | [
"train/bert.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n @Time : 2021/1/14 下午5:34\n @FileName: bert.py\n @author: 王炳宁\n @contact: wangbingning@sogou-inc.com\n\"\"\"\n\nimport sys\nimport time\nimport apex\nimport torch\nimport torch.distributed as dist\nfrom apex import amp\n\nsys.path.append('..')\nfrom modules.BERT import Bert\nfro... | [
[
"torch.distributed.get_world_size",
"torch.eq",
"torch.distributed.init_process_group",
"torch.FloatTensor",
"torch.no_grad",
"torch.manual_seed",
"torch.cuda.set_device",
"torch.LongTensor",
"torch.tensor",
"torch.distributed.reduce",
"torch.distributed.get_rank",
... |
zhengwsh/InplusTrader_Linux | [
"5f7eb17004da0b76ceafb93cb314de7a6009cd04",
"5f7eb17004da0b76ceafb93cb314de7a6009cd04"
] | [
"InplusTrader/backtestEngine/mod/analyser/mod.py",
"InplusTrader/backtestEngine/model/snapshot.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright 2017 Ricequant, Inc\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"numpy.array"
],
[
"numpy.isnan",
"numpy.dtype"
]
] |
jacobbaruch/Coin_market_cap | [
"c8eab8622b3b5d808f7530c036463c2544f8779e"
] | [
"Coins_history.py"
] | [
"import json\r\nimport sys\r\nimport requests\r\nfrom bs4 import BeautifulSoup\r\nimport pandas as pd\r\nfrom _datetime import datetime, date, timedelta\r\n\r\n\r\ndef save_crypto_coins_history(i_rank_start=1, i_rank_end=10, i_coin_file_path='crypto_coins',\r\n i_from_date=None, i_to_dat... | [
[
"pandas.DataFrame",
"pandas.concat"
]
] |
ZhicongLiang/ChocoSGD | [
"c7715b368cc9f66674720ea9c823032c8058bdf6"
] | [
"dl_code/pcode/distributed_running_nlp.py"
] | [
"# -*- coding: utf-8 -*-\nfrom copy import deepcopy\n\nimport numpy as np\nimport torch\n\nfrom pcode.utils.checkpoint import save_to_checkpoint\nfrom pcode.utils.logging import (\n display_training_stat,\n display_test_stat,\n dispaly_best_test_stat,\n)\nfrom pcode.utils.stat_tracker import RuntimeTracker... | [
[
"torch.no_grad",
"numpy.isnan"
]
] |
darpan-jain/registration-master | [
"0b7f894bf6d0cee496e846d4bff56a07f545e544"
] | [
"utils/align_custom.py"
] | [
"'''\nImplement Dlib Face alignment strategy\n\nHowever, this method/approach doesn't deform the original image like Dlib does.\n\nThis also categorizes the face in 3 types: Center, Left, Right\n\nAlign face based on facial landmarks\n'''\nimport math\n\nimport cv2\nimport numpy as np\n\n\nclass AlignCustom(object... | [
[
"numpy.matrix",
"numpy.linalg.norm",
"numpy.linalg.det",
"numpy.linalg.svd",
"numpy.diag"
]
] |
Melon-Zhou/FleetX | [
"ad055d27f3f77184f73430f31ece81aa88c51906"
] | [
"examples/hybrid_parallelism/model/transformer_encoder.py"
] | [
"# Copyright (c) 2019 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 ... | [
[
"numpy.sqrt"
]
] |
xylar/zppy | [
"8f1c80cfc4eae36731a759be74b3d6f5998cf7f6"
] | [
"zppy/templates/coupled_global.py"
] | [
"# Script to plot some global atmosphere and ocean time series\nimport math\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom readTS import TS\nimport matplotlib as mpl\nmpl.use('Agg')\nimport shutil\nimport glob\nfrom netCDF4 import Dataset\nimport sys\n\n##---additional function to get moc time series\nd... | [
[
"matplotlib.use",
"numpy.append",
"numpy.array",
"numpy.int",
"numpy.mean",
"matplotlib.pyplot.figure",
"numpy.where",
"numpy.polyfit",
"numpy.abs",
"numpy.poly1d",
"numpy.average",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.subplot"
]
] |
kuefmz/software_classification | [
"0dee3a046e59052ab272e4029195fb21f3d58c04"
] | [
"src/Report/Report.py"
] | [
"from sklearn.metrics import make_scorer\nfrom sklearn.metrics import accuracy_score\nfrom sklearn.metrics import precision_score\nfrom sklearn.metrics import recall_score\nfrom sklearn.metrics import f1_score,precision_recall_fscore_support\nfrom sklearn.metrics import confusion_matrix\nfrom sklearn.model_selectio... | [
[
"sklearn.model_selection.cross_validate",
"sklearn.metrics.confusion_matrix",
"sklearn.metrics.make_scorer",
"numpy.mean"
]
] |
go2chayan/HateXplain | [
"c5f173d39dca348ec6481fca08a17bc80616651a"
] | [
"eraserbenchmark/rationale_benchmark/metrics.py"
] | [
"import argparse\nimport json\nimport logging\nimport os\nimport pprint\n\nfrom collections import Counter, defaultdict, namedtuple\nfrom dataclasses import dataclass\nfrom itertools import chain\nfrom typing import Any, Callable, Dict, List, Set, Tuple\n\nimport numpy as np\nimport torch\n\nfrom scipy.stats import... | [
[
"numpy.array",
"sklearn.metrics.precision_recall_curve",
"scipy.stats.entropy",
"sklearn.metrics.accuracy_score",
"sklearn.metrics.classification_report",
"numpy.average",
"sklearn.metrics.auc"
]
] |
VictorDavis/conebound | [
"2f0600d946d27abfec10d19a840044c2ec9c18f1"
] | [
"test_conebound.py"
] | [
"# bloody dependencies\nimport numpy as np\nfrom numpy.linalg import norm\nimport unittest\n\n# things to test\nfrom conebound import bounding_cone\n\n\n# unit tests\nclass ConeBoundTest(unittest.TestCase):\n\n # bounding cone aperture < 90\n def test_2d_acute(self):\n\n # hyperparameters\n ndim... | [
[
"numpy.random.normal",
"numpy.linalg.norm",
"numpy.dot",
"numpy.random.uniform",
"numpy.cos"
]
] |
piotrbazan/deep-reinforcement-learning | [
"165ab29a1d85630b7baa7ccb31a1ab91cd0c6413"
] | [
"tictactoe/ConnectN.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport matplotlib.animation as animation\nfrom copy import copy\n\n\n# output the index of when v has a continuous string of i\n# get_runs([0,0,1,1,1,0,0],1) gives [2],[5],[3]\ndef get_runs(v,... | [
[
"numpy.concatenate",
"numpy.zeros",
"numpy.diff",
"numpy.where",
"numpy.any",
"numpy.abs",
"numpy.all",
"numpy.moveaxis",
"numpy.indices"
]
] |
praise2112/gpt-2-tensorflow2.0 | [
"c3e09c8c8e96eaa74b94efa4cb1acf796a2b0cea"
] | [
"src_v2/interactive_conditional_samples.py"
] | [
"#!/usr/bin/env python3\n\nimport fire\nimport json\nimport os\nimport numpy as np\nimport tensorflow as tf\n\nimport model, sample, encoder\n\n# config = tf.compat.v1.ConfigProto(gpu_options =\n# tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.8)\n# device_count = {'GPU': 1}\n# )... | [
[
"tensorflow.compat.v1.placeholder",
"numpy.random.seed",
"tensorflow.compat.v1.train.Saver",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.Graph",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.set_random_seed"
]
] |
Hsveh/CS420_final_hw | [
"5798ca227889ae47b91e189368f04a1fbe6ebb0d"
] | [
"CNN/SVM.py"
] | [
"\"\"\"\nRead data from CNN_SVM\n\"\"\"\nimport common\nimport numpy as np\nfrom sklearn.preprocessing import scale\nfrom sklearn.svm import SVC\nfrom sklearn.metrics import classification_report\nfrom sklearn.metrics import accuracy_score\n\ndata = common.Data(\"../mnist/mnist_train/train_data.npy\", \"../mnist/mn... | [
[
"numpy.load",
"sklearn.metrics.accuracy_score",
"sklearn.preprocessing.scale",
"sklearn.metrics.classification_report",
"sklearn.svm.SVC"
]
] |
ghostxsl/PaddleDetection | [
"e62c687486c0881759ffd49b736afb5ccaa3d717"
] | [
"ppdet/engine/tracker.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 re... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.dot",
"numpy.asarray",
"numpy.sum"
]
] |
alemazzo/metodi_numerici | [
"0d7d02aa392dde51abe1a4ee8ac5412f8f27736a"
] | [
"metodi/zeri/bisezione.py"
] | [
"import math\n\nimport numpy as np\n\n\ndef bisezione(f, a, b, tol):\n \"\"\"\n Algoritmo di Bisezione per il calcolo dello zero di una funzione.\n\n :param f: la funzione di cui calcolare lo zero\n :param a: il valore minimo dell'intervallo\n :param b: il valore massimo dell'intervallo\n :param t... | [
[
"numpy.spacing"
]
] |
ralic/tensorflow | [
"1209491913def44650d6457c60a6e41d56de3306"
] | [
"tensorflow/contrib/keras/python/keras/applications/resnet50.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.contrib.keras.python.keras.models.Model",
"tensorflow.contrib.keras.python.keras.layers.Dense",
"tensorflow.contrib.keras.python.keras.layers.Activation",
"tensorflow.contrib.keras.python.keras.layers.MaxPooling2D",
"tensorflow.contrib.keras.python.keras.layers.Conv2D",
"tensor... |
rivinduchamath/Open_CV-IM | [
"4082d24de659d672d9f90a6a3a2dbd942d183781",
"4082d24de659d672d9f90a6a3a2dbd942d183781"
] | [
"main2.py",
"a.py"
] | [
"import cv2\nimport numpy as np\n\n# Image negative\nimg = cv2.imread('\"C:/Users/wogza/Downloads/New folder (2)/A/rectangle.png\"', 0)\n\nm, n = img.shape\n\n# To find the maximum grey level\n# value in the image\nL = img.max()\n\n# Maximum grey level value minus\n# the original image gives the\n# negative image\n... | [
[
"numpy.zeros"
],
[
"numpy.hstack",
"numpy.zeros"
]
] |
beipeng/multiagent-particle-envs | [
"68d605ee3d649e1b1d6d8564ab1ff89cb1ad68d6"
] | [
"multiagent/scenarios/simple_spread_v2.py"
] | [
"import numpy as np\nfrom multiagent.core import World, Agent, Landmark\nfrom multiagent.scenario import BaseScenario\n\n\nclass Scenario(BaseScenario):\n def make_world(self):\n world = World()\n # set any world properties first\n world.dim_c = 2\n num_agents = 4\n num_landmar... | [
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.zeros",
"numpy.random.uniform"
]
] |
yamanalab/SecureSideEffectSearch | [
"e223ad0f8cc5b5097af5a6da841f128e4783bd26"
] | [
"tools/dummymaker/dummymaker/__main__.py"
] | [
"from dummymaker import config\nfrom dummymaker import population_stats\nimport json\nimport csv\nfrom datetime import datetime\nimport numpy as np\n\n\nclass DummyMaker(object):\n def __init__(self):\n self.config = config.Config()\n self.popstats = population_stats.PopulationStats()\n\n def _r... | [
[
"numpy.random.randint"
]
] |
anonymous2398384/provable_robustness_max_linear_regions | [
"529165d9047261813bc068997415f668c9675119"
] | [
"kolter_wong/models.py"
] | [
"import numpy as np\nimport scipy.io\n\nimport torch\nimport torch.nn as nn\nimport math\nimport data\n\nfrom kolter_wong.convex_adversarial import Dense, DenseSequential\nfrom kolter_wong.custom_layers import Conv2dUntiedBias\n\n\ndef select_model(model_type, n_in, n_out):\n h_in, w_in, c_in = (28, 28, 1) if n_... | [
[
"torch.nn.Linear",
"torch.nn.Sequential",
"torch.from_numpy",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"numpy.transpose"
]
] |
mfrasco/satflow | [
"2e56b46dfd81a05670c6d2b1bda8c9eec38301a7"
] | [
"satflow/models/gan/generators.py"
] | [
"import functools\nimport torch\nfrom torch import nn as nn\nfrom typing import Union\nfrom satflow.models.gan.common import get_norm_layer, init_net\nfrom satflow.models.utils import get_conv_layer\nimport antialiased_cnns\n\n\ndef define_generator(\n input_nc,\n output_nc,\n ngf,\n netG: Union[str, to... | [
[
"torch.nn.Dropout",
"torch.nn.ReplicationPad2d",
"torch.nn.Sequential",
"torch.nn.Tanh",
"torch.nn.LeakyReLU",
"torch.nn.ConvTranspose2d",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.ReflectionPad2d"
]
] |
ResearchingDexter/mtcnn-pytorch | [
"a7c5eb8ed2cd984a0990d59267cbac5a83770624"
] | [
"test_detector.py"
] | [
"from src.detector import detect_faces\nfrom PIL import Image,ImageDraw\nimport os\nimport torch\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport tqdm\n@torch.no_grad()\ndef img_locate(path):\n img=Image.open(path)\n boundboxes,landmark=detect_faces(img.copy())\n print(boundboxes,landmark)\n ... | [
[
"matplotlib.pyplot.show",
"torch.no_grad",
"numpy.array"
]
] |
abekoh/dcgan_font | [
"85c8580ae8aaeee9b9a10793063f02fe45067894"
] | [
"train_classifier.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\nimport cv2\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import optimizers\nfrom chainer import FunctionSet\nfrom chainer import Variable\nfrom chainer import serializers\n\nfrom chainer import functions as F\nfrom chainer import links as L\n\nfrom mylib.cha... | [
[
"numpy.random.permutation"
]
] |
LightNormal/StyleGAN2withGUI | [
"d2ffa81a4e7b2b779423bb854230863d57f0eb85"
] | [
"training/dataset.py"
] | [
"# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.\r\n#\r\n# This work is made available under the Nvidia Source Code License-NC.\r\n# To view a copy of this license, visit\r\n# https://nvlabs.github.io/stylegan2/license.html\r\n\r\n\"\"\"Multi-resolution input data pipeline.\"\"\"\r\n\r\nimport os\r\n... | [
[
"tensorflow.data.TFRecordDataset",
"tensorflow.data.Dataset.from_tensor_slices",
"numpy.load",
"tensorflow.reshape",
"tensorflow.data.Iterator.from_structure",
"numpy.fromstring",
"numpy.dtype",
"tensorflow.FixedLenFeature",
"tensorflow.random_uniform",
"numpy.prod",
"n... |
espottesmith/pyGSM | [
"5bf263f9ef6cbee3ec16355c5eb1839446e704e7"
] | [
"pygsm/growing_string_methods/se_cross.py"
] | [
"from __future__ import print_function\n# standard library imports\nimport sys\nimport os\nfrom os import path\n\n# third party\nimport numpy as np\n\n# local application imports\nsys.path.append(path.dirname( path.dirname( path.abspath(__file__))))\nfrom utilities import *\nfrom wrappers import Molecule\nfrom .bas... | [
[
"numpy.copy",
"numpy.linalg.norm",
"numpy.dot",
"numpy.asarray"
]
] |
henryqin1997/tpu | [
"cf7f26bb3d2bdfa71652f0e216be35a2393ff7ef"
] | [
"models/official/resnet/resnet_main_onecycle.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.distribute.cluster_resolver.TPUClusterResolver",
"tensorflow.compat.v1.logging.info",
"tensorflow.compat.v1.transpose",
"tensorflow.compat.v1.disable_v2_behavior",
"tensorflow.compat.v1.summary.all_v2_summary_ops",
"tensorflow.compat.v1.train.get_global_step",
"te... |
jaswinder9051998/Resources | [
"fd468af37bf24ca57555d153ee64693c018e822e"
] | [
"Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 90/90.py"
] | [
"#Please download the database file database.db and use Python to access the database table rows that have an area of 2,000,000 or greater. Then export those rows to a CSV file\nimport sqlite3\nimport pandas\n\nconn = sqlite3.connect(\"database.db\")\ncur = conn.cursor()\ncur.execute(\"SELECT * FROM countries WHERE... | [
[
"pandas.DataFrame.from_records"
]
] |
azag0/pyscf | [
"1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b",
"1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b",
"1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b",
"1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b"
] | [
"pyscf/cc/uccsd.py",
"pyscf/cc/gccsd_rdm.py",
"pyscf/pbc/gto/test/test_cell.py",
"pyscf/pbc/lib/kpts_helper.py"
] | [
"#!/usr/bin/env python\n# Copyright 2014-2020 The PySCF Developers. 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/LIC... | [
[
"numpy.zeros_like",
"numpy.empty",
"numpy.asarray",
"numpy.zeros",
"numpy.split",
"numpy.ndarray",
"numpy.einsum",
"numpy.tril_indices",
"numpy.cumsum",
"numpy.hstack",
"numpy.diag"
],
[
"numpy.count_nonzero",
"numpy.diag_indices",
"numpy.empty",
"nu... |
garion9013/shrinkbench | [
"c460cbc371ef2673b2a3f8498ca7a8aeb60d78bb"
] | [
"pruning/abstract.py"
] | [
"from abc import ABC, abstractmethod\nfrom collections import OrderedDict\n\nimport numpy as np\nimport pandas as pd\n\nfrom .mask import mask_module\nfrom .modules import MaskedModule\nfrom .utils import get_params\nimport tempfile, pathlib\nimport torch\n\n\nclass Pruning(ABC):\n\n \"\"\"Base class for Pruning... | [
[
"pandas.DataFrame",
"torch.save",
"numpy.prod",
"torch.load"
]
] |
footoredo/PettingZoo | [
"b48baf9ca459d72cdcb7013ef86c5fc470856081",
"b48baf9ca459d72cdcb7013ef86c5fc470856081"
] | [
"pettingzoo/agar/players/Bot.py",
"pettingzoo/magent/magent_env.py"
] | [
"from pettingzoo.agar.players.Player import Player\nimport numpy as np\nfrom pettingzoo.agar.modules import *\nfrom pettingzoo.agar.entity.Cell import Cell\nimport random\nfrom copy import deepcopy\nimport numpy as np\n\nclass Bot(Player):\n def __init__(self, gameServer, name='bot', id = None, pos = None):\n ... | [
[
"numpy.array",
"numpy.sin",
"numpy.zeros",
"numpy.exp",
"numpy.random.randint",
"numpy.abs",
"numpy.cos"
],
[
"numpy.concatenate",
"numpy.zeros_like",
"numpy.asarray",
"numpy.zeros",
"numpy.ones",
"numpy.tile",
"numpy.expand_dims"
]
] |
debunagoya/PredictVictoryofSumou | [
"16fe94defaab2173f2ca6d0051db768b38590907"
] | [
"pred.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport lightgbm as lgb\nimport pickle\nfrom sklearn import metrics\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score\nfrom sklearn.prepr... | [
[
"sklearn.preprocessing.LabelEncoder",
"pandas.concat",
"sklearn.model_selection.train_test_split",
"pandas.read_csv",
"numpy.unique",
"pandas.get_dummies"
]
] |
schopra8/skweak | [
"e2a8fd396164b07292d86fae44e71af0fa28860a"
] | [
"skweak/utils.py"
] | [
"\nimport json\nimport re\nimport functools\nfrom typing import List, Dict, Tuple, Optional, TypeVar, Iterable\nfrom spacy.tokens import Doc, Token, Span, DocBin # type: ignore\nimport numpy as np\n\nT = TypeVar('T')\n\n############################################\n# Utility functions for NLP analysis\n###########... | [
[
"numpy.isscalar",
"numpy.nonzero"
]
] |
antoniorv6/Transformer-Keras | [
"9566f4211f92922a668977e72dbb72b722d4de5e"
] | [
"Transformer/MHA.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras.layers import Dense, Softmax\n\nclass MHA(tf.keras.layers.Layer):\n def __init__(self, model_depth, num_heads):\n super(MHA, self).__init__()\n self.num_heads = num_heads\n self.model_depth = model_depth\n assert model_depth % self.num_h... | [
[
"tensorflow.shape",
"tensorflow.matmul",
"tensorflow.transpose",
"tensorflow.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.math.sqrt",
"tensorflow.keras.layers.Softmax"
]
] |
taro-masuda/nlp100 | [
"a2f73777b8215622726d040f48add9ab6b50c188"
] | [
"ch06/50_fetch_shape_data.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nimport random\nimport os\nimport requests\nimport zipfile\nimport io\n\ndef seed_everything(seed=42):\n random.seed(seed)\n os.environ['PYTHONHASHSEED'] = str(seed)\n np.random.seed(seed)\n\ndef fetch_data(url: ... | [
[
"numpy.random.seed",
"sklearn.model_selection.train_test_split"
]
] |
ttkyryliuk/RfPy | [
"727521f094fcb685622d31ae3f353c0d21713d0e"
] | [
"Scripts/rfpy_harmonics.py"
] | [
"#!/usr/bin/env python\n\n# Copyright 2019 Pascal Audet\n#\n# This file is part of RfPy.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without lim... | [
[
"numpy.median",
"numpy.var",
"numpy.abs"
]
] |
cool-RR/xgboost | [
"306e38ff3145b559e3a7c67d071d8a4ced5f70a3"
] | [
"python-package/xgboost/plotting.py"
] | [
"# pylint: disable=too-many-locals, too-many-arguments, invalid-name,\n# pylint: disable=too-many-branches\n# coding: utf-8\n\"\"\"Plotting Library.\"\"\"\nfrom io import BytesIO\nimport numpy as np\nfrom .core import Booster\nfrom .sklearn import XGBModel\n\n\ndef plot_importance(booster, ax=None, height=0.2,\n ... | [
[
"matplotlib.image.imread",
"matplotlib.pyplot.subplots"
]
] |
seckcoder/lang-learn | [
"1e0d6f412bbd7f89b1af00293fd907ddb3c1b571",
"1e0d6f412bbd7f89b1af00293fd907ddb3c1b571"
] | [
"python/sklearn/sklearn/dummy.py",
"python/sklearn/sklearn/tests/test_multiclass.py"
] | [
"\n# Author: Mathieu Blondel <mathieu@mblondel.org>\n# License: BSD Style.\n\nimport numpy as np\n\nfrom .base import BaseEstimator, ClassifierMixin, RegressorMixin\nfrom .utils import check_random_state\nfrom .utils.fixes import unique\nfrom .utils.validation import safe_asarray\n\n\nclass DummyClassifier(BaseEsti... | [
[
"numpy.bincount",
"numpy.ones",
"numpy.zeros",
"numpy.mean"
],
[
"sklearn.linear_model.LinearRegression",
"numpy.mean",
"sklearn.svm.LinearSVC",
"sklearn.svm.SVC",
"numpy.array",
"sklearn.multiclass.OneVsRestClassifier",
"sklearn.datasets.make_multilabel_classificat... |
wdczdj/qiskit-metal | [
"c77805f66da60021ef8d10d668715c1dc2ebcd1d"
] | [
"qiskit_metal/qlibrary/lumped/resonator_coil_rect.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.array"
]
] |
sudarshanregmi/ICRGAN-and-SSGAN | [
"c9e7b01d89cba19505e566892a678932717b8039"
] | [
"models/sngan_cifar10.py"
] | [
"import torch.nn as nn\nfrom .gen_resblock import GenBlock\n\n\nclass Generator(nn.Module):\n def __init__(self, args, activation=nn.ReLU(), n_classes=0):\n super(Generator, self).__init__()\n self.bottom_width = args.bottom_width\n self.activation = activation\n self.n_classes = n_cl... | [
[
"torch.nn.Linear",
"torch.nn.Softmax",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.Tanh",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.utils.spectral_norm"
]
] |
Yuleii/yulei-thesis-QBSM-kw94 | [
"bb882bc6c809331c370a4d6442c36ad67ccad498"
] | [
"functions/QBSM.py"
] | [
"\"\"\"Functions that compute quantile-based sensitivity measures.\"\"\"\nimport numpy as np\n\n\ndef quantile_measures(quantile_y_x, quantile_y_x_mix):\n \"\"\"Estimate the values of quantile based measures.\"\"\"\n m, n_params, len_alp = quantile_y_x_mix.shape[:3]\n\n # initialization\n q_1 = np.zeros... | [
[
"numpy.sum",
"numpy.mean",
"numpy.zeros",
"numpy.absolute"
]
] |
airy-ict/learn_python | [
"5a6c45c627208856bb04c2545fae8cba903519d3"
] | [
"pyscript/ml/bayes.py"
] | [
"import numpy as np\nimport scipy as sp\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.datasets import load_files\nfrom sklearn.feature_extraction.text import *\nfrom sklearn.metrics import precision_recall_curve\nfrom sklearn.metrics import classi... | [
[
"scipy.load",
"sklearn.model_selection.train_test_split",
"sklearn.externals.joblib.dump",
"sklearn.metrics.classification_report",
"sklearn.naive_bayes.MultinomialNB",
"sklearn.datasets.load_files",
"scipy.save"
]
] |
Liang813/tf_mvg | [
"01bc681a8b3aac5dcf0837d481b963f4968eb777"
] | [
"mvg_distributions/covariance_representations/covariance_chol.py"
] | [
"import tensorflow as tf\n\nfrom mvg_distributions.covariance_representations.covariance_matrix import Covariance, DecompMethod\n\n\nclass _CovarianceCholeskyCommon(Covariance):\n def __init__(self, inversion_method=None, **kwargs):\n self._log_diag_chol_covariance = None\n self._log_diag_chol_prec... | [
[
"tensorflow.multiply",
"tensorflow.matrix_diag_part",
"tensorflow.shape",
"tensorflow.expand_dims",
"tensorflow.assert_rank",
"tensorflow.matmul",
"tensorflow.transpose",
"tensorflow.negative",
"tensorflow.log",
"tensorflow.squeeze",
"tensorflow.reduce_sum",
"tensor... |
eggachecat/YCgplearn | [
"098bda558f5bb986e9dab70e82394602aca6519c"
] | [
"YCgplearn/skutils/tests/test_utils.py"
] | [
"import warnings\n\nimport numpy as np\nimport scipy.sparse as sp\nfrom scipy.linalg import pinv2\n\nfrom YCgplearn.skutils.testing import (assert_equal, assert_raises, assert_true,\n assert_almost_equal, assert_array_equal,\n SkipTest)\n\n... | [
[
"numpy.array",
"numpy.dot",
"numpy.random.RandomState",
"pandas.DataFrame",
"sklearn.utils.extmath.pinvh",
"numpy.eye",
"scipy.linalg.pinv2",
"numpy.arange",
"numpy.ravel",
"numpy.linalg.svd",
"scipy.sparse.csr_matrix"
]
] |
kauku123/Undergraduate_Fin_Proj_2018 | [
"e635d03c05785ca898c7a6bc48261de81318be26"
] | [
"final_yr_proj/tf_utils1.py"
] | [
"import h5py\nimport numpy as np\nimport tensorflow as tf\nimport math\n\ndef load_dataset():\n train_dataset = h5py.File('datasets/train_signs.h5', \"r\")\n train_set_x_orig = np.array(train_dataset[\"train_set_x\"][:]) # your train set features\n train_set_y_orig = np.array(train_dataset[\"train_set_y\"]... | [
[
"numpy.array",
"tensorflow.convert_to_tensor",
"tensorflow.nn.relu",
"numpy.random.seed",
"tensorflow.argmax",
"numpy.random.permutation",
"tensorflow.Session",
"tensorflow.matmul",
"numpy.eye",
"tensorflow.placeholder"
]
] |
DhruvAwasthi/TensorFlowSpecialization | [
"aeaa57eefd74f96f7389458662e050667eab7a54"
] | [
"4. Sequences, Time Series and Prediction/Week 1/Exercise_1_Create_and_predict_synthetic_data_Question-FINAL.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\n# ATTENTION: Please do not alter any of the provided code in the exercise. Only add your own code where indicated\n# ATTENTION: Please do not add or remove any cells in the exercise. The grader will check specific cells based on the cell position.\n# ATTENTIO... | [
[
"numpy.array",
"numpy.random.RandomState",
"tensorflow.keras.metrics.mean_squared_error",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.plot",
"numpy.exp",
"matplotlib.pyplot.figure",
"tensorflow.keras.metrics.mean_absolute_error",
"numpy.arange",... |
JacekPierzchlewski/RxCS | [
"250f9ebfe9c12f49754f354e60cc511be76e4632"
] | [
"rxcs/ana/SNR.py"
] | [
"\"\"\"|\nThis module contains SNR evaluation function of the reconstructed signals. |br|\n\n*Examples*:\n Please go to the *examples/analysis* directory for examples \n on how to use the SNR analysis modules. |br|\n\n*Settings*:\n Parameters of the SNR analysis are described below.\n\n Take a look on '... | [
[
"numpy.sum",
"numpy.log10",
"numpy.abs"
]
] |
Francesco-Sovrano/Generic-Hierarchical-Deep-Reinforcement-Learning-for-Sentiment-Analysis | [
"f6845b682176b76c97cbfc4e0d2dc8576e9883cb",
"f6845b682176b76c97cbfc4e0d2dc8576e9883cb"
] | [
"A3C/options.py",
"A3C/model/model_manager.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\ndef build():\n\t# Common\n\ttf.app.flags.DEFINE_boolean(\"use_gpu\", False, \"whether to use the GPU\")\n\ttf.app.flags.DEFINE_string(\"env_type\", \... | [
[
"tensorflow.app.flags.DEFINE_float",
"tensorflow.app.flags.DEFINE_integer",
"tensorflow.app.flags.DEFINE_boolean",
"tensorflow.app.flags.DEFINE_string"
],
[
"numpy.zeros"
]
] |
JiangZehua/control-pcgrl3D | [
"f9b04e65e1cbf70b7306f4df251450d83c6fb2be"
] | [
"submodules/dqd/ribs/emitters/opt/_cma_es.py"
] | [
"\"\"\"Implementation of CMA-ES that can be used across various emitters.\n\nAdapted from Nikolaus Hansen's pycma:\nhttps://github.com/CMA-ES/pycma/blob/master/cma/purecma.py\n\"\"\"\nimport numba as nb\nimport numpy as np\n\n\nclass DecompMatrix:\n \"\"\"Maintains a covariance matrix and its eigendecomposition.... | [
[
"numpy.min",
"numpy.outer",
"numpy.max",
"numpy.empty",
"numpy.log",
"numpy.linalg.eigh",
"numpy.eye",
"numpy.arange",
"numpy.sqrt",
"numpy.expand_dims",
"numpy.square",
"numpy.array",
"numpy.matmul",
"numpy.zeros",
"numpy.einsum",
"numpy.asarray",
... |
Juan0001/yellowbrick | [
"b2336e2b3e549bc3d9647c14893add7dd6bc8a2c"
] | [
"yellowbrick/classifier/rocauc.py"
] | [
"# yellowbrick.classifier.rocauc\n# Implements visual ROC/AUC curves for classification evaluation.\n#\n# Author: Rebecca Bilbro <rbilbro@districtdatalabs.com>\n# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Author: Neal Humphrey\n# Created: Wed May 18 12:39:40 2016 -0400\n#\n# Copyright (C)... | [
[
"sklearn.metrics.roc_curve",
"scipy.interp",
"numpy.zeros_like",
"numpy.hstack",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.auc",
"numpy.unique",
"sklearn.preprocessing.label_binarize"
]
] |
XiaominWuFred/autoGaming | [
"9277f6d3c8508ef7c2fa187801b995469af3f3f5"
] | [
"src/trainModel.py"
] | [
"# TensorFlow and tf.keras\r\nimport tensorflow as tf\r\nfrom tensorflow import keras\r\n\r\n# Helper libraries\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport math\r\nfrom keras import Sequential\r\nfrom keras.layers import Dense, Flatten, Activation, Dropout, Conv2D, MaxPooling2D\r\nfrom PIL im... | [
[
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"numpy.array",
"tensorflow.lite.TFLiteConverter.from_keras_model"
]
] |
RossDeVito/news-tsl-cse291 | [
"7b9c2fe2feb6da673bd1bd73684cd841bff07496"
] | [
"date_models/examine_dataset.py"
] | [
"'''\nShort script used to examine the format of the data in a news timeline dataset\n'''\n\nimport os\nimport pandas as pd\nfrom date_models.model_utils import inspect\n\ndef main():\n input_file = '../datasets/t17/bpoil/articles.preprocessed_mod.jsonl'\n df = pd.read_json(input_file)\n inspect(df)\n\n\n\... | [
[
"pandas.read_json"
]
] |
zabaras/inn-surrogate | [
"e04bbabb0c93ad9d8880193e3c1410ba5d9211c2"
] | [
"3D/models/main_model.py"
] | [
"import numpy as np \nimport torch\nimport sys\nimport torch.nn as nn\n\nfrom models.flat_data_model import Flat_data\nfrom models.Unflat_data_model import Unflat_data\nfrom models.Divide_data_model import divide_data\nfrom models.Permute_data_model import Permute_data\nfrom models.Downsample_model import Downsampl... | [
[
"torch.cat"
]
] |
richardfat7/enas | [
"e830fc1ad50be1824162719f2b005ade08451359"
] | [
"src/ptb/main.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport cPickle as pickle\nimport shutil\nimport sys\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom src import utils\nfrom src.utils import Logger\nfrom src.utils import ... | [
[
"tensorflow.train.SingularMonitoredSession",
"numpy.reshape",
"tensorflow.train.CheckpointSaverHook",
"tensorflow.Graph",
"tensorflow.train.Saver",
"numpy.exp",
"tensorflow.ConfigProto",
"numpy.random.uniform",
"numpy.size",
"tensorflow.app.run"
]
] |
shibaji7/Collaboration_NCAR | [
"c27e0ad8a1f0c6b2e66fa07e6cf57f98c4389899"
] | [
"code_rt_sd/sd/plotlib.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"plotlib.py: module is dedicated to plottting.\"\"\"\n\n__author__ = \"Chakraborty, S.\"\n__copyright__ = \"Copyright 2020, SuperDARN@VT\"\n__credits__ = []\n__license__ = \"MIT\"\n__version__ = \"1.0.\"\n__maintainer__ = \"Chakraborty, S.\"\n__email__ = \"shibaji7@vt.edu\"\n__status_... | [
[
"scipy.stats.median_absolute_deviation",
"numpy.quantile",
"matplotlib.pyplot.text",
"numpy.ma.sum",
"numpy.median",
"matplotlib.dates.DateFormatter",
"numpy.copy",
"numpy.min",
"numpy.mean",
"scipy.stats.pearsonr",
"matplotlib.colors.BoundaryNorm",
"numpy.cos",
... |
sveilleux1/pybrain | [
"1e1de73142c290edb84e29ca7850835f3e7bca8b"
] | [
"pybrain/tests/optimizationtest.py"
] | [
"from __future__ import print_function\n\n#! /usr/bin/env python\n\"\"\" This test script will test the set of optimization algorithms.\n\nIt tests\n - the conformity of interface\n - the behavior on simple functions\n - the behavior on FitnessEvaluators\n - the behavior when optimizing a list or an array\n - the b... | [
[
"scipy.log10",
"scipy.sum",
"scipy.array"
]
] |
naiqili/DGPG-MLJ | [
"2770ce58185091afff5eca8e295086b42f4d874e"
] | [
"dgp_graph/impl_parallel.py"
] | [
"import tensorflow as tf\nimport numpy as np\nfrom gpflow.mean_functions import Identity, Linear\nfrom gpflow import settings\nfrom gpflow import transforms\nfrom gpflow.misc import _broadcasting_elementwise_op\nfloat_type = settings.float_type\nfrom gpflow import params_as_tensors, params_as_tensors_for, ParamList... | [
[
"tensorflow.exp",
"numpy.dot",
"numpy.array_equal",
"numpy.random.rand",
"tensorflow.tensordot",
"tensorflow.linalg.cholesky",
"numpy.tile",
"tensorflow.matmul",
"tensorflow.reshape",
"numpy.where",
"tensorflow.linalg.diag_part",
"tensorflow.shape",
"numpy.vecto... |
globophobe/django-quant-werks | [
"0bc95f6bb32071aa32a4951ca0a15521f67f7f97"
] | [
"cryptofeed_werks/tests/test_calendar.py"
] | [
"from datetime import datetime, time, timezone\nfrom typing import List\n\nimport pandas as pd\nfrom django.test import TestCase\n\nfrom cryptofeed_werks.lib import (\n get_current_time,\n get_min_time,\n get_next_time,\n get_range,\n iter_missing,\n iter_timeframe,\n iter_window,\n parse_pe... | [
[
"pandas.Timedelta"
]
] |
elharo/beam | [
"a86dc0609f0b1bcc0c450979363b27b2657418af"
] | [
"sdks/python/apache_beam/dataframe/frames.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"pandas.DataFrame",
"pandas.core.series.is_iterator",
"pandas.core.common.is_bool_indexer",
"pandas.concat",
"pandas.Series"
]
] |
jules-samaran/scvi-tools | [
"7dcbb819cdc6a7991469fdca6b292276c59a946d"
] | [
"scvi/module/_scanvae.py"
] | [
"from typing import Iterable, Optional, Sequence\n\nimport numpy as np\nimport torch\nfrom torch.distributions import Categorical, Normal\nfrom torch.distributions import kl_divergence as kl\nfrom torch.nn import functional as F\n\nfrom scvi import _CONSTANTS\nfrom scvi._compat import Literal\nfrom scvi.module.base... | [
[
"numpy.array",
"torch.distributions.Categorical",
"torch.sqrt",
"torch.distributions.Normal",
"torch.ones",
"torch.tensor",
"numpy.arange",
"torch.ones_like",
"torch.zeros_like",
"torch.log",
"torch.mean",
"numpy.unique"
]
] |
GimmickNG/pytorch-lightning | [
"b36c5e86d014671b0fa922d750b27420bc73b6f9"
] | [
"pytorch_lightning/accelerators/horovod_backend.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.cuda.set_device",
"torch.cuda.is_available",
"torch.cuda.amp.autocast"
]
] |
maxpark/unilm | [
"cd0cc7e7207dd029db9c8f11e3568fb385be6a29"
] | [
"decoding/IAD/fairseq/fairseq/models/transformer.py"
] | [
"# 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 directory of this source tree.\n\nimport math\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport torch\nimport torch.nn as nn\nfrom fairseq import utils\n... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.nn.ModuleList",
"torch.nn.init.constant_",
"torch.FloatTensor",
"torch.nn.init.xavier_uniform_",
"torch.nn.init.normal_",
"torch.empty",
"torch.Tensor",
"torch.nn.Embedding"
]
] |
millengustavo/covid19-analytics | [
"a4dfc0edd56b8a498c7fb318c9b3e75ed858dd9c"
] | [
"src/plot_simulation.py"
] | [
"import pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport streamlit as st\n\n# plt.style.use(\"seaborn-whitegrid\")\n\n\ndef plot_simulation_output(df_simulated_data):\n df_simulated_data = df_simulated_data[[\"S\", \"E\", \"I\", \"R\", \"E+I\", \"E+I+R\"]]\n\n fig1 = plt.figure()\n... | [
[
"matplotlib.pyplot.grid",
"matplotlib.pyplot.figure",
"pandas.DateOffset",
"pandas.Timestamp",
"matplotlib.pyplot.xticks"
]
] |
crisobg1/armi | [
"38d9febdbec7ab8a67dd9b8e50780e11ea127022"
] | [
"armi/reactor/tests/test_blocks.py"
] | [
"# Copyright 2019 TerraPower, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agr... | [
[
"numpy.testing.assert_allclose",
"numpy.ones"
]
] |
MaverickLegacy/FollowDetect | [
"29331b13fa74e6fe1a8efa370f2e3de082b20fc6"
] | [
"official/benchmark/keras_imagenet_benchmark.py"
] | [
"# Lint as: 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/LICENSE-2... | [
[
"tensorflow.test.main"
]
] |
BFAnas/tianshou | [
"6e86a0bed7d1117c5ad6a421b483b45a6adfe336"
] | [
"examples/offline/atari_cql.py"
] | [
"#!/usr/bin/env python3\n\nimport argparse\nimport datetime\nimport os\nimport pickle\nimport pprint\n\nimport numpy as np\nimport torch\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom examples.atari.atari_network import QRDQN\nfrom examples.atari.atari_wrapper import make_atari_env\nfrom examples.offlin... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.load",
"torch.utils.tensorboard.SummaryWriter"
]
] |
bisnupriyasahu/cmssw | [
"6cf37ca459246525be0e8a6f5172c6123637d259"
] | [
"RecoLuminosity/LumiDB/python/matplotRender.py"
] | [
"'''\nSpecs:\n-- We use matplotlib OO class level api, we do not use its high-level helper modules. Favor endured stability over simplicity. \n-- PNG as default batch file format\n-- we support http mode by sending string buf via meme type image/png. Sending a premade static plot to webserver is considered a upload... | [
[
"matplotlib.use",
"matplotlib.dates.DateFormatter",
"matplotlib.ticker.FormatStrFormatter",
"matplotlib.ticker.LinearLocator",
"matplotlib.transforms.BlendedGenericTransform",
"matplotlib.figure.Figure",
"matplotlib.ticker.NullLocator",
"matplotlib.ticker.NullFormatter",
"matpl... |
soravux/jambokoko | [
"e9b2460cf0dcd5eab397aeefc60cfd4bc4821028"
] | [
"gen_dataset.py"
] | [
"# coding: utf-8\n\nimport fnmatch\nimport os\nimport random\nimport pickle\n\nimport numpy as np\nfrom hdrio import imread, imsave\nfrom envmap import EnvironmentMap\nfrom scipy.ndimage.interpolation import zoom\nfrom matplotlib import pyplot as plt\n\n\nSTACK_FILENAME = 'stack.exr'\nTARGET_SIZE = (256, 256)\n\n\n... | [
[
"numpy.isnan",
"numpy.median",
"numpy.percentile",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"numpy.clip",
"matplotlib.pyplot.subplot"
]
] |
olemeyer/pyforce | [
"f0432ada7974419d40cce229cd875ce6ae4270b9"
] | [
"pyforce/memory/memory.py"
] | [
"import numpy as np\nimport torch\n\nclass Memory():\n def __init__(self,device=\"cpu\",data=None,ordered=True):\n self.device=device\n self.data=data if data is not None else {}\n self.ordered=ordered\n\n def clear(self):\n self.data={}\n\n def __len__(self):\n keys=self.keys()\n if len(keys)=... | [
[
"torch.cat",
"numpy.random.choice"
]
] |
tavaresdong/stanford_cs224n | [
"09936ce5d994bb25bb45d19fd363c37198b6eda2"
] | [
"assignment2/q1_classifier.py"
] | [
"import time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom q1_softmax import softmax\nfrom q1_softmax import cross_entropy_loss\nfrom model import Model\nfrom utils.general_utils import get_minibatches\n\n\nclass Config(object):\n \"\"\"Holds model hyperparams and data information.\n\n The config cla... | [
[
"tensorflow.zeros",
"numpy.random.rand",
"numpy.zeros",
"numpy.random.seed",
"tensorflow.Graph",
"tensorflow.Session",
"tensorflow.matmul",
"tensorflow.truncated_normal",
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDesc... |
willdickson/sys_id_utils | [
"5dbf95e04e27377dcabed2f672f5fa788b0860d3"
] | [
"examples/run_sim_and_calc_resp_v2.py"
] | [
"import warnings\nimport numpy as np\nimport scipy as sp\nimport matplotlib.pyplot as plt\nimport sys_id_utils\n\nnum_pts = 5000 \nt0 = 0.0 # Start time\nt1 = 20.0 # End time\n\n# Yaw dynamics + controller model parameters\nmodel_param = {\n 'inertia' : 1.0,\n 'damping' : 0.0,\n 'pro_gain'... | [
[
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"numpy.linspace",
"matplotlib.pyplot.figlegend",
"scipy.signal.bode"
]
] |
Yunnglin/Chart-to-text | [
"86f3291930289a4739f658c590e208771759ee50"
] | [
"testfile/test_CornerNetPureBar.py"
] | [
"import os\nimport cv2\nimport json\nimport numpy as np\nimport torch\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm\nfrom config import system_configs\nfrom utils import crop_image, normalize_\nimport external.nms as nms\n\ndef _rescale_points(dets, ratios, borders, sizes):\n xs, ys = dets[:, :, 2], de... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.savefig",
"torch.no_grad",
"matplotlib.pyplot.close",
"numpy.shape",
"matplotlib.pyplot.figure",
"torch.from_numpy",
"torch.cuda.is_available",
"matplotlib.pyplot.Axes",
"numpy.clip",
"numpy.p... |
ihounie/benchmarking-gnns | [
"b62268b162b2506630028d92123826694f6bb018"
] | [
"data/molecules.py"
] | [
"import torch\nimport pickle\nimport torch.utils.data\nimport time\nimport os\nimport numpy as np\n\nimport csv\n\nimport dgl\n\nfrom scipy import sparse as sp\nimport numpy as np\n\n# *NOTE\n# The dataset pickle and index files are in ./zinc_molecules/ dir\n# [<split>.pickle and <split>.index; for split 'train', '... | [
[
"numpy.array",
"torch.sqrt",
"numpy.real",
"torch.from_numpy",
"torch.mm",
"torch.zeros_like",
"torch.diag",
"torch.sum"
]
] |
stnava/addons | [
"faa5cee641127926c266932296d4ece60783f62a"
] | [
"tensorflow_addons/image/dense_image_warp.py"
] | [
"# Copyright 2019 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.convert_to_tensor",
"tensorflow.shape",
"tensorflow.range",
"tensorflow.expand_dims",
"tensorflow.debugging.assert_greater_equal",
"tensorflow.function",
"tensorflow.reshape",
"tensorflow.constant",
"tensorflow.math.maximum",
"tensorflow.name_scope",
"tensor... |
nodedge/pyqtgraph | [
"5a08650853a339c383281fd531fe059b74e1bbcd"
] | [
"examples/linkedViews.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nThis example demonstrates the ability to link the axes of views together\nViews can be linked manually using the context menu, but only if they are given \nnames.\n\"\"\"\n\nimport initExample ## Add path to library (just for examples; you do not need this)\n\n\nfrom pyqtgraph.Qt i... | [
[
"numpy.linspace",
"numpy.sin"
]
] |
tanp5364/onnx-tensorflow | [
"08e41de7b127a53d072a54730e4784fe50f8c7c3"
] | [
"onnx_tf/common/__init__.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport inspect\nimport re\nimport sys\nimport uuid\nimport warnings\nimport logging\n\nfrom onnx.backend.base import DeviceType\nfrom tensorflow.python.client i... | [
[
"tensorflow.python.client.device_lib.list_local_devices"
]
] |
petermartigny/NeMo | [
"b20821e637314940e36b63d32c601c43d1b74051"
] | [
"collections/nemo_asr/nemo_asr/parts/jasper.py"
] | [
"# Taken straight from Patter https://github.com/ryanleary/patter\n# TODO: review, and copyright and fix/add comments\nimport torch\nimport torch.nn as nn\n\njasper_activations = {\n \"hardtanh\": nn.Hardtanh,\n \"relu\": nn.ReLU,\n \"selu\": nn.SELU,\n}\n\n\ndef init_weights(m, mode='xavier_uniform'):\n ... | [
[
"torch.nn.Dropout",
"torch.nn.init.kaiming_uniform_",
"torch.nn.ModuleList",
"torch.max",
"torch.arange",
"torch.nn.init.kaiming_normal_",
"torch.nn.init.xavier_uniform_",
"torch.nn.init.ones_",
"torch.nn.GroupNorm",
"torch.nn.BatchNorm1d",
"torch.nn.Hardtanh",
"tor... |
yd8534976/Personae | [
"5da37a51c446275a5d2e2c9d745fbf24b736c340"
] | [
"base/nn/pt/model.py"
] | [
"# coding=utf-8\n\nimport numpy as np\n\nfrom abc import abstractmethod\n\n\nclass BasePTModel(object):\n\n def __init__(self, env, **options):\n\n self.env = env\n\n try:\n self.learning_rate = options['learning_rate']\n except KeyError:\n self.learning_rate = 0.001\n\... | [
[
"numpy.where"
]
] |
RuJinlong/ProDy | [
"cf23b96f147321e365b2c5fd2a527018c1babb67"
] | [
"prody/trajectory/trajectory.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"This module defines a class for handling multiple trajectories.\"\"\"\n\nimport os.path\n\nimport numpy as np\n\nfrom .trajbase import TrajBase\nfrom .frame import Frame\n\nfrom prody.trajectory import openTrajFile\n\n__all__ = ['Trajectory']\n\nclass Trajectory(TrajBase):\n\n \"\... | [
[
"numpy.array",
"numpy.arange",
"numpy.unique"
]
] |
dmcnamee/snc | [
"c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786",
"c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786"
] | [
"tests/snc/agents/activity_rate_to_mpc_actions/test_feedback_mip_feasible_mpc_policy.py",
"src/snc/simulation/validation_script.py"
] | [
"import numpy as np\nfrom snc.agents.activity_rate_to_mpc_actions.feedback_mip_feasible_mpc_policy \\\n import FeedbackMipFeasibleMpcPolicy\n\n\ndef get_mpc_policy_sirl():\n # Simple reentrant line like environment.\n constituency_matrix = np.array([[1, 0, 1], [0, 1, 0]])\n buffer_processing_matrix = np... | [
[
"numpy.array",
"numpy.ones_like",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.eye"
],
[
"numpy.array",
"numpy.random.seed",
"numpy.ones",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ioff"
]
] |
ichbk/outlierhub | [
"5cb1ac80a9ea73b5144644d82ba695f3574e6815"
] | [
"src/outlier_hub/datasets/odr/preprocessor.py"
] | [
"import os\nimport sys\nimport tempfile\nimport h5py\nimport glob\nimport csv\nimport numpy as np\nimport pandas as pd\nimport io\n\nfrom natsort import natsorted, ns\nfrom PIL import Image, ImageFile\nfrom pathlib import Path\nfrom typing import Tuple, List, Any\nfrom data_stack.io.resources import StreamedResourc... | [
[
"pandas.DataFrame",
"pandas.read_excel",
"numpy.asarray"
]
] |
mikiec84/magenta | [
"f10c6a52e22b9694542b419d20b64f2ace32ad70"
] | [
"magenta/models/performance_rnn/performance_rnn_train.py"
] | [
"# Copyright 2017 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 appli... | [
[
"tensorflow.logging.set_verbosity",
"tensorflow.app.flags.DEFINE_integer",
"tensorflow.app.flags.DEFINE_string",
"tensorflow.app.flags.DEFINE_boolean",
"tensorflow.logging.info",
"tensorflow.gfile.MakeDirs",
"tensorflow.logging.fatal",
"tensorflow.app.run"
]
] |
ymym3412/textcnn-conv-deconv-pytorch | [
"f0101160b8bd2de0f2a0718a9053ad85dc5f695f"
] | [
"datasets.py"
] | [
"from torch.utils.data import Dataset\nimport torch\nimport numpy as np\nfrom tqdm import tqdm\n\nfrom collections import Counter\nfrom copy import deepcopy\n\n\ndef load_hotel_review_data(path, sentence_len):\n \"\"\"\n Load Hotel Reviews data from pickle distributed in https://drive.google.com/file/d/0B52eY... | [
[
"numpy.array",
"torch.from_numpy"
]
] |
DocOtak/xarray | [
"01a9baa01b1378cbf3f324ea3c27150a3860d3d1"
] | [
"xarray/core/dtypes.py"
] | [
"import functools\n\nimport numpy as np\n\nfrom . import utils\n\n# Use as a sentinel value to indicate a dtype appropriate NA value.\nNA = utils.ReprObject('<NA>')\n\n\n@functools.total_ordering\nclass AlwaysGreaterThan:\n def __gt__(self, other):\n return True\n\n def __eq__(self, other):\n re... | [
[
"numpy.result_type",
"numpy.timedelta64",
"numpy.issubdtype",
"numpy.dtype",
"numpy.datetime64"
]
] |
gtr8/Gradient-Free-Optimizers | [
"19dcde35d93f048721bac3600f33696ca21ec669"
] | [
"tests/test_optimizers/test_parameter/test_stochastic_hill_climbing_para_init.py"
] | [
"# Author: Simon Blanke\n# Email: simon.blanke@yahoo.com\n# License: MIT License\n\nimport pytest\nimport numpy as np\n\nfrom gradient_free_optimizers import StochasticHillClimbingOptimizer\nfrom .test_hill_climbing_para_init import hill_climbing_para\nfrom ._base_para_test import _base_para_test_func\n\n\ndef obje... | [
[
"numpy.arange"
]
] |
saksham-mittal/CS6510-Kaggle-Challenge | [
"01cf220a826649fc7341c057a2175c98acf025ba"
] | [
"random-forests.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import LabelEncoder, OneHotEncoder\nfrom sklearn.ensemble import RandomForestClassifier\n\ntraining_set = pd.read_csv(\"train.csv\")\n\n# Extracting labels from training set\ntraining_labels = training_set['pricing_category']\nprint(training_label... | [
[
"sklearn.preprocessing.LabelEncoder",
"numpy.asarray",
"numpy.zeros",
"sklearn.ensemble.RandomForestClassifier",
"pandas.read_csv",
"sklearn.preprocessing.OneHotEncoder"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.