repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
zhaniya-meruki/ZhaniyaKoishybayevaMasterThesis
[ "4e6cabeea711ef70fbe72e7b648b29f94bca1a66" ]
[ "synthesizer/hparams.py" ]
[ "from tensorflow.contrib.training import HParams\nfrom glob import glob\nimport os, pickle\n\ndef get_image_list(split, data_root, stream):\n if stream == 'rgb' or stream == 'both':\n folder = 'rgb_roi'\n elif stream == 'thr':\n folder = 'thr_roi'\n\n filelist = [] \n with open(os.path.j...
[ [ "tensorflow.contrib.training.HParams" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "1.2" ] } ]
ravitejau/User_Churning_Prediction_StackOverflow
[ "58ec5822e3ca23e912d154004e353df1725e2bc7" ]
[ "src/data/make_user_csv.py" ]
[ "import xml.etree.cElementTree as et\nimport pandas as pd\n \ndef getvalueofnode(node):\n \"\"\" return node text or None \"\"\"\n return node.text if node is not None else None\n \n\n\ndef users():\n \"\"\" Convert PostHistory.xml to pandas dataframe \"\"\"\n\n parsed_xml = et.parse(\"../../data/raw/Us...
[ [ "pandas.Series", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
Jmzahn/Covid-19_USCountyData
[ "707b54469c2d85e3f631e3122372e5c243364cba" ]
[ "lib.py" ]
[ "#library of helper functions\nimport os\nimport time\n\nimport numpy as np\nimport pandas as pd\n\n#a bunch of data loading functions\n\n#data from https://hifld-geoplatform.opendata.arcgis.com/datasets/hospitals\ndef loadHospitals():\n df = pd.read_csv(os.path.dirname(__file__)+'/data/Hospital_data/Hospitals.c...
[ [ "matplotlib.pyplot.legend", "pandas.DataFrame", "numpy.datetime64", "matplotlib.pyplot.plot", "numpy.timedelta64", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.empty", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
Lupphes/MSU-LatentAFIS
[ "1ca5f027c4d6df7b60b975354c3456e315fdd1cd" ]
[ "extraction/msu_latentafis/models/net.py" ]
[ "# lenet.py\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n__all__ = ['Net']\n\n\nclass Net(nn.Module):\n def __init__(self, nchannels=3, nclasses=10):\n super(Net, self).__init__()\n self.conv1 = nn.Conv2d(nchannels, 6, 5)\n self.conv1 = nn.Conv2d(3, 6, 5)\n self.pool =...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Conv2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
antoniopenta/deep_reinforcement_learning
[ "ae6e7269c37df6af50f18b19337c820c98292932" ]
[ "drl_multiagent_rl/framework/coordinator.py" ]
[ "\nimport numpy as np\nimport random\nimport copy\nfrom collections import namedtuple, deque\n\nfrom framework.networks import Actor, Critic\n\nimport torch\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.nn import MSELoss\nfrom framework.agent import *\nfrom utils.buffer import *\ndevice ...
[ [ "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dedert/Brand2Vec
[ "a9e89dc263dc45c988893dff51d9849f440630b7" ]
[ "parameter_search/util.py" ]
[ "import pandas as pd\nfrom ast import literal_eval\n\nimport gensim\nfrom gensim.models import Phrases\nfrom gensim.models.doc2vec import TaggedDocument\nassert gensim.models.doc2vec.FAST_VERSION == 1, \"this will be painfully slow otherwise\"\n\n\ndef sentence_list(data):\n sentence_list = []\n brand_list = ...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
CovidTrackerFr/forecast
[ "69e97e16daae95e2e3debe0fcdcc1f0643aabdb9" ]
[ "src/data.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"covid19_var_model.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1HgtWVKtoJE5WlJKtliyW12SC5uYqOF4l\n\"\"\"\n\n# Import libraries\nimport pandas as pd\nimport numpy as np\n\ndef import_and_prepare_data():\n...
[ [ "numpy.log10", "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
mariko19/sentiment_analysis
[ "2f3bbbdf8ea4d07f4725639d7163a46873409c00" ]
[ "predict.py" ]
[ "import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\nfrom utils import review_to_words, convert_and_p...
[ [ "numpy.hstack", "torch.from_numpy", "torch.cuda.is_available", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ForrestPi/Unsupervised-Defect-Segmentation
[ "e366ac7c757bb1b45f38ebbc502dfee7ccb72398" ]
[ "textured_surface_anomaly_detection/train_tb.py" ]
[ "# !/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\nimport numpy as np\nimport os\nimport sys\nimport argparse\n\nimport network\nimport provider\nimport tf_utils\nimport math\n\nBASE_DIR = os.path.dirname(__file__)\nDATA_ROOT = os.path.join(BASE_DIR, '../data/Class1/')\n\nparser = argparse.Arg...
[ [ "tensorflow.Graph", "tensorflow.Variable", "tensorflow.maximum", "tensorflow.minimum", "tensorflow.placeholder", "tensorflow.train.exponential_decay", "tensorflow.ConfigProto", "tensorflow.global_variables_initializer", "tensorflow.train.MomentumOptimizer", "tensorflow.summ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
lixiaoyu0575/BUTTeam
[ "4686f19146b259c2fa26c929525742bd5d102601" ]
[ "notes/test/test_script_pytorch_gpu.py" ]
[ "import torch\nimport time\n\na=torch.zeros(5)\n\na=a.cuda()\n\nprint(a)\n\ntime.sleep(20)\n" ]
[ [ "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Gauraviitkgp/SIR-Modelling
[ "02ab89d64040b09ddce820a1ecbbc0cfc9b13f29" ]
[ "src/workplaces.py" ]
[ "import numpy as np\nimport random\n\nfrom tabulate import tabulate\nclass Workplace(object):\n\tdef __init__(self,SectorName,Subclass,Id,E,V,Sector):\n\t\tsuper(Workplace, self).__init__()\n\t\tself.SectorName\t\t\t= SectorName\n\t\tself.Subclass \t\t\t= Subclass\n\t\tself.Id \t\t\t\t= Id\n\t\tself.E \t ...
[ [ "numpy.random.normal", "numpy.zeros", "numpy.sum", "numpy.multiply" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isaacanthony/yaml-pipeline
[ "d2fa061ce55569d813a21e00a539531c564e3375", "d2fa061ce55569d813a21e00a539531c564e3375" ]
[ "tests/nodes/test_drop_columns.py", "tests/nodes/test_rename_columns.py" ]
[ "\"\"\"Test drop_columns node\"\"\"\nimport unittest\nimport pandas as pd\nfrom yaml_pipeline.nodes.all import run\n\nDF = pd.DataFrame([{\n 'col1': 1,\n 'col2': 2,\n 'col3': 3,\n 'col4': 4,\n}])\n\nSETTINGS = {\n 'type': 'drop_columns',\n 'columns': [\n 'col3',\n 'col4',\n ],\n}\...
[ [ "pandas.DataFrame" ], [ "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "nump...
xingyu-long/models
[ "eae0eaf4c6dbb02a61df27ac62dcdc645563277c" ]
[ "research/delf/delf/python/examples/detector.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 requi...
[ [ "tensorflow.compat.v1.saved_model.loader.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
achao2013/deep3dmap
[ "7250020239fbee0959067cc0a26fc6afd9b92c7d" ]
[ "deep3dmap/runners/state_machine_runner.py" ]
[ "#!/usr/bin/env python\n# -*- coding=utf8 -*-\n\"\"\"\n# Author: achao\n# File Name: state_machine_runner.py\n# Description:\n\"\"\"\n\nimport os\nimport os.path as osp\nimport platform\nimport shutil\nimport time\nimport warnings\nfrom deep3dmap.core import utils\nfrom deep3dmap.runners.optimizer import build_opti...
[ [ "torch.no_grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jonas-Grundler/Warehouse-Simulation-Tool
[ "dd82bf9268f60bc2811c0c681f36babf7ba1f4a9" ]
[ "simulation_tool/data.py" ]
[ "import pandas as pd\nimport numpy as np\n\n'''\n#############################################################################\n\nDESCRIPTION DATA.PY\nAuthor: Jonas Grundler (University of Edinburgh)\n\nThis module can be used to generate random order data.\n\n Functions:\n - generate_orders(): Generat...
[ [ "numpy.ceil", "pandas.DataFrame", "numpy.random.default_rng" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
StatCan/SLICEmyPDF
[ "d135ad2133451e1d2cf4b63bb479dbf6a2edbfbc" ]
[ "slicemypdf/utilities/read_xml_json.py" ]
[ "# standard libraries\nimport io\nimport sys\nimport requests\nimport urllib\nfrom typing import Callable, Optional, List\nimport collections\n\nif sys.version_info >= (3, 6):\n from zipfile import ZipFile\nelse:\n from zipfile36 import ZipFile\n\n# installed packages\nimport pandas as pd\nfrom pandas import ...
[ [ "pandas.json_normalize" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0" ], "scipy": [], "tensorflow": [] } ]
taddy569/waveglow
[ "734d4c786288ed8d35478d441326571117896a09" ]
[ "glow.py" ]
[ "# *****************************************************************************\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redis...
[ [ "torch.cat", "torch.nn.utils.weight_norm", "torch.nn.ModuleList", "torch.det", "torch.nn.functional.conv1d", "torch.sum", "torch.nn.utils.remove_weight_norm", "torch.logdet", "torch.nn.functional.sigmoid", "torch.exp", "torch.FloatTensor", "torch.nn.Conv1d", "to...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
salesforce/DAPC
[ "df2b8bffdb78d21de9bb8c2d17c5cdb2590de54a", "df2b8bffdb78d21de9bb8c2d17c5cdb2590de54a" ]
[ "dapc/cov_utils.py", "transformer/add_sos_eos.py" ]
[ "# Copyright (c) 2021, salesforce.com, inc.\n# All rights reserved.\n# SPDX-License-Identifier: BSD-3-Clause\n# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause\n\n# Salesforce Research (Junwen Bai, Weiran Wang)\n\n\"\"\"\nThis implementation is modified f...
[ [ "torch.ones", "torch.zeros", "torch.reshape", "torch.sum", "torch.eye", "torch.logdet", "torch.mul" ], [ "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mitchelljeff/hack1
[ "990d873cbcd40d2978f44560016d18a76800908e" ]
[ "tests/jack/nn/test_models.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\nimport time\nfrom os.path import join, exists\n\nimport numpy as np\nimport pytest\n\nOVERFIT_PATH = './tests/test_results/overfit_test/'\nSMALLDATA_PATH = './tests/test_results/smalldata_test/'\n\n# if you add a model here, you need the data in the format o...
[ [ "numpy.allclose", "numpy.float32" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
algorithme/giotto-learn
[ "9141480634c250990ae1247907cfa9dcc40bef93" ]
[ "giotto/homology/point_clouds.py" ]
[ "\"\"\"Persistent homology on point clouds or finite metric spaces.\"\"\"\n# License: Apache 2.0\n\nimport numpy as np\nimport numbers\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom joblib import Parallel, delayed\nfrom sklearn.utils.validation import check_array, check_is_fitted\nfrom ._utils impo...
[ [ "sklearn.utils.validation.check_is_fitted", "sklearn.utils.validation.check_array", "numpy.min", "numpy.nan_to_num", "numpy.stack", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
michel4j/mxdc
[ "844f0854cc696553c8a51f8e9b5b06a8e4345261", "844f0854cc696553c8a51f8e9b5b06a8e4345261" ]
[ "mxdc/widgets/imageviewer.py", "mxdc/controllers/humidity.py" ]
[ "import time\nimport logging\nimport os\n\nimport numpy\nfrom gi.repository import GLib\nfrom gi.repository import Gtk\nfrom mxdc.utils import gui\nfrom mxdc.widgets import dialogs\nfrom mxdc.widgets.imagewidget import ImageWidget\nfrom mxdc import Registry\nfrom zope.interface import Interface\n\nlogger = logging....
[ [ "numpy.zeros", "numpy.loadtxt" ], [ "numpy.log", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tdallas/sia-tp3
[ "d1710d52796f4e19a428fc4b822bf1c42507e7a8" ]
[ "ej_1/simple_perceptron.py" ]
[ "import numpy as numpy\n\nclass SimplePerceptron():\n \n def __init__(self, training_inputs, training_expected_values, eta=0.25, iterations=1000):\n self.eta = eta\n self.iterations = iterations\n self.input_size = len(training_inputs[0])\n self.training_inputs = numpy.array(traini...
[ [ "numpy.insert", "numpy.array", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kisom/aipnd-classifier
[ "a361fc5f25402bbdfb23ddc08ad1b071fff50210" ]
[ "model.py" ]
[ "\"\"\"\nmodel.py contains code for building models from torchvision models, and defines\na class that acts as a container.\n\"\"\"\n\nfrom collections import OrderedDict\nimport pickle\n\nfrom PIL import Image\nimport torch\nfrom torch import nn\nfrom torch import optim\nfrom torchvision import models, transforms\...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.nn.Linear", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
billmcchesney1/distpy
[ "fa49d2a910b164514057ee75fa570397b7004159" ]
[ "distpy/workers/plotgenerator.py" ]
[ "# (C) 2020, Schlumberger. Refer to LICENSE\n\nimport numpy\nimport matplotlib.pyplot as plt\nimport datetime\nimport scipy.signal\nimport os\nimport distpy.io_help.io_helpers as io_helpers\nimport distpy.io_help.directory_services as directory_services\nimport distpy.calc.extra_numpy as extra_numpy\nimport distpy....
[ [ "matplotlib.pyplot.switch_backend", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
machine-intelligence/Rainbow
[ "a414584382ae3ed59f1e8e41a363f2e0958e0292" ]
[ "agent.py" ]
[ "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport os\nimport numpy as np\nimport torch\nfrom torch import optim\n\nfrom Rainbow.model import DQN\n\n\nclass Agent():\n def __init__(self, args, env):\n self.action_space = env.action_space()\n self.atoms = args.atoms\n self.Vmin = args.V_min\...
[ [ "torch.linspace", "numpy.random.random", "torch.load", "torch.sum", "torch.no_grad", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jcoughlin11/scholarphi
[ "014e0fe6e3967ca3c6362ac640ea4f866b2bb6ed" ]
[ "data-processing/entities/definitions/model/trainer.py" ]
[ "import logging\nimport os\nimport shutil\nfrom collections import Counter\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset\nfrom tqdm import tqdm, trange\nfrom transformers import AdamW...
[ [ "torch.utils.data.SequentialSampler", "torch.utils.data.DataLoader", "torch.utils.data.RandomSampler", "numpy.argmax", "torch.no_grad", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jpmaldonado/BuildingIntelligentSystems
[ "23c67c3afd5266eb4b62cec3988d592016800e85" ]
[ "05 RL demo.py" ]
[ "import gym\nimport numpy as np\nfrom tqdm import tqdm\nfrom time import sleep\n\ndef featurize(s,a):\n return (2*a-1)*s\n\ndef Q(s,a, theta):\n vec = featurize(s,a)\n return np.dot(vec,theta)\n\nenv = gym.make(\"CartPole-v0\")\nactions = range(env.action_space.n)\ntheta_star = np.array([0,0,3,1])\ngamma =...
[ [ "numpy.dot", "numpy.random.random", "numpy.random.seed", "numpy.random.choice", "numpy.random.rand", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
play0137/Stock_web_crawler
[ "4906aa01797d73da5c86a9749bf57663759245c1" ]
[ "stock_filter_df.py" ]
[ "\"\"\"\nOriginal data:公司股市代號對照表.csv\n\nConditions:\n1.單月營收歷月排名 1高\n from 月營收創新高.xlsx\n2.負債比 < 40% \n 季度\n https://goodinfo.tw/StockInfo/StockList.asp?RPT_TIME=&MARKET_CAT=%E7%86%B1%E9%96%80%E6%8E%92%E8%A1%8C&INDUSTRY_CAT=%E8%B2%A0%E5%82%B5%E7%B8%BD%E9%A1%8D%E4%BD%94%E7%B8%BD%E8%B3%87%E7%94%A2%E6%AF%94%E6%...
[ [ "pandas.merge", "pandas.read_excel", "pandas.Series", "pandas.ExcelWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
DunnCreativeSS/transformers
[ "384f0eb2f9d42e44094dbfd0917ccf4e6ddb462a" ]
[ "examples/text-classification/run_glue.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may...
[ [ "numpy.squeeze", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
robertlugg/transform
[ "7ec9f785a6b818aabddcf8b748434f03d50e9f5e" ]
[ "tensorflow_transform/analyzer_nodes.py" ]
[ "# Copyright 2018 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.compat.v1.get_default_graph", "tensorflow.compat.as_text", "tensorflow.compat.v1.placeholder", "numpy.array", "tensorflow.dtypes.as_dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
raeidsaqur/SeqGAN-RELAX
[ "2ddf612a8556a4cac523d25c9ef32eb3b1368b47" ]
[ "relax/rebar_tf.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.pyplot import ion\nion()\nimport matplotlib\n\nmatplotlib.rc(\"savefig\") #, dpi=300)\n\n\ndef safe_log_prob(x, eps=1e-8):\n return tf.log(tf.clip_by_value(x, eps, 1.0))\n\ndef safe_clip(x, eps=1e-8):\n return tf....
[ [ "tensorflow.control_dependencies", "numpy.mean", "tensorflow.train.AdamOptimizer", "tensorflow.where", "numpy.var", "tensorflow.check_numerics", "tensorflow.stop_gradient", "tensorflow.Session", "tensorflow.square", "tensorflow.trainable_variables", "tensorflow.tile", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
KaixiangLin/dopamine
[ "228a9ac2d2e9083d3f680c95c8d1fabcd2266d7e" ]
[ "tests/dopamine/tests/train_runner_integration_test.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Dopamine Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.logging.info", "tensorflow.test.main" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FrancescoPinto/pyprob
[ "63bb30bee69616af7464cf9a657813a41d482831" ]
[ "tests/test_distributions.py" ]
[ "import unittest\nimport torch\nimport numpy as np\nimport os\nimport math\nimport uuid\nimport tempfile\n\nimport pyprob\nfrom pyprob import util, Model\nfrom pyprob.distributions import Empirical, Normal, Categorical, Uniform, Poisson, Beta, Bernoulli, Exponential, Gamma, LogNormal, Binomial, Weibull, VonMises, M...
[ [ "torch.Size", "numpy.std", "numpy.mean", "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gdgarcia/pandapower
[ "630e3278ca012535f78282ae73f1b86f3fe932fc" ]
[ "pandapower/plotting/collections.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport copy\nimport inspect\nfrom itertools import combinations\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nf...
[ [ "matplotlib.transforms.Affine2D", "numpy.arctan2", "numpy.all", "matplotlib.pyplot.gca", "numpy.allclose", "matplotlib.pyplot.subplots_adjust", "numpy.repeat", "numpy.zeros", "numpy.isin", "matplotlib.pyplot.figure", "matplotlib.collections.LineCollection", "matplot...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
rewu1993/smart-taxi
[ "cd503866ff0bc3155258a1c3ec2176d97cedb812" ]
[ "utils/loc_utils.py" ]
[ "import pandas as pd\nimport numpy as np\nimport fiona\n\n\n\"\"\"Functions to parse shape file and create count df\"\"\"\ndef create_loc_counts_df(loc,taxi_zones_path):\n loc_count = loc.value_counts()\n zones_coord_dict = get_zones_coord(taxi_zones_path)\n df = parse_centriod_count(loc_count,zones_coord_...
[ [ "pandas.DataFrame.from_dict" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
marcuskaiser/projects
[ "4841bb3adcd8625681d50bc8a2eed599eae44305" ]
[ "independence_tests/mi/mutual_information.py" ]
[ "import numpy as np\n\nfrom independence_tests.mi.utils import _check_xy, _get_bins, _mi\nfrom independence_tests.utils import fast_rank\n\n\ndef mutual_information(x, y, bins=None, rank=False):\n \"\"\"\n Estimate of Mutual Information by discretizing the data into bins.\n First creates a histogram of the...
[ [ "numpy.lib.histogramdd" ] ]
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.13", "1.16", "1.9", "1.18", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], "scipy": [], "tensorflow": [] } ]
Chengcheng-Xiao/mpiPyMC
[ "8f64ba925919f99b39216423cb73785b5de046a0" ]
[ "MC_MPI_Ising.py" ]
[ "from __future__ import print_function\nfrom __future__ import division\nfrom tqdm.auto import tqdm\nimport numpy as np\nfrom numpy.random import rand\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nfrom mpi4py import MPI\ncomm = MPI.COMM_WORLD\nrank = comm.Get_rank()\nsize = comm.Get_...
[ [ "matplotlib.pyplot.scatter", "numpy.linspace", "matplotlib.use", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel", "numpy.random.randint", "numpy.random.rand", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "numpy.exp", "numpy.zeros", "numpy.sum", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
andrew-houghton/moon-board-climbing
[ "ae149586099f4e0a0ee3664404f6493f19f6ad61" ]
[ "moon/models/keras_mlp/model.py" ]
[ "import os\n\nimport numpy as np\nfrom keras.layers import Dense\nfrom keras.models import Sequential\n\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n\n\nclass Model:\n def name(self):\n return \"Keras MLP\"\n\n def train(self, x_train, y_train):\n num_classes = y_train.shape[1]\n\n self...
[ [ "numpy.asarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
conglu1997/robel
[ "5233acdb687af791979180fb6c3cca78ab3659de" ]
[ "robel/components/tracking/vr_tracker.py" ]
[ "# Copyright 2019 The ROBEL Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
silky/echomesh
[ "2fe5a00a79c215b4aca4083e5252fcdcbd0507aa" ]
[ "code/python/external/analyse.py" ]
[ "'''Analyse sound chunks\n\nAnalyse sound chunks to detect loudness and pitch. Also includes some\nutility functions for converting midi note numbers to and from\nfrequencies. Designed for realtime microphone input for singing\ngames.\n\nCopyright 2008, Nathan Whitehead\nReleased under the LGPL\n\n'''\n\nimport n...
[ [ "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oberonbot/FLAML
[ "612668e8ed7bbed66ee1a6f50914e6b4204dd5b7" ]
[ "flaml/automl.py" ]
[ "# !\n# * Copyright (c) FLAML authors. All rights reserved.\n# * Licensed under the MIT License. See LICENSE file in the\n# * project root for license information.\nimport time\nimport os\nfrom typing import Callable, Optional, List, Union\nfrom functools import partial\nimport numpy as np\nfrom scipy.sparse imp...
[ [ "sklearn.model_selection.GroupShuffleSplit", "sklearn.model_selection.RepeatedKFold", "scipy.sparse.issparse", "numpy.isfinite", "numpy.unique", "numpy.reshape", "sklearn.utils.shuffle", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.concatenate", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.1...
f-sky/DeepV2D
[ "5c1c6f58ee359d045a7efd5161445ea87d83bdbe", "5c1c6f58ee359d045a7efd5161445ea87d83bdbe" ]
[ "deepv2d/data_stream/neufu_demo.py", "evaluation/eval_scannet.py" ]
[ "import os.path as osp\nimport os\n\nimport cv2\nimport numpy as np\n\n\nclass DemoDataset:\n \"\"\"Pytorch Dataset for a single scene. getitem loads individual frames\"\"\"\n\n def __init__(self, data_path, scene):\n \"\"\"\n Args:\n \"\"\"\n self.scene = scene\n self.data_...
[ [ "numpy.linalg.inv", "numpy.array", "numpy.stack" ], [ "tensorflow.ConfigProto", "numpy.linalg.inv", "numpy.mean", "tensorflow.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1...
winnerineast/tensor2tensor
[ "1a2543751d582de5f7bb8479424cf89faf877068" ]
[ "tensor2tensor/models/bluenet_test.py" ]
[ "# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.constant", "tensorflow.concat", "tensorflow.test.main", "tensorflow.train.get_or_create_global_step", "tensorflow.global_variables_initializer", "numpy.random.random_integers" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
srio/minishadow
[ "019bf46106f09f89297e01c273784e8059e02014" ]
[ "shadow4/physical_models/bragg/bragg.py" ]
[ "# todo: DELETE? this class is not used... use crystalpy instead...\n#\n# Bragg() a class to manipulate the shadow bragg preprocessor file v1\n#\n# uses xoppylib that contains bragg preprocessor readers\n#\nimport numpy\nimport scipy.constants as codata\nfrom xoppylib.crystals.bragg_preprocessor_file_io import bra...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.cos", "numpy.sin", "numpy.array", "numpy.zeros", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
devrimcavusoglu/ignite
[ "f51ef0c299511399639c15e9735a78cb6b60db97", "f51ef0c299511399639c15e9735a78cb6b60db97" ]
[ "ignite/metrics/nlp/bleu.py", "ignite/contrib/handlers/neptune_logger.py" ]
[ "import math\nfrom collections import Counter\nfrom typing import Any, Callable, Sequence, Tuple, Union, ValuesView\n\nimport torch\n\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import Metric, reinit__is_reduced, sync_all_reduce\nfrom ignite.metrics.nlp.utils import modified_precis...
[ [ "torch.device", "torch.tensor" ], [ "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ammunk/pyprob
[ "56a165b5c01edd16471f4cc29891b5f5fd163c10" ]
[ "pyprob/graph.py" ]
[ "import pydotplus\nimport os\nimport math\nimport numpy as np\nfrom collections import OrderedDict\nfrom itertools import islice\n\nfrom . import util, diagnostics\nfrom .distributions import Empirical\n\n\nclass Node():\n def __init__(self, address_id, variable, weight):\n self.address_id = address_id\n ...
[ [ "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
s0hvaperuna/Not-a-bot
[ "933ae57e70a5c98fed6800205595af21bbf1a10e" ]
[ "cogs/voting.py" ]
[ "import argparse\nimport asyncio\nimport logging\nimport operator\nimport re\n\nimport disnake\nimport numpy\nfrom asyncpg.exceptions import PostgresError\nfrom disnake.ext.commands import BucketType, cooldown, is_owner, guild_only\nfrom emoji import emoji_count\n\nfrom bot.bot import command, has_permissions, bot_...
[ [ "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fossabot/batchflow
[ "967fe76afcbb13040b5da9f25baba99394f53038" ]
[ "batchflow/tests/named_expr_test.py" ]
[ "# pylint: disable=redefined-outer-name, missing-docstring\nimport sys\nfrom contextlib import ExitStack as does_not_raise\n\nimport pytest\nimport numpy as np\n\nsys.path.append('..')\nfrom batchflow import B, C, D, F, L, V, R, P, I, Dataset, Pipeline, Batch, apply_parallel, inbatch_parallel, action\n\n\n#--------...
[ [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Xi-CAM/Xi-cam-unified
[ "8b2811a8c13e18ec3b8860dfa5aee1eabc42da9e" ]
[ "xicam/plugins/tests/test_OperationPlugin.py" ]
[ "import pytest\nimport inspect\n\nimport numpy as np\n\nfrom xicam.core import msg\n\n# from xicam.plugins import operation\nfrom xicam.plugins.operationplugin import (\n display_name,\n fixed,\n input_names,\n limits,\n opts,\n output_names,\n output_shape,\n units,\n visible,\n Valid...
[ [ "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rnt-pmi/odin
[ "8cfddf04f964393ef30217aa5f4aa61229d7e811" ]
[ "odin/classes/analyzer_classification.py" ]
[ "import copy\nimport math\nimport os\nimport sys\nfrom collections import defaultdict\n\nimport numpy as np\nimport pandas as pd\nfrom abc import ABC\n\nfrom sklearn.metrics import auc, multilabel_confusion_matrix, confusion_matrix\n\nfrom odin.classes import DatasetClassification, TaskType\nfrom odin.classes.analy...
[ [ "numpy.true_divide", "pandas.merge", "numpy.sqrt", "numpy.linspace", "numpy.cumsum", "sklearn.metrics.confusion_matrix", "numpy.concatenate", "numpy.mean", "numpy.digitize", "numpy.where", "numpy.unique", "numpy.std", "numpy.warnings.filterwarnings", "numpy....
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
VlachosGroup/AdsorptionConfiguration_MS2021
[ "7ff88e9f21358e4c98135c858d840f36bc6a3116" ]
[ "enumeration/5FourorMoreAtomConfigEnum.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 20 11:57:31 2018\n\n@author: Gu\n\"\"\"\nimport json\nfrom rdkit import Chem\nfrom util import SurfHelper, SetUpReaction, RemoveLatticeAmbiguity, CheckConfig,\\\n BridgeRule, SetUpRingReaction, CleanUp\nfrom tqdm import tqdm\nimport pandas\nimport time\nimport...
[ [ "pandas.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
qwopqwop200/Fast-Invertible-Rescaling-Net
[ "871733f2eee7929d6b37c4d1d6a27347b39b67a9" ]
[ "codes/models/FIRN_model.py" ]
[ "import logging\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.parallel import DataParallel, DistributedDataParallel\nimport models.networks as networks\nimport models.lr_scheduler as lr_scheduler\nfrom .base_model import BaseModel\nfrom models.modules.loss import Reconst...
[ [ "torch.optim.Adam", "torch.nn.parallel.DataParallel", "torch.cuda.current_device", "torch.sum", "torch.no_grad", "torch.distributed.get_rank" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
McMvMc/DVS_compare
[ "9e0408bfe2a3217f75f3349d505498c76eac3400" ]
[ "run_nerf_helpers.py" ]
[ "import os\nimport torch\nimport imageio\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as F\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n\n# Misc utils\ndef img2mse(x, y, M=None):\n if M == None:\n return torch.mean((x - y) ** 2)\n else:\n ...
[ [ "torch.mean", "torch.abs", "torch.cat", "torch.load", "torch.sum", "numpy.max", "torch.cuda.is_available", "torch.split", "numpy.moveaxis", "torch.clamp", "numpy.clip", "numpy.arange", "torch.reshape", "torch.median", "numpy.stack", "torch.nn.functio...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RuikangSun/PaddleHelix
[ "6e082f89b8090c3c360593d40a08bffc884165dd" ]
[ "apps/drug_target_interaction/sman/metrics.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 req...
[ [ "numpy.abs", "scipy.stats.spearmanr", "sklearn.linear_model.LinearRegression", "numpy.corrcoef", "numpy.argsort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
stevezheng23/contextual_modeling_tf
[ "d68c36f69e8dc84286b3165aafc2158f12316139" ]
[ "contextual_modeling/util/contextual_modeling_util.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\nfrom util.default_util import *\n\n__all__ = [\"create_variable_initializer\", \"create_weight_regularizer\", \"create_activation_function\",\n \"softmax_with_mask\", \"generate_masked_data\"]\n\ndef create_variable_initializer(initializer_type,\n ...
[ [ "tensorflow.nn.softmax", "tensorflow.glorot_normal_initializer", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.random_uniform_initializer", "tensorflow.contrib.layers.l1_regularizer", "tensorflow.truncated_normal_initializer", "tensorflow.orthogonal_initializer"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.4", "1.5", "1.7", "1.0", "1.2" ] } ]
RolandGao/RegSeg
[ "40f8c0bab7048eb5bb8bba6c76393275e61f7050", "40f8c0bab7048eb5bb8bba6c76393275e61f7050" ]
[ "datasets/coco.py", "competitors_models/hardnet.py" ]
[ "from PIL import Image\nimport torch.utils.data as data\nimport os\nimport json\nimport numpy as np\nfrom pycocotools import mask as coco_mask\n\ndef load_coco_json(json_file, image_dir):\n from pycocotools.coco import COCO\n coco_api = COCO(json_file)\n # sort indices for reproducible results\n img_ids...
[ [ "numpy.zeros" ], [ "torch.nn.Sequential", "torch.cat", "torch.randn", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.AvgPool2d", "torch.nn.functional.interpolate", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zengchen1024/mindarmour
[ "eed59453cf048da92fe15f57dbe3ca7de8b7adcb" ]
[ "tests/st/resnet50/resnet_cifar10.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...
[ [ "numpy.random.uniform", "numpy.random.normal", "numpy.zeros", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lukasfolle/fastMRI
[ "d533913ba2a51c5de80efb9a2c55bcde35777e24", "d533913ba2a51c5de80efb9a2c55bcde35777e24" ]
[ "fastmri/pl_modules/mri_module.py", "fastmri/pl_modules/data_module.py" ]
[ "\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport pathlib\nfrom argparse import ArgumentParser\nfrom collections import defaultdict\n\nimport fastmri\nimport numpy as...
[ [ "torch.view_as_real", "torch.abs", "torch.tensor" ], [ "torch.utils.data.DistributedSampler", "torch.utils.data.DataLoader", "torch.distributed.is_initialized", "torch.utils.data.get_worker_info", "torch.distributed.is_available", "torch.distributed.get_rank" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
duymanhdoan/InsightFace_Pytorch
[ "4fec277889ef0f79d9b7cb3669d0ed64c5c7e411" ]
[ "config.py" ]
[ "from easydict import EasyDict as edict\nfrom pathlib import Path\nimport torch\nfrom torch.nn import CrossEntropyLoss\nfrom torchvision import transforms as trans\nimport args\nimport configure\n\ndef get_config(training = True):\n conf = edict()\n conf.data_path = Path(configure.root_dir)\n conf.work_pat...
[ [ "torch.nn.CrossEntropyLoss", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FabioSeixas/traDSSAT
[ "e7ac31a3c2d0f4f303c64c0ea685ce2903502b4c" ]
[ "tradssat/mgrs/gen_mgr.py" ]
[ "import os\n\nimport numpy as np\n\nfrom tradssat import CULFile, ECOFile\nfrom .mgr import get_dssat_subdir, PeriphFileMgr\n\n\nclass PeriphGenMgr(PeriphFileMgr):\n\n def __init__(self, crops, cultivars, levels, model=None):\n self.crops = crops\n self.cultivars = cultivars\n\n self.files =...
[ [ "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
opme/CalculiX-Examples
[ "00d220226946d3761f12775165bdf5ac2cc3226e" ]
[ "Scripts/monitor.py" ]
[ "#!/opt/conda/bin/python\n\"\"\"\nThis is a monitor for .sta and .cvg files of calculix\n\"\"\"\nimport sys\nimport numpy\nimport glob\n# replace pylab import\nimport matplotlib as mpl\nmpl.use('Agg')\nimport matplotlib.pylab as pylab\n\n# print(sys.argv[1]\n# job = sys.argv[1]\n# processing command line arguments,...
[ [ "numpy.array", "matplotlib.pylab.show", "matplotlib.pylab.grid", "matplotlib.use", "matplotlib.pylab.semilogy", "matplotlib.pylab.title", "numpy.genfromtxt", "matplotlib.pylab.subplot", "matplotlib.pylab.ylabel", "matplotlib.pylab.plot", "matplotlib.pylab.legend", "...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Marwaahmed96/deep-transfer-learning
[ "2969ed6c740d04283aa54af4e2c267cb980c96fe" ]
[ "MUDA/MFSAN/MFSAN_2src/mmd.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n\nimport torch\nfrom torch.autograd import Variable\n\ndef guassian_kernel(source, target, kernel_mul=2.0, kernel_num=5, fix_sigma=None):\n n_samples = int(source.size()[0])+int(target.size()[0])\n total = torch.cat([source, target], dim=0)\n total0 = total.unsque...
[ [ "torch.exp", "torch.mean", "torch.sum", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
deephealthproject/use-case-pipelines
[ "ea9c8aedfbc9084e1a5350f6f73def2578258c77", "ea9c8aedfbc9084e1a5350f6f73def2578258c77" ]
[ "pytorch/export_segm_onnx.py", "pytorch/skin_lesion_classification/plots.py" ]
[ "import os\nimport subprocess\nimport sys\n\nimport segmentation_models_pytorch as smp\nimport torch\n\nif __name__ == '__main__':\n print('Require: `pip install torch segmentation-models-pytorch onnx-simplifier`')\n os.makedirs('segmmodels', exist_ok=True)\n\n encoders = ['resnet18', 'resnet34', 'resnet50...
[ [ "torch.onnx.export", "torch.ones" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.ylabel",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kevslinger/stable-baselines3
[ "1f8fd290f3f2ef3bbd98c71de68adfaf4e1ba423" ]
[ "stable_baselines3/her/rbelief_her_replay_buffer.py" ]
[ "from typing import Dict, Optional, Tuple, Union\n\nimport numpy as np\nimport torch as th\n\nfrom stable_baselines3.common.buffers import DictReplayBuffer\nfrom stable_baselines3.common.type_aliases import DictReplayBufferSamples\nfrom stable_baselines3.common.vec_env import VecEnv, VecNormalize\nfrom stable_basel...
[ [ "numpy.arange", "numpy.array", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zkkio/aidemo
[ "1be3cfea0b4979fd20b7d267438d28f64df74529" ]
[ "code/ch02/PerceptronDemo.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nclass Perceptron(object):\n #eta:学习速率(0~1)\n #n_iter:迭代次数(10)\n def __init__(self, eta = 0.01, n_iter = 10):\n self.eta = eta\n self.n_iter = n_iter\n #\n def fit(self, x, y):\n #\n self.w_ = np.z...
[ [ "matplotlib.pyplot.legend", "numpy.dot", "pandas.read_csv", "matplotlib.pyplot.scatter", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.where", "numpy.zeros", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
panchalhp-db/hyperopt
[ "25bbb8a2a0ba0b2efd5fcb60218388fbdccd119e" ]
[ "hyperopt/atpe.py" ]
[ "\"\"\"\n Implements the ATPE algorithm. See\n https://www.electricbrain.io/blog/learning-to-optimize\n and\n https://www.electricbrain.io/blog/optimizing-optimization to learn more\n\"\"\"\n\n__authors__ = \"Bradley Arsenault\"\n__license__ = \"3-clause BSD License\"\n__contact__ = \"github.com/hyperop...
[ [ "numpy.random.choice", "numpy.issubdtype", "numpy.percentile", "numpy.max", "numpy.std", "numpy.warnings.filterwarnings", "sklearn.preprocessing.StandardScaler", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sarisboo/extractive_sum
[ "45900b578c39385c82a8effbc05c61f3ff7aef24", "45900b578c39385c82a8effbc05c61f3ff7aef24" ]
[ "src/features/build_punctuation_feature.py", "src/data/stemming.py" ]
[ "# Import necessary Modules\nimport pandas as pd\nimport numpy as np\nfrom ast import literal_eval\nimport time\n\n# Create a functions that label sentences with question marks, exlamation points and quotes\ndef question_mark_finder(sentence):\n \"\"\"\n Returns 1 if sentence contains question mark, 0 otherwi...
[ [ "pandas.read_csv" ], [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1...
hansenbeast/2019-SYSU-DM
[ "39250fe21681ea445d38d521679fb4b9d6b0d345" ]
[ "Final_Project/test.py" ]
[ "import argparse\nimport os\nimport tensorflow as tf\n\nfrom model import GAN\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--lr', type=float, default=0.01)\nparser.add_argument('--momentum', type=float, default=0.9)\nparser.add_argument('--nIter', type=int, default=1000)\nparser.add_argument('--imgSi...
[ [ "tensorflow.ConfigProto", "tensorflow.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
seenitall/flow-utils
[ "68e4f1e39fba19b0051a0345fd426c6f59215da3" ]
[ "correlation/correlation.py" ]
[ "import cupy\nimport torch\nimport re\n\nkernel_Correlation_rearrange = '''\n\textern \"C\" __global__ void kernel_Correlation_rearrange(\n\t\tconst int n,\n\t\tconst float* input,\n\t\tfloat* output\n\t) {\n\t int intIndex = (blockIdx.x * blockDim.x) + threadIdx.x;\n\n\t if (intIndex >= n) {\n\t return;\n\t ...
[ [ "torch.cuda.current_stream" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
XinyuHua/pair-emnlp2020
[ "45f8b8ea3752dfb43aa75914afab1b29b2f10c50" ]
[ "planning/data/dictionary.py" ]
[ "from transformers import BertTokenizer\nimport torch\n\nclass BertDictionary(object):\n \"\"\"Wrapper for BertTokenizer\"\"\"\n def __init__(self, bert_model_name='bert-base-cased',\n eos_token='[unused100]', bos_token='[unused101]', bok_token='[unused1]'):\n self.tokenizer = BertToken...
[ [ "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ludvik-martin/trade_volume_prediction
[ "f50a0ad9516cd6053cfd0962306b9d30baf21255" ]
[ "test/read_data_test.py" ]
[ "import unittest\nfrom util.read_data import DataReader\nimport numpy as np\n\nclass ReadDataTest(unittest.TestCase):\n\n def setUp(self):\n self.reader = DataReader()\n\n def test_read_data(self):\n data = self.reader.read_all_data()\n number_of_rows = 4778\n self.assertEqual(len(...
[ [ "numpy.array_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lawsuisum/FedML
[ "2a7cacbf0b74307f9adedcceb3b0fb6f92c41067" ]
[ "fedml_api/model/cv/cnn.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass CNN_OriginalFedAvg(torch.nn.Module):\n \"\"\"The CNN model used in the original FedAvg paper:\n \"Communication-Efficient Learning of Deep Networks from Decentralized Data\"\n https://arxiv.org/abs/1602.05629.\n\n The number of parameters when `only_digits...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.Flatten", "torch.unsqueeze", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kraktos/Data_Science_Analytics
[ "bcbe196062aefeeb318deac5cc5aec1a067682fc" ]
[ "DigitRecogniser/Main.py" ]
[ "from sklearn.ensemble import RandomForestClassifier\nimport numpy as np\nimport pandas as pd\n\n# create the training & test sets, skipping the header row with [1:]\ndataset = pd.read_csv(\"train.csv\")\ntarget = dataset[[0]].values.ravel()\ntrain = dataset.iloc[:, 1:].values\ntest = pd.read_csv(\"test.csv\").valu...
[ [ "pandas.read_csv", "sklearn.ensemble.RandomForestClassifier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
bkowshik/probability-distributions
[ "a2ea09716908050edc0d83668af412202235f459" ]
[ "app.py" ]
[ "import random\n\nimport streamlit as st\nimport pandas as pd\n\nimport matplotlib.pyplot as plt\n\n\nst.balloons()\n\n\nst.markdown('# Probability distributions')\n\nst.markdown('Ref: https://en.wikipedia.org/wiki/Probability_distribution')\nst.markdown('> In probability theory and statistics, a probability distri...
[ [ "matplotlib.pyplot.grid", "matplotlib.pyplot.subplots", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
chris-jh-cho/abides
[ "0917e099b901a864751233b19eecf50a451085df" ]
[ "config/random_fund_value.py" ]
[ "import argparse\nimport numpy as np\nimport pandas as pd\nimport sys\nimport datetime as dt\nfrom dateutil.parser import parse\n\nfrom Kernel import Kernel\nfrom util import util\nfrom util.order import LimitOrder\nfrom util.oracle.SparseMeanRevertingOracle import SparseMeanRevertingOracle\nfrom model.LatencyModel...
[ [ "pandas.to_datetime", "numpy.random.seed", "pandas.Timestamp.now", "pandas.to_timedelta", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
FrederikKjeldal/PhysNet
[ "e243e2c383b4ac0a9d7062e654d9b4feb76ca859" ]
[ "training/Trainer.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom .AMSGrad import AMSGrad\n\nclass Trainer:\n def __init__(self, learning_rate=1e-3, decay_steps=100000, decay_rate=0.96, scope=None):\n self._scope = scope\n with tf.variable_scope(self.scope):\n self._global_step = tf.Variable(0, name=...
[ [ "tensorflow.Variable", "tensorflow.control_dependencies", "tensorflow.get_collection", "tensorflow.train.exponential_decay", "tensorflow.clip_by_global_norm", "tensorflow.train.ExponentialMovingAverage", "tensorflow.no_op", "tensorflow.variable_scope", "tensorflow.global_norm" ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
sagepublishing/COVID19_scholcomms
[ "52d1289827d5e7dc0b4d7b210d065428a7d45454" ]
[ "PUBMED_CORD_02_textcategorizer.py" ]
[ "# adapted from https://spacy.io/usage/examples#textcat\n# this should run perfectly well on a CPU, but a GPU will be faster\n# consider installing spacy with GPU support https://spacy.io/usage\n# can't get this to work with scispacy. Pity.\n\n#!/usr/bin/env python\n# coding: utf8\n\"\"\"Train a convolutional neura...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
christophe-gouel/dolo
[ "d9aef6d78d19899e2669e49ee6b7ad9aacf0e35d" ]
[ "dolo/numeric/error_measures.py" ]
[ "#from dolo.compiler.compiler_global import test_residuals\nfrom dolo.numeric.interpolation.interpolation import RectangularDomain\n\nfrom dolo.compiler.compiler_global import CModel\nimport numpy\nimport numpy as np\n\n#testgrid = RectangularGrid(domain,[20,20])\n\ndef test_residuals(s,dr, f,g,parms, epsilons, wei...
[ [ "numpy.random.seed", "numpy.power", "numpy.random.multivariate_normal", "numpy.tile", "numpy.ones", "numpy.max", "numpy.tensordot", "numpy.repeat", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
schrum2/SonicDeepRLEvolution
[ "f4476fa66d96c4f6cd9bf15947f0e9392c99eadb", "f4476fa66d96c4f6cd9bf15947f0e9392c99eadb" ]
[ "NSGA2/NSGAII.py", "fastlearner/ppo2ttifrutti_sonic_env.py" ]
[ "\"\"\"\n This is an implementation of NSGA-II by Haris Ali Khan that has been\n modified to evolve deep neural networks to play Sonic the Hedgehog.\n Much of the Sonic code comes from the OpenAI Retro Contest. Although\n evolution instantiates the networks, they also learn using a PyTorch\n version ...
[ [ "matplotlib.pyplot.scatter", "torch.load", "numpy.min", "torch.reshape", "torch.from_numpy", "torch.numel", "numpy.random.uniform", "numpy.random.normal", "numpy.concatenate", "torch.FloatTensor", "torch.no_grad", "torch.cuda.is_available", "torch.split", "n...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Yoshanuikabundi/openff-interchange
[ "282a38601ea790f98fce09ece1667a5f8652d87a" ]
[ "openff/interchange/components/interchange.py" ]
[ "\"\"\"An object for storing, manipulating, and converting molecular mechanics data.\"\"\"\nimport warnings\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Dict, Optional, Tuple, Union\n\nimport mdtraj as md\nimport numpy as np\nfrom openff.toolkit.topology.topology import To...
[ [ "numpy.all", "numpy.eye", "numpy.allclose", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
grkmkctrk/btkML
[ "a15faeeb11b51bb2b58cc7166fdb595ff7e9be7c" ]
[ "1_Predictions/7_EvulatingOfPredictions/r2andadjustedr2.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"R2andAdjustedR2.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1OVJxNYhPknexKv4vpwZtyRbVvflJ9i94\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nveriler = pd.read_csv...
[ [ "sklearn.ensemble.RandomForestRegressor", "pandas.read_csv", "sklearn.metrics.r2_score", "matplotlib.pyplot.scatter", "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
otosense/plunk
[ "dccce4fcac548d937147de7d05639ead66fe5ef3" ]
[ "plunk/sb/metaflow_practice/classify.py" ]
[ "from metaflow import FlowSpec, step\n\n\nclass ClassifierTrainFlow(FlowSpec):\n @step\n def start(self): # A\n from sklearn import datasets\n from sklearn.model_selection import train_test_split\n\n X, y = datasets.load_wine(return_X_y=True)\n (\n self.train_data,\n ...
[ [ "sklearn.datasets.load_wine", "sklearn.model_selection.train_test_split", "sklearn.svm.SVC", "sklearn.neighbors.KNeighborsClassifier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AbeleMM/fltk-testbed
[ "307b6f192c06a76d9e9017039596d1a96ebdadfb" ]
[ "fltk/samplers/n_label.py" ]
[ "import random\n\nimport numpy as np\n\nfrom fltk.samplers import DistributedSamplerWrapper\n\n\nclass N_Labels(DistributedSamplerWrapper):\n \"\"\"\n A sampler that limits the number of labels per client\n The number of clients must <= than number of labels\n \"\"\"\n\n def __init__(self, dataset, n...
[ [ "numpy.random.choice", "numpy.ndarray", "numpy.concatenate", "numpy.ceil", "numpy.array_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dengwirda/jigsaw-to-fvcom
[ "0f3bcc7aa20e18dab1e3343590e7c87e05814a34" ]
[ "cullfvc.py" ]
[ "\nimport numpy as np\nfrom scipy import sparse\n\nfrom jigsawpy import certify, orient1\n\n\ndef in_tri2(ppos, tri2, test, rtol):\n \"\"\"\n IN-TRI2: return a T-by-1 array STAT, with STAT[I] = TRUE\n if TEST lies \"inside\" the I-TH triangle.\n\n \"\"\"\n\n TEST = np.tile(test, (tri2.shape[0], 1))\n...
[ [ "numpy.concatenate", "numpy.max", "numpy.all", "numpy.reshape", "numpy.arange", "numpy.logical_and.reduce", "numpy.lexsort", "numpy.full", "numpy.diff", "numpy.count_nonzero", "numpy.zeros", "numpy.min", "scipy.sparse.csr_matrix", "scipy.sparse.csgraph.conne...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cph-cachet/cachet-ecg-db
[ "655795c23205b8b2563def45667e7daf2b56a570" ]
[ "others/count_rpeaks_and_noise.py" ]
[ "import shutil\nimport os\n\nimport h5py\nimport pandas as pd\n\n\ndef copyfile(src, dest):\n try:\n shutil.copyfile(src, dest)\n # Directories are the same\n except shutil.Error as e:\n print('file not copied. Error: %s' % e)\n # Any error saying that the directory doesn't exist\n exc...
[ [ "pandas.read_excel", "pandas.to_datetime", "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Hee-Beom-Kim/tensorflow
[ "3d0282e5cf1fbc03c238c9765dfa8cf2d32462f1" ]
[ "tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.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.ops.array_ops.constant", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.math_ops.reduce_max", "tensorflow.python.ops.logging_ops.Print", "tensorflow.python.ops.control_flow_ops.while_loop", "ten...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.8", "1.10", "1.12", "2.7", "1.4", "2.6", "1.13", "2.3", "2.4", "2.9", "1.5", "1.7", "2.5", "1.0", "2.2", "1.2", "2....
tabular-feature-vectors/featurevectors
[ "5d75a83d7762728fe2f548c1c0639fab0a3451b0" ]
[ "fvecs/utils.py" ]
[ "\"\"\"This file contains helper functions for the Feature Vectors method.\"\"\"\n\nimport numpy as np\nimport re\nfrom typing import List\n\nSEARCH_PATTERN = 'X\\d\\d\\d\\d\\d' # Encoded features' names are represented with this pattern e.g. second feature would be X00001\n\n\n# --------------------- FeatureVec u...
[ [ "numpy.sqrt", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.arctan2", "numpy.mean", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jiangqn/TextCNN
[ "4802ddc07fcb27d7f9abc7af61d6eb4cf61f7451" ]
[ "src/predict_text_cnn.py" ]
[ "import torch\nfrom torchtext import data\nfrom torchtext.data import TabularDataset, Iterator\nimport pickle\n\ndef predict_text_cnn(model_path, file_path, vocab_path, batch_size=64):\n\n TEXT = data.Field(sequential=True, lower=True, batch_first=True)\n fields = [\n ('sentence', TEXT)\n ]\n\n t...
[ [ "torch.device", "torch.softmax", "torch.no_grad", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aishikhar/continuum_tensorflow
[ "7c735950fc8de199abeff5b37adc0760a3a0a8bc" ]
[ "continuum_tensorflow/learner/sample_learner.py" ]
[ "import tensorflow as tf\n'''\nSilly learners. \n'''\n\ndef learn_on(dataset):\n learner = CAE_MNIST_v2(latent_dim=5, name='silly_learner')\n train(learner, on_dataset = dataset)\n\ndef train(learner, on_dataset):\n def train_step(inputs, learner, optimizer):\n with tf.GradientTape() as tape:\n ...
[ [ "tensorflow.summary.histogram", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.layers.Conv2D", "tensorflow.reduce_sum", "tensorflow.keras.layers.InputLayer", "tensorflow.keras.losses.binary_crossentropy", "tensorflow.keras.optimizers.A...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
Derfei/MergingandScheduling
[ "544612a45a5e7db270f51782f1bb08006e3e348a" ]
[ "iot/Executer/excuteVgg16.py" ]
[ "# -*- coding: utf-8 -*-\n'''\n@author: longxin\n@version: 1.0\n@date:\n@changeVersion:\n@changeAuthor:\n@description: vgg16的执行\n'''\nclass operation:\n\n def __init__(self, operation_id, generate_operation_model, input_shape,weights_model):\n import numpy as np\n\n self.operation_id = operation_id...
[ [ "numpy.array", "numpy.shape", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kkonen/baselines
[ "a48b519e6410f9bf8f0aafbbfda62ac40e1a613d" ]
[ "baselines/common/tf_util.py" ]
[ "import numpy as np\nimport tensorflow as tf # pylint: ignore-module\nimport copy\nimport os\nimport functools\nimport collections\nimport multiprocessing\n\ndef switch(condition, then_expression, else_expression):\n \"\"\"Switches between two operations depending on a scalar value (int or bool).\n Note that...
[ [ "numpy.sqrt", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.cast", "tensorflow.variables_initializer", "tensorflow.global_variables", "numpy.random.randn", "tensorflow.get_default_graph", "tensorflow.group", "tensorflow.nn.conv2d", "numpy.square", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
dygcjlu/nanodet
[ "4a69890342cc25d59a18e89486ef66d3f58d4e24", "4a69890342cc25d59a18e89486ef66d3f58d4e24" ]
[ "nanodet/model/fpn/ghost_pan_deconv.py", "demo/shufflenetv2_classification.py" ]
[ "# Copyright 2021 RangiLyu.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to...
[ [ "torch.nn.Sequential", "torch.nn.ModuleList", "torch.nn.ConvTranspose2d", "torch.cat" ], [ "torch.nn.Sequential", "torch.transpose", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.hub.load_state_dict_f...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
VedPatwardhan/ivy
[ "de193946a580ca0f54d78fe7fc4031a6ff66d2bb" ]
[ "ivy/functional/backends/mxnet/general.py" ]
[ "# global\nfrom typing import List, Optional, Union\nimport ivy\n\n_round = round\nimport mxnet as mx\nimport numpy as _np\nfrom numbers import Number\nimport multiprocessing as _multiprocessing\n\n# local\nfrom ivy.functional.ivy.device import default_device\nfrom ivy.functional.backends.mxnet.device import _calla...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sahilg06/ODA-Object-Detection-ttA
[ "ace08b2e61f47f5cc2fa72d32a7cc2b62b4117a1" ]
[ "odach/nms.py" ]
[ "# coding: utf-8\n__author__ = 'ZFTurbo: https://kaggle.com/zfturbo'\n\nimport numpy as np\nfrom numba import jit\n\n\ndef prepare_boxes(boxes, scores, labels):\n result_boxes = boxes.copy()\n\n cond = (result_boxes < 0)\n cond_sum = cond.astype(np.int32).sum()\n if cond_sum > 0:\n print('Warning...
[ [ "numpy.maximum", "numpy.minimum", "numpy.unique", "numpy.min", "numpy.arange", "numpy.ones", "numpy.concatenate", "numpy.max", "numpy.argmax", "numpy.exp", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chenxi1228/RCBF-Dataset
[ "9b75b7658b30d5a8646ac33d17ffeaf2c906be30" ]
[ "experiments/load&generate.py" ]
[ "import torch\nimport os\nimport matplotlib.pyplot as plt\nimport torchvision\nfrom torch.autograd import Variable\nimport argparse\nfrom model import Generator\n\nckpt_dir = os.path.join('checkpoints')\nlog_dir = os.path.join('logs')\ngenerator_ckpt = 'generator.pth'\npic_name = 'result.png'\n\nz_dim = 100\nimg_si...
[ [ "torch.randn", "torch.cuda.is_available", "torch.device", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YingHongBin/incubator-singa
[ "45a608f0a3365ae21368438024d4b98280b0bb07" ]
[ "test/python/test_tensor.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.einsum", "numpy.asarray", "numpy.reshape", "numpy.tensordot", "numpy.transpose", "numpy.repeat", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
llv22/RLBerkelyFa2018
[ "55a6e164f566f9c63028072d24ea11af95f18140" ]
[ "hw5/meta/point_mass_observed.py" ]
[ "import numpy as np\nfrom gym import spaces\nfrom gym import Env\n\n\nclass ObservedPointEnv(Env):\n \"\"\"\n point mass on a 2-D plane\n four tasks: move to (-10, -10), (-10, 10), (10, -10), (10, 10)\n\n Problem 1: augment the observation with a one-hot vector encoding the task ID\n - change the di...
[ [ "numpy.copy", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Priyansdesai/lux
[ "d1a2f170cdb675752ace35f6deeca032fb879580" ]
[ "lux/vislib/altair/AltairRenderer.py" ]
[ "# Copyright 2019-2020 The Lux Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ [ "pandas.PeriodIndex", "pandas.api.types.is_period_dtype", "pandas.api.types.is_interval_dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
zyhhhy/CellDet
[ "c8e05d213474ae20a283badeed8f2fd9f178fb27" ]
[ "ghostnet_pytorch/train.py" ]
[ "import os\nimport torch\nimport torchvision\nimport torch.nn as nn\nimport argparse\nfrom tqdm import tqdm\nfrom datetime import datetime\nfrom config import Config\nfrom torch.utils.data import DataLoader\nfrom torch.autograd import Variable\nimport copy\n\nfrom model import Net\nfrom dataloader.LoadDataTrain imp...
[ [ "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.nn.DataParallel", "torch.autograd.Variable" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aqqosh/pandemic_vision
[ "dc63ba0437c3a13f42f069f42b0b119c93355b67" ]
[ "all_models/full_module.py" ]
[ "import torch\nimport cv2\nimport warnings\nimport all_models.distance.utils.utils as utils\nimport all_models.masks.masks_module as mask_module\nfrom all_models.masks.data.config import cfg_re50\nfrom all_models.distance.models import Darknet\nfrom all_models.distance.sort import *\nfrom all_models.distance.video_...
[ [ "torch.set_grad_enabled", "torch.cuda.is_available", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]