repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
DiZhang-XDU/SleepStage | [
"97cb21d13b782f85a4d9fa4c292ee8cb96bb6f62"
] | [
"data/prepare_physionet_SHHS_Resample.py"
] | [
"import argparse\nimport glob\nimport math\nimport ntpath\nimport os\nimport shutil\nimport urllib\n# import urllib2\n\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\n\nfrom mne import Epochs, pick_types, find_events\nfrom mne.io import concatenate_raws, read_raw_edf\n\nimport dhedfreader... | [
[
"numpy.split",
"numpy.savez",
"numpy.linspace",
"numpy.asarray",
"numpy.concatenate",
"numpy.int",
"numpy.interp",
"numpy.zeros"
]
] |
jeremyDT/P2P-lending-with-AI | [
"0240c77d9987a28e571d34d64e8b4804ea1a553a"
] | [
"code/code_1_acceptance.py"
] | [
"'''import the required packages and read the file.'''\n\nimport pandas as pd\nimport numpy as np\n\n\nprint('reading file')\n\ndata = pd.read_csv('../data/input_file_1.csv.zip', sep = ',', index_col=0, compression='zip')\n\nprint('file shape', data.shape)\n\n'''parse column to date format'''\n\nprint('date encodin... | [
[
"sklearn.metrics.roc_auc_score",
"sklearn.model_selection.GridSearchCV",
"pandas.read_csv",
"pandas.to_datetime",
"sklearn.preprocessing.Imputer",
"sklearn.preprocessing.StandardScaler",
"sklearn.metrics.recall_score",
"sklearn.linear_model.SGDClassifier",
"pandas.get_dummies"
... |
joebhakim/mimic_understander | [
"62c146e966cbd5d5e815db4580388977792c7ce7"
] | [
"src/extract_from_mimic.py"
] | [
"# MIMIC IIIv14 on postgres 9.4\nimport argparse\nimport os\nimport pickle\nimport numpy as np\nimport pandas as pd\nimport psycopg2\n\npickle.HIGHEST_PROTOCOL = 3\n\n# Output filenames\nstatic_filename = 'static_data.csv'\nstatic_columns_filename = 'static_colnames.txt'\n\ndynamic_filename = 'vitals_hourly_data.cs... | [
[
"pandas.read_sql_query",
"pandas.read_csv",
"numpy.isnan",
"pandas.DataFrame",
"pandas.isna"
]
] |
mythrocks/spark | [
"47659a0675e4bb0403d1ebe207ec697a78936d04"
] | [
"examples/src/main/python/sql/arrow.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"numpy.random.rand",
"pandas.Series",
"pandas.DataFrame",
"pandas.merge_asof"
]
] |
Amjad50/Fyp | [
"6bd934ef42edf7e355ade6cf5d2a151f098f2352"
] | [
"parser/utils.py"
] | [
"from re import sub as re_sub\nfrom typing import Optional\n\nimport numpy as np\n\nfrom segmenter.utils import box_center, box_size\nfrom symbols_utils.symbol_size import get_baseline_center, percentage_of_default_size\nfrom utils.geometry import angle_between_points, distance_between_points\nfrom utils.types impo... | [
[
"numpy.min"
]
] |
qihongl/dlstm-demo | [
"1f2edc02708d1226224c76396548b40caafef76e"
] | [
"src/task/ContextualChoice.py"
] | [
"import torch\nimport numpy as np\n\n\nclass ContextualChoice():\n\n def __init__(self, obs_dim, trial_length=10, t_noise_off=5):\n self.obs_dim = obs_dim\n self.ctx_dim = obs_dim\n self.trial_length = trial_length\n self.t_noise_off = t_noise_off\n # 2nd level params\n ... | [
[
"numpy.min",
"matplotlib.pyplot.subplots",
"numpy.dstack",
"numpy.tile",
"torch.tensor",
"numpy.max",
"numpy.random.normal",
"numpy.random.permutation",
"numpy.shape",
"numpy.zeros",
"numpy.sum",
"numpy.vstack"
]
] |
Bonder-MJ/limix_qtl | [
"71f18f4e39cdba0f0e6dc59713b83701599bc86f"
] | [
"Limix_QTL/test_QTL_small_analysis_lm.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\n#from depricated_run_QTL_analysis_limix_1 import run_QTL_analysis\nfrom run_QTL_analysis import run_QTL_analysis\nfrom qtl_utilities import merge_QTL_results\nimport subprocess\nimport numpy as np\nimport pandas as pd\nimport pytest\n\ndef hdf5_results_checking(fi... | [
[
"numpy.mean",
"pandas.HDFStore"
]
] |
Jamie725/RGBT-detection | [
"e7741bf0a8bdfb940794248a6d3247e4a5025dc4"
] | [
"demo/demo_bayesian_fusion.py"
] | [
"\"\"\"\nTake 3 model as input\n\nCorrect multi-class Bayesian fusion\n\nFuse multi-class probability, also perform logits summation\n\"\"\"\nimport pdb\nimport os\nimport json\nimport numpy as np\nfrom os.path import isfile, join\nimport cv2\nimport torch\nimport pickle\nfrom torch.nn import functional as F\nfrom ... | [
[
"numpy.log",
"numpy.maximum",
"numpy.minimum",
"torch.Tensor",
"numpy.asarray",
"numpy.concatenate",
"torch.unique",
"numpy.where",
"numpy.array",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] |
clulab/gentlenlp | [
"f30f459acabfb89db32bfbe1dec5293611d313d3"
] | [
"chapter4/preprocess_dataset.py"
] | [
"import argparse\nfrom pathlib import Path\nimport numpy as np\nfrom vocabulary import Vocabulary\nimport imdb\n\nif __name__ == '__main__':\n # parse command-line arguments\n parser = argparse.ArgumentParser()\n parser.add_argument('data_dir', type=Path, help='path to the data directory')\n parser.add_... | [
[
"numpy.savez_compressed",
"numpy.savez"
]
] |
hdpc2015/BasicSR | [
"e7001551571194e71a15e908c38c3616c8ff0454"
] | [
"codes/models/SRRaGAN_hfen_model.py"
] | [
"import os\nimport logging\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim import lr_scheduler\n\nimport models.networks as networks\nfrom .base_model import BaseModel\nfrom models.modules.loss import GANLoss, GradientPenaltyLoss, HFENL1Loss, HFENL2Loss, TVLoss, Charbon... | [
[
"torch.optim.Adam",
"torch.mean",
"torch.optim.lr_scheduler.MultiStepLR",
"torch.nn.MSELoss",
"torch.Tensor",
"torch.isnan",
"torch.no_grad",
"torch.nn.L1Loss"
]
] |
jackzipu/heterogeneity-aware-lowering-and-optimization | [
"5e4387b9d415499cf007c67ab4ffc5d2e3e95ac3"
] | [
"utils/halo_pgq.py"
] | [
"#!/usr/bin/env python3\n\n\"\"\"\nCopyright (C) 2019-2020 Alibaba Group Holding Limited.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nU... | [
[
"numpy.array",
"numpy.expand_dims"
]
] |
RadeenXALNW/Pytorch-DeepLabV3-Underwater-Image | [
"024535d7a847ac43922a88dde4cf6b5b6437fe66"
] | [
"utils/dataloader.py"
] | [
"\n\"\"\"\nRGB color code and object categories:\n------------------------------------\n000 BW: Background waterbody\n001 HD: Human divers\n010 PF: Plants/sea-grass\n011 WR: Wrecks/ruins\n100 RO: Robots/instruments\n101 RI: Reefs and invertebrates\n110 FV: Fish and vertebrates\n111 SR: Sand/sea-floor (& rocks)\n\"\... | [
[
"torch.stack",
"torch.tensor",
"torch.utils.data.DataLoader",
"torch.zeros"
]
] |
AdvaitGadhikar/federated-1 | [
"be2aa1d296b61e93be2cb5b7365866fd652b5a9c"
] | [
"differential_privacy/stackoverflow/run_federated.py"
] | [
"# Copyright 2019, 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree... | [
[
"tensorflow.squeeze"
]
] |
tamnguyenvan/AnchorUDF | [
"e08705e5b7350367df3868432ddb9a3a32628f5a"
] | [
"apps/train_hd.py"
] | [
"import sys\nimport os\n\nsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))\nROOT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\nimport time\nimport json\nimport torch\nfrom torch.utils.data import DataLoader\n\nfrom lib.options import BaseOptions\nfrom lib.tr... | [
[
"torch.device",
"torch.optim.RMSprop",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
fedingo/gym-unblockme | [
"a4dd20a7608122e09862d681259111e2634f3d4b"
] | [
"gym_unblockme/envs/unblockme_render.py"
] | [
"import pygame\nimport time\nimport numpy as np\nimport sys\n\ngray = (150, 150, 150)\nwhite = (255, 255, 255)\nblack = (0, 0, 0, )\nred_block = (255, 0, 0)\nred_border = (76, 0, 19)\nblock_color = (255, 128, 0)\nborder_color = (165,42,42)\n\nscreen = None\nSIDE = 50\nBORDER = 5\nMARGIN = 5\nLINE = 1\n\nh_swit... | [
[
"numpy.where"
]
] |
Nancy823/PGL | [
"fc517bbb87c570d0b854507769078c479d613914"
] | [
"ogb_examples/graphproppred/mol/monitor/train_monitor.py"
] | [
"# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.mean",
"numpy.vstack"
]
] |
sanket-kamthe/gptf | [
"7db86b8a608f9ca45548c4e2c9fcb5f48daf9187"
] | [
"gptf/core/models.py"
] | [
"# -*- encoding: utf-8 -*-\n\"\"\"Provides base classes for models of all kinds.\"\"\"\nfrom builtins import super, range\nfrom future.utils import with_metaclass\nfrom abc import ABCMeta, abstractmethod\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.contrib.opt import ScipyOptimizerInterface\nfrom... | [
[
"tensorflow.batch_matmul",
"tensorflow.transpose",
"tensorflow.contrib.opt.ScipyOptimizerInterface",
"tensorflow.as_dtype",
"tensorflow.shape",
"tensorflow.reshape",
"tensorflow.random_normal"
]
] |
hkuich/kglib | [
"bc221d7abbff801802ca327bfd293d50e619ff5f"
] | [
"kglib/kgcn_tensorflow/learn/learn_IT.py"
] | [
"#\n# 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# \"Lice... | [
[
"numpy.array",
"numpy.zeros"
]
] |
B-Eltzner/geomstats | [
"d0e81fd81c86ed380a2444337e9ba9621ee73f04"
] | [
"geomstats/_backend/pytorch/__init__.py"
] | [
"\"\"\"Pytorch based computation backend.\"\"\"\n\nimport math\nfrom functools import wraps\n\nimport numpy as _np\nimport torch\nfrom torch import ( # NOQA\n arange,\n argmin,\n arccos,\n arccosh,\n arcsin,\n arctanh,\n atan2 as arctan2,\n bool as t_bool,\n broadcast_tensors as broadcas... | [
[
"torch.all",
"torch.cat",
"torch.zeros",
"numpy.diag_indices",
"torch.sum",
"torch.le",
"torch.where",
"torch.split",
"torch.cumprod",
"torch.allclose",
"torch.logical_and",
"torch.t",
"torch.isclose",
"torch.Size",
"torch.sqrt",
"torch.einsum",
... |
pomonam/AttentionCluster | [
"7dd11bcc5e4a5572fcd4b14c6450602e922ac9b7"
] | [
"utils.py"
] | [
"# Copyright 2018 Google Inc., Juhan Bae 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.stack",
"tensorflow.reduce_sum",
"tensorflow.clip_by_norm",
"numpy.mean",
"tensorflow.IndexedSlices",
"tensorflow.Summary"
]
] |
xiqicpt/VNPY-Master | [
"d3b8b945bc534d5e0bd8bf9cc9fdf0069e31a9cd"
] | [
"vnpy/app/cta_strategy/backtesting.py"
] | [
"from collections import defaultdict\nfrom datetime import date, datetime, timedelta\nfrom typing import Callable\nfrom itertools import product\nfrom functools import lru_cache\nfrom time import time\nimport multiprocessing\nimport random\nimport traceback\nfrom platform import system\n\nimport numpy as np\nfrom p... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.set_printoptions",
"numpy.nan_to_num",
"pandas.DataFrame.from_dict"
]
] |
akimotty877/mmediting | [
"cae872d6f3e867ba144c7c0dbc29a0ee1a29e5a6"
] | [
"mmedit/models/backbones/sr_backbones/basicvsr_net.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import ConvModule\nfrom mmcv.runner import load_checkpoint\n\nfrom mmedit.models.common import (PixelShufflePack, ResidualBlockNoBN,\n flow_warp, mak... | [
[
"torch.nn.Sequential",
"torch.chunk",
"torch.Tensor",
"torch.cat",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.zeros_like",
"torch.nn.Upsample",
"torch.nn.LeakyReLU",
"torch.nn.functional.interpolate",
"torch.stack"
]
] |
giorgio-arena/ComputeLibraryBinary | [
"b8bb65f0dc2561907e566908e102aabcb7d41d61"
] | [
"full_model.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom keras import regularizers, optimizers, backend as K\nfrom keras.models import Sequential\nfrom keras.layers import Conv2D, MaxPooling2D, Dense, Activation, Flatten, Dropout, BatchNormalization\nfrom keras.utils import to_categorical\nfrom keras.preprocessing.image ... | [
[
"numpy.std",
"numpy.mean",
"numpy.save"
]
] |
jacobver/diag_context | [
"ca8d008b745743bf20c4bedcf6faa412a5ad8080"
] | [
"visualize.py"
] | [
"import torch\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport train\nimport argparse\n\n\ndef process_data(net_data):\n # vocab = net_data['dicts']['vdict']\n dicts = (net_data['dicts']['src'], net_data['dicts']['tgt'])\n\n (src, tgt) = net_data['data'] # ['src']\n\n plt.ion()\n print('... | [
[
"matplotlib.pyplot.imshow",
"torch.load",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplot",
"numpy.shape",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.close",
"matplotlib.pyplot.matshow",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.ylabel"
]
] |
WiseDoge/ChatBotCHS | [
"bbdc396b3106573a25eda05b2bb0d342cdda035c"
] | [
"module/decoder.py"
] | [
"import torch.nn as nn\nimport torch\nfrom .attention import DotAttention\n\n\nclass AttnGRUDecoder(nn.Module):\n def __init__(self, embedding, hidden_dim, output_dim, n_layers=1, dropout=0.1, attn_type='dot'):\n super().__init__()\n self.embedding = embedding\n embedding_dim = embedding.wei... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.GRU",
"torch.cat"
]
] |
geohci/language-switching | [
"14e5e91af7aab80d0fc09077eb8e9168df5b21a4"
] | [
"reader_language_overlap.py"
] | [
"import argparse\nfrom copy import deepcopy\nimport csv\nimport glob\nimport logging\n\nimport pandas as pd\n\nfrom session_utils import tsv_to_sessions\nfrom session_utils import get_lang_switch\nfrom session_utils import usertypes\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"-... | [
[
"pandas.DataFrame"
]
] |
asenina/mmdetection | [
"951b23a7ecee7fa79caf7f80d71491b7f555a261"
] | [
"mmdet/models/roi_heads/scnet_roi_head.py"
] | [
"import torch\nimport torch.nn.functional as F\n\nfrom mmdet.core import (bbox2result, bbox2roi, bbox_mapping, merge_aug_bboxes,\n merge_aug_masks, multiclass_nms)\nfrom mmdet.core.mask.transforms import mask2result\nfrom mmdet.core.utils.misc import dummy_pad\nfrom mmdet.integration.nncf.uti... | [
[
"torch.cat",
"torch.zeros_like",
"torch.from_numpy",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.no_grad",
"torch.onnx.is_in_onnx_export"
]
] |
ysinha1/entropica_qaoa | [
"ac2a16fc8fb3cfedf86fe4154f5c21fc76c0d0c1"
] | [
"entropica_qaoa/vqe/measurelib.py"
] | [
"# Copyright 2019 Entropica Labs\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.sqrt",
"numpy.einsum",
"numpy.abs",
"numpy.kron",
"numpy.zeros_like",
"numpy.mean",
"numpy.var",
"numpy.array",
"numpy.zeros"
]
] |
mdipronio/models | [
"48791660c4525d2f4c9a3d317cce62a3f8139d7b"
] | [
"official/vision/image_classification/resnet_imagenet_main.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.device",
"tensorflow.test.is_built_with_cuda",
"tensorflow.keras.optimizers.schedules.ExponentialDecay",
"tensorflow.keras.backend.set_image_data_format",
"tensorflow.keras.applications.mobilenet.MobileNet",
"tensorflow.keras.backend.set_learning_phase",
"tensorflow.train.e... |
JesseLT/qstrader | [
"1e82d70aacff71e4f484e1d88038d4bf0ad67bc9"
] | [
"qstrader/price_handler/yahoo_daily_csv_bar.py"
] | [
"import os\n\nimport pandas as pd\n\nfrom ..price_parser import PriceParser\nfrom .base import AbstractBarPriceHandler\nfrom ..event import BarEvent\n\n\nclass YahooDailyCsvBarPriceHandler(AbstractBarPriceHandler):\n \"\"\"\n YahooDailyBarPriceHandler is designed to read CSV files of\n Yahoo Finance daily ... | [
[
"pandas.read_csv"
]
] |
ZephyrII/competitive_colaboration | [
"a557d1e23ef2c0b8e3794f085a79bfffb860f9df",
"2167e089be80ca01911ba55c07b83c9f26f147e7"
] | [
"test_disp.py",
"models/MaskResNet6.py"
] | [
"import torch\nfrom torch.autograd import Variable\nfrom PIL import Image\nfrom scipy import interpolate\nfrom scipy.misc import imresize\nfrom scipy.ndimage.interpolation import zoom\nimport numpy as np\nfrom path import Path\nimport argparse\nfrom tqdm import tqdm\nfrom utils import tensor2array\nimport models\nf... | [
[
"numpy.log",
"scipy.misc.imresize",
"numpy.maximum",
"numpy.abs",
"torch.load",
"numpy.arange",
"numpy.median",
"torch.from_numpy",
"numpy.save",
"numpy.ma.masked_invalid",
"numpy.mean",
"torch.FloatTensor",
"numpy.transpose",
"numpy.meshgrid",
"scipy.nd... |
qweas120/Active_VLN | [
"d5dabd5fe6127bcfec023b90f14a4ba5ac671f9b"
] | [
"active/model.py"
] | [
"\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\nfrom param import args\nimport numpy as np\n\ndef check(ar):\n ar = ar.cpu().detach().numpy()\n return np.any(np.isnan(ar))\n\... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.sigmoid",
"torch.nn.LSTM",
"numpy.isnan",
"torch.cat",
"torch.zeros",
"torch.zeros_like",
"torch.nn.Embedding",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.utils.rnn.pad_... |
togaras1/gengochi | [
"374309d5996c0b4a8c5bdda27863597d2b7b11fb"
] | [
"datasets.py"
] | [
"import os\nimport sys\n\nimport numpy as np\nimport six\nimport glob\nfrom PIL import Image\n\nimport chainer\nfrom chainer import datasets\n\nclass gengochi_train(object):\n def __init__(self, size_to=128):\n # testdata / traindataを作るとしたらディレクトリを分ける。\n # ラベルはtsvかcsvを作り関連付けするかファイル名。\n self.s... | [
[
"numpy.asarray"
]
] |
wvandertoorn/nanoRMS | [
"e3d41b4c0bd9ca16355f313494d288ea73eee6bb"
] | [
"per_read/get_features.py"
] | [
"#!/usr/bin/env python3\ndesc=\"\"\"Requiggle basecalled FastQ files and features in BAM file. \n\nFor all reference bases we store (as BAM comments):\n- normalised signal intensity mean [tag si:B,f]\n- reference base probability [tag tr:B:C] retrieved from guppy (trace scaled 0-255)\n- dwell time [tag dt:B:C] in s... | [
[
"numpy.arange",
"numpy.argwhere",
"numpy.mean",
"numpy.array",
"numpy.zeros"
]
] |
mikailweston/phy | [
"d774cb989152a4b7344ac9b70c79c204a5036763"
] | [
"phy/cluster/tests/test_supervisor.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"Test GUI component.\"\"\"\n\n#------------------------------------------------------------------------------\n# Imports\n#------------------------------------------------------------------------------\n\n#from contextlib import contextmanager\n\nfrom pytest import yield_fixture, fi... | [
[
"numpy.testing.assert_array_equal",
"numpy.repeat",
"numpy.array"
]
] |
OrcusCZ/pyreaper | [
"09a65e421edb355f3475a70427ae3796f4108690"
] | [
"docs/conf.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# pyreaper documentation build configuration file, created by\n# sphinx-quickstart on Fri Sep 4 18:38:55 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenera... | [
[
"matplotlib.rcParams.update"
]
] |
bladezzw/RL_project3 | [
"b9947830c5731296b6e68de3fb90b88d2cce4e56"
] | [
"src/process.py"
] | [
"\nimport torch\nfrom src.env import create_train_env\nfrom src.model import ActorCritic\nimport torch.nn.functional as F\nfrom torch.distributions import Categorical\nfrom collections import deque\nfrom tensorboardX import SummaryWriter\nimport timeit\n\n\ndef local_train(index, opt, global_model, optimizer, save=... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.log_softmax",
"torch.zeros",
"torch.manual_seed",
"torch.from_numpy",
"torch.distributions.Categorical",
"torch.no_grad",
"torch.argmax"
]
] |
dweigand/qutip | [
"b57d5e4b4846880e894afa390c62f4d095c642e1"
] | [
"qutip/tests/test_subsys_apply.py"
] | [
"# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are... | [
[
"numpy.testing.run_module_suite",
"numpy.linalg.norm"
]
] |
DFLyan/DPA-Net | [
"9629195f374091de216febf35d46446e6d242630"
] | [
"model_DPA.py"
] | [
"#! /usr/bin/python\n# -*- coding: utf8 -*-\n\nimport tensorflow as tf\nimport tensorlayer as tl\nimport numpy as np\nfrom tensorlayer.layers import *\nfrom config import config, log_config\n\nbatch_size = config.TRAIN.batch_size\n\n\ndef T1(y_1, is_train=False, reuse=False):\n w_init = tf.random_normal_initiali... | [
[
"tensorflow.constant_initializer",
"tensorflow.random_normal_initializer",
"tensorflow.variable_scope",
"tensorflow.exp"
]
] |
ofnote/IndicSynthText | [
"8e7b7413e3b0e560c30b05b93932b5a1d06a4ac7"
] | [
"text_utils.py"
] | [
"from __future__ import division\nimport numpy as np\nimport matplotlib.pyplot as plt \nimport scipy.io as sio\nimport os.path as osp\nimport random, os\nimport cv2\n#import cPickle as cp\nimport _pickle as cp\nimport scipy.signal as ssig\nimport scipy.stats as sstat\nimport pygame, pygame.locals\nfrom pygame impor... | [
[
"matplotlib.pyplot.imshow",
"numpy.all",
"numpy.zeros_like",
"numpy.any",
"numpy.random.randn",
"numpy.random.beta",
"numpy.ceil",
"numpy.argmax",
"numpy.zeros",
"scipy.signal.fftconvolve",
"numpy.random.choice",
"numpy.nonzero",
"numpy.random.rand",
"numpy.... |
Lockon2000/TDGPE-via-SSFM | [
"6706af1c246482b144109d42147a0eacd5bd75ee"
] | [
"TDGPEviaSSFM/animating.py"
] | [
"\"\"\"\n\"\"\"\n\nimport numpy as np\nimport scipy.signal\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as anim\nimport IPython.core.display as IPython_display\nimport pycav.display as pycav_display\n\nfrom .tools import probDensity\nfrom .tools import computeTotalProbability\nfrom .tools import co... | [
[
"numpy.absolute",
"matplotlib.pyplot.subplots"
]
] |
fuglede/scipy | [
"59cd790c210a2f5c200e0ac9a83e1160d38f4563"
] | [
"scipy/special/tests/test_basic.py"
] | [
"# this program corresponds to special.py\n\n### Means test is not done yet\n# E Means test is giving error (E)\n# F Means test is failing (F)\n# EF Means test is giving error and Failing\n#! Means test is segfaulting\n# 8 Means test runs forever\n\n### test_besselpoly\n### test_mathieu_a\n### test_math... | [
[
"scipy.special.ivp",
"scipy.special._ufuncs.i1",
"scipy.special.k1e",
"scipy.special._ufuncs.ndtri",
"scipy.special.hankel1",
"numpy.sin",
"scipy.special.berp",
"scipy.special._ufuncs.zeta",
"scipy.special.it2j0y0",
"scipy.special._testutils.assert_tol_equal",
"scipy.sp... |
haataa/disaster-response-pipline | [
"1521eefff2347caec60506fa11cc00b8e39edc13"
] | [
"app/run.py"
] | [
"import json\nimport plotly\nimport pandas as pd\n\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.tokenize import word_tokenize\n\nfrom flask import Flask\nfrom flask import render_template, request, jsonify\nfrom plotly.graph_objs import Bar\nfrom sklearn.externals import joblib\nfrom sqlalchemy import create... | [
[
"pandas.read_sql_table",
"sklearn.externals.joblib.load"
]
] |
albertocarpentieri/executors | [
"3b025b6106fca9dba3c2569b0e60da050273fa6e"
] | [
"jinahub/encoders/audio/VGGISHAudioEncoder/executor/vggish_audio_encoder.py"
] | [
"__copyright__ = \"Copyright (c) 2021 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nimport os\nfrom pathlib import Path\nfrom typing import Iterable, Optional\n\nimport numpy as np\nimport requests as _requests\nimport tensorflow as tf\nfrom jina import DocumentArray, Executor, requests\n... | [
[
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.compat.v1.Session",
"numpy.float32",
"tensorflow.compat.v1.disable_eager_execution",
"tensorflow.config.experimental.set_visible_devices"
]
] |
hboyan/yellowbrick | [
"34e9c33cd6bcb74146826aac34e707e290afc18b"
] | [
"examples/examples.py"
] | [
"#!/usr/bin/env python\n# Ben's scratchpad for testing\n\n## Imports\nimport os\nimport pandas as pd\nimport yellowbrick as yb\nimport matplotlib.pyplot as plt\n\nfrom pandas.tools.plotting import radviz, parallel_coordinates\nfrom yellowbrick.features import ParallelCoordinates, RadViz, Rank2D\n\n## Module Constan... | [
[
"pandas.tools.plotting.radviz",
"pandas.read_excel",
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"pandas.tools.plotting.parallel_coordinates",
"matplotlib.pyplot.show"
]
] |
superligen/asdf | [
"8d1dd589d1fb1d9c286ade7ba787bd95c7e5e88f"
] | [
"asdf/constants.py"
] | [
"import numpy as np\n\n\nASDF_MAGIC = b'#ASDF'\nBLOCK_MAGIC = b'\\xd3BLK'\nBLOCK_HEADER_BOILERPLATE_SIZE = 6\n\nASDF_STANDARD_COMMENT = b'ASDF_STANDARD'\n\nINDEX_HEADER = b'#ASDF BLOCK INDEX'\n\n# The maximum number of blocks supported\nMAX_BLOCKS = 2 ** 16\nMAX_BLOCKS_DIGITS = int(np.ceil(np.log10(MAX_BLOCKS) + 1)... | [
[
"numpy.log10"
]
] |
CovingtonResearchGroup/CaveXC | [
"5d6c2f7cfee269941219cd1aa19f4d2255cfa5e1"
] | [
"CrossSection.py"
] | [
"from numpy import sin, cos, pi, fabs, sign, roll, arctan2, diff, cumsum, hypot, logical_and, where, linspace\nfrom scipy import interpolate\nimport matplotlib.pyplot as plt\n\n# Cross-section class that stores x, y points for the cross-section\n# and calculates various geometry data\n\nd = 1000\n\nclass CrossSecti... | [
[
"numpy.fabs",
"scipy.interpolate.splprep",
"numpy.cumsum",
"numpy.cos",
"scipy.interpolate.splev",
"numpy.arctan2",
"numpy.sin",
"numpy.sign",
"numpy.logical_and",
"numpy.where",
"numpy.roll",
"numpy.hypot"
]
] |
aliang-rec/FuxiCTR | [
"15fd0460508715fda52c17f80463655f729f6baa"
] | [
"fuxictr/pytorch/models/FiGNN.py"
] | [
"# =========================================================================\n# Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.\n# Copyright (C) 2021. Tsinghua University. All rights reserved.\n#\n# Authors: Kelong Mao <Tsinghua University>\n# Jieming Zhu <Huawei Noah's Ark Lab>\n# ... | [
[
"torch.nn.Linear",
"torch.nn.Sigmoid"
]
] |
Jiayuan-Gu/maskrcnn-benchmark | [
"7282f554886b1885357e7e0e73d2b4000c60642b"
] | [
"maskrcnn_benchmark/modeling/balanced_positive_negative_sampler.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\n\n\nclass BalancedPositiveNegativeSampler(object):\n \"\"\"\n This class samples batches, ensuring that they contain a fixed proportion of positives\n \"\"\"\n\n def __init__(self, batch_size_per_image, positive_frac... | [
[
"torch.zeros_like",
"torch.nonzero"
]
] |
sfu-discourse-lab/SFU_Comment_Extractor | [
"27b79c79c04feca2b5458b2c2f3722877dcf7e03"
] | [
"Source_Code/CSV_creation/normalize_csv_comments.py"
] | [
"__author__ = 'Varada Kolhatkar'\nimport argparse, sys, os, glob, ntpath, pprint, codecs, re, csv\nimport pandas as pd\nimport re, html.entities\nfrom timeit import default_timer as timer\nimport string\nimport numpy as np\nimport multiprocessing as mp\nfrom multiprocessing import cpu_count\nimport re\n\n\ndef word... | [
[
"numpy.array_split",
"pandas.read_csv"
]
] |
welegent2010/urban-sprawl | [
"b26bdf7889fdba1382259be7c14e7e0d8f535cd9"
] | [
"urbansprawl/population/data_extract.py"
] | [
"###################################################################################################\n# Repository: https://github.com/lgervasoni/urbansprawl\n# MIT License\n###################################################################################################\n\nfrom shapely.geometry import Polygon, G... | [
[
"numpy.all",
"pandas.merge"
]
] |
sunny5156/docker-milvus-image-search | [
"72819510955925983a790617b9e05ba0f33159c0"
] | [
"operators/face-encoder/facenet.py"
] | [
"# github url https://github.com/davidsandberg/facenet.git\r\nimport os\r\nimport re\r\nimport numpy as np\r\nimport tensorflow as tf\r\n\r\n\r\ndef prewhiten(x):\r\n mean = np.mean(x)\r\n std = np.std(x)\r\n std_adj = np.maximum(std, 1.0 / np.sqrt(x.size))\r\n y = np.multiply(np.subtract(x, mean), 1 / ... | [
[
"tensorflow.train.get_checkpoint_state",
"numpy.sqrt",
"numpy.subtract",
"numpy.std",
"numpy.mean"
]
] |
PkuRainBow/ISD-SSD | [
"2cd8beba33e0d4fb8b792301b0d9e5486dbe5e68"
] | [
"train_isd.py"
] | [
"from data import *\nfrom utils.augmentations import SSDAugmentation\nfrom layers.modules import MultiBoxLoss, CSDLoss, ISDLoss\nfrom ssd import build_ssd\n# from ssd_consistency import build_ssd_con\nfrom isd import build_ssd_con\nimport os\nimport sys\nimport time\nimport torch\nfrom torch.autograd import Variabl... | [
[
"torch.set_default_tensor_type",
"torch.nn.KLDivLoss",
"numpy.random.beta",
"torch.ones",
"torch.Tensor",
"torch.load",
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.cuda.FloatTensor",
"torch.mul",
"torch.cuda.is_available",
"torch.nn.DataParallel",
"nump... |
algattik/azure-mlops-terraform | [
"ff19d36d52fb29ce76439b9f921676d9a1031ad1"
] | [
"code/training/train.py"
] | [
"from azureml.core.run import Run\nimport os\nimport argparse\nfrom sklearn.datasets import load_diabetes\nfrom sklearn.linear_model import Ridge\nfrom sklearn.metrics import mean_squared_error\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.externals import joblib\n\n\nparser = argparse.Argumen... | [
[
"sklearn.externals.joblib.dump",
"sklearn.model_selection.train_test_split",
"sklearn.datasets.load_diabetes",
"sklearn.metrics.mean_squared_error",
"sklearn.linear_model.Ridge"
]
] |
prabhat00155/sklearn-onnx | [
"c88c4330b21ed0e4241257d02f4c61ad4f798a30"
] | [
"tests/test_sklearn_decision_tree_converters.py"
] | [
"# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------\n... | [
[
"sklearn.tree.ExtraTreeRegressor",
"sklearn.datasets.make_classification",
"sklearn.tree.DecisionTreeRegressor",
"pandas.DataFrame",
"sklearn.tree.ExtraTreeClassifier",
"sklearn.tree.DecisionTreeClassifier"
]
] |
kulkarni62sushil/wittgenstein | [
"2ae19222b80cf24467b3693da9b2b4909033a695"
] | [
"wittgenstein/ripper.py"
] | [
"\"\"\"\nImplementation of the RIPPERk algorithm for growing classification rulesets.\nSee https://www.let.rug.nl/nerbonne/teach/learning/cohen95fast.pdf\n\"\"\"\n\n# Author: Ilan Moscovitz <ilan.moscovitz@gmail.com>\n# License: MIT\n\nimport copy\nimport math\nimport numpy as np\n\nimport pandas as pd\n\nfrom witt... | [
[
"numpy.array"
]
] |
antalszava/pytorch | [
"e28a49003a580a6559f0f4da78b3a8f8d9b25de8"
] | [
"torch/package/package_importer.py"
] | [
"import builtins\nimport importlib\nimport inspect\nimport io\nimport linecache\nimport os.path\nimport types\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import cast, Any, BinaryIO, Callable, Dict, List, Optional, Union\nfrom weakref import WeakValueDictionary\n\nimport torch\nfrom... | [
[
"torch._C.PyTorchFileReader",
"torch._C.DeserializationStorageContext",
"torch.serialization._maybe_decode_ascii",
"torch.serialization._get_restore_location",
"torch._utils._validate_loaded_sparse_tensors"
]
] |
tmuntianu/supereeg | [
"cd6e3ca1a898f091ef2696281c9ea32d1baf3eea"
] | [
"docs/auto_examples/debug_predict.py"
] | [
"\n# -*- coding: utf-8 -*-\n\"\"\"\n=============================\ndebug predict\n=============================\n\nThis example shows debugging process for predict. Delete before pip push.\n\n\"\"\"\n\n# Code source: Lucy Owen & Andrew Heusser\n# License: MIT\n\n\nimport supereeg as se\nimport sys\nimport numpy as... | [
[
"numpy.array",
"numpy.random.seed"
]
] |
adugnag/deSpeckNet-TF-GEE | [
"9758dee3dc1548985b542394a9b93c13bfdb9a56"
] | [
"test.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jan 31 17:57:51 2022\n\n@author: adugna\n\"\"\"\n\n\n\n# Import, authenticate and initialize the Earth Engine library.\nimport ee\nee.Initialize()\nimport helper\n\nimport tensorflow as tf\nprint('Tensorflow version is: ',tf.__version__)\nprin... | [
[
"tensorflow.keras.models.load_model",
"tensorflow.config.list_physical_devices"
]
] |
Strubbl/map-machine | [
"e2c6f8cd373bc5dba322129112cfa58874a8321b"
] | [
"map_machine/feature/road.py"
] | [
"\"\"\"\nWIP: road shape drawing.\n\"\"\"\nimport logging\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import Any, Optional, Union\n\nimport numpy as np\nimport svgwrite\nfrom colour import Color\nfrom svgwrite import Drawing\nfrom svgwrite.filters import Filter\nfrom svgwrit... | [
[
"numpy.linalg.norm"
]
] |
coder-yuzhiwei/iechub | [
"d13ba79bef46acb1fbabd206a33cad9fa6e760c1"
] | [
"NLP Learning Schedule/Knowledge Graph/demo/DuIe_baseline/ernie/reader/task_reader.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 ... | [
[
"pandas.read_csv",
"numpy.ones_like",
"numpy.random.seed",
"pandas.DataFrame",
"numpy.random.shuffle",
"numpy.stack",
"numpy.array"
]
] |
djconly85/CodeSnippets | [
"3c96617f6330448e3ce9c7d01f282e2a6ffe9a79"
] | [
"Conversions/sqlqry_2_pandasdf.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nName:sqlqry_2_pandasdf.py\nPurpose: Run an SQL query file on a SQL Server database and load results into Pandas dataframe\n\nAlternative methods:\n https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html\n \nAuthor: Darren Conly\nLast Updated: <d... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
cnut1648/Multimodal-Transformer | [
"8b86590b4d14dcd9e72ee2c9da9668a458780a16"
] | [
"src/datamodules/msp_improv_datamodule.py"
] | [
"import random\nfrom typing import Optional, Tuple\nimport os\nimport numpy as np\n\nimport torch, librosa\nimport pandas as pd\nfrom pytorch_lightning import LightningDataModule\nfrom torch.utils.data import ConcatDataset, DataLoader, Dataset, random_split\nfrom torchvision.datasets import MNIST\nfrom torch.utils.... | [
[
"torch.flip",
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.stack",
"torch.utils.data.sampler.SequentialSampler",
"torch.utils.data.sampler.RandomSampler",
"torch.utils.data.sampler.BatchSampler"
]
] |
oort77/COT | [
"b84bc519163f103d485527f325d820b4132dd087"
] | [
"cot2a.py"
] | [
"# COT analysis -- streamlit v2a\n\n### NEEDS REWRITE: put DDATE to h5 file refs instead of to environment variable\n\n# Import libraries\nfrom datetime import datetime\n# import pytz\nimport pandas as pd\nimport numpy as np\nimport h5py\nimport zipfile, urllib.request, shutil, requests\nimport os\nimport altair\ni... | [
[
"pandas.read_excel",
"pandas.to_datetime",
"pandas.unique",
"pandas.HDFStore",
"pandas.set_option"
]
] |
louisletoumelin/wind_downscaling_cnn | [
"9d08711620db1ee1f472847f0e822c5f4eb1d300",
"9d08711620db1ee1f472847f0e822c5f4eb1d300"
] | [
"train/Models/UNet.py",
"downscale_/downscale/operators/micro_met.py"
] | [
"from tensorflow.keras.models import Model\nfrom tensorflow.keras.layers import *\n\n\ndef build_Unet(prm):\n '''\n Input: A dictionary containing parameters\n Output: Unet model\n \n Documentation:\n https://arxiv.org/pdf/1505.04597.pdf\n \n '''\n inputs = Input(prm['input_shape'])\n ... | [
[
"tensorflow.keras.models.Model"
],
[
"numpy.sqrt",
"numpy.arctan",
"numpy.gradient",
"numpy.abs",
"numpy.cos",
"numpy.sin",
"numpy.all",
"numpy.ndim",
"numpy.any",
"numpy.nanstd",
"numpy.array",
"numpy.where",
"numpy.roll"
]
] |
mehrdad-shokri/mlens | [
"6cbc11354b5f9500a33d9cefb700a1bba9d3199a"
] | [
"mlens/externals/sklearn/scorer.py"
] | [
"\"\"\"\n\nScikit-learn imports to reconstruct the ``make_scorer`` function.\n\n========================================================================\nThe :mod:`sklearn.metrics.scorer` submodule implements a flexible\ninterface for model selection and evaluation using\narbitrary score functions.\n\nA scorer obje... | [
[
"numpy.vstack"
]
] |
gauranshkumar/chithi | [
"09438f32cc656f4b00a0d6d591450e006816c52b"
] | [
"src/app.py"
] | [
"# Imports\nimport email\nimport pandas as pd\nimport streamlit as st\nimport markdown\nimport mimetypes\n\n# from streamlit_ace import st_ace, LANGUAGES, THEMES\nimport time\nfrom mailer import Mailer\nfrom info import get_server_info\n\n\ndef setup_page_title():\n # Title for page\n st.title(\"✉️ CHITTHI\")... | [
[
"pandas.read_excel",
"pandas.read_csv"
]
] |
thomaskost17/winter2022 | [
"1dd92a9ad1aab7a339d24bf7155eb056dbdf0ec6"
] | [
"ECEC247/hw5/nndl/cnn.py"
] | [
"from platform import architecture\nimport numpy as np\n\nfrom nndl.layers import *\nfrom nndl.conv_layers import *\nfrom utils.fast_layers import *\nfrom nndl.layer_utils import *\nfrom nndl.conv_layer_utils import *\n\nimport pdb\n\nclass ThreeLayerConvNet(object):\n \"\"\"\n A three-layer convolutional network... | [
[
"numpy.arange",
"numpy.linalg.norm",
"numpy.ones",
"numpy.random.randn",
"numpy.zeros"
]
] |
kiddyboots216/ben-decentralized-chatbot | [
"c13f6046e1bf22b4303896096da96dab24a8e221"
] | [
"chatbot/conversation_discriminator.py"
] | [
"# -*- coding: utf-8 -*-\n\n__author__ = 'Oswaldo Ludwig'\n__version__ = '1.01'\n\nfrom keras.layers import Input, Embedding, LSTM, Dense, RepeatVector, Dropout, merge\nfrom keras.optimizers import Adam \nfrom keras.models import Model\nfrom keras.models import Sequential\nfrom keras.layers import Activation, Dense... | [
[
"numpy.log",
"numpy.random.seed",
"numpy.asarray",
"numpy.save",
"numpy.max",
"numpy.argmax",
"numpy.load",
"numpy.zeros",
"numpy.where"
]
] |
AAlben/segementation_1 | [
"999db92b2ec792ec1bd65f5e193a97c7be20c4fc"
] | [
"faster_rcnn/infference_1.py"
] | [
"import os\nimport cv2\nimport json\nimport numpy as np\nimport pandas as pd\nfrom tqdm import tqdm\nfrom labelme import utils as labelme_utils\n\nimport torch\nimport torchvision\nimport torchvision.transforms as T\nfrom torchvision.models.detection.faster_rcnn import FastRCNNPredictor\n\nimport warnings\nwarnings... | [
[
"torch.device",
"torch.no_grad",
"torch.cuda.is_available",
"torch.load"
]
] |
justinbois/altair-catplot | [
"b0afb8a62657ca7d97df7a8151f8347539db01d6"
] | [
"altair_catplot/jitter.py"
] | [
"import warnings\n\nimport numpy as np\nimport pandas as pd\n\nimport altair as alt\nfrom altair.utils.schemapi import Undefined, UndefinedType\n\nfrom .utils import (_check_catplot_transform,\n _check_catplot_sort,\n _check_mark,\n _make_altair_encoding,\n ... | [
[
"pandas.Categorical"
]
] |
defermelowie/ML-course-project | [
"df35ddbd2c76d6077ca1657133d089bbdf3a2e0b"
] | [
"results/20-12-2021_12u14/plotter.py"
] | [
"import json as json\nimport matplotlib.pyplot as plt\n\n# Load data\nwith open(f'./results.json', 'r') as fd:\n results = json.load(fd)\n\n# Plot setup\nfig, (train_plt, cv_plt) = plt.subplots(2, sharex=True)\n\ntrain_plt.set(xlabel='Iterations', ylabel='Accuracy')\ntrain_plt.grid(visible=True, which='major', a... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig"
]
] |
cooltunes/magenta | [
"be6558f1a06984faff6d6949234f5fe9ad0ffdb5"
] | [
"magenta/models/coconet/lib_hparams.py"
] | [
"# Copyright 2021 The Magenta 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 o... | [
[
"numpy.log2",
"tensorflow.compat.v1.logging.info",
"tensorflow.compat.v1.gfile.Open"
]
] |
tobias-liaudat/deep_mccd | [
"55254a89df4b38e6130f79298b0ee1491753d0fb"
] | [
"scripts/OLD/training/learnlets_512.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[ ]:\n\n\nimport tensorflow as tf\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom denoising.learnlets.learnlet_model import Learnlet\nfrom tensorflow.keras.optimizers import Adam\nfrom denoising.evaluate import keras_psnr, keras_ssim, center_keras_psnr\nfrom... | [
[
"tensorflow.keras.callbacks.ModelCheckpoint",
"matplotlib.pyplot.legend",
"tensorflow.compat.v1.ConfigProto",
"matplotlib.pyplot.title",
"tensorflow.test.gpu_device_name",
"matplotlib.pyplot.yscale",
"numpy.random.shuffle",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",... |
hodlar/curso_python | [
"d19d4bdc8011a5ef47b787d448d5feb15a190f2e"
] | [
"proyectos/clase_3/scripts/rotacion.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport mpl_toolkits.mplot3d.axes3d as axes3d\nfig = plt.figure()\nax = fig.add_subplot(1, 1, 1, projection='3d')\n\nu = np.linspace(-1, 2, 60)\nv = np.linspace(0, 2*np.pi, 60)\nU, V = np.meshgrid(u, v)\n\nX = U\nY1 = (U**2 + 1)*np.cos(V)\nZ1 = (U**2 + 1)*np.sin(... | [
[
"numpy.linspace",
"numpy.cos",
"numpy.sin",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
ankurgarg101/neural-motifs | [
"967ce0d3ae84e7777997aff3091fda57c7b15a59"
] | [
"lib/fpn/nms/build.py"
] | [
"import os\nimport torch\nfrom torch.utils.ffi import create_extension\n# Might have to export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}\n\nsources = []\nheaders = []\ndefines = []\nwith_cuda = False\n\nif torch.cuda.is_available():\n print('Including CUDA code.')\n sources += ['src/nms_cuda.c']\n head... | [
[
"torch.utils.ffi.create_extension",
"torch.cuda.is_available"
]
] |
redfrexx/geoplot | [
"8231baab0e286f1dec870dd5e8c6c8218e5b5da7"
] | [
"examples/plot_melbourne_schools.py"
] | [
"\"\"\"\nVoronoi of Melbourne primary schools\n====================================\n\nThis example shows a ``pointplot`` combined with a ``voronoi`` mapping primary schools in\nMelbourne. Schools in outlying, less densely populated areas serve larger zones than those in\ncentral Melbourne.\n\nThis example inspired... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.title"
]
] |
freedombenLiu/autokeras | [
"3a181c8d229d3f45d6457cd329d2336b07b2330b"
] | [
"autokeras/pretrained/face_detector.py"
] | [
"# This is DFace's implementation of MTCNN modified for AutoKeras\n# Link to DFace: https://github.com/kuaikuaikim/DFace\nimport os\n\nimport cv2\nimport matplotlib.patches as patches\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torchvision.transforms as transfor... | [
[
"numpy.minimum",
"torch.load",
"torch.autograd.variable.Variable",
"numpy.round",
"torch.cuda.is_available",
"numpy.where",
"matplotlib.pyplot.axis",
"numpy.zeros",
"torch.nn.init.constant_",
"torch.nn.PReLU",
"torch.nn.Conv2d",
"matplotlib.patches.Circle",
"tor... |
lambda-shuttle/Fisci | [
"bf95e2e8aa10c3bd22afcaa9174ef1a4d7e6f748"
] | [
"api/app.py"
] | [
"import time\nimport os\nfrom flask import Flask, request, Response, jsonify\nfrom flask_cors import CORS\nfrom connect_database import get_database_client\nimport pandas as pd\nimport numpy as np\nfrom errors import error_response, bad_request\nfrom cassandra.query import ordered_dict_factory\n\napp = Flask(__name... | [
[
"pandas.read_csv"
]
] |
campustirolmotorsport/DL-LidarSimulation | [
"3d42d686d2bcbc8f8acc0e7a7f37e419bfb61c64"
] | [
"src/image/image.py"
] | [
"from typing import List, Tuple\nimport numpy as np\nimport cv2\n\n\nclass Image:\n # ToDo: Specify Type for numpy array\n def __init__(self, data: np.ndarray) -> None:\n self.raw = data\n self.shape = data.shape\n\n def save(self, path: str) -> None:\n cv2.imwrite(path, self.raw)\n\n ... | [
[
"numpy.uint8",
"numpy.zeros"
]
] |
jphacks/TK_1909 | [
"45c06c248d799a017c9784bcdf36774031a18aea"
] | [
"extract_api.py"
] | [
"import pandas as pd\nfrom flask import Flask, jsonify, render_template, redirect, request, url_for,current_app\nimport datetime\nimport requests\nimport matplotlib.pyplot as plt\n\n\napp = Flask(__name__)\n\n#if __name__ in \"__main__\":\n # app.run(debug=True, threaded=True, port=3000)\n@app.route(\"/jp_api/<ma... | [
[
"pandas.merge",
"pandas.read_csv",
"pandas.to_datetime",
"matplotlib.pyplot.savefig",
"pandas.date_range",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.figure"
]
] |
allenai/language_fragments | [
"99c2251fc0effcf845265cc04c964b49b80912db"
] | [
"language_fragments/tools/random_sat_nl.py"
] | [
"import os\nimport sys\nimport random\nimport logging\nimport itertools\nimport json\nimport tempfile\nimport tqdm\nimport inflect\nimport wandb\nfrom collections import defaultdict\nimport numpy as np\nfrom optparse import OptionParser,OptionGroup\nfrom z3 import Solver\nfrom language_fragments import initialize_c... | [
[
"numpy.median",
"numpy.array",
"numpy.random.randint",
"numpy.random.choice"
]
] |
FumiyukiKato/HDPView | [
"9e70ec567086375764fb4adf7ecd879947a48b1b"
] | [
"src/script/make_p_view_by_hdpview.py"
] | [
"import numpy as np\nimport time\nfrom tqdm import tqdm\nfrom pathlib import Path\nimport pickle\nimport json\nimport argparse\n\nfrom dataset import Dataset\nfrom count_table import CountTable\nimport hdpview\n\nparser = argparse.ArgumentParser(description='Execute HDPView and save generated p-view')\n\nparser.add... | [
[
"numpy.random.RandomState"
]
] |
AbhishekRS4/fcn_seg | [
"c1719e522fb1d446d9618e16659fbe5d92abb065"
] | [
"src/fcn_utils.py"
] | [
"# @author : Abhishek R S\n\nimport os\nimport json\nimport numpy as np\nimport tensorflow as tf\n\nIMAGENET_MEAN = np.array([103.939, 116.779, 123.68]).reshape(1, 3)\n\n# read the json file and return the content\ndef read_config_file(json_file_name):\n # open and read the json file\n config = json.load(open... | [
[
"tensorflow.concat",
"tensorflow.transpose",
"tensorflow.read_file",
"tensorflow.image.decode_png",
"tensorflow.cast",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.squeeze",
"tensorflow.split",
"numpy.array"
]
] |
mortonjt/deepblast | [
"9521ccd7bb5178f80b1657237d75c019c47935da"
] | [
"deepblast/dataset/dataset.py"
] | [
"import numpy as np\nimport pandas as pd\nimport math\nimport torch\nfrom torch.utils.data import Dataset\nfrom deepblast.dataset.alphabet import UniprotTokenizer\nfrom deepblast.constants import m\nfrom deepblast.dataset.utils import (\n state_f, tmstate_f,\n clip_boundaries, states2matrix, states2edges,\n ... | [
[
"numpy.maximum",
"torch.empty",
"torch.ones",
"torch.Tensor",
"torch.utils.data.get_worker_info",
"pandas.read_table",
"numpy.logical_and"
]
] |
liangshi7/botorch | [
"7472b843121ff8b67ee8fbe41a830c386783e97b"
] | [
"test/models/test_multitask.py"
] | [
"#! /usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport math\nimport warnings\n\nimport torch\nfrom botorch.exceptions.warnings import OptimizationWarning\n... | [
[
"torch.randn_like",
"torch.linspace",
"torch.Size",
"torch.sin",
"torch.cat",
"torch.rand",
"torch.full_like",
"torch.cos"
]
] |
hualongdeng/hualongdeng-COMP90051-Statistical-Machine-Learning | [
"8de7c39f35572480bbfb76b50557cb627e766795"
] | [
"ALL.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.linear_model import Lasso\nfrom sklearn.metrics import mean_squared_error\nfrom sklearn.model_selection import train_test_split\nimport torch\nimport torch.nn.functional as F\nimport torch.nn as nn\n\n\ndef encode(item):\n index = [0, 3, 4, 5]\n year = np... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"torch.from_numpy",
"sklearn.linear_model.Lasso",
"numpy.concatenate",
"sklearn.metrics.mean_squared_error",
"numpy.append",
"numpy.delete",
"torch.nn.Linear",
"numpy.array",
"numpy.zeros",
"torch.nn.MSE... |
shaulr/tensorflow | [
"4ac9c09d5ca57a03b8daa5fb9e295947b1619854"
] | [
"tensorflow/tensorboard/plugins/projector/plugin_test.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.contrib.tensorboard.plugins.projector.projector_config_pb2.ProjectorConfig",
"numpy.array_equal",
"tensorflow.tensorboard.backend.application.TensorBoardWSGIApp",
"tensorflow.python.platform.gfile.GFile",
"tensorflow.python.framework.ops.Graph",
"tensorflow.python.ops.variable_... |
vishakhpk/counterfactually-augmented-data | [
"4b464f4a02cd87fdb1dcbf49b045b1d3eca55d2e"
] | [
"imdb/train_full_imdb.py"
] | [
"import random\nimport argparse\n\nimport torch\nimport numpy as np\nimport pandas as pd\nimport torch.optim as optim\nimport matplotlib.pyplot as plt\nfrom torchtext.data import Field\nfrom keras.preprocessing.text import Tokenizer\nfrom sklearn.model_selection import train_test_split\nfrom keras.preprocessing.seq... | [
[
"torch.sigmoid",
"pandas.read_csv",
"numpy.random.seed",
"torch.manual_seed",
"numpy.subtract",
"pandas.DataFrame",
"torch.nn.BCELoss",
"torch.tensor",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.not_equal",
"sklearn.metrics.classification_report"
]
] |
sjeblee/chrononet | [
"df71d227f28e7ee3545ca41efe79574f2f48381f",
"df71d227f28e7ee3545ca41efe79574f2f48381f"
] | [
"chrononet/models/ordering/transformer_models.py",
"chrononet/evaluation/ordering_metrics.py"
] | [
"#!/usr/bin/python3\n\n#import hurry.filesize\nimport math\nimport numpy\nimport random\nimport os\nimport time\nimport torch\nimport torch.nn as nn\n#import torch.nn.functional as F\nfrom allennlp.modules.elmo import Elmo, batch_to_ids\nfrom GPUtil import showUtilization as gpu_usage\nfrom torch import optim\nfrom... | [
[
"torch.nn.Softmax",
"torch.max",
"torch.load",
"torch.cat",
"numpy.asarray",
"torch.zeros",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"torch.nn.L1Loss",
"torch.nn.CrossEntropyLoss",
"torch.backends.cudnn.version",
"torch.tensor",
"torch.cud... |
willettk/gzh_jpg | [
"ae5599844995ca741c8f05a5cf3c76b15744496c"
] | [
"python/nw.py"
] | [
"import numpy as np\n\n#+\n#NAME:\n# arcsinh_fit\n#PURPOSE:\n# scales the FITS image by a specified degree of nonlinearity\n#INPUTS:\n# colors - (3xNXxNY) numpy array that contains the R/G/B images\n#OPTIONAL INPUTS:\n# nonlinearity- 'b'\n# - b=0 for linear fit\n# - default is 3\n... | [
[
"numpy.array",
"numpy.zeros_like",
"numpy.arcsinh"
]
] |
LynnHo/DTLC-GAN-Tensorflow | [
"ca053af68a47e4678c172d756d64e3576a51e009"
] | [
"model.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom functools import partial\n\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nimport tflib as tl\n\n\n# =========================================================... | [
[
"tensorflow.concat",
"numpy.concatenate",
"tensorflow.contrib.slim.flatten",
"numpy.random.randint",
"numpy.ones_like",
"numpy.eye",
"tensorflow.gradients",
"tensorflow.losses.softmax_cross_entropy",
"tensorflow.name_scope",
"tensorflow.Session",
"numpy.zeros",
"ten... |
shuipi100/kaldi | [
"8e30fddb300a87e7c79ef2c0b9c731a8a9fd23f0"
] | [
"egs/yomdle_tamil/v1/local/yomdle/gedi2csv_enriched.py"
] | [
"#!/usr/bin/env python3\n\n'''\nConvert GEDI-type bounding boxes to CSV format\n'''\n\nimport logging\nimport os\nimport sys\nimport time\nimport glob\nimport csv\nimport imghdr\nfrom PIL import Image\nimport argparse\nimport pdb\nimport cv2\nimport numpy as np\nimport xml.etree.ElementTree as ET\n\nsin = np.sin\nc... | [
[
"numpy.int0",
"numpy.dot",
"numpy.asarray",
"numpy.reshape",
"numpy.shape",
"numpy.array"
]
] |
Tiernan8r/Variational-Principle-GUI | [
"6572a8b67ce870590ff30ad7c3bcfdeda47b3360"
] | [
"variational_principle_gui/components/embedded_graphs/array_graph.py"
] | [
"import matplotlib\n\nmatplotlib.use('Qt5Agg')\nimport logging\nfrom variational_principle_gui.components.graphs_tab.list_entry import ListEntry\nfrom variational_principle_gui.components.embedded_graphs.embedded_graph import EmbeddedGraph\n\n\nclass ArrayGraph(EmbeddedGraph):\n\n def __init__(self, graph_widget... | [
[
"matplotlib.use"
]
] |
SCCH-KVS/segmentation_models | [
"e868f169a219a06ed1a96d810c61a4bd465edeec"
] | [
"segmentation_models/models/xnet.py"
] | [
"#!/usr/bin/env python\n# Adopted from https://github.com/MrGiovanni/UNetPlusPlus\n\nfrom keras_applications import get_submodules_from_kwargs\nimport numpy as np\n\nfrom ._utils import freeze_model\nfrom ..backbones.backbones_factory import Backbones\n\nbackend = None\nlayers = None\nmodels = None\nkeras_utils = N... | [
[
"numpy.isscalar"
]
] |
adamchang2000/DenseFusion | [
"6e9f3b1598e8e4a627ca18bbad8440059ef8063f"
] | [
"datasets/customCAD/mask_generator.py"
] | [
"import os\nimport cv2\nimport numpy as np\n\nclass UnityMaskGenerator:\n def __init__(self, root):\n self.root = root\n assert(os.path.isdir(root))\n assert(os.path.isdir(os.path.join(root, \"data\")))\n def generate_masks(self):\n data_dir = os.path.join(self.root, \"data\")\n ... | [
[
"numpy.max",
"numpy.zeros",
"numpy.sum",
"numpy.min"
]
] |
xw931018/lrw_data_preprocesing | [
"54faacfd53143a3e751ed03a5ea4226aaad92168"
] | [
"util_lip_data.py"
] | [
"\"\"\"\nUtility functions for landmark-based human action recognition using path signatures\n\"\"\"\n\nimport requests\n\nimport cv2\nfrom moviepy.editor import VideoFileClip, clips_array\nimport numpy as np\nfrom tqdm.notebook import tqdm\n\ndef download(source_url, target_filename, chunk_size=1024):\n \"\"\"\... | [
[
"numpy.amax",
"numpy.amin",
"numpy.around",
"numpy.copy",
"numpy.array",
"numpy.zeros"
]
] |
HardPlant/gym-js | [
"932a3780d784fb6524e1bdd0a413671f39b788ca"
] | [
"gym/0.dummy.py"
] | [
"import numpy as np\nimport random as pr\nimport matplotlib.pyplot as plt\n\nimport gym\nfrom gym.envs.registration import register\n\n\ndef rargmax(vector):\n # 가장 큰 값 중 랜덤하게 반환\n m = np.amax(vector)\n indices = np.nonzero(vector == m)[0]\n return pr.choice(indices)\n\nregister(\n id=\"FrozenLake-v3... | [
[
"numpy.amax",
"numpy.nonzero",
"numpy.max",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
MagazzuGaetano/Weather-Classifier | [
"2bfac1918eea4aaa37563ef4ffabdc290e411d76"
] | [
"models/ResNet.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Bottleneck(nn.Module):\n expansion = 4\n def __init__(self, in_channels, out_channels, i_downsample=None, stride=1):\n super(Bottleneck, self).__init__()\n \n self.conv1 = nn.Conv2d(in_channels, out_channels... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
vitorgt/SCC0251 | [
"0f39e9da8ae9862c5b97afe308b48ed2948714e9"
] | [
"a01/submission/a01.py"
] | [
"# # Assignment 1: Intensity Transformations\n# ## SCC0251.2020.1 - Image Processing\n# ### Prof. Dr. Moacir Ponti\n# ### 10284952 - Vitor Gratiere Torres\n# https://github.com/vitorgt/SCC0251\n\n# Imports\nimport numpy as np\nimport imageio\n# import matplotlib.pyplot as plt\n\n\n# Transformation functions\n# Form... | [
[
"numpy.max",
"numpy.log2",
"numpy.min"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.