repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
FelixGreeg/envdjango | [
"aa1933a2fc92c0b50412e1f719efe5b975d5effb",
"aa1933a2fc92c0b50412e1f719efe5b975d5effb"
] | [
"Lib/site-packages/pandas/core/window/rolling.py",
"Lib/site-packages/pandas/core/groupby/generic.py"
] | [
"\"\"\"\nProvide a generic structure to support window functions,\nsimilar to how we have a Groupby object.\n\"\"\"\nfrom datetime import timedelta\nfrom functools import partial\nimport inspect\nfrom textwrap import dedent\nfrom typing import Callable, Dict, List, Optional, Set, Tuple, Type, Union\n\nimport numpy ... | [
[
"pandas.Series",
"scipy.signal.get_window",
"numpy.asarray",
"pandas.core.window.indexers.FixedWindowIndexer",
"numpy.concatenate",
"pandas.core.window.indexers.GroupbyRollingIndexer",
"pandas.compat.numpy.function.validate_rolling_func",
"numpy.where",
"pandas.util._decorators... |
coreylowman/avalanche | [
"9c1e7765f1577c400ec0c57260221bcffd9566a2",
"9c1e7765f1577c400ec0c57260221bcffd9566a2",
"9c1e7765f1577c400ec0c57260221bcffd9566a2"
] | [
"examples/synaptic_intelligence.py",
"examples/cope.py",
"avalanche/training/utils.py"
] | [
"################################################################################\n# Copyright (c) 2021 ContinualAI. #\n# Copyrights licensed under the MIT License. #\n# See the accompanying LICENSE file for terms. ... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.is_available"
],
[
"torch.cuda.is_available"
],
[
"torch.cat",
"torch.utils.data.DataLoader",
"torch.zeros_like",
"torch.tensor",
"torch.nn.Linear",
"torch.as_tensor"
]
] |
borneelphukan/Facial-Emotion-Detection | [
"dd892f448897ab7a9f6235a2006b9de19b7fa6af"
] | [
"train.py"
] | [
"from cnn import xceptionNetwork\nfrom feature_extraction import load_data, preprocessing\nfrom sklearn.model_selection import train_test_split\nfrom keras.callbacks import CSVLogger, ModelCheckpoint, EarlyStopping, ReduceLROnPlateau\nfrom keras.preprocessing.image import ImageDataGenerator\n\nbatch_size = 32\nn_ep... | [
[
"sklearn.model_selection.train_test_split"
]
] |
pankaj02/CarND-Behavioral-Cloning-P3 | [
"246590888f8caac8e7027ce459a8588938635790"
] | [
"model.py"
] | [
"import logging\nimport csv\nimport cv2\nimport numpy as np\nimport os\nfrom keras.models import Sequential\nfrom keras.layers import Flatten, Dense, Lambda, Activation, MaxPooling2D, Cropping2D, Dropout\nfrom keras.layers import Convolution2D\n\n\ndef create_logger():\n logger = logging.getLogger(__name__)\n\n ... | [
[
"numpy.array"
]
] |
peter-sipos/Learning-to-See-in-the-Dark | [
"704c9b58bf0fba3f8f879014ed53eda21c1fd2cc"
] | [
"test_residual_4000.py"
] | [
"# uniform content loss + adaptive threshold + per_class_input + recursive G\r\n# improvement upon cqf37\r\nfrom __future__ import division\r\nimport os, scipy.io\r\nimport tensorflow as tf\r\nimport tensorflow.contrib.slim as slim\r\nimport numpy as np\r\nimport rawpy\r\nimport glob\r\nfrom scipy import misc\r\n\r... | [
[
"tensorflow.train.get_checkpoint_state",
"tensorflow.depth_to_space",
"numpy.expand_dims",
"tensorflow.concat",
"tensorflow.truncated_normal",
"numpy.maximum",
"tensorflow.shape",
"numpy.minimum",
"tensorflow.maximum",
"tensorflow.contrib.slim.max_pool2d",
"tensorflow.p... |
wohlbier/inference | [
"8126722673a0252fb5db53d7c56bc3a179194799"
] | [
"v0.7/speech_recognition/rnnt/pytorch/parts/features.py"
] | [
"# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\n# Copyright (c) 2019, Myrtle Software Limited. 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\... | [
[
"torch.randn_like",
"torch.zeros",
"torch.cat",
"torch.zeros_like",
"torch.tensor",
"torch.no_grad",
"torch.log"
]
] |
yl3dy/nbody_playground | [
"27bd6afcfb11d1fe90306213da6cccd49fdde9bd"
] | [
"nbody_sim/engines/naive.py"
] | [
"import collections\nfrom abc import ABC, abstractmethod\nimport math\nimport time\nimport numpy as np\nfrom scipy.constants import G\nimport scipy.linalg\n\nfrom ..common import SystemState, GlobalConfig\nfrom .. import common\n\n\ndef _norm(r):\n \"\"\"Custom Euler norm calculator for 3-vectors\n\n Seems sl... | [
[
"numpy.empty_like"
]
] |
jpviguerasguillen/deepcaps | [
"6e6e330d4f38c3b5f7c38e784f0f1a191a4b4295"
] | [
"capslayers.py"
] | [
"from keras import backend as K\nimport tensorflow as tf\nimport numpy as np\nfrom keras import layers, initializers, regularizers, constraints\nfrom keras.utils import conv_utils\nfrom keras.layers import InputSpec\nfrom keras.utils.conv_utils import conv_output_length\n\ncf = K.image_data_format() == '..'\nuseGPU... | [
[
"tensorflow.norm",
"tensorflow.fill",
"tensorflow.transpose",
"tensorflow.while_loop",
"tensorflow.constant",
"tensorflow.gather_nd",
"tensorflow.TensorArray",
"tensorflow.nn.softmax",
"tensorflow.reduce_sum",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.sha... |
AlejandroUPC/ztypebot | [
"d0a069ec1b04eddb0a9021b99de7d60cc15cff36"
] | [
"utils/window_finder.py"
] | [
"if __name__=='__main__':\n import os\n import sys\n sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))\n import config\n import pyautogui\n import numpy as np\n from config import REGION\n\n import cv2 as cv\n\n\n screenshot = pyautogui.screenshot(region=R... | [
[
"numpy.array"
]
] |
protagolabs/MathematicalReasoning | [
"bb6c9c67e112c63fc25cf77059dc1678ce5eba0e"
] | [
"dgl_transformer/dgl_transformer.py"
] | [
"import torch as th\nimport numpy as np\nimport networkx as nx\nimport matplotlib.pyplot as plt\n\nfrom dgl_transformer.modules.layers import * \nfrom dgl_transformer.modules.functions import *\nfrom dgl_transformer.modules.embedding import *\nfrom dgl_transformer.modules.viz import att_animation, get_attention_map... | [
[
"torch.nn.Dropout",
"numpy.sqrt",
"torch.zeros",
"numpy.power",
"torch.zeros_like",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.nn.init.xavier_uniform_"
]
] |
arnabbiswas1/k_tab_sept_roc_auc_binary_classification_KFold | [
"7a5a91e52d460fd25133b76d5241462a4aedc474",
"7a5a91e52d460fd25133b76d5241462a4aedc474",
"7a5a91e52d460fd25133b76d5241462a4aedc474",
"7a5a91e52d460fd25133b76d5241462a4aedc474",
"7a5a91e52d460fd25133b76d5241462a4aedc474"
] | [
"submissions/submissions_33.py",
"submissions/submissions_22.py",
"submissions/submissions_6.py",
"submissions/submissions_35.py",
"src/scripts/training/lgb_K10_nonull_mean_sum_max_full_data.py"
] | [
"\nimport os\n\nimport pandas as pd\n\nCOMPETITION_NAME = \"tabular-playground-series-sep-2021\"\n\nSUBMISSION_DIR = \".\"\nSUBMISSION_FILE = \"sub_stacking_lgb_xbg_cat_imputer_no_imputer_v2_0930_1030_0.81686.gz\"\nSUBMISSION_MESSAGE = '\"Stacking: LGB, XGB, Cat with and without imputation old/new LGBs/XGB/Cat,tsne... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv"
],
[
"pandas.read_csv"
],
[
"pandas.read_csv"
],
[
"pandas.read_parquet",
"pandas.concat",
"sklearn.model_selection.KFold"
]
] |
bmahlbrand/pytorch-lightning | [
"95e85e4d2d8f644b0ccc1f59d59634d6dd0f5d65"
] | [
"pytorch_lightning/trainer/trainer.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.set_grad_enabled"
]
] |
aasseman/mi-prometheus | [
"c655c88cc6aec4d0724c19ea95209f1c2dd6770d",
"c655c88cc6aec4d0724c19ea95209f1c2dd6770d",
"c655c88cc6aec4d0724c19ea95209f1c2dd6770d",
"c655c88cc6aec4d0724c19ea95209f1c2dd6770d",
"c655c88cc6aec4d0724c19ea95209f1c2dd6770d"
] | [
"problems/seq_to_seq/algorithmic/maes_baselines/reverse_recall_cl.py",
"models/sequential_model.py",
"models/dnc/plot_data.py",
"models/multi_hops_attention/image_encoding.py",
"problems/image_to_class/image_to_class_problem.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) IBM Corporation 2018\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/L... | [
[
"torch.zeros",
"numpy.fliplr",
"numpy.tile",
"torch.from_numpy",
"numpy.random.binomial",
"numpy.zeros",
"numpy.random.randint"
],
[
"matplotlib.pylab.rcParams.update",
"matplotlib.figure.Figure",
"torch.from_numpy",
"matplotlib.ticker.MaxNLocator",
"numpy.rando... |
chenj133/FATE | [
"7065fc73ab83f83e699efec69ff8efb499159ef4",
"7065fc73ab83f83e699efec69ff8efb499159ef4",
"bdda535c7d8a974fc2c43102837964b7da199730",
"7065fc73ab83f83e699efec69ff8efb499159ef4",
"7065fc73ab83f83e699efec69ff8efb499159ef4",
"7065fc73ab83f83e699efec69ff8efb499159ef4"
] | [
"federatedml/optim/gradient/test/hetero_lr_gradient_test.py",
"federatedml/feature/feature_scale/standard_scale.py",
"research/hetero_dnn_logistic_regression/test/mock_models.py",
"federatedml/ftl/test/whitebox_enc_gradients_test.py",
"federatedml/feature/test/one_hot_test.py",
"federatedml/feature/featur... | [
"#\n# Copyright 2019 The FATE Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r... | [
[
"numpy.square"
],
[
"numpy.around",
"numpy.abs"
],
[
"numpy.array",
"numpy.matmul"
],
[
"numpy.array",
"numpy.zeros",
"numpy.abs",
"numpy.ones"
],
[
"numpy.array",
"numpy.random.choice"
],
[
"numpy.around",
"numpy.abs"
]
] |
brunnovicente/Projeto | [
"6600c80a643c68094dbcbcfcb8f878dac01335f4"
] | [
"gerardor3.py"
] | [
"import numpy as np\n\nnomes = ['Wayne Whitley','Justine Alvarado','Darrel Sweet','Kitra Ewing',\n 'Felix Church','Deacon Larson','Kuame Cannon','Amela Michael',\n 'Melanie Michael','Odysseus Alford','Aubrey Beach','Tatyana Hardin',\n 'Chester Battle','Eric Jacobson','Cody Malone','Travis De... | [
[
"numpy.random.randint"
]
] |
IKATS/op-resampling | [
"155d3a492d79cacdb05657296c6e83c08c1e43c8"
] | [
"resampling/tests/test_downsampling.py"
] | [
"\"\"\"\nCopyright 2018-2019 CS Systèmes d'Information\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\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law... | [
[
"numpy.array"
]
] |
rdukale007/ga-learner-dsmp-repo | [
"3840d936659fdef78d531a8ffd3da60ebabd82da",
"3840d936659fdef78d531a8ffd3da60ebabd82da"
] | [
"High-Rated-Games-on-Google-Playstore/code.py",
"Moving-to-Melbourne---Housing-Again!/code.py"
] | [
"# --------------\n#Importing header files\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n\n\n\n\n#Code starts here\ndata = pd.read_csv(path)\ndata.hist(column='Rating', bins=8)\n\ndata = data[data['Rating'] <= 5]\ndata.hist(column='Rating', bins=8)\n#Code ends here\n\n\n# ---------... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.to_datetime",
"matplotlib.pyplot.title",
"sklearn.preprocessing.LabelEncoder",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show"
],
[
"pandas.read_csv",
"sklearn.metrics.r2_score",
"sklearn.model_selection.cross_val_score",... |
Aquaveo/gsshapyorm | [
"cf12f7ffe40e1dc3467bd4d3a1e55feaa1500571",
"cf12f7ffe40e1dc3467bd4d3a1e55feaa1500571"
] | [
"gsshapyorm/orm/tim.py",
"gsshapyorm/orm/prj.py"
] | [
"\"\"\"\n********************************************************************************\n* Name: TimeSeriesModel\n* Author: Nathan Swain\n* Created On: Mar 18, 2013\n* Copyright: (c) Brigham Young University 2013\n* License: BSD 2-Clause\n***************************************************************************... | [
[
"pandas.Series",
"pandas.DataFrame"
],
[
"numpy.ma.array",
"numpy.mean"
]
] |
chineking/mars | [
"660098c65bcb389c6bbebc26b2502a9b3af43cf9",
"660098c65bcb389c6bbebc26b2502a9b3af43cf9",
"660098c65bcb389c6bbebc26b2502a9b3af43cf9",
"660098c65bcb389c6bbebc26b2502a9b3af43cf9",
"660098c65bcb389c6bbebc26b2502a9b3af43cf9"
] | [
"mars/learn/utils/tests/test_core.py",
"mars/tensor/random/uniform.py",
"mars/tensor/indexing/tests/test_indexing.py",
"mars/tensor/stats/ttest.py",
"mars/dataframe/arithmetic/core.py"
] | [
"# Copyright 1999-2022 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.testing.assert_array_equal",
"numpy.argsort",
"numpy.random.RandomState"
],
[
"numpy.random.RandomState"
],
[
"numpy.isnan",
"numpy.arange",
"numpy.dtype",
"numpy.ones",
"numpy.empty",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"numpy.rand... |
db434/nn-restrict | [
"bc46725d01db9555e1cd9f2068b25a1dee8912ce",
"bc46725d01db9555e1cd9f2068b25a1dee8912ce"
] | [
"training/distillation.py",
"models/wlm.py"
] | [
"import os.path\nimport torch\nimport torch.nn.functional as F\n\nimport locations\nimport models\nimport structured\nfrom util import checkpoint, log\nfrom . import trainer\n\n\nclass Trainer(trainer.Trainer):\n \"\"\"\n Class which trains a model using an experienced teacher model.\n \"\"\"\n\n def __... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.cross_entropy",
"torch.nn.functional.log_softmax",
"torch.autograd.Variable"
],
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.Embedding"
]
] |
4xle/Blender-Addon-Photogrammetry-Importer | [
"8098dbbb712939973ecc04e7cb82694628c100f9",
"8098dbbb712939973ecc04e7cb82694628c100f9"
] | [
"photogrammetry_importer/file_handlers/ply_file_handler.py",
"photogrammetry_importer/file_handlers/nvm_file_handler.py"
] | [
"'''\nCopyright (C) 2018 Sebastian Bullinger\n\nCreated by Sebastian Bullinger\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your op... | [
[
"numpy.empty",
"numpy.array",
"numpy.dtype"
],
[
"numpy.array",
"numpy.zeros"
]
] |
mmcelhan/nfl_capstone | [
"d597ef7e27b79aa755df1117aade61531c874391",
"d597ef7e27b79aa755df1117aade61531c874391"
] | [
"data_build_scripts/stage_to_warehouse/draft_stats_build.py",
"data_build_scripts/stage_to_warehouse/college_players_build.py"
] | [
"import json\nimport os\nimport pandas as pd\nimport sys\nsys.path.append(\"..\")\nsys.path.append(\"../../column_matching\")\nimport column_matching.column_match as cm\nimport data_build_scripts.helpers as hlp\n\n\ndef main():\n\n local_path = os.path.dirname(os.path.abspath(__file__))\n f = open(os.path.joi... | [
[
"pandas.merge",
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] |
arvidl/dynamical-systems-with-applications-using-python | [
"db747f550337a7e7ec4a0851b188dd6e2e816a64",
"db747f550337a7e7ec4a0851b188dd6e2e816a64",
"db747f550337a7e7ec4a0851b188dd6e2e816a64"
] | [
"Anaconda-files/Program_18b.py",
"Anaconda-files/Program_20a.py",
"Anaconda-files/Program_08d.py"
] | [
"# Programs 18d: Counting white pixels in color picture of a raccoon.\n# See Figure 18.2.\n\nfrom scipy import misc\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nface = misc.face()\n\nfig1 = plt.figure()\nplt.imshow(face)\nwidth, height, _ = face.shape\n\nprint('Image dimensions: {}x{}'.format(width, heig... | [
[
"matplotlib.pyplot.imshow",
"scipy.misc.face",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.sum",
"matplotlib.pyplot.figure"
],
[
"numpy.random.random",
"matplotlib.pyplot.show",
"numpy.ones",
"matplotlib.pyplot.plot",
"numpy.var",
"matplotlib.pyplot.xlabel",... |
farisza203/facerecognition-school-project | [
"72bc89f084426277e4183ed56871492e12e8c852"
] | [
"schoolps/main.py"
] | [
"import tkinter as tk\r\nfrom collections import deque\r\nfrom tkinter.constants import BUTT, END, GROOVE, NW, RAISED, RIDGE, S, SUNKEN\r\nimport numpy as np\r\nimport cv2\r\nfrom PIL import Image,ImageTk\r\nimport os\r\nimport face_recognition\r\nimport time\r\nwindow =tk.Tk()\r\nwindow.option_add(\"*Font\",\"He... | [
[
"numpy.argmin"
]
] |
pmanlukas/classifierAPI | [
"0a07f3cbceaeb1ad559d4dda3c6ee996195cca36"
] | [
"classifier_api.py"
] | [
"import numpy as np\r\nimport pandas as pd\r\nimport json\r\nimport pickle\r\nimport sklearn\r\nimport flask\r\nimport io\r\nfrom collections import Counter\r\nfrom datetime import datetime\r\nfrom sklearn.feature_extraction.text import TfidfVectorizer\r\nfrom sklearn.linear_model import SGDClassifier\r\nfrom sklea... | [
[
"sklearn.externals.joblib.load"
]
] |
Sparkier/luna | [
"ce50d0c024ae1984cf519e02646f9065d30d222b"
] | [
"luna/pretrained_models/googlenet.py"
] | [
"\"\"\"\nA Keras Implementation of the GoogleNet (InceptionV1) from\nhttps://gist.github.com/joelouismarino/a2ede9ab3928f999575423b9887abd14\n\"\"\"\n# pylint: skip-file\nimport tensorflow as tf\nfrom tensorflow.keras import backend as K\nfrom tensorflow import keras\nfrom tensorflow.keras.regularizers import l2\nf... | [
[
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.AveragePooling2D",
"tensorflow.keras.layers.Activation",
"tensorflow.python.keras.utils.data_utils.get_file",
"tensorflow.python.keras.utils.conv_utils",
"tensorflow.keras.models.Model",
"tensorflow.compat.v1.assign",
... |
venkate5hgunda/CSE598-Spring22-Group22-NetsDB | [
"6c2dabd1a3b3f5901a97c788423fdd93cc0015d4",
"6c2dabd1a3b3f5901a97c788423fdd93cc0015d4"
] | [
"model-inference/deduplication/page-packing/text_classification_300_64/runBaseline.py",
"model-inference/deduplication/page-packing/text_classification_100/runGreedy-2.py"
] | [
"import numpy as np\nimport sys\nfrom numpy.lib.arraysetops import unique\nimport uuid\nimport hashlib\nimport timeit\nimport itertools\n\n# import the PagePacking.py under algorithm folder\nimport os\nfrom sys import path\nsys.path.append('../algorithms/')\nfrom PagePacking import *\n\n# load the input file\ninput... | [
[
"numpy.load"
],
[
"numpy.load"
]
] |
astrolabsoftware/SparkCorr | [
"6efafaf15fd3763f3ae1f8ea001bae5b41bff569",
"6efafaf15fd3763f3ae1f8ea001bae5b41bff569",
"6efafaf15fd3763f3ae1f8ea001bae5b41bff569"
] | [
"data/anatimeR.py",
"scripts/bin.py",
"data/anatimeX.py"
] | [
"from pylab import *\nimport sys\n\nimport pandas\n\ndef getTimes(fn):\n p=pandas.read_csv(fn,sep=\"\\s+\")\n nodes=unique(p.nodes)\n tt=[]\n imin=p['imin'].values[1]\n imax=p['imax'].values[1]\n NpixD=float(p['NpixD'].values[1])/1e6\n NpixJ=float(p['NpixJ'].values[1])/1e3\n Ndata=float(p['N... | [
[
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.read_csv"
],
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
jmuth/parliament-viz.ch | [
"48a6a1b1cb7ece74f51cac7ab7c293a7197bfed2"
] | [
"scraping/tables.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n\n# Copyright © 2016 Joachim Muth <joachim.h.muth@gmail.com>\n#\n# Distributed under terms of the MIT license.\n\nimport json\nimport pandas as pd\nimport numpy as np\nimport scipy.sparse as sp\nimport os.path\nimport sys\nimport itertools\nfrom collections import defaultdic... | [
[
"pandas.read_csv",
"numpy.isfinite",
"pandas.DataFrame",
"numpy.zeros",
"scipy.sparse.lil_matrix"
]
] |
limberc/HyperGAN | [
"b074e74abf0ed9b81bd52084706e3707a47e0fe2",
"b074e74abf0ed9b81bd52084706e3707a47e0fe2",
"b074e74abf0ed9b81bd52084706e3707a47e0fe2"
] | [
"tests/inputs/test_image_loader.py",
"hypergan/losses/realness_loss.py",
"examples/next-frame.py"
] | [
"import hypergan as hg\nimport tensorflow as tf\nfrom hypergan.gan_component import ValidationException\nfrom hypergan.inputs.image_loader import ImageLoader\nimport os\n\ndef fixture_path(subpath=\"\"):\n return os.path.dirname(os.path.realpath(__file__)) + '/fixtures/' + subpath\n\nclass TestImageLoader:\n ... | [
[
"tensorflow.test.main"
],
[
"torch.linspace",
"torch.ones",
"torch.zeros",
"torch.tensor",
"numpy.random.normal",
"numpy.random.uniform",
"numpy.histogram"
],
[
"torch.zeros",
"torch.cat",
"torch.randn",
"torch.utils.data.DataLoader",
"torch.rand"
]
] |
rwbfd/pytorch-lightning | [
"f518ee6e25d1499f73cec86ca8b3f584d0fa440d"
] | [
"tests/metrics/functional/test_classification.py"
] | [
"from functools import partial\n\nimport pytest\nimport torch\nfrom sklearn.metrics import (\n accuracy_score as sk_accuracy,\n jaccard_score as sk_jaccard_score,\n precision_score as sk_precision,\n recall_score as sk_recall,\n roc_auc_score as sk_roc_auc_score,\n)\n\nfrom pytorch_lightning import s... | [
[
"torch.randint",
"torch.Tensor",
"torch.zeros",
"torch.zeros_like",
"torch.eye",
"torch.tensor",
"torch.rand",
"torch.cuda.is_available",
"torch.arange",
"torch.allclose",
"torch.ones_like",
"torch.logical_not"
]
] |
fossabot/Video-to-Online-Platform | [
"b1230c8f702487225566b5be13947bd6f7904556",
"46019562f072a5dc2a92684986411d7f88758882"
] | [
"third/mmdet/models/bbox_heads/convfc_bbox_head.py",
"server/model_server/feature_extract_model_server.py"
] | [
"import torch.nn as nn\n\nfrom .bbox_head import BBoxHead\nfrom ..utils import ConvModule\n\n\nclass ConvFCRoIHead(BBoxHead):\n \"\"\"More general bbox head, with shared conv and fc layers and two optional\n separated branches.\n\n /-> cls convs -> cls fcs -> cls\n shared con... | [
[
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.Linear",
"torch.nn.init.xavier_uniform_",
"torch.nn.ReLU"
],
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"tensorflow.gfile.GFile",
"numpy.fromstring",
"tensorflow.GraphDef"
]
] |
QualiChain/qualichain_mediator | [
"7ab3b18325982ff629618a51b8c66e4a6d546b0e"
] | [
"clients/postgres_client.py"
] | [
"from sqlalchemy import Column, Integer, String, create_engine, MetaData\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker\nimport pandas as pd\n\nfrom settings import ENGINE_STRING\n\nBase = declarative_base()\n\n\nclass ExtractedSkill(Base):\n \"\"\"Extracted Ski... | [
[
"pandas.read_csv"
]
] |
MovestaDev/low-resource-text-classification-framework | [
"4380755a65b35265e84ecbf4b87e872d79e8f079",
"4380755a65b35265e84ecbf4b87e872d79e8f079"
] | [
"lrtc_lib/active_learning/core/strategy/discriminative_representation_sampling.py",
"lrtc_lib/data_access/processors/process_csv_data.py"
] | [
"# (c) Copyright IBM Corporation 2020.\n\n# LICENSE: Apache License 2.0 (Apache-2.0)\n# http://www.apache.org/licenses/LICENSE-2.0\n\nimport numpy as np\nimport gc\n\nimport tensorflow as tf\n\nfrom lrtc_lib.active_learning.strategies import ActiveLearningStrategies\nfrom lrtc_lib.orchestrator import orchestrator_a... | [
[
"numpy.hstack",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Sequential",
"numpy.ones",
"tensorflow.keras.optimizers.Adam",
"numpy.argpartition",
"numpy.array",
"numpy.zeros",
"tensorflow.keras.utils.to_categorical",
"numpy.vstack"
],
[
"pandas.read_csv"
]
] |
red0orange/red0orange | [
"6ea8cb51fc154ffff1df0d08e4155ed39e21993e"
] | [
"red0orange/image_helper.py"
] | [
"import imp\nimport numpy as np\nfrom PIL import Image\nfrom PyQt5.QtGui import QImage\n\n\ndef smart_crop_image(image, x1, y1, x2, y2):\n \"\"\"智能图像crop\n\n Args:\n image (numpy): 输入图像\n x1 (int): 左上角x坐标\n y1 (int): 左上角y坐标\n x2 (int): 右下角x坐标\n y2 (int): 右下角y坐标\n\n Return... | [
[
"numpy.frombuffer",
"numpy.zeros"
]
] |
keesvanginkel/europe_flood_road_disruption | [
"397e9ab300af1f68422c5d4edc78fdbe35b44073"
] | [
"scripts/intersect_floods_edgeid.py"
] | [
"import os\nimport pandas as pd\nimport numpy as np\nimport geopandas as gpd\nimport pygeos\nfrom tqdm import tqdm\nfrom rasterstats import zonal_stats\nimport pyproj\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom multiprocessing import Pool,cpu_count\n\ndef reproject(geometries):\n #Find crs of c... | [
[
"numpy.array",
"pandas.read_feather",
"pandas.DataFrame",
"numpy.unique"
]
] |
bamos/HowToTrainYourMAMLPytorch | [
"436da88959e710d21d3fd5914cdad47e4b214ac2"
] | [
"train_maml_system.py"
] | [
"#!/usr/bin/env python3\n\nfrom data import MetaLearningSystemDataLoader\nfrom experiment_builder import ExperimentBuilder\nfrom few_shot_learning_system import MAMLFewShotClassifier\nfrom utils.dataset_tools import maybe_unzip_dataset\n\nimport torch\n\nfrom omegaconf import OmegaConf\nimport hydra\n\nfrom setproc... | [
[
"torch.device"
]
] |
metabolize/blmath | [
"8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da",
"8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da",
"8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da"
] | [
"blmath/numerics/linalg/isomorphism.py",
"blmath/geometry/transform/rodrigues.py",
"blmath/geometry/transform/rigid_transform.py"
] | [
"import numpy as np\n\n\nclass DimensionalityError(ValueError):\n pass\n\n\nclass LinearDependenceError(ValueError):\n pass\n\n\ndef isomorphism(frame1, frame2):\n '''\n Takes two bases and returns their standard matrix representation.\n\n Args:\n\n frame1: N x N np.ndarray\n frame2: N ... | [
[
"numpy.matrix",
"numpy.linalg.det"
],
[
"numpy.diag",
"numpy.dot",
"numpy.linalg.svd",
"numpy.sqrt",
"numpy.abs",
"numpy.eye",
"numpy.linalg.norm",
"numpy.cos",
"numpy.finfo",
"numpy.all",
"numpy.sin",
"numpy.arccos",
"numpy.ones",
"numpy.array",... |
GorkemP/EndoCV2021-EfficientDet-Pytorch | [
"2ca3140d50a07e503850cad101deb0887eace9c7",
"2ca3140d50a07e503850cad101deb0887eace9c7"
] | [
"coco_eval_custom.py",
"test/albumentations_on_real_set.py"
] | [
"# Author: Zylo117\n\n\"\"\"\nCOCO-Style Evaluations\n\nput images here datasets/your_project_name/val_set_name/*.jpg\nput annotations here datasets/your_project_name/annotations/instances_{val_set_name}.json\nput weights here /path/to/your/weights/*.pth\nchange compound_coef\n\n\"\"\"\n\nimport json\nimport os\n\n... | [
[
"torch.device",
"torch.from_numpy"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.tight_layout",
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.text",
"matplotlib.pyplot.show"
]
] |
giovp/spatial-alignment | [
"b03a6508ba581246a3f6367217b2f8df5dcd15d4",
"b03a6508ba581246a3f6367217b2f8df5dcd15d4",
"b03a6508ba581246a3f6367217b2f8df5dcd15d4"
] | [
"experiments/simulations/two_dimensional_denovo_vs_templatebased.py",
"gpsa/util/util.py",
"experiments/simulations/one_dimensional.py"
] | [
"import torch\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport seaborn as sns\nimport sys\nfrom gpsa import VariationalGPSA, matern12_kernel, rbf_kernel, LossNotDecreasingChecker\nfrom gpsa.plotting import callback_twod\n\nsys.path.append(\"../../data\")\nfrom simulated.generate_twod_data import gener... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"torch.from_numpy",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"torch.cuda.is_available",
"matplotlib.pyplot.xlab... |
bkhamesra/yt-EinsteinToolkit | [
"576bf88b5cd706fd577c513c23b1db07ec5f4cd2",
"576bf88b5cd706fd577c513c23b1db07ec5f4cd2",
"576bf88b5cd706fd577c513c23b1db07ec5f4cd2",
"576bf88b5cd706fd577c513c23b1db07ec5f4cd2"
] | [
"yt/frontends/gadget_fof/tests/test_outputs.py",
"yt/geometry/coordinates/tests/test_polar_coordinates.py",
"yt/frontends/ytdata/data_structures.py",
"yt/fields/field_functions.py"
] | [
"\"\"\"\nGadgetFOF frontend tests using gadget_fof datasets\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, di... | [
[
"numpy.intersect1d",
"numpy.zeros"
],
[
"numpy.argmax",
"numpy.argmin"
],
[
"numpy.abs",
"numpy.ones",
"numpy.concatenate",
"numpy.log10",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.minimum",
"numpy.sqrt",
"numpy.multiply",
"numpy.abs",
"numpy.... |
loliksamuel/python-ML-keras | [
"cafa8ce00c10ff91d553d4126f2cea4a749fcbdb"
] | [
"examples/reuters_mlp.py"
] | [
"'''Trains and evaluate a simple MLP(Multilayer perceptron)\non the Reuters newswire topic classification task.\n'''\nfrom __future__ import print_function\n\nimport numpy as np\nimport keras\nfrom keras.datasets import reuters\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Activatio... | [
[
"numpy.max"
]
] |
hcch0912/maddpg | [
"5d6f1d8c5da929c85d11969af4f240e4d7fc4dba"
] | [
"train.py"
] | [
"import argparse\nimport numpy as np\nimport tensorflow as tf\nimport time\nimport pickle\n\nimport maddpg.common.tf_util as U\nfrom maddpg.trainer.maddpg import MADDPGAgentTrainer\nimport tensorflow.contrib.layers as layers\n\ndef parse_args():\n parser = argparse.ArgumentParser(\"Reinforcement Learning experim... | [
[
"tensorflow.variable_scope",
"tensorflow.train.Saver",
"numpy.mean",
"tensorflow.contrib.layers.fully_connected"
]
] |
Sanaelotfi/Bayesian_model_comparison | [
"c6f0da1d49374c0dda6ee743e5b02bcf3e158e96",
"c6f0da1d49374c0dda6ee743e5b02bcf3e158e96",
"c6f0da1d49374c0dda6ee743e5b02bcf3e158e96"
] | [
"Laplace_experiments/learning_curves/learning_curves.py",
"Laplace_experiments/learning_curves/models/toy_nets.py",
"Laplace_experiments/learning_curves/models/densenet.py"
] | [
"'''Train CIFAR100 with PyTorch.'''\nfrom __future__ import print_function\n\nimport sys\nimport os\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.nn.utils import parameters_to_vector\nfrom torch.utils.data import SubsetRandomSampler,Dataset\nimport ... | [
[
"torch.nn.functional.softmax",
"numpy.log",
"numpy.random.seed",
"torch.cuda.manual_seed",
"torch.load",
"torch.manual_seed",
"torch.randn",
"torch.utils.data.DataLoader",
"numpy.stack",
"numpy.concatenate",
"numpy.argmax",
"numpy.mean",
"torch.no_grad",
"to... |
SymbioticLab/Salus | [
"b2a194e7e4654b51dbd8d8fc1577fb1e9915ca6f"
] | [
"tests/test_tf/lib/vae/vae.py"
] | [
"from __future__ import print_function, absolute_import, division\n\nfrom collections import namedtuple\n\nimport tensorflow as tf\n\n\ndef get_args(**kwargs):\n VaeArgs = namedtuple('VaeArgs', 'dim_z n_hidden learn_rate batch_size')\n args = {\n 'dim_z': 20,\n 'n_hidden': 500,\n 'learn_r... | [
[
"tensorflow.clip_by_value",
"tensorflow.get_variable",
"tensorflow.nn.elu",
"tensorflow.matmul",
"tensorflow.contrib.layers.variance_scaling_initializer",
"tensorflow.reduce_mean",
"tensorflow.shape",
"tensorflow.nn.tanh",
"tensorflow.constant_initializer",
"tensorflow.log"... |
lconaboy/yt | [
"d97c3cf6d7911cd12b8337784d3232068ebc59f6",
"023680e3a7bd1000d601727e02a55e72b4cbdc75",
"d97c3cf6d7911cd12b8337784d3232068ebc59f6",
"d97c3cf6d7911cd12b8337784d3232068ebc59f6",
"d97c3cf6d7911cd12b8337784d3232068ebc59f6"
] | [
"yt/units/tests/test_magnetic_code_units.py",
"yt/visualization/volume_rendering/transfer_function_helper.py",
"yt/funcs.py",
"yt/frontends/gadget/io.py",
"yt/geometry/coordinates/spherical_coordinates.py"
] | [
"import numpy as np\n\nfrom yt.loaders import load_uniform_grid\nfrom yt.testing import assert_allclose\n\n\ndef test_magnetic_code_units():\n\n sqrt4pi = np.sqrt(4.0 * np.pi)\n ddims = (16,) * 3\n data = {\"density\": (np.random.uniform(size=ddims), \"g/cm**3\")}\n\n ds1 = load_uniform_grid(\n d... | [
[
"numpy.random.uniform",
"numpy.sqrt"
],
[
"numpy.ones_like",
"matplotlib.figure.Figure",
"numpy.append",
"numpy.log10",
"numpy.float64",
"numpy.array"
],
[
"matplotlib.style.context",
"numpy.array_equal",
"numpy.asarray",
"matplotlib.interactive",
"numpy... |
arturs-berzins/adaptmesh | [
"8ce257d85b5943d2bca578ca67490e6b85ea8bec"
] | [
"adaptmesh/meshplex/mesh_tri.py"
] | [
"import os\n\nimport numpy\n\nfrom .base import (\n _base_mesh,\n compute_ce_ratios,\n compute_tri_areas,\n compute_triangle_circumcenters,\n)\nfrom .helpers import grp_start_len, unique_rows\n\n__all__ = [\"MeshTri\"]\n\n\nclass MeshTri(_base_mesh):\n \"\"\"Class for handling triangular meshes.\"\"\... | [
[
"numpy.amax",
"numpy.logical_xor",
"numpy.sqrt",
"numpy.einsum",
"numpy.all",
"numpy.concatenate",
"numpy.argmin",
"numpy.any",
"numpy.cross",
"numpy.moveaxis",
"numpy.where",
"matplotlib.pyplot.tripcolor",
"numpy.unique",
"numpy.arange",
"numpy.stack",
... |
Goodkorning/Skyline_operator | [
"e67b9f0aceb0900ceec13d18b75bf185800479ee"
] | [
"database_builder.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Aug 20 17:19:02 2019\n\n@author: LKK\n\"\"\"\n\n#will build 3 different databases\n#each database has 10,0000 tuples\n#A tuple has d attributes of type double and one bulk attribute with garbage characters to ensure that each tuple is 100 bytes long.\n#The valus of t... | [
[
"numpy.random.uniform"
]
] |
XiaobingSuper/intel-extension-for-pytorch | [
"f0cdcc602658340a957a964447d8e76bf413f66a"
] | [
"tests/cpu/test_jit.py"
] | [
"from __future__ import division\nfrom __future__ import print_function\n\n'''\nFrom PyTorch:\n\nCopyright (c) 2016- Facebook, Inc (Adam Paszke)\nCopyright (c) 2014- Facebook, Inc (Soumith Chintala)\nCopyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)\nCopyright (c) 2012... | [
[
"torch.jit.script",
"torch.sigmoid",
"torch.sigmoid_",
"torch.jit.trace",
"torch.add",
"torch.transpose",
"torch.manual_seed",
"torch.nn.ELU",
"torch.nn.Conv2d",
"torch.randn",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.mul",
"torch.no_grad",
... |
matteo-rizzo/interpretable-tcc | [
"c50ab5c7407d8b300e00a7a889aa45d34bae2276"
] | [
"classes/modules/submodules/attention/TemporalAttention.py"
] | [
"import torch\nfrom torch import nn, Tensor\n\n\nclass TemporalAttention(nn.Module):\n\n def __init__(self, features_size: int = 512, hidden_size: int = 128):\n super().__init__()\n self.phi_x = nn.Linear(features_size, 1, bias=False)\n self.phi_h = nn.Linear(hidden_size, 1, bias=False)\n ... | [
[
"torch.nn.Linear",
"torch.nn.Softmax",
"torch.mean"
]
] |
elgiroma/mcd_project | [
"e776ae73c627df6968fd2db3d802d82ffb1a8b5c"
] | [
"codigo.py"
] | [
"import pandas as pd\nimport matplotlib.pyplot as plt\n\ndf = pd.read_csv(\"./df_covid19.csv\")\n\ndf_mujer = df[df.SEXO == 1]\ndf_hombre = df[df.SEXO == 2]\n\n\n# HOMBRES\nsi_tiene_hombre = list(df_hombre.DIABETES).count(1)\nno_tiene_hombre = list(df_hombre.DIABETES).count(2)\nno_aplica_hombre = list(df_hombre.DIA... | [
[
"pandas.read_csv",
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
TakafumiKurai/hifill | [
"0810ac8836bd974aad10dc84258b9dba56e831ba"
] | [
"GPU_CPU/test.py"
] | [
"import cv2\nimport numpy as np\nimport tensorflow as tf\nimport glob \nimport argparse\nimport os\n\n\nINPUT_SIZE = 512 # input image size for Generator\nATTENTION_SIZE = 32 # size of contextual attention\n\n\ndef sort(str_lst):\n return [s for s in sorted(str_lst)]\n\n# reconstruct residual from patches\ndef ... | [
[
"tensorflow.Graph",
"numpy.expand_dims",
"tensorflow.import_graph_def",
"numpy.clip",
"numpy.reshape",
"numpy.matmul",
"tensorflow.global_variables_initializer",
"numpy.mean",
"tensorflow.Session",
"numpy.transpose",
"tensorflow.GraphDef"
]
] |
seakkas/indycar-racecardetection | [
"7bb5704903aa66206e84b9cd49b3e9039d0dce9c"
] | [
"indycar_data_prepare/explore_data.py"
] | [
"import tensorflow as tf\n\ncount = 0\nfile = open('example.txt','w')\nfor example in tf.python_io.tf_record_iterator(\"train.tfrecord\"):\n file.write(str(tf.train.Example.FromString(example)))\n \n count += 1\n if count == 2:\n break\n\n"
] | [
[
"tensorflow.python_io.tf_record_iterator",
"tensorflow.train.Example.FromString"
]
] |
farhan0syakir/OpenCv-tutorial | [
"b3d78f3567f4ea61b8955190f51097b6ceb4b318"
] | [
"10. Invisible_Cloak/invisiblecloak.py"
] | [
" \nimport cv2\nimport time\nimport numpy as np\n\n## Preparation for writing the ouput video\nfourcc = cv2.VideoWriter_fourcc(*'XVID')\nout = cv2.VideoWriter('output.avi', fourcc, 20.0, (640, 480))\n\n##reading from the webcam\ncap = cv2.VideoCapture(0)\n\n## Allow the system to sleep for 3 seconds before the web... | [
[
"numpy.array",
"numpy.flip",
"numpy.ones"
]
] |
alvarofpp/ufrn-imd1155-brazil-air-traffic-network-analysis | [
"41b9b24a238110c17c09e2a4e2df542c6bcbce1b"
] | [
"extract.py"
] | [
"import os.path\nimport pandas as pd\nimport networkx as nx\nfrom tqdm import tqdm\n\nyears = [2019, 2020, 2021]\n\n# Read dataframe\ndf = pd.read_csv('https://github.com/alvarofpp/dataset-flights-brazil/raw/main/data/anac.zip')\ndf_airports = pd.read_csv('https://github.com/alvarofpp/dataset-flights-brazil/raw/mai... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
dprelogo/21CMMC | [
"41fa38c2fad450a1f259f799e6d486822782c141"
] | [
"tests/test_prior.py"
] | [
"import pytest\n\nimport numpy as np\nfrom math import isclose\nfrom scipy.stats import multivariate_normal\n\nfrom py21cmmc.cosmoHammer import Params\nfrom py21cmmc.prior import DataWhitener, PriorBase, PriorFunction, PriorGaussianKDE\n\n\n@pytest.fixture(scope=\"module\")\ndef astro_params():\n ap = {\n ... | [
[
"numpy.array",
"scipy.stats.multivariate_normal",
"numpy.allclose"
]
] |
heylakshya/tf-vsumm-reinforce-attention | [
"a32bd26455c6d07d3e74b85e5e71c51b6104d65c"
] | [
"visualize_results.py"
] | [
"import h5py\nfrom matplotlib import pyplot as plt\nimport argparse\nimport os.path as osp\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-p', '--path', type=str, required=True,\n\t\t\t\t\thelp=\"path to h5 file containing summarization results\")\nargs = parser.parse_args()\n\nh5_res = h5py.File(args.... | [
[
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.close"
]
] |
rvegaml/SIMLR | [
"5d50cd1ccd5f34bf095c499e3be2e739950a0145"
] | [
"MLib/Models/KerasModels.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import Model\nimport tensorflow.keras.backend as K\nfrom MLib.Core.Cells import SIR_Cell\nfrom tensorflow.keras.layers import RNN\n\n\nclass MarkovChainRNN_Model(Model):\n\tdef __init__(self, population):\n\t\tsuper(MarkovChainRNN_Model, self).__in... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.keras.layers.RNN"
]
] |
EpicEricEE/manim | [
"66d26380e526b44d10a405b474356acbbf1f6434",
"66d26380e526b44d10a405b474356acbbf1f6434"
] | [
"manim/scene/vector_space_scene.py",
"manim/mobject/number_line.py"
] | [
"\"\"\"A scene suitable for vector spaces.\"\"\"\n\n__all__ = [\"VectorScene\", \"LinearTransformationScene\"]\n\n\nfrom typing import Optional\n\nimport numpy as np\nfrom colour import Color\n\nfrom manim.utils.config_ops import update_dict_recursively\n\nfrom .. import config\nfrom ..animation.animation import An... | [
[
"numpy.dot",
"numpy.linalg.inv",
"numpy.linalg.norm",
"numpy.sign",
"numpy.identity",
"numpy.array"
],
[
"numpy.concatenate",
"numpy.arange",
"numpy.dot",
"numpy.abs"
]
] |
drpreetyrai/ChatBotCourse | [
"156041d51ec51842592e8a1eeda565197fe31aec"
] | [
"seq2seq/tflearn_prj/seq2seq_example.py"
] | [
"'''\nPedagogical example realization of seq2seq recurrent neural networks, using TensorFlow and TFLearn.\nMore info at https://github.com/ichuang/tflearn_seq2seq\n'''\n\nfrom __future__ import division, print_function\n\nimport os\nimport sys\nimport tflearn\nimport argparse\nimport json\n\nimport numpy as np\nimp... | [
[
"tensorflow.equal",
"tensorflow.unpack",
"tensorflow.pack",
"tensorflow.python.ops.seq2seq.embedding_attention_seq2seq",
"numpy.random.randint",
"tensorflow.get_collection",
"tensorflow.reset_default_graph",
"numpy.argmax",
"tensorflow.name_scope",
"tensorflow.argmax",
... |
yu-iskw/polyaxon-examples | [
"849f9d12f942630eff0f7e3d35fd5e39234aba5f"
] | [
"pytorch/cifar10-ignite/check.py"
] | [
"import torch\n\nprint(\"torch version: {}\".format(torch.__version__))\nprint(\"torch cuda version: {}\".format(torch.version.cuda))\nprint(\"torch cuda available: {}\".format(torch.cuda.is_available()))\n\nx = torch.rand(4, 512, 512, 3).to('cuda')\nprint(torch.sum(x))\n"
] | [
[
"torch.sum",
"torch.rand",
"torch.cuda.is_available"
]
] |
TheDerek/fake-news-classifier | [
"1901d460ef0640199a0269930e381f2c5111fb5a"
] | [
"eval.py"
] | [
"#! /usr/bin/env python\n\nimport tensorflow as tf\nimport numpy as np\nimport os\nimport time\nimport datetime\nimport data_helpers\nimport dataset\n\nfrom text_cnn import TextCNN\nfrom tensorflow.contrib import learn\nimport csv\n\n# Parameters\n# ==================================================\n\n# Data Param... | [
[
"tensorflow.flags.DEFINE_boolean",
"tensorflow.Graph",
"tensorflow.train.latest_checkpoint",
"tensorflow.flags.DEFINE_string",
"tensorflow.ConfigProto",
"numpy.concatenate",
"numpy.argmax",
"tensorflow.Session",
"numpy.array",
"tensorflow.contrib.learn.preprocessing.Vocabul... |
shapiromatron/bmds | [
"57562858f3c45e9b9ec23e1c229a8a1de0ea4a70"
] | [
"bmds/bmds2/batch.py"
] | [
"import json\nimport os\n\nimport pandas as pd\n\nfrom . import exports\nfrom .reporter import Reporter\n\n\nclass SessionBatch(list):\n \"\"\"\n Export utilities for exporting a collection of multiple BMD sessions.\n\n Example\n -------\n >>> datasets = [\n bmds.ContinuousDataset(\n ... | [
[
"pandas.DataFrame"
]
] |
matt-chan/pyscf | [
"0606bb8ac410ec641295b12756e5474ee3800731"
] | [
"pyscf/pbc/scf/rohf.py"
] | [
"#!/usr/bin/env python\n# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LIC... | [
[
"numpy.asarray",
"numpy.zeros"
]
] |
jchwei/colour | [
"2b2ad0a0f2052a1a0b4b076b489687235e804fdf",
"2b2ad0a0f2052a1a0b4b076b489687235e804fdf",
"2b2ad0a0f2052a1a0b4b076b489687235e804fdf"
] | [
"colour/difference/delta_e.py",
"colour/models/rgb/transfer_functions/filmic_pro.py",
"colour/models/rgb/transfer_functions/dicom_gsdf.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n:math:`\\\\Delta E_{ab}` - Delta E Colour Difference\n=================================================\n\nDefines :math:`\\\\Delta E_{ab}` colour difference computation objects:\n\nThe following methods are available:\n\n- :func:`colour.difference.delta_E_CIE1976`\n- :func:`co... | [
[
"numpy.sqrt",
"numpy.fabs",
"numpy.arctan2",
"numpy.deg2rad",
"numpy.exp",
"numpy.logical_and",
"numpy.where",
"numpy.hypot"
],
[
"numpy.arange",
"numpy.log",
"numpy.sqrt"
],
[
"numpy.round",
"numpy.log",
"numpy.log10"
]
] |
kamilstecyk/SMARTS | [
"77fca0605b060d3a922400a9e85db8b28aeb6ce3"
] | [
"smarts/core/chassis.py"
] | [
"# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rig... | [
[
"numpy.array",
"numpy.zeros",
"numpy.linalg.norm"
]
] |
christine-berlin/Capstone_WindPowerPredictions | [
"e07e82d1ca916c381d475aa00614c6f4377272f2"
] | [
"modeling/functions.py"
] | [
"\"\"\"Functions for:\n- logging with MLflow,\n- modelling,\n- hyperparameter tuning,\n- finding best feature combinations,\n\"\"\"\n\nimport warnings\nimport numpy as np\nimport pandas as pd\nfrom sklearn.metrics import mean_squared_error\nfrom sklearn.model_selection import GridSearchCV\nimport mlflow\nfrom model... | [
[
"pandas.DataFrame.from_dict",
"pandas.DataFrame",
"sklearn.metrics.mean_squared_error"
]
] |
eigeneddie/Rehab-Bot-Project | [
"df9c7628f530f523c4d4f6040089907547d3b8ba"
] | [
"python_scripts/main_new2.py"
] | [
"# Copyright (c) 2021 Edgar B. Sutawika\n# \n# Rehabilitation project for lower extremity stroke patients.\n#\n# Project consist of several scripts running concurrently in a multi-threaded fashion\n# All programs are run by raspberry pi 4\n# mainProg.py: Rehab-bot system execution. \n# livePlotter.py: plotting impo... | [
[
"pandas.DataFrame"
]
] |
egg-west/DeepRL-Grounding | [
"03b529ac95383facf11d0468b0c69fd1e974a308"
] | [
"a3c_test.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn.functional as F\nimport time\nimport logging\n\nimport env as grounding_env\nfrom models import A3C_LSTM_GA\n\nfrom torch.autograd import Variable\nfrom constants import *\n\nfrom tensorboardX import SummaryWriter\n\n\ndef test(rank, args, shared_model):\n write... | [
[
"torch.nn.functional.softmax",
"torch.load",
"torch.zeros",
"torch.manual_seed",
"torch.from_numpy",
"torch.no_grad",
"numpy.mean",
"numpy.array"
]
] |
davidiommi/MONAI | [
"c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f",
"c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f",
"c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f"
] | [
"monai/metrics/regression.py",
"tests/test_handler_metrics_saver_dist.py",
"tests/test_orientationd.py"
] | [
"# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agre... | [
[
"torch.sqrt",
"torch.log10"
],
[
"torch.distributed.get_rank",
"torch.tensor"
],
[
"numpy.eye",
"numpy.ones",
"numpy.testing.assert_allclose"
]
] |
gehring/tensorflow | [
"07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e",
"e6d171a2afcf0b7a1f77f125751727232480edbe",
"07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e",
"07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e",
"07da23bfa2a9ca10cd7c1dd6bea0f85d981c013e",
"e6d171a2afcf0b7a1f77f125751727232480edbe",
"e6d171a2afcf0b7a1f77f125751727232480edb... | [
"tensorflow/python/kernel_tests/sparse_reshape_op_test.py",
"tensorflow/python/eager/benchmarks_test.py",
"tensorflow/python/kernel_tests/bitcast_op_test.py",
"tensorflow/python/autograph/core/converter_testing.py",
"tensorflow/python/keras/engine/training_utils_test.py",
"tensorflow/contrib/timeseries/py... | [
"# Copyright 2016 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.framework.sparse_tensor.SparseTensorValue",
"tensorflow.python.ops.array_ops.shape",
"numpy.nonzero",
"numpy.reshape",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.platform.test.main",
"numpy.prod",
"tensorflow.python.framework.sparse_tensor.... |
pnvnd/plotly | [
"ede0bb0bb92484c2e3bf4e3631fa97f547e02c16",
"ede0bb0bb92484c2e3bf4e3631fa97f547e02c16"
] | [
"py/line1.py",
"py/callback_dashboard2.py"
] | [
"import numpy as np\nimport plotly.offline as pyo\nimport plotly.graph_objs as go\n\nnp.random.seed(56)\n\nx_values = np.linspace(0,1,100)\ny_values = np.random.randn(100)\n\n\ntrace0 = go.Scatter(\n x=x_values,\n y=y_values+5,\n mode=\"markers\",\n name=\"markers\"\n)\n\ntrace1 = go.Scatter(\n x=x_v... | [
[
"numpy.random.randn",
"numpy.random.seed",
"numpy.linspace"
],
[
"pandas.read_csv"
]
] |
dunna-error/shopping-classification | [
"25d2f49a664de2ee9f3b4dee527f4714a5741579"
] | [
"joon/joon_product_eda.py"
] | [
"import pandas as pd\ndataset_dir = '/workspace/dataset/'\n\ndf = pd.read_pickle(dataset_dir + 'df_word_count.pkl')\n\nprint(df.head(50))"
] | [
[
"pandas.read_pickle"
]
] |
google/gps_building_blocks | [
"385ea06f3e84047e08e120791281aac02f028a81"
] | [
"py/gps_building_blocks/analysis/exp_design/ab_testing_design.py"
] | [
"# Copyright 2021 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 agreed ... | [
[
"numpy.ceil",
"pandas.merge",
"pandas.qcut",
"pandas.DataFrame"
]
] |
AISyLab/side-channel-attacks | [
"83c93b1087c9f16423ece7191c3171d07ed1cdce"
] | [
"sca/analysis/nicv.py"
] | [
"import numpy as np\nimport warnings\n\nfrom sca.util.hamming_weight import HammingWeight\n\nCONST_PLAIN_TEXT_LENGTH = 256\n\n\nclass NICV:\n \"\"\"\"\n This class contains methods for performing a NICV (Normalized\n Inter-Class Variance) for accelerating side-channel attacks.\n \"\"\"\n\n @staticmet... | [
[
"numpy.save",
"numpy.mean",
"numpy.var",
"numpy.argsort",
"numpy.empty"
]
] |
voytekresearch/neurodsp | [
"a44845fb3638a5cc72b11eef340fb22e917c22e8",
"a44845fb3638a5cc72b11eef340fb22e917c22e8"
] | [
"neurodsp/tests/tutils.py",
"neurodsp/tests/sim/test_transients.py"
] | [
"\"\"\"Utility functions for testing neurodsp functions.\"\"\"\n\nfrom functools import wraps\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom neurodsp.utils.data import compute_nsamples\n\nfrom neurodsp.tests.settings import N_SECONDS, FS\n\n###########################################################... | [
[
"numpy.isnan",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.close"
],
[
"numpy.all"
]
] |
dmitryvinn/pplbench | [
"70786251291ee5e9905c926174691935ebe9211d"
] | [
"pplbench/models/utils.py"
] | [
"# Copyright (c) Meta Platforms, Inc. and 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\nfrom typing import Tuple\n\nimport numpy as np\nimport xarray as xr\n\n\ndef log1pexp(x: np.ndarray) -> np.ndarray:\n \"\"\"\n ... | [
[
"numpy.exp",
"numpy.zeros_like",
"numpy.expm1"
]
] |
bKolisnik/Condition-CNN | [
"3117b0e13cf3581d868c21b2d6778582f5789037"
] | [
"articleType.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras.applications.resnet50 import ResNet50\nfrom tensorflow.keras.applications.vgg16 import VGG16\nfrom tensorflow.keras.applications.inception_v3 import InceptionV3\nfrom tensorflow.keras.layers import Dense, GlobalAveragePooling2D, MaxPooling2D, Flatten, Input, Conv2D, c... | [
[
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.keras.models.Model",
"tensorflow.keras.backend.count_params",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.optimizers.SGD",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.ke... |
apkrelling/xarray | [
"abcae54664539e50a34d4b713faadf108cf6d22e",
"abcae54664539e50a34d4b713faadf108cf6d22e"
] | [
"xarray/conventions.py",
"xarray/coding/times.py"
] | [
"import warnings\nfrom collections import defaultdict\n\nimport numpy as np\nimport pandas as pd\n\nfrom .coding import strings, times, variables\nfrom .coding.variables import SerializationWarning, pop_to\nfrom .core import duck_array_ops, indexing\nfrom .core.common import contains_cftime_datetimes\nfrom .core.py... | [
[
"pandas.isnull",
"numpy.asarray",
"numpy.issubdtype",
"numpy.dtype",
"numpy.array",
"numpy.empty"
],
[
"numpy.nanargmax",
"pandas.to_datetime",
"pandas.notnull",
"pandas.TimedeltaIndex",
"pandas.isnull",
"pandas.Timestamp",
"numpy.asarray",
"numpy.issubd... |
VIAME/netharn | [
"9ebc8ddb33c56fe890684f3a0a6369c52ebe4742",
"9ebc8ddb33c56fe890684f3a0a6369c52ebe4742",
"c9491d655c5d91cb0ee6055f30e68282108e6b67"
] | [
"dev/mnist_matching.py",
"netharn/plots/weight_scatter.py",
"netharn/examples/classification.py"
] | [
"import cv2\nfrom os.path import join\nimport netharn as nh\nimport numpy as np\nimport torch\nimport torchvision\nimport ubelt as ub\nfrom torch import nn\nfrom sklearn import metrics\nimport kwimage\nimport kwarray\n\n\nclass MNISTEmbeddingNet(nh.layers.Module):\n \"\"\"\n References:\n https://githu... | [
[
"torch.cat",
"sklearn.metrics.matthews_corrcoef",
"torch.FloatTensor",
"numpy.nanmean",
"torch.utils.data.Subset",
"numpy.where",
"torch.LongTensor",
"torch.nn.PReLU",
"numpy.median",
"torch.nn.Conv2d",
"torch.is_tensor",
"torch.nn.Linear",
"torch.nn.functional.... |
rajeshkppt/Megatron-LM | [
"d41696840ed0a7edb7e0499eb82a48ae112d9bb3"
] | [
"megatron/model/transformer.py"
] | [
"# coding=utf-8\n# Copyright (c) 2020, 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 obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | [
[
"torch.nn.Dropout",
"torch.enable_grad",
"torch.cuda.current_device",
"torch.nn.functional.dropout"
]
] |
JuancaDuque/esda | [
"b9ca0fb1d7b9d06417b7eddb73b08845bb33e898"
] | [
"esda/join_counts.py"
] | [
"\"\"\"\nSpatial autocorrelation for binary attributes\n\n\"\"\"\n__author__ = \"Sergio J. Rey <srey@asu.edu> , Luc Anselin <luc.anselin@asu.edu>\"\n\nfrom libpysal.weights.spatial_lag import lag_spatial\nfrom .tabular import _univariate_handler\nimport numpy as np\n\n__all__ = ['Join_Counts']\n\nPERMUTATIONS = 999... | [
[
"numpy.min",
"numpy.asarray",
"numpy.max",
"numpy.random.permutation",
"numpy.mean",
"numpy.array"
]
] |
z-fabian/MRAugment | [
"88dd0649f05b2dd43bf967e8b92eaf2d5daab42d"
] | [
"mraugment/data_transforms.py"
] | [
"\"\"\"\nModel dependent data transforms that apply MRAugment to \ntraining data before fed to the model.\nModified from https://github.com/facebookresearch/fastMRI/blob/master/fastmri/data/transforms.py\n\"\"\"\nfrom typing import Dict, Optional, Sequence, Tuple, Union\nimport fastmri\nimport numpy as np\nimport t... | [
[
"numpy.array",
"torch.tensor"
]
] |
markansn/masters_project | [
"f72a104c9922dc2044f0aa2cfdbe9e51f369cc34",
"f72a104c9922dc2044f0aa2cfdbe9e51f369cc34"
] | [
"masters/decay-plot-drebin.py",
"masters/representation_bench.py"
] | [
"import IPython\nimport numpy as np\nfrom sklearn.feature_extraction import DictVectorizer\nfrom sklearn.svm import LinearSVC\nimport drebin_class_split\nfrom masters.load_features import *\nfrom tesseract import evaluation, temporal, metrics, viz\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom s... | [
[
"sklearn.feature_extraction.DictVectorizer",
"numpy.asarray",
"sklearn.linear_model.SGDClassifier"
],
[
"sklearn.feature_extraction.DictVectorizer",
"sklearn.feature_extraction.FeatureHasher",
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.svm.LinearSVC"
]
] |
dreamingweaver/making_passportImage | [
"68f23411780ff82abe934dfae5fc04acb80f2c49",
"68f23411780ff82abe934dfae5fc04acb80f2c49"
] | [
"rcnn/lib/python3.6/site-packages/tensorflow/contrib/data/python/ops/gen_dataset_ops.py",
"rcnn/lib/python3.6/site-packages/imgaug/imgaug.py"
] | [
"\"\"\"Python wrappers around TensorFlow ops.\n\nThis file is MACHINE GENERATED! Do not edit.\nOriginal C++ source file: gen_dataset_ops.cc\n\"\"\"\n\nimport collections as _collections\nimport six as _six\n\nfrom tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow\nfrom tensorflow.python.eager import ... | [
[
"tensorflow.python.eager.execute.make_shape",
"tensorflow.python.eager.execute.convert_to_mixed_eager_tensors",
"tensorflow.core.framework.op_def_pb2.OpList",
"tensorflow.python.eager.execute.make_type",
"tensorflow.python.pywrap_tensorflow.TFE_Py_FastPathExecute",
"tensorflow.python.util.... |
xiaomisusu/oneflow_vision_model | [
"ddf8b2cf1bca41ba787c98fb8ccb969063def5ab"
] | [
"CenterNet_of/tools/samplers.py"
] | [
"from __future__ import absolute_import\r\nfrom __future__ import division\r\n\r\nfrom collections import defaultdict\r\nimport numpy as np\r\nimport sys\r\nimport copy\r\nimport random\r\n\r\nclass RandomIdentitySampler(object):\r\n def __init__(self, dataset_size):\r\n self.size = dataset_size\r\n de... | [
[
"numpy.random.choice"
]
] |
tugot17/RGB-Infrared-Classification | [
"fb0f48e00fba28630d04f2b196b92cf83d8be5c0"
] | [
"app/image_classification/models_with_two_separate_backbones/efficientnet_with_two_separate_backbones.py"
] | [
"import sys\nfrom os.path import join, relpath, dirname\n\nupper_dir = join(dirname(relpath(__file__)), \"..\")\nsys.path.append(upper_dir)\n\nfrom torch import nn, cat\nfrom base_model import ImageClassificationLightningModule\nfrom typing import Callable\n\n\nclass EfficientNetLightningModuleWithTwoBackbones(Imag... | [
[
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.cat"
]
] |
jmontp/Prosthetic_Adaptation | [
"0933a6eb830de744fa84ecbca70838f4e9e7340a",
"0933a6eb830de744fa84ecbca70838f4e9e7340a"
] | [
"kmodel/kronecker_model.py",
"scripts/papers_and_presentations/OG paper/hypothesis_3.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n\nCreated on Sat Apr 10 22:15:17 2021\n@author: jmontp\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport pickle\nfrom sklearn.decomposition import PCA\n\n\n#Relative Imports\nfrom .context import math_utils\n\n\n#Set test assert_pd for speed boost\n... | [
[
"numpy.linalg.solve",
"numpy.sqrt",
"numpy.diagflat",
"numpy.asarray",
"numpy.linalg.norm",
"numpy.ones",
"numpy.concatenate",
"pandas.read_parquet",
"numpy.linalg.eigh",
"numpy.mean",
"numpy.array_split",
"numpy.array",
"numpy.flip",
"numpy.zeros"
],
[
... |
izokay/catalyst | [
"83e2e2b23c0266bde1c11e68a6acde7460c6eadf",
"db312be6543cd00f7f4f3ff6dc9072d29f6e7d97",
"83e2e2b23c0266bde1c11e68a6acde7460c6eadf",
"db312be6543cd00f7f4f3ff6dc9072d29f6e7d97"
] | [
"catalyst/utils/calendars/exchange_calendar_open.py",
"tests/exchange/test_bcolz.py",
"catalyst/data/bundles/quandl.py",
"catalyst/exchange/exchange_data_portal.py"
] | [
"from datetime import time\nfrom pytz import timezone\n\nfrom pandas import Timestamp\nfrom pandas.tseries.offsets import DateOffset\n\nfrom catalyst.utils.memoize import lazyval\n\nfrom .trading_calendar import TradingCalendar\n\n\nclass OpenExchangeCalendar(TradingCalendar):\n @property\n def name(self):\n ... | [
[
"pandas.Timestamp",
"pandas.tseries.offsets.DateOffset"
],
[
"pandas.to_datetime",
"pandas.DataFrame"
],
[
"pandas.Timedelta",
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.DataFrame"
]
] |
iranroman/soundata | [
"8b60852debea7cdc49e2c6853b033a29e503b67c"
] | [
"tests/test_jams_utils.py"
] | [
"import numpy as np\nimport pytest\nimport jams\n\nfrom soundata import jams_utils, annotations\n\n\ndef get_jam_data(jam, namespace, annot_numb):\n time = []\n duration = []\n value = []\n confidence = []\n for obs in jam.search(namespace=namespace)[annot_numb][\"data\"]:\n time.append(obs.ti... | [
[
"numpy.array"
]
] |
DamienBellos/Neural-Networks | [
"99063f62d3bdee1d2d99dcc0a992f6be447b8a09"
] | [
"MNIST data using a multi-layer perceptron/MNIST with Multi-Layer Perceptron.py"
] | [
"# MNIST data set of handwritten digits from (http://yann.lecun.com/exdb/mnist/).\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nfrom tensorflow.examples.tutorials.mnist import input_data\nmnist = input_data.read_data_sets(\"/tmp/data/\", one_hot=True)\n\n# Data Format\ntype(mnist)\ntype(mnist.train.im... | [
[
"tensorflow.nn.relu",
"matplotlib.pyplot.imshow",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.matmul",
"tensorflow.InteractiveSession",
"tensorflow.reduce_mean",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorfl... |
mxmeier/ic3-labels | [
"34a76445ed3df4bee66a8d34d6dac3105ce6d739"
] | [
"ic3_labels/labels/utils/cascade.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*\n'''Helper functions for icecube specific labels.\n'''\nfrom __future__ import print_function, division\nimport numpy as np\nfrom icecube import dataclasses, simclasses\n\n# Try to import ShowerParameters from I3SimConstants\ntry:\n from icecube.sim_services import ... | [
[
"numpy.isfinite"
]
] |
rakeeb123/pygaggle | [
"f21c163bdfa23f9c6b78da52f00ece7378b85ed8"
] | [
"pygaggle/model/decode.py"
] | [
"from typing import Union, Tuple\n\nfrom transformers import PreTrainedModel\nimport torch\n\n__all__ = ['greedy_decode']\n\nDecodedOutput = Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]\n\n\n@torch.no_grad()\ndef greedy_decode(model: PreTrainedModel,\n input_ids: torch.Tensor,\n ... | [
[
"torch.no_grad"
]
] |
tifat58/ss-da-consistency | [
"de1ddc0f5508d0a06a7b34d4bc3c927238f4ad0b",
"de1ddc0f5508d0a06a7b34d4bc3c927238f4ad0b",
"de1ddc0f5508d0a06a7b34d4bc3c927238f4ad0b"
] | [
"networks/wrn.py",
"networks/advnet.py",
"data/rotate_dataset.py"
] | [
"import math\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport numpy as np\r\n\r\nclass BasicBlock(nn.Module):\r\n def __init__(self, in_planes, out_planes, stride, dropRate=0.0):\r\n super(BasicBlock, self).__init__()\r\n self.bn1 = nn.BatchNorm2d(in_planes)\r\n... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.FloatTensor",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"torch.nn.Dropout",
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.nn.Sigmoid"
],
[
"numpy.random.randint"
]
] |
mmcelhan/nfl_draft_predictions | [
"4ffb0c189743a417fc4ac31849bdd53354313144"
] | [
"data_build_scripts/stage_to_warehouse/combine_stats_build.py"
] | [
"import json\nimport os\nimport pandas as pd\nimport sys\nsys.path.append(\"..\")\nsys.path.append(\"../../column_matching\")\nimport data_build_scripts.helpers as hlp\n\n\ndef main():\n\n school_matching = hlp.return_college_matching_dict()\n\n local_path = os.path.dirname(os.path.abspath(__file__))\n f =... | [
[
"pandas.merge",
"pandas.read_csv"
]
] |
kmuehlbauer/pyart | [
"4accda3fc02490d135373ad5b054899c6781e762",
"4accda3fc02490d135373ad5b054899c6781e762"
] | [
"pyart/io/sigmet.py",
"pyart/map/grid_mapper.py"
] | [
"\"\"\"\npyart.io.sigmet\n===============\n\nReading and writing of Sigmet (raw format) files\n\n.. autosummary::\n :toctree: generated/\n\n read_sigmet\n ymds_time_to_datetime\n _time_order_data_and_metadata_full\n _time_order_data_and_metadata_roll\n\n\"\"\"\n\nfrom __future__ import division\nimpo... | [
[
"numpy.abs",
"numpy.arange",
"numpy.cumsum",
"numpy.ones",
"numpy.append",
"numpy.diff",
"numpy.argsort",
"numpy.array",
"numpy.roll"
],
[
"numpy.sqrt",
"numpy.linspace",
"numpy.cumsum",
"numpy.exp",
"numpy.where",
"numpy.ma.is_masked",
"numpy.lo... |
dimitar-petrov/python-nufft | [
"25bbec5594f98bcc93cf88b3430b83ce9d0900e9"
] | [
"tests/test_nufft1d_dft.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import division, print_function\nimport unittest\nimport numpy as np\nfrom nufft import nufft1d1, nufft1d2, nufft1d3\n\n\ndef _error(exact, approx):\n return np.sqrt(np.sum(np.abs(exact - approx) ** 2) / np.sum(np.abs(exact)**2))\n\n\nclass NUFFT1DTestCase(unittest.Tes... | [
[
"numpy.fft.irfft",
"numpy.conj",
"numpy.fft.rfft",
"numpy.fft.fft",
"numpy.abs",
"numpy.arange",
"numpy.fft.ifft"
]
] |
csmith73/Background_Remove | [
"7cf7269ac11ff6eca7ad583d276310ca8b56df5b"
] | [
"Background_Removal_2.py"
] | [
"import cv2\nimport numpy as np\n\nimg = cv2.imread(\"./test_data/Background_Removal/CM_1.jpg\")\nmask = cv2.imread(\"./test_data/Background_Removal/CM_1_Mask.png\")\nmask = cv2.cvtColor(mask, cv2.COLOR_BGR2GRAY)\ntransparent = np.zeros((img.shape[0], img.shape[1], 4), dtype=np.uint8)\ntransparent[:,:,0:3] = img\nt... | [
[
"numpy.zeros"
]
] |
facorazza/python-skyfield | [
"8d3dc132f43656766a58e3e1984363592aa1f11a",
"8d3dc132f43656766a58e3e1984363592aa1f11a"
] | [
"skyfield/tests/test_broadcastability.py",
"skyfield/keplerlib.py"
] | [
"import numpy as np\nfrom skyfield.positionlib import ICRF\n\n_deep = np.array([[[1]],[[0]],[[0]]])\n\ndef test_ecliptic_xyz_with_no_epoch():\n p = ICRF(_deep)\n x, y, z = p.ecliptic_xyz().au\n assert x.shape == y.shape == z.shape == (1, 1)\n",
"from __future__ import division\n\nimport sys\nimport math\... | [
[
"numpy.array"
],
[
"numpy.sqrt",
"numpy.arctan",
"numpy.squeeze",
"numpy.zeros_like",
"numpy.copyto",
"numpy.exp",
"numpy.arange",
"numpy.sin",
"numpy.atleast_1d",
"numpy.copy",
"numpy.repeat",
"numpy.log",
"numpy.cosh",
"numpy.power",
"numpy.arc... |
pengkangzaia/RANSynCoders | [
"05fbcd5158ad7fca232e8ba876b0f1222c8b6045"
] | [
"models.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Dec 10 11:52:54 2020\n\n@author: aabdulaal\n................................................................................................................................\n\"\"\"\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.keras.constraints... | [
[
"tensorflow.sin",
"tensorflow.python.keras.constraints.NonNeg",
"numpy.random.choice",
"tensorflow.python.keras.layers.Dense",
"tensorflow.expand_dims",
"tensorflow.gather",
"tensorflow.python.keras.initializers.Constant"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.