repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Chih-Ling-Hsu/distiller
[ "33d1697298c6e3a7f7bfa615741fd0cda61d2794" ]
[ "models/cinic10/googlenet_cinic.py" ]
[ "#\n# Copyright (c) 2018 Intel Corporation\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 ...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
maresb/Set_Functions_for_Time_Series
[ "2139304f5f888dcb22e120aa814d42e9ca20ed45" ]
[ "seft/models/phased_lstm.py" ]
[ "\"\"\"Phased LSTM implementation based on the version in tensorflow contrib.\n\nSee: https://github.com/tensorflow/tensorflow/blob/r1.15/tensorflow/contrib/rnn/python/ops/rnn_cell.py#L1915-L2064\n\nDue to restructurings in tensorflow some adaptions were required. This\nimplementation does not use global naming of ...
[ [ "tensorflow.concat", "tensorflow.compat.v1.where", "tensorflow.expand_dims", "tensorflow.math.log", "tensorflow.keras.layers.Dense", "tensorflow.compat.v1.initializers.random_uniform", "tensorflow.squeeze", "tensorflow.compat.v1.nn.rnn_cell.LSTMStateTuple", "tensorflow.tanh", ...
henriklg/master-thesis
[ "62a65d7420ffdfa2ece8ffb162faec705e8d7176" ]
[ "src/utils/resnet/resnet.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.python.keras.backend.image_data_format", "tensorflow.keras.layers.add", "tensorflow.keras.layers.Activation", "tensorflow.keras.backend.image_data_format", "tensorflow.keras.models.Model", "tensorflow.python.keras.backend.permute_dimensions", "tensorflow.keras.layers.ZeroPa...
hrtwt/ssd.pytorch
[ "c29c3fb41e9f80c283cca19dbde5d22bf8c40789" ]
[ "data/voc0712.py" ]
[ "\"\"\"VOC Dataset Classes\n\nOriginal author: Francisco Massa\nhttps://github.com/fmassa/vision/blob/voc_dataset/torchvision/datasets/voc.py\n\nUpdated by: Ellis Brown, Max deGroot\n\"\"\"\nfrom .config import HOME\nimport os.path as osp\nimport sys\nimport torch\nimport torch.utils.data as data\nimport cv2\nimpor...
[ [ "numpy.array", "numpy.expand_dims", "torch.from_numpy" ] ]
svsamsonov/VR-MCMC
[ "335ffb0835917b1cdce633877099c8452e3aeb78" ]
[ "Code/Algo2.py" ]
[ "# Algorithm 1, polynomial regression for Q_l + explicit formula + truncation\n\nimport numpy as np\nfrom scipy.misc import comb\nfrom scipy.special import hermitenorm\nfrom tqdm import tqdm\nfrom joblib import Parallel, delayed\nfrom itertools import product\nfrom sklearn.preprocessing import PolynomialFeatures\ni...
[ [ "numpy.square", "scipy.special.hermitenorm", "numpy.array", "numpy.zeros", "sklearn.preprocessing.PolynomialFeatures", "scipy.misc.comb", "numpy.sqrt", "numpy.linalg.inv" ] ]
gyfastas/ICCV2019-Horde
[ "fbe086a0595d55e918ef69e8c4aa9374db3dec1e", "fbe086a0595d55e918ef69e8c4aa9374db3dec1e" ]
[ "kerastools/image_generators/dml_generator.py", "kerastools/databases/mnist.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\nimport numpy as np\nfrom PIL import Image\nfrom tensorflow.keras.utils import Sequence\n\nfrom ..utils.image_processing import preprocess, center_crop\nfrom ..utils.generic_utils import labels2indexes\n\n\nclass DMLGenerator(Sequence):\n \"\"\" Keras Sequence for Deep Met...
[ [ "numpy.array", "numpy.random.rand", "numpy.shape", "numpy.random.shuffle", "numpy.where", "numpy.arange" ], [ "numpy.concatenate", "numpy.where", "tensorflow.keras.datasets.mnist.load_data" ] ]
jrderuiter/genemap
[ "0413474294cae9e17252d88c8b9ff1382e4a2f0f" ]
[ "tests/mappers/test_util.py" ]
[ "# -*- coding: utf-8 -*-\n\n# pylint: disable=wildcard-import,redefined-builtin,unused-wildcard-import\nfrom __future__ import absolute_import, division, print_function\nfrom builtins import *\n# pylint: enable=wildcard-import,redefined-builtin,unused-wildcard-import\n\nimport pytest\n\nimport pandas as pd\n\n# pyl...
[ [ "pandas.DataFrame" ] ]
JacobFV/pgi
[ "b4c9af3c4ae94fcb335f20c2a1e7a4ff46ca54e6" ]
[ "nnn/nodes/attn_node/grid_attn_node/moving_grid_attn_node/loc_node.py" ]
[ "import math\nfrom typing import Mapping, List, Optional, Union, Callable, Text\n\nimport tensorflow as tf\n\nfrom ... import InfoNode\nfrom ....utils import keys\nfrom ....utils import types as ts\n\nclass LocNode(InfoNode):\n \"\"\"Manages a location in rectangular space encoded in binary\n as a [D, ceil(lg...
[ [ "tensorflow.exp", "tensorflow.TensorSpec", "tensorflow.constant", "tensorflow.reduce_max", "tensorflow.clip_by_value", "tensorflow.keras.backend.floatx", "tensorflow.nn.sigmoid" ] ]
lmmx/jax
[ "11e6f49c3d4a619434f1fa538330c171c4163bc4" ]
[ "jax/experimental/jet.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.result_type", "numpy.zeros_like", "numpy.shape", "numpy.sqrt" ] ]
Berk035/Gibson_Exercise
[ "406dff57ec1ba7268e70b90937874361bd6c135a" ]
[ "gibson/envs/env_bases.py" ]
[ "## Issue related to time resolution/smoothness\n# http://bulletphysics.org/mediawiki-1.5.8/index.php/Stepping_The_World\n\nfrom gibson.core.physics.scene_building import SinglePlayerBuildingScene\nfrom gibson.core.physics.scene_stadium import SinglePlayerStadiumScene\nimport pybullet as p\nimport time\nimport ran...
[ [ "numpy.array" ] ]
jbhunter804/NBANeural
[ "108b30d133398a87db7130bec34f7cccff6ad7a9" ]
[ "prediction_app/makeTomorrowPlayerData.py" ]
[ "#!/usr/bin/python\nimport py_ball\nfrom nba_api.stats.endpoints import teamgamelog, playerdashboardbygeneralsplits, boxscoreadvancedv2, playerdashboardbylastngames, playerdashboardbyclutch, playerdashboardbyopponent, boxscoresummaryv2, teamplayeronoffsummary, commonallplayers, commonplayerinfo\nimport csv\nimport ...
[ [ "numpy.random.choice" ] ]
Chenfeng1271/Adaptive-deformable-convolution
[ "7feb55cdf74bf6ec2a028e6e5da1299fb493f855" ]
[ "modeling/DenseDSPP_v3.py" ]
[ "\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom modeling.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d\nfrom modeling.deformable_conv.deform_conv_v3 import *\nfrom torch.nn import BatchNorm2d as bn\n\n\nclass _DenseAsppBlock(nn.Module):\n \"\"\" ConvNet block ...
[ [ "torch.nn.ReLU", "torch.nn.BatchNorm2d", "torch.cat", "torch.nn.Conv2d" ] ]
zhangshixuan1987/e3sm_release
[ "343d7a7109fb132b45150084dbd83b58f8c98c54" ]
[ "diagnostic_v2_0/draw_clubb_standard.py" ]
[ "'''\n CLUBB standard variables \n zhunguo : guozhun@lasg.iap.ac.cn ; guozhun@uwm.edu\n'''\n\n\nimport Ngl\nfrom netCDF4 import Dataset\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport scipy as sp\nimport pylab\nimport os\nimport Common_functions\nfrom subprocess import call\n\n\ndef clubb_std_prf...
[ [ "numpy.arange", "numpy.zeros" ] ]
alasdairtran/pytorch-transformers
[ "0220c878839634ea7057528e871544ae9c943a10" ]
[ "examples/single_model_scripts/run_swag.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...
[ [ "torch.distributed.get_world_size", "torch.utils.data.RandomSampler", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.distributed.init_process_group", "torch.manual_seed", "numpy.argmax", "torch.tensor", "torch.utils.data.DataLoader", "torch.distributed.get_rank"...
yarenty/ml-suite
[ "570202d904cf5980c2262b4cfc067eb8428ea8d0" ]
[ "xfdnn/rt/scripts/framework/darknet/cfg.py" ]
[ "#!/usr/bin/env python\n#\n# (C) Copyright 2018, Xilinx, Inc.\n#\n\"\"\"MIT License from https://github.com/ysh329/darknet-to-caffe-model-convertor/\nCopyright (c) 2015 Preferred Infrastructure, Inc.\nCopyright (c) 2015 Preferred Networks, Inc.\n\nPermission is hereby granted, free of charge, to any person obtainin...
[ [ "numpy.asarray", "numpy.sqrt" ] ]
dachii-azm/habitat-api
[ "ac937fde9e14a47968eaf221857eb4e65f48383e" ]
[ "habitat_baselines/il/trainers/eqa_cnn_pretrain_trainer.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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 os\nimport time\n\nimport torch\nfrom torch.utils.data import DataLoader\n\nfrom habitat import logger...
[ [ "torch.device", "torch.no_grad", "torch.nn.SmoothL1Loss", "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.load", "torch.nn.CrossEntropyLoss" ] ]
CIMCB/cimcb
[ "fe831253b122ed0ff9e33cbd160ef721abee1e38" ]
[ "cimcb/utils/load_dataCSV.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom os import path\nfrom .table_check import table_check\n\n\ndef load_dataCSV(DataSheet, PeakSheet):\n \"\"\"Loads and validates the DataFile and PeakFile from csv files.\n\n\n Parameters\n ----------\n DataSheet : string\n The name of the csv file (.cs...
[ [ "pandas.read_csv" ] ]
tt6746690/lddmm-ot
[ "5af26fe32ae440c598ed403ce2876e98d6e1c692" ]
[ "LDDMM_Python/lddmm_python/modules/manifolds/theano_shapes.py" ]
[ "# Import of the relevant tools\nimport time\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano import pp, config\n\n\nfrom plotly.tools import FigureFactory as FF\nimport plotly.graph_objs as go\n\nfrom ..io.read_vtk import ReadVTK\nfrom ..data_attachment.measures import Measures\nfrom ....
[ [ "numpy.append" ] ]
macfadyen/sailfish
[ "44752a6769a2a7566a90dd9c8df21d4e2c49d720" ]
[ "tools/indep_res_analysis.py" ]
[ "import sys\nimport numpy as np\nimport msgpack\nimport re\n\ndef reconstitute(filename, fieldnum):\n chkpt = msgpack.load(open(filename, 'rb'))\n mesh = chkpt['mesh']\n primitive = np.zeros([mesh['ni'], mesh['nj'], 4])\n for patch in chkpt['primitive_patches']:\n i0 = patch['rect'][0]['start']\n...
[ [ "numpy.array", "numpy.zeros", "numpy.ones", "numpy.exp", "numpy.shape", "numpy.arange", "numpy.sqrt", "numpy.frombuffer", "numpy.average" ] ]
LinHuiqing/nonparaSeq2seqVC_code
[ "d40a0cb9dc11c77b8af56b8510e4ab041f2f2b25" ]
[ "pre-train/plotting_utils.py" ]
[ "import matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pylab as plt\nimport numpy as np\n\n\ndef save_figure_to_numpy(fig):\n # save it to a numpy array.\n data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')\n data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))\n ...
[ [ "matplotlib.use", "matplotlib.pylab.savefig", "matplotlib.pylab.ylabel", "matplotlib.pylab.close", "matplotlib.pylab.colorbar", "matplotlib.pylab.xlabel", "matplotlib.pylab.subplots", "matplotlib.pylab.tight_layout" ] ]
DancingQuanta/dylos-calibration
[ "43d067310672a717fc38a69fcc198b274e8a01d9" ]
[ "src/visualisation/hist.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport argparse\nimport json\nfrom utils import *\nimport logging\n\nlogging.basicConfig(filename='log',\n filemode='a',\n format='%(asctime)s...
[ [ "numpy.array", "numpy.log", "matplotlib.pyplot.xlabel", "pandas.DataFrame", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "numpy.log10" ] ]
Nicola115/VMAgent
[ "99522aa67537e4db4a97169de4cc53a5b639839e" ]
[ "vmagent/test.py" ]
[ "import numpy as np\nfrom schedgym.sched_env import SchedEnv\n\nDATA_PATH = 'vmagent/data/Huawei-East-1.csv'\n\nif __name__ == \"__main__\":\n\n env = SchedEnv(5, 40, 90, DATA_PATH, render_path='../test.p',\n allow_release=False, double_thr=32)\n MAX_STEP = 1e4\n env.reset(np.random.randi...
[ [ "numpy.where", "numpy.random.randint" ] ]
SamMaoYS/gem5-baseline
[ "349653cb1fd7d7cb7e68f2a84e78d2ced1a14ac0" ]
[ "run_spec/extractAllL1DOccpPfStrideBOI.py" ]
[ "# Set the absolute path in \n\nimport numpy as np\nimport pandas as pd\n#from matplotlib import pyplot as plt\nimport os\nimport csv\n\nif not os.getenv(\"LAB_PATH\"):\n print(\"Set Lab Path\\n\")\n exit(1)\n\nbenchmarks = ['510.parest_r','541.leela_r','641.leela_s','531.deepsjeng_r','631.deepsjeng_s','505.m...
[ [ "pandas.DataFrame" ] ]
galaxyumi/beast
[ "f5ce89d73c88ce481b04fc31a8c099c9c19041fb" ]
[ "beast/observationmodel/tests/test_extra_filters.py" ]
[ "import numpy as np\nimport pytest\n\nfrom beast.observationmodel.extra_filters import make_integration_filter, make_top_hat_filter\n\n\n@pytest.mark.parametrize(\n \"lambda_start,lambda_finish,d_lambda\",\n [(90., 913., 1.), (1000, 3000, 100)],\n)\ndef test_extra_filters(lambda_start, lambda_finish, d_lambda...
[ [ "numpy.testing.assert_allclose" ] ]
stuartcampbell/tiled
[ "01c054fa4638f2595a228173ea2f2c59a6a52500" ]
[ "tiled/_tests/test_search.py" ]
[ "import numpy\nimport pytest\n\nfrom ..adapters.array import ArrayAdapter\nfrom ..adapters.mapping import MapAdapter\nfrom ..client import from_tree\nfrom ..queries import FullText\n\ntree = MapAdapter(\n {\n \"a\": ArrayAdapter.from_array(\n numpy.arange(10), metadata={\"apple\": \"red\", \"an...
[ [ "numpy.arange" ] ]
malarinv/jasper-asr
[ "e8f58a504381f0a9030da3b30caf993ac418da33" ]
[ "jasper/training/featurizer.py" ]
[ "# import math\n\n# import librosa\nimport torch\nimport pickle\n# import torch.nn as nn\n# from torch_stft import STFT\n\n# from nemo import logging\nfrom nemo.collections.asr.parts.perturb import AudioAugmentor\n# from nemo.collections.asr.parts.segment import AudioSegment\n\n\nclass RpycWaveformFeaturizer(object...
[ [ "torch.tensor" ] ]
marneylc/pcmdpy
[ "c73a1d2639d5c0a3d5e719c86c5abbb5fd97fce0" ]
[ "pcmdpy/isochrones/isochrones.py" ]
[ "# isochrones.py\n# Ben Cook (bcook@cfa.harvard.edu)\n\n\"\"\"Define the Isocrhone_Model class\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport os\nimport glob\nimport sys\nfrom warnings import warn\nfrom pkg_resources import resource_filename\n\n##########################\n# Useful Utilities\n\n\ndef load_...
[ [ "numpy.isinf", "numpy.max", "numpy.array", "numpy.isclose", "numpy.empty", "pandas.read_table", "pandas.DataFrame", "numpy.min", "numpy.diff", "numpy.where", "numpy.power", "numpy.abs", "numpy.append", "numpy.average", "numpy.linspace", "numpy.unique...
mbc96325/IOHMM-for-individual-mobility-prediction
[ "b2d346a12b902581641a0afa8e694ee8ef158195" ]
[ "A05_generate_sample_card_type.py" ]
[ "import pandas as pd\nimport numpy as np\nimport copy\nimport pickle\nfrom datetime import datetime,timedelta\nimport os\nimport multiprocessing\nimport random\n\n\ndata_path = '../data/'\n\n\nTEST = True\n\n\nif TEST:\n df = pd.read_csv(data_path + '201407_new.csv',sep = ';')\nelse:\n data_path = '../data/'\...
[ [ "pandas.unique", "pandas.read_csv", "pandas.concat" ] ]
tjnel/LC_OSINT_Feeds
[ "142a6b3f84fc5e9a946784d1198169abc8f25a8c" ]
[ "src/generate_urlhaus_list.py" ]
[ "from urllib.parse import urlparse\nimport pandas as pd\n\nFILENAME = \"LC_URLHAUS_Domains_List.txt\"\n\nurl=\"https://urlhaus.abuse.ch/downloads/text/\"\ndomains = pd.read_csv(url, skiprows=9, names=['url'], error_bad_lines=False, warn_bad_lines=False)\ndomains['source'] = ' urlhaus'\ndomains['url'] = domains['url...
[ [ "pandas.read_csv" ] ]
lamkina/OpenAeroStruct
[ "d30e2626fc1272e7fe3a27386c4c663157e958ec" ]
[ "openaerostruct/examples/rectangular_wing/opt_chord.py" ]
[ "\"\"\"\nPerform inviscid drag minimization of initially rectangular wing with respect to\nthe chord distribution, subject to a lift and reference area constraint. Similar\nto the twist optimization, the expected result from lifting line theory should\nproduce an elliptical lift distrbution. Check output directory ...
[ [ "numpy.ones", "numpy.zeros" ] ]
elaeon/ML
[ "8b56c62a28c69987fc5dbd8a47406a3a22214371" ]
[ "tests/test_it.py" ]
[ "import unittest\nimport numpy as np\nimport pandas as pd\nimport datetime\nimport collections\n\nfrom dama.data.it import Iterator, BatchIterator, Slice\nfrom dama.data.ds import Data\nfrom dama.connexions.core import GroupManager\nfrom dama.fmtypes import DEFAUL_GROUP_NAME\nfrom dama.utils.core import Chunks\nfro...
[ [ "numpy.array", "numpy.random.rand", "numpy.asarray", "numpy.zeros", "pandas.DataFrame", "numpy.arange", "numpy.dtype" ] ]
rinelson456/raven
[ "1114246136a2f72969e75b5e99a11b35500d4eef", "1114246136a2f72969e75b5e99a11b35500d4eef" ]
[ "framework/CodeInterfaces/WorkshopExamples/ProjectileInterfaceNoCSV.py", "tests/framework/calc_and_transfer/calc.py" ]
[ "# Copyright 2017 Battelle Energy Alliance, 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 ...
[ [ "numpy.asarray" ], [ "numpy.zeros" ] ]
cacoool/CLSA-Retina
[ "0001cf38bc5984d742c1093a718a279738aefa4b" ]
[ "helper_functions/loadConfig.py" ]
[ "from six.moves import configparser\nimport torch\n\ndef loadConfig(path):\n #========= Load settings from Config file\n config = configparser.RawConfigParser()\n config.read(path)\n\n #[data paths]\n path_dataset = config.get('data paths', 'path_dataset')\n\n #[experiment name]\n name = confi...
[ [ "torch.cuda.is_available" ] ]
georgetown-analytics/housing-risk
[ "bc8317c54322f4a5d26cc2978e98ea42f491c2b1" ]
[ "code/tests/test_prediction.py" ]
[ "##########################################################################\n## Prediction Package Tests\n##########################################################################\n\n# to execute tests, run from *project* root. This runs all test packages\n# (this one and any other in the /tests folder)\n#\n# no...
[ [ "sklearn.ensemble.RandomForestClassifier", "sklearn.neighbors.KNeighborsClassifier" ] ]
UT-Austin-RPL/Ditto
[ "c9bd94ede2aa4343f59f52bc1e3b1e3eccd96484" ]
[ "src/third_party/ConvONets/encoder/unet.py" ]
[ "\"\"\"\nCodes are from:\nhttps://github.com/jaxony/unet-pytorch/blob/master/model.py\n\"\"\"\n\nfrom collections import OrderedDict\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torch.nn import init\n\n\ndef conv3x3(in_channel...
[ [ "torch.cat", "torch.nn.ModuleList", "numpy.zeros", "torch.nn.MaxPool2d", "torch.nn.init.constant_", "torch.FloatTensor", "torch.nn.ConvTranspose2d", "torch.isnan", "torch.nn.Upsample", "torch.nn.Conv2d", "torch.nn.init.xavier_normal_" ] ]
huangruizhe/waldo_old
[ "75ead75c3320643888141573f191f5190f9aa203" ]
[ "egs/madcat_arabic/v1/scoring/scoring_utils.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright 2018 Johns Hopkins University (author: Ashish Arora)\n# Apache 2.0\n\n# It contains utility functions for scoring. These functions are called from score.py\n\nfrom shapely.geometry.polygon import Polygon\nimport numpy as np\nfrom PIL import Image\n\n\ndef _evaluate_mask_image(...
[ [ "numpy.array", "numpy.empty", "numpy.zeros", "numpy.where", "numpy.argmax", "numpy.unique" ] ]
tripidhoble/ga-learner-dsmp-repo
[ "69b5ce964ca13ebbf356a2d1924641b0de5fa4c7" ]
[ "Banking-Inferences-Project/code.py" ]
[ "# --------------\nimport pandas as pd\r\nimport scipy.stats as stats\r\nimport math\r\nimport numpy as np\r\nimport warnings\r\n\r\nwarnings.filterwarnings('ignore')\r\n#Sample_Size\r\nsample_size=2000\r\n\r\n#Z_Critical Score\r\nz_critical = stats.norm.ppf(q = 0.95) \r\n\r\n\r\n# path [File location varia...
[ [ "numpy.array", "scipy.stats.norm.ppf", "matplotlib.pyplot.subplots", "scipy.stats.chi2_contingency", "pandas.Series", "pandas.read_csv", "scipy.stats.chi2.ppf" ] ]
yohplala/vaex
[ "ca7927a19d259576ca0403ee207a597aaef6adc2" ]
[ "packages/vaex-core/vaex/encoding.py" ]
[ "\"\"\"Private module that determines how data is encoded and serialized, to be able to send it over a wire, or save to disk\"\"\"\n\nimport base64\nimport io\nimport json\nimport numbers\nimport pickle\nimport uuid\nimport struct\nimport collections.abc\n\nimport numpy as np\nimport pyarrow as pa\nimport vaex\nfro...
[ [ "numpy.array", "numpy.frombuffer", "numpy.ma.isMaskedArray", "numpy.ma.array", "numpy.cumsum", "numpy.dtype" ] ]
rishigurnani/iclr19-graph2graph
[ "77ff0ab52393930ac3a49f1300e007c9176bb001", "77ff0ab52393930ac3a49f1300e007c9176bb001" ]
[ "fast_jtnn/scaff_gan.py", "fast_jtnn/jtnn_enc.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.autograd as autograd\nfrom mol_tree import Vocab, MolTree\nfrom nnutils import create_var, avg_pool, index_select_ND, GRU\nfrom jtnn_enc import JTNNEncoder\n\nclass ScaffoldGAN(nn.Module):\n\n def __init__(self, jtnn, hidden_size...
[ [ "torch.nn.Linear", "torch.cat", "torch.stack", "torch.autograd.Variable", "torch.nn.LeakyReLU" ], [ "torch.nn.Linear", "torch.nn.functional.sigmoid", "torch.cat", "torch.stack", "torch.nn.ReLU", "torch.LongTensor", "torch.nn.functional.pad" ] ]
KuZero/pvinspect
[ "7d6666c509573fdb36e5312fed1e68d5ec47f2ce" ]
[ "test/utilities.py" ]
[ "import numpy as np\nfrom pathlib import Path\nfrom pvinspect.data import (\n Image,\n ModuleImage,\n ImageSequence,\n ModuleImageSequence,\n EL_IMAGE,\n)\nfrom typing import List, Dict, Any, Optional\n\n\ndef assert_equal(value, target, precision=1e-3):\n assert np.all(value > target - precision)...
[ [ "numpy.all", "numpy.random.random" ] ]
ManaliSharma/Self_Driving_Cars_Supervised_And_Reinforcement_Learning
[ "a7479ec1cba6846d491ee9ec11ae5db1a7abff32" ]
[ "Umbrella_Academy_INFO7390_Project/INFO7390_Notebooks/modules/RL_exp_replay.py" ]
[ "import numpy as np\n\nclass ExperienceReplay:\n\n def __init__(self,\n num_frame_stack=4,\n capacity=int(1e5),\n pic_size=(96, 96)\n ):\n self.num_frame_stack = num_frame_stack\n self.capacity = capacity\n self.pic_size = pic_size\n self.counter = ...
[ [ "numpy.zeros", "numpy.ones", "numpy.random.randint", "numpy.append", "numpy.repeat", "numpy.moveaxis" ] ]
Nannigalaxy/mmediting
[ "92cebc1b101707072cc25da0510e717fdb0b335d" ]
[ "mmedit/models/extractors/lte.py" ]
[ "import torch\nimport torch.nn as nn\nfrom mmcv.runner import load_checkpoint\nfrom torchvision import models\n\nfrom mmedit.models import ImgNormalize\nfrom mmedit.models.registry import COMPONENTS\nfrom mmedit.utils import get_root_logger\n\n\n@COMPONENTS.register_module()\nclass LTE(nn.Module):\n \"\"\"Learna...
[ [ "torch.nn.Sequential" ] ]
ZettaAI/Synaptor
[ "e425b4c744fca093ee5c63f41b82b3cae7898af4", "e425b4c744fca093ee5c63f41b82b3cae7898af4" ]
[ "synaptor/proc/seg/conncomps.py", "synaptor/proc/seg/merge/merge_ccs.py" ]
[ "\"\"\" Connected Components \"\"\"\n\n\nimport numpy as np\nfrom scipy import ndimage\nimport cc3d\n\nfrom ... import seg_utils\n\n\ndef connected_components(d, thresh=0, overlap_seg=None, dtype=np.uint32):\n \"\"\"\n Performs basic connected components on network\n output given a threshold value. Returns...
[ [ "numpy.zeros", "numpy.ascontiguousarray", "scipy.ndimage.binary_dilation", "scipy.ndimage.iterate_structure", "scipy.ndimage.generate_binary_structure" ], [ "numpy.ndindex", "numpy.logical_and", "numpy.zeros" ] ]
sgbaird/ocp
[ "874e53e8040a3112ed60c9f145c008c598baa74a" ]
[ "ocpmodels/common/utils.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 collections\nimport copy\nimport glob\nimport importlib\nimport itertools\nimport json\nimport os\nimport time\nfrom...
[ [ "torch.cat", "torch.stack", "torch.gt", "torch.cuda.max_memory_cached", "torch.le", "torch.bmm", "torch.logical_and", "torch.transpose", "matplotlib.backends.backend_agg.FigureCanvasAgg", "torch.sum", "torch.is_tensor", "torch.cuda.memory_cached", "torch.tensor"...
k-danna/a3c
[ "f34f1320171ac49b768cb23ef52e607926211c0e" ]
[ "a3c.py" ]
[ "\nimport sys\nfrom queue import Queue\nimport random\nimport tensorflow as tf\nimport numpy as np\nimport pandas as pd\nimport scipy.signal\nimport gym\n\n#FIXME: move these to the net\n#some quick wrapper methods for the state\n\ndef process_state(state):\n\n #pad state if 1d with odd number of observations\n ...
[ [ "tensorflow.group", "tensorflow.multinomial", "tensorflow.matmul", "tensorflow.assign_add", "tensorflow.nn.softmax", "tensorflow.one_hot", "tensorflow.contrib.layers.flatten", "tensorflow.set_random_seed", "pandas.DataFrame", "tensorflow.train.Saver", "tensorflow.Variab...
dk-teknologisk-rtfh/ProcessOptimizer
[ "993e20f35646901862616b4218a1443eeb0866cc" ]
[ "plot_test/bokeh_categorical.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.model_selection import cross_val_score\nfrom ProcessOptimizer.space import Integer, Categorical\nfrom ProcessOptimizer import gp_minimize, bokeh_plot\n...
[ [ "numpy.random.seed", "matplotlib.pyplot.set_cmap", "sklearn.datasets.load_breast_cancer" ] ]
coding-chenkaikai/scikit
[ "2a7545beff075528211feeeb22d9c5a403ce8948" ]
[ "util/probability_function.py" ]
[ "# -*- coding: UTF-8 -*-\n\"\"\"\n 概率分布函数\n\"\"\"\n\nimport numpy as np\nimport scipy.stats as st\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\n# 二项分布\ndef binomial_distribution():\n n = 10\n p = 0.3\n k = np.arange(0, 21)\n binomial = st.binom.pmf(k=k, n=n, p=p)\n\n plt.plot(k, bi...
[ [ "scipy.stats.norm.pdf", "scipy.stats.binom.rvs", "scipy.stats.beta.pdf", "scipy.stats.poisson.rvs", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "scipy.stats.poisson.pmf", "numpy.exp", "matplotlib.pyplot.hist", "numpy.arange", "matp...
ntaylorwss/pavlov
[ "c10dff9e32934fb0bba0531c041251f4c61366ac" ]
[ "pavlov/models/topology.py" ]
[ "from tensorflow.keras.layers import Input, Flatten, concatenate, Activation\nfrom tensorflow.keras.layers import Dense, Conv2D\n\n\nclass Topology:\n \"\"\"Base class for creating headless Keras computation graphs with arbitrary architecture.\n\n Input layer is pre-defined, and resides in `self.input`,\n ...
[ [ "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Dense" ] ]
marickmanrho/linabsspec
[ "b9ee6f67261c7028d1aa78144f629ca82db9e8ff" ]
[ "linabsspec/test_demohamiltonian.py" ]
[ "import unittest\r\nimport numpy as np\r\nfrom demohamiltonian import *\r\n\r\nclass TestHamGen(unittest.TestCase):\r\n # Test if output has right dimensions\r\n def testDim(self):\r\n N = 2\r\n v,w = Hamiltonian(N,1,1,1,1)\r\n a = np.shape(v)\r\n b = np.shape(w)\r\n self.as...
[ [ "numpy.shape" ] ]
lbartnik/transformer
[ "d392fb79b9218be47305b84784e4bf0c448f7333" ]
[ "src/transformer/text.py" ]
[ "from spacy.lang.en import English\nfrom spacy.lang.de import German\nfrom torchtext.datasets import IWSLT2017\nfrom torchtext.vocab import build_vocab_from_iterator\n\n\n# Define special symbols and indices\nPAD_IDX, UNK_IDX, BOS_IDX, EOS_IDX = 0, 1, 2, 3\n# Make sure the tokens are in order of their indices to pr...
[ [ "torch.save", "torch.LongTensor", "torch.no_grad", "torch.load" ] ]
joaoagulha/deep_learning
[ "2fe6bf0a75f02411c2cd73f8488f09a9276a66b0" ]
[ "2 - Unsupervised Deep Learning/6 - AutoEncoders (AE)/ae-1.py" ]
[ "# AutoEncoders\n\n# Importing the libraries\nimport numpy as np\nimport pandas as pd\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.optim as optim\nimport torch.utils.data\nfrom torch.autograd import Variable\n\n# Importing the dataset\nmovies = pd.read_csv('ml-1m/movies.dat', sep = '...
[ [ "torch.nn.Linear", "numpy.array", "torch.nn.MSELoss", "numpy.zeros", "torch.nn.Sigmoid", "torch.autograd.Variable", "torch.FloatTensor", "numpy.sqrt", "pandas.read_csv", "torch.sum" ] ]
nwtnni/movies
[ "48102760923766cffbcc21b83526bff7d03084a0" ]
[ "validate.py" ]
[ "import json\nimport matplotlib.pyplot as plt\nfrom collections import defaultdict\n\n\ndef main():\n # genres = defaultdict(int)\n language = defaultdict(int)\n # rating = defaultdict(int)\n # runtime = []\n # tokens = []\n # imdb = []\n # tmdb = []\n # meta = []\n\n for movie in json.lo...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots_adjust" ] ]
ruijis/mortar-analytics
[ "2899c49b6681c3cf15b7cbfddadb2632f084e5c5" ]
[ "dr_evaluation/baseline_functions.py" ]
[ "import pandas as pd\nfrom pandas.tseries.holiday import USFederalHolidayCalendar as calendar\nfrom pandas.tseries.offsets import CustomBusinessDay\nimport numpy as np\nimport datetime\n\ndef make_baseline(x_days, pivot, name=\"Temperature\", freq=\"15min\"):\n baseline=pivot[pivot.index.isin(x_days)].mean(axis=...
[ [ "numpy.isnan", "pandas.Timedelta", "pandas.tseries.holiday.USFederalHolidayCalendar", "numpy.shape", "pandas.Timestamp", "numpy.fabs", "numpy.arange" ] ]
Anonymous-DL/MAGNET
[ "5926ca79ae03010289c1e522f8df41aa79de5edc" ]
[ "src/Digraph.py" ]
[ "# external files\nimport numpy as np\nimport pickle as pk\nimport torch.optim as optim\nfrom datetime import datetime\nimport os, time, argparse, csv\nfrom collections import Counter\nimport torch.nn.functional as F\nfrom sklearn.model_selection import train_test_split\nfrom torch.optim.lr_scheduler import CosineA...
[ [ "numpy.round", "torch.nn.functional.nll_loss", "numpy.save", "numpy.zeros" ] ]
pg42866/SIB
[ "853dffc5bba514139a5e04edcbad435c98e4389d" ]
[ "src/si/util/scale.py" ]
[ "import numpy as np\nfrom copy import copy\n\n\nclass StandardScaler:\n def __init__(self):\n self.mean = None\n self.var = None\n \"\"\"\n Standardize features by centering the mean to 0 and unit variance.\n The standard score of an instance is calculated by:\n z = (x - u) / s\n ...
[ [ "numpy.var", "numpy.sqrt", "numpy.mean" ] ]
chuliuT/easy-faster-rcnn.pytorch
[ "8c69b98825fc4cacdbf51c48ba63e341af0a221f" ]
[ "backbone/resnet50.py" ]
[ "from typing import Tuple\n\nimport torchvision\nfrom torch import nn\n\nimport backbone.base\n\n\nclass ResNet50(backbone.base.Base):\n\n def __init__(self, pretrained: bool):\n super().__init__(pretrained)\n\n def features(self) -> Tuple[nn.Module, nn.Module, int, int]:\n # 这里调用的是Resnet50\n ...
[ [ "torch.nn.Sequential" ] ]
qwentest/qwenAILearn
[ "ea2e86ea70609be6c1f6baac6704ff0d677ef9c6" ]
[ "DarkNet/predict.py" ]
[ "# coding: utf-8 \n# @时间 : 2022/1/18 8:42 上午\n# @作者 : 文山\n# @邮箱 : wolaizhinidexin@163.com\n# @作用 :\n# @文件 : predict.py\n# @微信 :qwentest123\nimport numpy as np\nimport pandas as pd\nfrom tensorflow.keras.layers import Dense, Flatten, Conv2D, AvgPool2D, MaxPool2D\nfrom tensorflow.keras import Model\nimpor...
[ [ "numpy.array", "numpy.squeeze", "numpy.argmax", "numpy.expand_dims" ] ]
HosseinSheikhi/drq
[ "a21e379d03680b0ee0ec5f347dd46eeae7b75f9d" ]
[ "train.py" ]
[ "import copy\nimport math\nimport os\nimport pickle as pkl\nimport sys\nimport time\n\nimport numpy as np\n\nimport dmc2gym\nimport hydra\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport utils\nfrom logger import Logger\nfrom replay_buffer import ReplayBuffer\nfrom video import VideoRec...
[ [ "torch.device" ] ]
kubekbreha/ML-Python-Algorithms
[ "8058b68a2d98a79a6debcc69abdd188c97420d75" ]
[ "school/lecture6/isi_cv_28_task.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 21 20:05:06 2017\n\n@author: pd\n\"\"\"\n\n\nfrom IPython import get_ipython\nget_ipython().magic('reset -sf') \n\nfrom sklearn import datasets\nimport numpy as np\nfrom sklearn.datasets import make_classification\nfrom sklearn.linear_mode...
[ [ "sklearn.linear_model.LogisticRegression", "sklearn.datasets.make_classification" ] ]
debdutgoswami/python-semester-practical
[ "9abdc9091d825a2425b36437f6f8fe6806ac84f2" ]
[ "Question 21 - 30/Q28.py" ]
[ "import matplotlib.pyplot as plt\n\nx = [2, 6, 9, 1]\ny = [8, 3, 7, 1]\n\nplt.plot(x,y)\nplt.title('line')\nplt.xlabel('x')\nplt.ylabel('y')\nplt.grid(axis='both')\nplt.show()" ]
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show" ] ]
ged-steponavicius/dask
[ "3b0bde764ff94071ce46a9329ae28072dad046dc" ]
[ "dask/dataframe/core.py" ]
[ "import operator\nimport warnings\nfrom collections.abc import Iterator, Sequence\nfrom functools import wraps, partial\nfrom numbers import Number, Integral\nfrom operator import getitem\nfrom pprint import pformat\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.util import cache_readonly\nfrom pandas.api....
[ [ "pandas.DatetimeIndex", "numpy.min", "pandas.api.types.is_numeric_dtype", "pandas.io.formats.printing.pprint_thing", "numpy.where", "pandas.Timestamp", "numpy.cumsum", "numpy.issubdtype", "numpy.max", "numpy.concatenate", "numpy.nan_to_num", "pandas.Timedelta", ...
LEGaTO-SmartMirror/SmartMirror-Facerecognition
[ "65b87528b5f64a94b9352134712ff4ca404294a1" ]
[ "facerecognition/classifier/FaceClassifier.py" ]
[ "import os\nimport pickle\nimport numpy as np\nfrom sklearn import neighbors, svm\n\nBASE_DIR = os.path.dirname(__file__) + '/'\nPATH_TO_PKL = 'trained_classifier.pkl'\n\nparam_grid = [\n {'C': [1, 10, 100, 1000],\n 'kernel': ['linear']},\n {'C': [1, 10, 100, 1000],\n 'gamma': [0.001, 0.0001],\n '...
[ [ "sklearn.neighbors.KNeighborsClassifier", "sklearn.svm.SVC" ] ]
sbrugman/missingno
[ "3af89fbcbb29822a67ccb74071f1cb8efd408244" ]
[ "missingno/missingno.py" ]
[ "import numpy as np\nimport matplotlib as mpl\nfrom matplotlib import gridspec\nimport matplotlib.pyplot as plt\nfrom scipy.cluster import hierarchy\nimport seaborn as sns\nimport pandas as pd\nfrom .utils import nullity_filter, nullity_sort\nimport warnings\n\n\ndef matrix(df,\n filter=None, n=0, p=0, so...
[ [ "scipy.cluster.hierarchy.linkage", "numpy.zeros_like", "numpy.zeros", "numpy.triu_indices_from", "pandas.date_range", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.pyplot.gca", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.subplot" ] ]
cellular-nanoscience/pyotic
[ "4cf68d4fd4efe2f1cbb4bb6fd61a66af0d15eaff" ]
[ "pyoti/plugins/modifications/attachment.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 10 21:33:22 2016\n\n@author: Tobias Jachowski\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom pyoti.modification.modification import Modification, GraphicalMod\nfrom pyoti import traces as tc\nfrom pyoti.evaluate import signal as sn\n\n\nclas...
[ [ "numpy.array", "matplotlib.pyplot.Button", "matplotlib.pyplot.subplots" ] ]
mikita-zhuryk/Practical_RL
[ "4726da9d471f9a4f59f745a009796c2fbbe86e58" ]
[ "week01_intro/deep_crossentropy_method.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Deep Crossentropy method\n# \n# In this section we'll extend your CEM implementation with neural networks! You will train a multi-layer neural network to solve simple continuous state space games. __Please make sure you're done with tabular crossentropy method from the...
[ [ "numpy.max", "numpy.array", "matplotlib.pyplot.arrow", "numpy.percentile", "matplotlib.pyplot.grid", "sklearn.neural_network.MLPClassifier", "matplotlib.pyplot.legend", "numpy.mean", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "matplotlib.pyplot.hist", ...
BioMedicalBigDataMiningLab/AMMGC
[ "09b9e4760375f6b56c1bd5b1cbc2084ed3d85692" ]
[ "metrics.py" ]
[ "import numpy as np\r\nimport math\r\n\r\ndef model_evaluate(real_score,predict_score):\r\n\r\n AUPR = get_AUPR(real_score,predict_score)\r\n AUC = get_AUC(real_score,predict_score)\r\n [f1,accuracy,recall,spec,precision] = get_Metrics(real_score,predict_score)\r\n return np.array([AUPR,AUC,f1,accuracy,...
[ [ "numpy.matrix", "numpy.array", "numpy.savetxt", "numpy.where", "numpy.argmax" ] ]
artberryx/LSD
[ "99ee081de2502b4d13c140b474f772db8a5f92fe", "99ee081de2502b4d13c140b474f772db8a5f92fe" ]
[ "garaged/src/garage/tf/policies/gaussian_lstm_policy.py", "garaged/examples/torch/mtsac_metaworld_ml1_pick_place.py" ]
[ "\"\"\"Gaussian LSTM Policy.\n\nA policy represented by a Gaussian distribution\nwhich is parameterized by a Long short-term memory (LSTM).\n\"\"\"\n# pylint: disable=wrong-import-order\nimport akro\nimport numpy as np\nimport tensorflow as tf\n\nfrom garage.experiment import deterministic\nfrom garage.tf.models im...
[ [ "tensorflow.zeros_initializer", "numpy.random.normal", "tensorflow.compat.v1.placeholder", "numpy.array", "numpy.concatenate", "numpy.copy", "tensorflow.compat.v1.variable_scope", "numpy.exp", "tensorflow.compat.v1.get_default_session" ], [ "numpy.exp" ] ]
jordan-bonecutter/detectron2
[ "5c923c64c4f4f79a8b1f265be4b6d9d8512b5793" ]
[ "detectron2/utils/visualizer.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport colorsys\nimport logging\nimport math\nimport numpy as np\nfrom enum import Enum, unique\nimport cv2\nimport matplotlib as mpl\nimport matplotlib.colors as mplc\nimport matplotlib.figure as mplfigure\nimport pycocotools.mask as mask_util\nimport torch\nfro...
[ [ "numpy.random.rand", "numpy.frombuffer", "matplotlib.patches.Rectangle", "matplotlib.backends.backend_agg.FigureCanvasAgg", "numpy.max", "numpy.linalg.norm", "numpy.prod", "torch.tensor", "matplotlib.patches.Circle", "numpy.sqrt", "numpy.argmax", "matplotlib.colors....
metataro/Informer2020
[ "6ea8178a1e6b6a1aa356b6ea8dd851169cae80fd" ]
[ "exp/exp_basic.py" ]
[ "import os\nimport torch\nimport numpy as np\n\nfrom utils.loggers import Logger\n\n\nclass Exp_Basic(object):\n def __init__(self, args, logger: Logger):\n self.args = args\n self.logger = logger\n self.device = self._acquire_device()\n self.model = self._build_model().to(self.device...
[ [ "torch.device" ] ]
taufikxu/FD-ScoreMatching
[ "9df0789bb98bb798b3de57072f63ee4b2f19947f" ]
[ "ncsn/runners/baseline_runner.py" ]
[ "import numpy as np\nimport tqdm\nfrom losses.dsm import dsm_score_estimation\nimport torch.nn.functional as F\nimport logging\nimport torch\nimport os\nimport shutil\nimport tensorboardX\nimport torch.optim as optim\nfrom torchvision.datasets import MNIST, CIFAR10, FashionMNIST\nimport torchvision.transforms as tr...
[ [ "torch.rand", "torch.sigmoid", "torch.rand_like", "torch.optim.RMSprop", "torch.log1p", "torch.no_grad", "torch.optim.Adam", "torch.optim.SGD", "torch.clamp", "torch.randn_like", "torch.utils.data.DataLoader", "numpy.sqrt", "torch.log", "torch.nn.DataParalle...
intelligent-human-perception-laboratory/Speaker-Invariant-Domain-Adversarial-Neural-Networks
[ "7a0df25178a4805648cd8e63767405d6b7a7ddb8" ]
[ "experiment_a/train_sidann.py" ]
[ "\"\"\"\nTrains and validates models\n\"\"\"\n\nimport os\nimport torch\nimport random\nimport pandas\nimport models\nimport warnings\nimport datasets\nimport argparse\nimport itertools\nimport numpy as np\n\nfrom tqdm import tqdm\nfrom sklearn.metrics import accuracy_score, recall_score\n\nwarnings.filterwarnings(...
[ [ "torch.zeros", "torch.device", "numpy.array", "torch.cat", "torch.cuda.manual_seed_all", "numpy.random.seed", "torch.save", "torch.no_grad", "sklearn.metrics.accuracy_score", "torch.manual_seed", "numpy.std", "torch.ones", "pandas.read_csv", "torch.nn.CrossE...
charlesxbai/mmf
[ "3fc0cdf8adb7fd01260c5a16b867dcb7f895a135" ]
[ "mmf/common/test_reporter.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport csv\nimport json\nimport os\n\nimport torch\nfrom torch.utils.data import DataLoader, Dataset\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom mmf.common.batch_collator import BatchCollator\nfrom mmf.common.registry import registry\nfro...
[ [ "torch.utils.data.distributed.DistributedSampler" ] ]
danielk333/pyant
[ "7abcada86145482a0ca63f3072c577dc441da4b7", "7abcada86145482a0ca63f3072c577dc441da4b7" ]
[ "examples/using_parameters.py", "pyant/interpolated.py" ]
[ "'''\nUsing parameters\n=================\n'''\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pyant\n\nbeam = pyant.Airy(\n azimuth=[0, 45.0, 0],\n elevation=[89.0, 80.0, 60.0],\n frequency=[930e6, 230e6],\n I0=10**4.81,\n radius=np.linspace(10,23.0,num=20),\n)\n\nk = np.array([0,0,1.0]...
[ [ "numpy.array", "numpy.linspace" ], [ "numpy.logical_not", "numpy.empty", "numpy.zeros", "numpy.load", "numpy.save", "numpy.sqrt", "numpy.linspace", "numpy.meshgrid" ] ]
holdmeplease/The-Sound-of-Pixels-
[ "dc0ed2dffcde76c0c55fb8fe21013dabba496467" ]
[ "train_new.py" ]
[ "from models import modifyresnet18, UNet, Synthesizer\r\nimport torch\r\nimport torch.optim as optim\r\nimport torch.nn as nn\r\nfrom util.datahelper import load_all_training_data, sample_from_dict #正确性未经验证\r\nimport itertools\r\nimport numpy as np\r\nimport librosa.display\r\nimport matplotlib.pyplot as plt\r\nimp...
[ [ "numpy.reshape", "numpy.zeros", "torch.nn.L1Loss", "torch.from_numpy", "torch.cuda.is_available", "numpy.absolute", "torch.transpose" ] ]
jhoogmoed/HumanThreatPerception
[ "ec02459925ea53ed88e467921266fc3beaeef742", "ec02459925ea53ed88e467921266fc3beaeef742" ]
[ "htpmKitti/model/services.py", "htpmKitti/kitti/tracklet_parser.py" ]
[ "#!/usr/bin/env python3\nimport os\nimport numpy as np\n# import kitti.tracklet_parser as tracklet_parser\n# import kitti.tracklet_parser as tracklet_parser\nimport collections\nimport pandas as pd\n\nKittiObject = collections.namedtuple('KittiObject', ['type',\n ...
[ [ "pandas.DataFrame.from_dict", "numpy.prod", "pandas.read_csv", "numpy.linalg.norm" ], [ "numpy.array", "numpy.transpose", "numpy.arctan2", "numpy.append" ] ]
arpitgogia/mars_city
[ "30cacd80487a8c2354bbc15b4fad211ed1cb4f9d" ]
[ "servers/biometric_signal_sensor_interface/src/anomaly_detector/anomaly_detector.py" ]
[ "from __future__ import division, print_function\nfrom threading import Thread\n\nimport os\nimport ConfigParser\nimport logging\n\nimport numpy as np\nimport pandas as pd\n\nfrom atrial_fibrillation import AtrialFibrillation\nfrom ventricular_tachycardia import VentricularTachycardia\nfrom apc_pvc_helper import AP...
[ [ "pandas.read_csv" ] ]
Kinoo2/tensorflow
[ "e334eb2f95bdece6f0df3eff0cf9c402078fe392" ]
[ "tensorflow/python/compat/compat.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.python.platform.tf_logging.warning", "tensorflow.python.util.tf_export.tf_export" ] ]
robbason/perses
[ "33a6b4c41da2414c727c7980cb400d6402b24f3d" ]
[ "perses/app/relative_point_mutation_setup.py" ]
[ "from __future__ import absolute_import\n\nfrom perses.utils.openeye import *\nfrom perses.annihilation.relative import HybridTopologyFactory\nfrom perses.rjmc.topology_proposal import PointMutationEngine\nfrom perses.rjmc.geometry import FFAllAngleGeometryEngine\n\nimport simtk.openmm as openmm\nimport simtk.openm...
[ [ "numpy.zeros" ] ]
Ebanflo42/eligibility_propagation
[ "ae454a68ea4473a768e147ab2766feaa063e83df" ]
[ "Figure_4_and_5_ATARI/compile.py" ]
[ "import argparse\nimport subprocess as sp\nimport tensorflow as tf\n\ncflags = \" \".join(tf.sysconfig.get_compile_flags())\nlflags = \" \".join(tf.sysconfig.get_link_flags())\ntf_inc = tf.sysconfig.get_include()\ntf_lib = tf.sysconfig.get_lib()\n\nparser = argparse.ArgumentParser()\nparser.add_argument('ale_path',...
[ [ "tensorflow.sysconfig.get_lib", "tensorflow.sysconfig.get_include", "tensorflow.sysconfig.get_compile_flags", "tensorflow.sysconfig.get_link_flags" ] ]
mrklees/dowhy
[ "a9e950fd0cf180dc4cbbca13332638aab9d00c65" ]
[ "dowhy/causal_refuters/placebo_treatment_refuter.py" ]
[ "import copy\n\nimport numpy as np\n\nfrom dowhy.causal_refuter import CausalRefutation\nfrom dowhy.causal_refuter import CausalRefuter\n\n\nclass PlaceboTreatmentRefuter(CausalRefuter):\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self._placebo_type = kwargs[\"pla...
[ [ "numpy.random.randn" ] ]
cartman12/lambdata_mali_tree_classifier
[ "62cf7d5c105e4da05e4467f0b0b73338d70d59c0" ]
[ "lambdata_mali_tree_classifier/lambdata_mali_tree_classifier.py" ]
[ "def fit(X_train, y_train):\n from sklearn.metrics import accuracy_score\n import pandas as pd\n data = X_train.copy()\n assert len(data) == len(y_train)\n y_train = pd.DataFrame(list(y_train))\n data.index = range(len(data))\n concated_data = pd.concat([data,y_train],axis=1)\n majority_dict = {}\n list_ma...
[ [ "sklearn.metrics.accuracy_score", "pandas.concat" ] ]
fujunwei/dldt
[ "09497b7724de4be92629f7799b8538b483d809a2", "09497b7724de4be92629f7799b8538b483d809a2" ]
[ "model-optimizer/extensions/ops/argmax.py", "model-optimizer/extensions/back/compress_quantized_weights_test.py" ]
[ "\"\"\"\n Copyright (C) 2017-2020 Intel Corporation\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...
[ [ "numpy.array", "numpy.ones" ], [ "numpy.all", "numpy.finfo", "numpy.array" ] ]
billzhonggz/Transfer-Learning-Library
[ "7b0ccb3a8087ecc65daf4b1e815e5a3f42106641", "7b0ccb3a8087ecc65daf4b1e815e5a3f42106641", "7b0ccb3a8087ecc65daf4b1e815e5a3f42106641" ]
[ "talib/finetune/bss.py", "dglib/modules/sampler.py", "examples/domain_adaptation/image_classification/dann.py" ]
[ "\"\"\"\n@author: Yifei Ji\n@contact: jiyf990330@163.com\n\"\"\"\nimport torch\nimport torch.nn as nn\n\n__all__ = ['BatchSpectralShrinkage']\n\n\nclass BatchSpectralShrinkage(nn.Module):\n r\"\"\"\n The regularization term in `Catastrophic Forgetting Meets Negative Transfer:\n Batch Spectral Shrinkage for...
[ [ "torch.pow" ], [ "numpy.random.choice" ], [ "torch.cat", "torch.nn.Identity", "torch.nn.Sequential", "torch.manual_seed", "torch.nn.functional.cross_entropy", "torch.cuda.is_available", "torch.utils.data.DataLoader" ] ]
Droyd97/fingan
[ "074b275fb11dc75868c6cc5b73bc5db97efa5ed1" ]
[ "tests/model_tests.py" ]
[ "import pytest\nfrom fingan.wgan import WGAN\nfrom fingan.TestData import SineData\nimport matplotlib.pyplot as plt\n\n\ndef testWGAN():\n data = SineData(100, 400, [3, 10], [1, 5])\n model = WGAN()\n model.train(data, 20)\n x = model.generate(1)\n print(x.detach().numpy())\n plt.plot(x.detach().n...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.plot" ] ]
fushwLZU/onnxruntime_test
[ "7ee82dde9150dc0d3014c06a82eabdecb989f2f3", "7ee82dde9150dc0d3014c06a82eabdecb989f2f3" ]
[ "cmake/external/tvm/nnvm/python/nnvm/to_relay.py", "onnxruntime/python/tools/quantization/onnx_quantizer.py" ]
[ "# pylint: disable=no-else-return, unidiomatic-typecheck, invalid-name, unused-argument\n\"\"\"Convert an NNVM graph to Relay.\"\"\"\nimport json\nimport numpy\n\nfrom tvm import relay, nd\nfrom tvm.relay import op, expr, var\nfrom tvm.relay.frontend.common import StrAttrsDict\nfrom tvm.relay.frontend.nnvm_common i...
[ [ "numpy.zeros" ], [ "numpy.concatenate", "numpy.asarray", "numpy.zeros" ] ]
p994070003/surplus_det
[ "3bef4bfc32e9b0bd3a3307c641d4d0c7d2b0fe53" ]
[ "yolo.py" ]
[ "#-------------------------------------#\r\n# 创建YOLO类\r\n#-------------------------------------#\r\nimport colorsys\r\nimport os\r\nimport time\r\n\r\nimport numpy as np\r\nimport torch\r\nimport torch.nn as nn\r\nfrom PIL import Image, ImageDraw, ImageFont\r\n\r\nfrom nets.yolo3 import YoloBody\r\nfrom utils...
[ [ "numpy.concatenate", "numpy.array", "torch.cat", "numpy.asarray", "torch.no_grad", "numpy.shape", "torch.cuda.is_available", "numpy.transpose", "torch.load", "numpy.expand_dims", "torch.nn.DataParallel", "numpy.floor" ] ]
WFRCAnalytics/urbansim_wfrc
[ "83d479a2dcaa5f3f3ca93e6531d444e3809cf22d" ]
[ "urbansim_wfrc/models/developer.py" ]
[ "from __future__ import print_function\nfrom __future__ import division\n\nimport pandas as pd\nimport numpy as np\nfrom urbansim_defaults.randomfile import fixedrandomseed,seednum\n\nclass Developer(object):\n \"\"\"\n Pass the dataframe that is returned by feasibility here\n\n Can also be a dictionary wh...
[ [ "numpy.max", "numpy.searchsorted", "numpy.random.seed", "pandas.concat" ] ]
vibhatha/mars
[ "7a6b78ca4befd1a46d82cfb0163ffcd49293f7b5" ]
[ "mars/dataframe/groupby/apply.py" ]
[ "# Copyright 1999-2020 Alibaba Group Holding 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 appl...
[ [ "numpy.array", "numpy.errstate", "pandas.Series" ] ]
AmiiThinks/forget-me-not
[ "a5f0746143bba532b5f502089ade9d342e79a7ce" ]
[ "environments.py" ]
[ "'''\nBLINC Adaptive Prosthetics Toolkit\n- Bionic Limbs for Improved Natural Control, blinclab.ca\nanna.koop@gmail.com\n\nA toolkit for running machine learning experiments on prosthetic limb data\n\nThis module file environments\n# TODO: expand to handle ros environments\n'''\nimport os\nimport pandas as pd\nimpo...
[ [ "numpy.random.seed", "numpy.random.random", "numpy.random.get_state", "pandas.concat" ] ]
KolinGuo/RL289A-WQ2020
[ "9afd086bf8800dc6a490a565348f690861343c6f" ]
[ "src/train.py" ]
[ "'''\n## Train ##\n# Code to train Deep Q Network on gym-sokoban environment\n@author: Kolin Guo\n'''\n\nfrom datetime import datetime\nimport json, os, sys, argparse, logging, random, time, shutil\nimport gym, gym_sokoban\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\n\nfrom utils.e...
[ [ "numpy.array", "tensorflow.convert_to_tensor", "tensorflow.summary.trace_on", "tensorflow.summary.scalar", "numpy.random.seed", "tensorflow.random.set_seed", "numpy.mean", "numpy.invert", "tensorflow.math.reduce_max", "tensorflow.summary.trace_export", "tensorflow.summa...
fertc3/MetPy
[ "361f2711f44f30be7a48d116dfc4dd42fcad1139" ]
[ "src/metpy/xarray.py" ]
[ "# Copyright (c) 2018,2019 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Provide accessors to enhance interoperability between xarray and MetPy.\n\nMetPy relies upon the `CF Conventions <http://cfconventions.org/>`_. to provide helpful\...
[ [ "numpy.median", "numpy.diff", "numpy.ptp", "numpy.issubdtype", "numpy.meshgrid" ] ]
haharay/causalnex
[ "4318a34d43b708e7e75deb40e1e970c1c050ea1d" ]
[ "causalnex/discretiser/abstract_discretiser.py" ]
[ "# Copyright 2019-2020 QuantumBlack Visual Analytics Limited\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# THE SOFTWARE IS P...
[ [ "pandas.DataFrame.from_dict" ] ]
GBLin5566/An-Automated-Traditional-Chinese-Dialogue-Generating-System
[ "3f6d0e3b52602eee1eb97c943cb806508f8647bb" ]
[ "seq2seq.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"An-Automated-Traditional-Chinese-Dialogue-Generating-System Main file\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom builtins import range\n\nimport argparse\nimport time\nimport os\nimport sys\nimport rando...
[ [ "torch.manual_seed", "torch.cuda.is_available", "torch.nn.NLLLoss" ] ]
SarraHayoune/Summer2020
[ "32cab8537231fb4ab15de401e577a90522f7eda9" ]
[ "3plots.py" ]
[ "import pynbody\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib\nimport readcol\nimport astropy.units as u\nimport pylab\nimport itertools as it\nfrom itertools import tee\nimport warnings\nimport decimal\nimport statistics\nimport numpy.core.defchararray as npd\nresultd...
[ [ "numpy.array", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "numpy.mean", "numpy.where", "numpy.core.defchararray.equal", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.show", "matplotlib.pyplot.yscale" ] ]
ilikepistachio/TCNN_STCNN
[ "925939adfb009bee55add0a7ae9cf5db29c83871" ]
[ "demo.py" ]
[ "import sys\nsys.path.insert(0, '/home/rhou/caffe/python')\nimport caffe\nimport numpy as np\nfrom os import mkdir\nfrom os.path import exists, join\nimport cv2\nimport matplotlib.pyplot as plt\n\nclass DataLayer():\n def __init__(self, net, model):\n self._batch_size = 1\n self._depth = 8\n self._height ...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.imshow", "matplotlib.pyplot.subplot" ] ]
syborg64/SourceIO
[ "e4ba86d801f518e192260af08ef533759c2e1cc3" ]
[ "source1/vtf/cubemap_to_envmap.py" ]
[ "from .import_vtf import load_texture, texture_from_data\nfrom ...content_providers.content_manager import ContentManager\nfrom ...utilities.thirdparty.equilib.cube2equi_numpy import run as convert_to_eq\nfrom ..vmt.valve_material import VMT\nimport numpy as np\n\n\ndef pad_to(im: np.ndarray, s_size: int):\n new...
[ [ "numpy.rot90", "numpy.flipud", "numpy.zeros", "numpy.full_like" ] ]
yenchunlin024/APE
[ "bc9c08af01291b6f5821efffe85452554be22694" ]
[ "ape/HarmonicBasis.py" ]
[ "# -*- coding: utf-8 -*-\nimport sys\nimport numpy as np\nfrom numpy import exp\nfrom scipy.special import erf\nfrom math import factorial as fact\nfrom math import pi, sqrt\n\ndef Hermite(m,x):\n if m < 0:\n value = 0\n elif m == 0:\n value = 1\n elif m == 1:\n value = 2*x\n else:\...
[ [ "scipy.special.erf", "numpy.log" ] ]
AlBi-HHU/covid-analysis
[ "cf221f0e53ea90ff7d1b4d2bc717510ef7159f42" ]
[ "scripts/evaluation/verifyAltair.py" ]
[ "import altair as alt\nimport pandas as pd\n\ntuples = []\n\nwith open(snakemake.input[0], \"r\") as infile:\n sample = \"???\"\n for l in infile.read().splitlines():\n split = l.split(\"\\t\")\n if len(split) > 1:\n if len(split) == 7:\n tuples.append(\n ...
[ [ "pandas.DataFrame" ] ]
sony/nnabla-rl
[ "6a9a91ac5363b8611e0c9f736590729952a8d460" ]
[ "nnabla_rl/models/atari/q_functions.py" ]
[ "# Copyright 2020,2021 Sony Corporation.\n# Copyright 2021 Sony Group Corporation.\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...
[ [ "numpy.full" ] ]
vladh/clumsycomputer
[ "737737cfaabe57f6674b980fe89173755901f7cd" ]
[ "from-scratch-2-ocr/ocr.py" ]
[ "#!/usr/bin/env python\n\n\nDEBUG = False\n\nif DEBUG:\n # This code only exists to help us visually inspect the images.\n # It's in an `if DEBUG:` block to illustrate that we don't need it for our code to work.\n from PIL import Image\n import numpy as np\n\n def read_image(path):\n return np...
[ [ "numpy.array" ] ]