repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
jbeezley/SMQTK | [
"fc9404b69150ef44f24423844bc80735c0c2b669",
"fc9404b69150ef44f24423844bc80735c0c2b669"
] | [
"python/smqtk/bin/make_train_test_sets.py",
"python/smqtk/bin/minibatch_kmeans_clusters.py"
] | [
"#!/usr/bin/env python\nimport argparse\nimport csv\nimport itertools\nimport os\nimport re\n\nimport numpy\nimport six\nfrom sklearn.model_selection import StratifiedShuffleSplit\n\n\nclass KeyToFilepath(argparse.Action):\n \"\"\"\n Custom argparse action for parsing out positional class-to-filepath\n arg... | [
[
"sklearn.model_selection.StratifiedShuffleSplit",
"numpy.array"
],
[
"sklearn.cluster.MiniBatchKMeans",
"numpy.save"
]
] |
GeoscienceAustralia/geophys_utils | [
"e5580f582f3e42f347d71b140dd9213f784e2fde",
"e5580f582f3e42f347d71b140dd9213f784e2fde"
] | [
"geophys_utils/netcdf_converter/aseg_gdf_utils.py",
"geophys_utils/test/test_netcdf_point_utils.py"
] | [
"'''\nFunctions to work with ASEG-GDF format string\nRefer to https://www.aseg.org.au/sites/default/files/pdf/ASEG-GDF2-REV4.pdf for further information\n\nCreated on 19 Jun. 2018\n\n@author: u76345\n'''\n\nimport re\nimport numpy as np\nfrom collections import OrderedDict\nfrom math import ceil, log10\nimport logg... | [
[
"numpy.asscalar",
"numpy.abs",
"numpy.nanmin",
"numpy.any",
"numpy.zeros"
],
[
"numpy.count_nonzero"
]
] |
saurabhclusterone/deepchem | [
"29bcf0fbf29a74c264a553237627ad3573a4b09d"
] | [
"deepchem/utils/save.py"
] | [
"\"\"\"\nSimple utils to save and load from disk.\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\n# TODO(rbharath): Use standard joblib once old-data has been regenerated.\nimport joblib\nfrom sklearn.externals import joblib as old_joblib\n... | [
[
"pandas.concat",
"pandas.read_csv",
"sklearn.externals.joblib.load",
"pandas.DataFrame"
]
] |
HUuxiaobin/Face-Super-Resolution-Guided-by-3D-Facial-Priors | [
"987e7c74d33d26cc5e9d1c0e395a06519a31792f"
] | [
"3Dface_priors/facial_landmark.py"
] | [
"# import the necessary packages\nfrom imutils import face_utils\nimport numpy as np\nimport argparse\nimport imutils\nimport dlib\nimport cv2\n#python facial_landmarks.py --shape-predictor shape_predictor_68_face_landmarks.dat --image test1.jpg\ndef rect_to_bb(rect):\n# take a bounding predicted by dlib and conver... | [
[
"numpy.zeros"
]
] |
koskotG/ebonite | [
"b01b662c43709d152940f488574d78ff25f89ecf",
"9f9ae016b70fb24865d5edc99142afb8ab4ddc59",
"9f9ae016b70fb24865d5edc99142afb8ab4ddc59"
] | [
"tests/ext/sklearn/test_model.py",
"src/ebonite/ext/ext_loader.py",
"tests/runtime/test_model_interface.py"
] | [
"import numpy as np\nimport pytest\nfrom sklearn.linear_model import LinearRegression, LogisticRegression\n\nfrom ebonite.core.analyzer.model import ModelAnalyzer\nfrom ebonite.ext.sklearn import SklearnModelWrapper\n\n\n@pytest.fixture\ndef inp_data():\n return [[1, 2, 3], [3, 2, 1]]\n\n\n@pytest.fixture\ndef o... | [
[
"sklearn.linear_model.LinearRegression",
"sklearn.linear_model.LogisticRegression"
],
[
"tensorflow.__version__.split"
],
[
"pandas.DataFrame"
]
] |
derEitel/patch_individual_filter_layer | [
"ecd7b3ace759e10ceda8c39ebe1190a7bc27f223"
] | [
"nitorch/nitorch/initialization.py"
] | [
"# Initialize weights\nfrom torch.nn import init, Conv3d, BatchNorm3d, Linear\n\n\ndef xavier(x):\n \"\"\"Wrapper for torch.nn.init.xavier method.\n\n Parameters\n ----------\n x : torch.tensor\n Input tensor to be initialized. See torch.nn.init.py for more information\n\n Returns\n -------... | [
[
"torch.nn.init.constant_",
"torch.nn.init.xavier_normal_",
"torch.nn.init.kaiming_uniform_",
"torch.nn.init.xavier_uniform_",
"torch.nn.init.kaiming_normal_"
]
] |
piersharding/astropy | [
"9680cd546aa9063758f2c23c836ca79a7c8f1eb1"
] | [
"astropy/io/votable/tree.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# TODO: Test FITS parsing\n\n# STDLIB\nimport io\nimport re\nimport gzip\nimport base64\nimport codecs\nimport urllib.request\n\n# THIRD-PARTY\nimport numpy as np\nfrom numpy import ma\n\n# LOCAL\nfrom astropy.io import fits\nfrom astropy import __ve... | [
[
"numpy.asarray",
"numpy.dtype",
"numpy.all",
"numpy.ceil",
"numpy.any",
"numpy.ma.array",
"numpy.ma.zeros",
"numpy.zeros",
"numpy.recarray"
]
] |
tsaodingtw/pttanal | [
"c1d786c04e2d6f1ce02f6886748b4dbec1f37676"
] | [
"tf.py"
] | [
"import tensorflow as tf\nimport numpy as np\nfrom feature import Feature\nimport sqlite3\nimport pickle\n\ndb = sqlite3.connect('ptt.db')\ncur = db.execute('SELECT * FROM ARTICLES LIMIT 1000')\n\n\n# Create 100 phony x, y data points in NumPy, y = x * 0.1 + 0.3\nf = Feature()\npost_data = []\npush_data = []\nboo_d... | [
[
"tensorflow.matmul",
"tensorflow.zeros",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.Session",
"tensorflow.square",
"tensorflow.train.Saver",
"numpy.array",
"tensorflow.random_uniform"
]
] |
thorwhalen/ut | [
"353a4629c35a2cca76ef91a4d5209afe766433b4"
] | [
"sound/dacc/mg.py"
] | [
"__author__ = 'thor'\n\nimport os\nimport pandas as pd\nfrom pymongo import MongoClient\nfrom pymongo.cursor import Cursor\n\n\nfrom ut.sound import util as sutil\nfrom ut.daf.manip import reorder_columns_as\nfrom ut.sound.util import Sound\nfrom ut.pstr.trans import str_to_utf8_or_bust\n\n\nclass MgDacc(object):\n... | [
[
"pandas.DataFrame"
]
] |
MaksHess/napari | [
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e7",
"64a144607342c02177fc62fa83a3442ace0a98e... | [
"napari/utils/_dtype.py",
"napari/_tests/test_draw.py",
"napari/utils/colormaps/standardize_color.py",
"examples/add_points.py",
"napari/layers/labels/_tests/test_labels_pyramid.py",
"napari/_qt/_tests/test_qt_viewer.py",
"napari/utils/_tests/test_geometry.py"
] | [
"from typing import Tuple, Union\n\nimport numpy as np\n\n_np_uints = {\n 8: np.uint8,\n 16: np.uint16,\n 32: np.uint32,\n 64: np.uint64,\n}\n\n_np_ints = {\n 8: np.int8,\n 16: np.int16,\n 32: np.int32,\n 64: np.int64,\n}\n\n_np_floats = {\n 16: np.float16,\n 32: np.float32,\n 64: n... | [
[
"numpy.issubdtype",
"numpy.iinfo",
"numpy.dtype",
"numpy.finfo"
],
[
"numpy.random.random"
],
[
"numpy.asarray",
"numpy.linalg.norm",
"numpy.ones",
"numpy.atleast_2d",
"numpy.float32",
"numpy.zeros",
"numpy.where"
],
[
"numpy.array"
],
[
"num... |
romenr/bachelorthesis | [
"1f4325d5f10274597efb81194b6869768cc38659"
] | [
"controller/model.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nfrom parameters import *\nfrom snn import TargetFollowingSNN, ObstacleAvoidanceSNN, nest_simulate\n\n\nclass Model:\n\n\tdef __init__(self):\n\t\tself.snn_tf = TargetFollowingSNN()\n\t\tself.snn_oa = ObstacleAvoidanceSNN()\n\t\tself.turn_pre = 0.0\n\t\tself.angle_pre = ... | [
[
"numpy.sign",
"numpy.any"
]
] |
rraymondhp/dybm | [
"3d618874a2f8838eaeca17ce40649a3789e9f140"
] | [
"src/pydybm/arraymath/dycupy/random.py"
] | [
"\"\"\"``cupy``-based implementation of the random module\n\"\"\"\n\n__author__ = \"Taro Sekiyama\"\n__copyright__ = \"(C) Copyright IBM Corp. 2016\"\n\n\nimport numpy.random as r\nimport cupy as cp\n\n\ndef _to_gpu(a):\n arr = cp.empty_like(a)\n arr.set(a)\n return arr\n\n\nclass RandomState:\n def __i... | [
[
"numpy.random.random",
"numpy.random.normal",
"numpy.random.randn",
"numpy.random.rand",
"numpy.random.uniform",
"numpy.random.RandomState"
]
] |
mosvlad/tumor_mask_rcnn | [
"16d6b20431553e6e1cf1594686a1f503171d5f8d"
] | [
"inference_2.py"
] | [
"import os\nimport cv2\nimport sys\nimport random\nimport math\nimport re\nimport time\nimport numpy as np\nimport tensorflow as tf\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nimport skimage\nimport glob\n\nROOT_DIR = os.getcwd()\n\nsys.path.append(ROOT_DIR)\nfrom Mask... | [
[
"tensorflow.device",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
huxian123/mask_detecting | [
"a9564d595edaff9317378fbe682cad4400760bff"
] | [
"yolo.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nClass definition of YOLO_v3 style detection model on image and video\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nfrom PIL... | [
[
"numpy.expand_dims",
"numpy.random.seed",
"numpy.asarray",
"numpy.random.shuffle",
"numpy.floor",
"numpy.array"
]
] |
ParhamYZ/MusicSourceSeparation | [
"26a42fbebdf50d2ae2ef674ef64f4c88cbe7e8e3"
] | [
"tests/test_transforms.py"
] | [
"import pytest\r\nimport numpy as np\r\nimport torch\r\nfrom openunmix import transforms\r\n\r\n\r\n@pytest.fixture(params=[4096, 44100])\r\ndef nb_timesteps(request):\r\n return int(request.param)\r\n\r\n\r\n@pytest.fixture(params=[1, 2])\r\ndef nb_channels(request):\r\n return request.param\r\n\r\n\r\n@pyte... | [
[
"torch.rand"
]
] |
CsabaWirnhardt/cbm | [
"1822addd72881057af34ac6a7c2a1f02ea511225",
"1822addd72881057af34ac6a7c2a1f02ea511225",
"1822addd72881057af34ac6a7c2a1f02ea511225"
] | [
"scripts/extraction/postgisC6Extract.py",
"cbm/datas/api.py",
"cbm/extract/pgS1bsExtract.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# This file is part of CbM (https://github.com/ec-jrc/cbm).\n# Author : Guido Lemoine\n# Credits : GTCAP Team\n# Copyright : 2021 European Commission, Joint Research Centre\n# License : 3-Clause BSD\n# Version : \n\nimport time\nimport sys\nimport os\nimp... | [
[
"pandas.DataFrame"
],
[
"pandas.read_json"
],
[
"pandas.DataFrame"
]
] |
sabuj7177/CovidProject | [
"b4b7bcfa5ace165520507f489dc74da7b695e2f0",
"b4b7bcfa5ace165520507f489dc74da7b695e2f0",
"b4b7bcfa5ace165520507f489dc74da7b695e2f0"
] | [
"coronet/main2_worker_gradient_quantization.py",
"coronet/util_tf_v2_migrated.py",
"coronet/main2_worker_gradient_quantization_with_gps.py"
] | [
"import time\n\nfrom numpy.random import seed\nseed(8) #1\n\nimport tensorflow\ntensorflow.random.set_seed(7)\n# tensorflow.random.set_random_seed(7)\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport os\n\nfrom tensorflow.keras import backend as... | [
[
"matplotlib.pyplot.legend",
"tensorflow.keras.losses.CategoricalCrossentropy",
"tensorflow.python.keras.layers.Flatten",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"numpy.random.seed",
"tensorflow.python.keras.layers.Dense",
"tensorflow.python.keras.models.Sequential",
... |
mumumu99/latent-pose-reenactment | [
"bfe8175f9cf3d67d46c21194bb5b6f898ef3ea53"
] | [
"embedders/FAb-Net/Datasets/generate_large_voxceleb.py"
] | [
"\nimport os\n\nids = [d for d in os.listdir(VOX_CELEB_LOCATION) if d[0:2] == 'id']\n\n\ntrain = ids[0:int(0.7*len(ids))]\nval = ids[int(0.7*len(ids)):int(0.8*len(ids))]\ntest = ids[int(0.8*len(ids)):]\n\nimport numpy as np\nnp.save('./large_voxceleb/train.npy', np.array(train))\nnp.save('./large_voxceleb/test.npy'... | [
[
"numpy.array"
]
] |
aaryapatel007/Hippocampal-Volume-Quantification-in-Alzheimer-Progression | [
"5c9eff98572c1d2647a742d285805d9e328ab14f"
] | [
"train model/src/inference/UNetInferenceAgent.py"
] | [
"\"\"\"\nContains class that runs inferencing\n\"\"\"\nimport torch\nimport numpy as np\n\nfrom networks.RecursiveUNet import UNet\n\nfrom utils.utils import med_reshape\n\nclass UNetInferenceAgent:\n \"\"\"\n Stores model and parameters and some methods to handle inferencing\n \"\"\"\n def __init__(sel... | [
[
"torch.argmax",
"torch.from_numpy",
"torch.load"
]
] |
cv-hci-project/PyTorch-VAE | [
"e9b9d122eb52f76e096942b300a8db97a123be13"
] | [
"models/base.py"
] | [
"from abc import abstractmethod\n\nimport matplotlib.pyplot as plt\nimport pytorch_lightning as pl\nimport torch\nimport torchvision.utils as vutils\nfrom torch import optim\nfrom torch.utils.data import DataLoader\nfrom torchvision import transforms\nfrom torchvision.datasets import CelebA\n\nfrom datasets.concret... | [
[
"matplotlib.pyplot.title",
"torch.utils.data.DataLoader",
"torch.optim.lr_scheduler.ExponentialLR",
"torch.stack",
"matplotlib.pyplot.show"
]
] |
hwsamuel/modin | [
"4d0a3155b31104ac8083b223bd71ff3e541ecd92",
"4d0a3155b31104ac8083b223bd71ff3e541ecd92",
"4d0a3155b31104ac8083b223bd71ff3e541ecd92"
] | [
"modin/pandas/datetimes.py",
"modin/engines/base/io/text/json_reader.py",
"modin/engines/base/frame/axis_partition.py"
] | [
"# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you... | [
[
"pandas.to_datetime"
],
[
"numpy.array",
"pandas.Series",
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.Series"
]
] |
souradip93/GCDT | [
"5991044307f59598ea224b64f1f3b915fa00ebcc"
] | [
"thumt/bin/trainer.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2018 The THUMT Authors\n\nimport argparse\nimport os\nimport numpy as np\nimport tensorflow as tf\nimport thumt.data.dataset as dataset\nimport thumt.data.record as record\nimport thumt.data.vocab as vocabulary\nimport thumt.models as models\nimport thumt.utils.ho... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.control_dependencies",
"tensorflow.gfile.Exists",
"tensorflow.gfile.MkDir",
"tensorflow.minimum",
"tensorflow.train.AdamOptimizer",
"tensorflow.to_int32",
"tensorflow.train.MonitoredTrainingSession",
"tensorflow.add_n",
"tensorflo... |
craft-ai/craft-ai-client-python | [
"3d8b3d9a49c0c70964deaeb9645130dd54f9a0b3"
] | [
"tests/test_pandas_get_generator_operations.py"
] | [
"import unittest\n\nfrom craft_ai.pandas import CRAFTAI_PANDAS_ENABLED\n\nif CRAFTAI_PANDAS_ENABLED:\n import copy\n import pandas as pd\n\n import craft_ai.pandas\n\n from .data import pandas_valid_data\n from .utils import generate_entity_id\n from . import settings\n\n AGENT_ID_1_BASE = \"te... | [
[
"pandas.Timestamp"
]
] |
grybd/oneflow | [
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e69",
"82237ad096a10527591660c09b61444c42917e6... | [
"python/oneflow/test/modules/test_view.py",
"python/oneflow/test/modules/test_randn.py",
"python/oneflow/test/graph/test_graph_optim_sgd.py",
"python/oneflow/test/modules/test_convtranspose.py",
"python/oneflow/test/modules/test_meshgrid.py",
"python/oneflow/test/modules/test_replicationpad2d.py",
"pyth... | [
"\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\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 ap... | [
[
"numpy.array",
"numpy.array_equal"
],
[
"numpy.ones"
],
[
"numpy.random.uniform",
"numpy.zeros_like",
"numpy.allclose"
],
[
"numpy.array",
"numpy.ones"
],
[
"numpy.array"
],
[
"numpy.random.random",
"numpy.zeros",
"numpy.pad",
"numpy.ones"
... |
papanisaicharan/Scalable-energy-efficient-scheme-on-mobile-nodes | [
"43f8d9c82b603c33803ee5d07f056eaeabdaf530"
] | [
"SEES_CODE/hybrid_placement.py"
] | [
"\"\"\" \r\n\r\nThis is a hybrid placement algorithm(offline mode)\r\n\"\"\"\r\n\r\nfrom sympy.solvers import solve\r\nfrom sympy import Symbol\r\n#this is testing plot\r\nfrom matplotlib import pyplot as plt\r\nfrom matplotlib.ticker import MultipleLocator\r\nimport numpy as np\r\nimport math\r\nimport random\r\ni... | [
[
"matplotlib.ticker.MultipleLocator",
"matplotlib.pyplot.show",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.figure"
]
] |
jthhk/Binance-volatility-trading-bot | [
"d815716d2161c5d07cea0506049d73450bd5ef5b"
] | [
"strategies/vyacheslav_signalbuy_VolScan.py"
] | [
"# VolScan is a Binance Volatility Bot(BVT Bot)\n# compatible module that generates crypto buying signals based upon negative price change & volatility.\n# It does this in two different ways,\n# the main one being by calculating the aggregate price change within a user defined period,\n# the second way being by use... | [
[
"numpy.array"
]
] |
MSLars/allennlp | [
"2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475",
"2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475",
"2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475",
"2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475",
"2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475"
] | [
"tests/modules/seq2seq_encoders/gated_cnn_encoder_test.py",
"tests/modules/seq2vec_encoders/pytorch_seq2vec_wrapper_test.py",
"allennlp/modules/maxout.py",
"tests/modules/transformer/transformer_embeddings_test.py",
"tests/commands/evaluate_test.py"
] | [
"import torch\n\nfrom allennlp.common.testing import AllenNlpTestCase\nfrom allennlp.modules.seq2seq_encoders.gated_cnn_encoder import GatedCnnEncoder\n\n\nclass TestGatedCnnEncoder(AllenNlpTestCase):\n def test_gated_cnn_encoder(self):\n cnn_encoder = GatedCnnEncoder(\n input_dim=32,\n ... | [
[
"torch.ones",
"torch.rand"
],
[
"torch.ones",
"torch.nn.LSTM",
"torch.randn",
"torch.FloatTensor",
"torch.rand"
],
[
"torch.nn.Dropout",
"torch.nn.Linear",
"torch.nn.ModuleList"
],
[
"torch.nn.Dropout",
"torch.testing.assert_allclose",
"torch.zeros",... |
Guangrui-best/ML_from_scratch | [
"afbdfb7046544bd5639a2b73fa4fe711b4c86593",
"afbdfb7046544bd5639a2b73fa4fe711b4c86593"
] | [
"mlfromscratch/lda.py",
"mlfromscratch/lda_tests.py"
] | [
"import numpy as np\n\nclass LDA:\n\n def __init__(self, n_components):\n self.n_components = n_components\n self.linear_discriminants = None\n\n def fit(self, X, y):\n n_features = X.shape[1]\n class_labels = np.unique(y)\n\n # Within class scatter matrix:\n # SW = s... | [
[
"numpy.dot",
"numpy.unique",
"numpy.linalg.inv",
"numpy.linalg.eig",
"numpy.mean",
"numpy.zeros"
],
[
"matplotlib.pyplot.cm.get_cmap",
"sklearn.datasets.load_iris",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.p... |
elcronos/adversarial_genattack | [
"b86b07a938a6aef54a41891fc2de3feeaa8e03aa"
] | [
"main.py"
] | [
"\"\"\"\nAuthor: Moustafa Alzantot (malzantot@ucla.edu)\n\n\"\"\"\nimport time\nimport os\nimport sys\nimport random\nimport numpy as np\n\nimport tensorflow as tf \nfrom setup_inception import ImageNet, InceptionModel\n\nimport utils\nfrom genattack_tf2 import GenAttack2\n\nflags = tf.app.flags\nflags.DEFINE_str... | [
[
"numpy.argmax",
"tensorflow.placeholder",
"tensorflow.Session"
]
] |
sanowar-raihan/nerf-meta | [
"dbb97431b613acb3dfdc7075344c6e1fd1b6cf51"
] | [
"shapenet_train.py"
] | [
"import argparse\nimport json\nimport copy\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\nfrom datasets.shapenet import build_shapenet\nfrom models.nerf import build_nerf\nfrom models.rendering import get_rays_shapenet, sample_points, volume_render\n\n\ndef inner_loop(model... | [
[
"torch.randint",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.nn.functional.mse_loss",
"torch.no_grad",
"torch.cuda.is_available",
"torch.split",
"torch.stack",
"torch.log10"
]
] |
cxxixi/Online-opinions-on-weibo | [
"ae4586b8b42d166c9a2386319891a04d390585fb"
] | [
"plot/event1/comment_concat.py"
] | [
"import pandas as pd\n\ncsv1 = pd.read_csv('D:\\my_documents\\competition\\government\\Report\\event1\\\\500-593.csv',header=None)\ncsv2 = pd.read_csv('D:\\my_documents\\competition\\government\\Report\\event1\\\\comment594.csv',header=None)\ncsv3 = pd.read_csv('D:\\my_documents\\competition\\government\\Report\\ev... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
donalrinho/zfit | [
"9769ef7d56a6be9a5d438e47b80ea5a8f772bc24",
"9769ef7d56a6be9a5d438e47b80ea5a8f772bc24"
] | [
"examples/custom_pdf_advanced.py",
"tests/test_fitresult.py"
] | [
"# Copyright (c) 2021 zfit\n\nimport tensorflow as tf\n\nimport zfit\nfrom zfit import z\n\n\nclass CustomPDF2D(zfit.pdf.BasePDF):\n \"\"\"My custom, 2 dimensional pdf. The axes are: Energy, Momentum.\n\n \"\"\"\n\n def __init__(self, param1, param2, param3, obs, name=\"CustomPDF\", ):\n # we can n... | [
[
"numpy.array",
"tensorflow.cos",
"tensorflow.math.log"
],
[
"numpy.diag",
"numpy.random.normal",
"numpy.sqrt",
"numpy.testing.assert_allclose"
]
] |
jiaojiao1234/RISE | [
"fd85aa6e475534a74faab5c4644c63dc0c01d236",
"fd85aa6e475534a74faab5c4644c63dc0c01d236",
"fd85aa6e475534a74faab5c4644c63dc0c01d236"
] | [
"Jupyter/UDO_Free/RP/test_start.py",
"Jupyter/WiAG_O_test/L5/test_start.py",
"Jupyter/WiG_test/S2/test_start.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jun 8 22:09:47 2021\n\n@author: Apple\n\"\"\"\ndef start():\n import numpy as np\n import scipy.io as sio\n import sklearn.ensemble\n from sklearn import svm\n from sklearn.model_selection import StratifiedKFold\n from sklearn.metrics import confus... | [
[
"sklearn.naive_bayes.GaussianNB",
"sklearn.linear_model.LogisticRegression",
"sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis",
"scipy.io.loadmat",
"sklearn.metrics.confusion_matrix",
"sklearn.discriminant_analysis.LinearDiscriminantAnalysis",
"sklearn.neighbors.KNeighborsC... |
DREAMS-lab/mask_rcnn_pytorch | [
"1fcc8489758aa4673c29a32a2413f7f86742414f"
] | [
"rock_c3.py"
] | [
"\"\"\"\nrock.py\nZhiang Chen, Feb 2020\ndata class for mask rcnn\n\"\"\"\n\nimport os\nimport numpy as np\nimport torch\nfrom PIL import Image\nimport pickle\nimport matplotlib.pyplot as plt\n\n\"\"\"\n./datasets/\n Rock/\n data/\n 0_8.npy\n 0_9.npy\n 1_4.npy\n ... | [
[
"numpy.expand_dims",
"numpy.ones_like",
"torch.zeros",
"numpy.min",
"torch.tensor",
"numpy.ones",
"numpy.max",
"numpy.append",
"numpy.std",
"numpy.mean",
"numpy.load",
"numpy.where",
"numpy.empty",
"torch.as_tensor"
]
] |
shantanusharma/keras | [
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938",
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938",
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938",
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938",
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938",
"662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938"
] | [
"keras/engine/sequential.py",
"keras/saving/saved_model/utils.py",
"keras/distribute/saved_model_mixed_api_test.py",
"keras/layers/multi_head_attention.py",
"keras/utils/tf_utils_test.py",
"keras/layers/preprocessing/normalization.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v2.nest.map_structure",
"tensorflow.compat.v2.compat.v1.executing_eagerly_outside_functions",
"tensorflow.python.platform.tf_logging.warning",
"tensorflow.compat.v2.init_scope",
"tensorflow.compat.v2.is_tensor",
"tensorflow.python.util.tf_export.keras_export",
"tenso... |
mehdijj/ppd | [
"9e7626a47886d9d2016873d722f97a930e96540d"
] | [
"utils.py"
] | [
"import numpy as np\r\nimport Augmentor\r\nimport os\r\n\r\n\r\ndef _permute_index(l, seed):\r\n \"\"\"\r\n Creates a permutation of np.array([0, ..., l-1]) and its inverse\r\n :param l: length of the array to permute\r\n :param seed: permutation seed\r\n :return: (s, s_inverse) where s is permutatio... | [
[
"numpy.expand_dims",
"pandas.DataFrame",
"numpy.fft.fftshift",
"numpy.concatenate",
"numpy.mean",
"numpy.exp",
"numpy.random.randint",
"pandas.read_csv",
"numpy.arange",
"numpy.random.set_state",
"numpy.fft.ifftshift",
"numpy.load",
"numpy.zeros",
"numpy.fft... |
HERA-Team/vis_cpu | [
"32de2318efd6690e4a8c6c64aad5eae6f429b10a"
] | [
"tests/test_plot.py"
] | [
"\"\"\"Compare vis_cpu with pyuvsim visibilities.\"\"\"\nimport numpy as np\nfrom pyuvsim.analyticbeam import AnalyticBeam\n\nfrom vis_cpu import conversions, plot\n\nnsource = 10\n\n\ndef test_source_az_za_beam():\n \"\"\"Test function that calculates the Az and ZA positions of sources.\"\"\"\n # Observation... | [
[
"numpy.random.random",
"numpy.isfinite",
"numpy.linspace",
"numpy.deg2rad",
"numpy.random.uniform"
]
] |
LBJ-Wade/bilby | [
"b1e02f1dfae03d4939cae9c95eff300c22919689",
"b1e02f1dfae03d4939cae9c95eff300c22919689",
"b1e02f1dfae03d4939cae9c95eff300c22919689",
"b1e02f1dfae03d4939cae9c95eff300c22919689"
] | [
"bilby/gw/source.py",
"examples/gw_examples/injection_examples/create_your_own_source_model.py",
"bilby/core/prior/analytical.py",
"test/bilby_mcmc/test_proposals.py"
] | [
"import numpy as np\n\nfrom ..core import utils\nfrom ..core.utils import logger\nfrom .conversion import bilby_to_lalsimulation_spins\nfrom .utils import (lalsim_GetApproximantFromString,\n lalsim_SimInspiralFD,\n lalsim_SimInspiralChooseFDWaveform,\n lalsim... | [
[
"numpy.exp",
"numpy.zeros_like",
"numpy.sqrt",
"numpy.loadtxt"
],
[
"numpy.exp",
"numpy.sqrt"
],
[
"scipy.special._ufuncs.log1p",
"numpy.minimum",
"numpy.sqrt",
"numpy.arctan",
"scipy.special.erfinv",
"numpy.nan_to_num",
"scipy.special._ufuncs.xlogy",
... |
ajclaros/rl_legged_walker | [
"26d0e124ef38045943449c2772b966571117683b",
"26d0e124ef38045943449c2772b966571117683b",
"26d0e124ef38045943449c2772b966571117683b",
"26d0e124ef38045943449c2772b966571117683b"
] | [
"vis/plot_2d_neural_outputs.py",
"andrew/generategenomes.py",
"jason/xp_figure2_msc.py",
"andrew/evoandlearning.py"
] | [
"\nfrom jason.ctrnn import CTRNN\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\nimport random\nimport sys\nimport json\nimport os\nimport math\nfrom util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match\n\n\ndef main():\n trial_seed=1\... | [
[
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"numpy.zeros"
],
[
"numpy.load"
],
[
"numpy.sum"
],
[
"numpy.seterr",
"numpy.arange",
"numpy.zeros",
"matplotlib.cm.get_cmap"
]
] |
RaphaelMeudec/tf-explain | [
"1a75841762985e55abe19107d09279f68f5731c8"
] | [
"examples/callbacks/mnist.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport tf_explain\n\nINPUT_SHAPE = (28, 28, 1)\nNUM_CLASSES = 10\n\nAVAILABLE_DATASETS = {\n 'mnist': tf.keras.datasets.mnist,\n 'fashion_mnist': tf.keras.datasets.fashion_mnist,\n}\nDATASET_NAME = 'fashion_mnist' # Choose between \"mnist\" and \"fashion_mnist\"\... | [
[
"tensorflow.keras.Input",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Dropout",
"numpy.array",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.utils.to_categorica... |
SanjayMarreddi/GameInShape | [
"64d64c2cb7bc472c3319b949f6f0b6b67ea15910"
] | [
"Web_App/GesturePredictor.py"
] | [
"# Importing relevant libraries\r\nimport cv2\r\nimport imutils\r\nimport tflearn\r\nimport numpy as np\r\nfrom PIL import Image\r\nimport tensorflow as tf\r\n\r\nfrom tensorflow.python.framework import ops\r\nfrom tflearn.layers.estimator import regression\r\nfrom tflearn.layers.conv import conv_2d, max_pool_2d\r\... | [
[
"numpy.amax",
"numpy.argmax",
"tensorflow.python.framework.ops.reset_default_graph"
]
] |
int-brain-lab/ibllib | [
"93be6b98848758e05cdc9398caaf19e6a68f7386",
"93be6b98848758e05cdc9398caaf19e6a68f7386"
] | [
"brainbox/plot.py",
"ibllib/io/extractors/base.py"
] | [
"\"\"\"\nPlots metrics that assess quality of single units. Some functions here generate plots for the\noutput of functions in the brainbox `single_units.py` module.\n\nRun the following to set-up the workspace to run the docstring examples:\n>>> from brainbox import processing\n>>> import alf.io as aio\n>>> import... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.Figure",
"numpy.asarray",
"numpy.max",
"numpy.mean",
"numpy.zeros_like",
"numpy.where",
"numpy.divide",
"matplotlib.pyplot.gca",
"numpy.unique",
"numpy.reshape",
"numpy.arange",
"numpy.ceil",
"numpy.std",
"n... |
jdvelasq/techMiner | [
"c611d96d2f812b0890513514d9d19787a1edfe2d",
"c611d96d2f812b0890513514d9d19787a1edfe2d",
"c611d96d2f812b0890513514d9d19787a1edfe2d"
] | [
"techminer/core/normalize_network.py",
"techminer/gui/correlation_analysis.py",
"techminer/plots/bubble_plot.py"
] | [
"import numpy as np\n\n\ndef normalize_network(X, normalization=None):\n \"\"\"\n \"\"\"\n X = X.copy()\n\n if isinstance(normalization, str) and normalization == \"None\":\n normalization = None\n\n if normalization is None:\n X = X.applymap(lambda w: int(w))\n else:\n X = X.... | [
[
"numpy.log",
"numpy.sqrt"
],
[
"pandas.read_csv",
"matplotlib.pyplot.cm.get_cmap",
"pandas.DataFrame"
],
[
"matplotlib.pyplot.cm.get_cmap",
"matplotlib.pyplot.Figure",
"matplotlib.rc"
]
] |
botmatic/tacotron2 | [
"c2dee4930f6bd1cf707e0565fd0675b8646a51a1"
] | [
"parallel_wavenet_vocoder/tests/test_mixture.py"
] | [
"# coding: utf-8\nfrom __future__ import with_statement, print_function, absolute_import\n\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nimport librosa\nimport pysptk\n\nfrom wavenet_vocoder.mixture import discretized_mix_logistic_loss\nfrom wavenet_vocoder.mixture... | [
[
"torch.sigmoid",
"numpy.allclose",
"numpy.random.seed",
"torch.max",
"torch.nn.functional.log_softmax",
"torch.from_numpy",
"torch.exp",
"torch.rand",
"torch.nn.functional.softplus"
]
] |
jjbrophy47/tree_deletion | [
"97041d129da335de3018b3243bc81943088abf24",
"97041d129da335de3018b3243bc81943088abf24",
"97041d129da335de3018b3243bc81943088abf24"
] | [
"scripts/experiments/roar.py",
"scripts/postprocess/roar.py",
"scripts/experiments/performance.py"
] | [
"\"\"\"\nRemove and Retrain (ROAR) experiment.\n\"\"\"\nimport os\nimport sys\nimport time\nimport argparse\nfrom datetime import datetime\n\nimport numpy as np\n\nhere = os.path.abspath(os.path.dirname(__file__))\nsys.path.insert(0, here + '/../../')\nsys.path.insert(0, here + '/../')\nimport dare\nfrom utility im... | [
[
"numpy.random.seed",
"numpy.random.choice",
"numpy.unique",
"numpy.arange",
"numpy.delete",
"numpy.argsort",
"numpy.random.randint"
],
[
"numpy.load",
"scipy.stats.sem",
"numpy.mean",
"pandas.DataFrame"
],
[
"sklearn.model_selection.GridSearchCV",
"sklea... |
iostermann/deeplab2 | [
"e0f7eecfac5d35c3e9e66f061098d5f5f15a7152",
"e0f7eecfac5d35c3e9e66f061098d5f5f15a7152",
"e0f7eecfac5d35c3e9e66f061098d5f5f15a7152",
"e0f7eecfac5d35c3e9e66f061098d5f5f15a7152"
] | [
"data/dataset_utils_test.py",
"data/preprocessing/input_preprocessing.py",
"evaluation/test_utils.py",
"model/decoder/panoptic_deeplab_test.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Deeplab2 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... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.range",
"tensorflow.test.main",
"tensorflow.math.greater_equal",
"tensorflow.where",
"numpy.random.randint"
],
[
"tensorflow.assert_greater",
"tensorflow.TensorShape",
"tensorflow.concat",
"tensorflow.control_dependencies",
... |
jwfromm/relax | [
"f120282007778706199243ee88b50697c2b9550c",
"f120282007778706199243ee88b50697c2b9550c"
] | [
"python/tvm/relay/frontend/pytorch.py",
"tests/python/contrib/test_cmsisnn/test_pooling.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"torch.zeros",
"torch._C._jit_pass_onnx_function_substitution",
"numpy.float16",
"numpy.int32",
"numpy.int8",
"numpy.uint8",
"torch._C._jit_pass_inline",
"numpy.finfo",
"numpy.ones",
"numpy.int64",
"numpy.int16",
"numpy.float64",
"numpy.isscalar",
"numpy.flo... |
alexandresalvatierra/python-data-preprocessing | [
"48c3f465db0b5b5785d217d0f8c9524bb3980c48"
] | [
"missing-data-one-hot-encoding.py"
] | [
"import pandas as pd\npd.set_option( 'display.max_columns', 24 )\n\nfile_path = 'C:/Users/profAlexandre/Desktop/inteligencia artificial/data-preprocessing/dataset/'\nfile_name = 'traffic-collision-data-from-2010-to-present.csv'\n\ndf = pd.read_csv( file_path + file_name )\n\n# show head from dataset\n#print( df.hea... | [
[
"pandas.set_option",
"pandas.read_csv",
"pandas.concat",
"pandas.get_dummies"
]
] |
giprayogo/binyard | [
"c1cfa880cb9907416da2363fa0e4ca2de920543e"
] | [
"binyard/plot_column.py"
] | [
"#!/usr/bin/env python\n# for all to often task: text data file, plot single column\n\nimport matplotlib\nmatplotlib.rc('axes.formatter', useoffset=False)\nimport matplotlib.pyplot as plt\nimport argparse\nfrom numpy import arange\nfrom numpy import loadtxt\nfrom numpy import transpose\n\nparser = argparse.Argument... | [
[
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.rc",
"matplotlib.pyplot.show",
"numpy.loadtxt"
]
] |
c-hydro/hmc | [
"66470234e126e4a727e1faf2fe64bd58547220ed"
] | [
"tools/processing_tool_ensemble_maker/lib_utils_time.py"
] | [
"\"\"\"\nLibrary Features:\n\nName: lib_utils_time\nAuthor(s): Fabio Delogu (fabio.delogu@cimafoundation.org)\nDate: '20211208'\nVersion: '1.0.0'\n\"\"\"\n\n#######################################################################################\n# Libraries\nimport logging\nimport pandas... | [
[
"pandas.Timestamp",
"pandas.DatetimeIndex",
"pandas.date_range"
]
] |
JurriaanBerger/AdventOfCode2021 | [
"666d9b36d87bfaec3da8b700832bf0a5791b840a"
] | [
"day11/flash.py"
] | [
"import numpy as np\n\n\ndef read_octo():\n octo_map = []\n\n file = open('octo.txt', \"r\")\n f1 = file.read()\n file.close()\n\n f2 = f1.split(\"\\n\")\n\n for h in f2:\n list_h = []\n list_h[:0] = h\n octo_map.append([int(l) for l in list_h])\n\n return np.array(octo_map... | [
[
"numpy.array",
"numpy.sum"
]
] |
7D24H/testGPU | [
"d9341e1a60d51c895c7e5090990bc13920ba7257"
] | [
"ops.py"
] | [
"\nfrom glob import glob\nimport os\nimport tensorflow as tf\nimport numpy as np\nimport cv2\n\n\ndef block_patch(input, patch_size=15, margin=5):\n\tshape = input.get_shape().as_list()\n\n\t#create patch in random size\n\tpad_size = tf.random_uniform([2], minval=int(patch_size*0.1), maxval=patch_size, dtype=tf.int... | [
[
"tensorflow.image.central_crop",
"tensorflow.multiply",
"numpy.sqrt",
"tensorflow.train.match_filenames_once",
"tensorflow.zeros",
"tensorflow.WholeFileReader",
"tensorflow.image.resize_images",
"tensorflow.reshape",
"tensorflow.pad",
"tensorflow.image.convert_image_dtype",... |
Lakoc/SFC_project | [
"00b98f0d9651138c30f567ae4775a624e511a392"
] | [
"gui/utils.py"
] | [
"import numpy as np\n\n\ndef remove_values_from_list(the_list, val):\n return [value for value in the_list if value != val]\n\n\ndef remove_values_from_list_to_float(the_list, val):\n return [float(value) for value in the_list if value != val]\n\n\ndef load_3d_arr_from_string(arr):\n arr = arr.replace('[',... | [
[
"numpy.array"
]
] |
ASMDS/PATREC | [
"091df6ec20e0736340a2b2ff9a25ac81bec48259"
] | [
"utils/Dataset.py"
] | [
"\nimport pandas as pd\nimport numpy as np\nfrom utils.DatasetFilter import DatasetFilter\nfrom utils.DatasetSplitter import DatasetSplitter\n\n\nclass Dataset:\n \n def __init__(self, dataset_options):\n self.options = dataset_options;\n self.df = None;\n self.columns_df = None;\n ... | [
[
"pandas.read_csv",
"numpy.min"
]
] |
shiningsunnyday/ssd_keras | [
"3a2ea0ceaa676f59b1787ad5f5e8337520c7c056",
"3a2ea0ceaa676f59b1787ad5f5e8337520c7c056"
] | [
"data_generator/object_detection_2d_data_generator_custom.py",
"misc_utils/sample_new_model.py"
] | [
"'''\nA data generator for 2D object detection.\n\nCopyright (C) 2018 Pierluigi Ferrari\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\n... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.stack",
"numpy.concatenate",
"numpy.any",
"numpy.random.uniform",
"numpy.array"
],
[
"numpy.concatenate",
"numpy.array"
]
] |
Yeachan-Heo/ray | [
"a73c488c74b1e01da3961db2eb538c43c29753f5",
"a73c488c74b1e01da3961db2eb538c43c29753f5",
"a73c488c74b1e01da3961db2eb538c43c29753f5",
"a73c488c74b1e01da3961db2eb538c43c29753f5"
] | [
"rllib/agents/dqn/dqn_torch_model.py",
"python/ray/serve/master.py",
"rllib/tests/test_rollout_worker.py",
"python/ray/parameter.py"
] | [
"import numpy as np\n\nfrom ray.rllib.models.torch.torch_modelv2 import TorchModelV2\nfrom ray.rllib.utils import try_import_torch\n\ntorch, nn = try_import_torch()\n\n\nclass DQNTorchModel(TorchModelV2):\n \"\"\"Extension of standard TorchModelV2 to provide dueling-Q functionality.\n \"\"\"\n\n def __init... | [
[
"numpy.zeros"
],
[
"numpy.isclose"
],
[
"numpy.argmax",
"numpy.zeros_like",
"numpy.mean"
],
[
"numpy.__version__.split"
]
] |
huynhngoc/deoxys | [
"b2e9936b723807e129fda36d8d6131ca00db558f",
"b2e9936b723807e129fda36d8d6131ca00db558f"
] | [
"src/deoxys/experiment/postprocessor.py",
"src/deoxys/model/callbacks.py"
] | [
"from ..loaders import load_data\nfrom ..utils import load_json_config\n\n\nfrom deoxys_image.patch_sliding import get_patch_indice\nfrom deoxys_vis import read_csv\n\nimport numpy as np\nimport h5py\nimport pandas as pd\nimport os\nfrom time import time\nimport shutil\nimport matplotlib.pyplot as plt\nimport warni... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"pandas.read_csv",
"numpy.expand_dims",
"matplotlib.pyplot.title",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.concatenate",
"numpy.ones",
"numpy.where",
"matplotlib.pyplot.close",
"numpy.zeros",
"... |
jimilee/image-classification | [
"abd07abbbf3ed2e38bb7fda6f4bfeb28dd7ffaae"
] | [
"utils/losses.py"
] | [
"from torch import nn, Tensor\nfrom typing import Union\nfrom torch.nn import CrossEntropyLoss\n\n\nclass LabelSmoothCrossEntropy(nn.Module):\n def __init__(self, smoothing=0.1):\n super().__init__()\n assert smoothing < 1.0\n self.smoothing = smoothing\n self.confidence = 1. - smooth... | [
[
"torch.nn.Softmax",
"torch.nn.CrossEntropyLoss",
"torch.nn.LogSoftmax",
"torch.nn.KLDivLoss"
]
] |
kasoju2712/Science_of_success | [
"fbaa92a8d035f7869162bf45338fc9e174492b98"
] | [
"bibmatch/parse_wos.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\nimport os\nimport numpy as np\nimport pandas as pd\nfrom bibmatch.authorclass import author\n\ndef adf2author(aid, adf):\n author_dict = {}\n author_dict['all_names'] = set(adf['FullName'])\n author_dict['prefered_name'] = sorted(author_dict['all_names'], key = len)... | [
[
"pandas.read_hdf",
"pandas.concat",
"numpy.searchsorted"
]
] |
lynnmunday/neml | [
"2c0e3db9f849345dba01d64fc8488e2b97e477dd"
] | [
"test/test_sliprules.py"
] | [
"#!/usr/bin/env python3\n\nfrom neml import history, interpolate\nfrom neml.math import tensors, rotations\nfrom neml.cp import crystallography, slipharden, sliprules\n\nfrom common import differentiate\nfrom nicediff import *\n\nimport unittest\nimport numpy as np\nimport numpy.linalg as la\n\nclass CommonSlipRule... | [
[
"numpy.array",
"numpy.abs",
"numpy.isclose"
]
] |
hrk7531/scipy | [
"a62bf66b2a485fbb3e08fe52feecaca765bead1f"
] | [
"scipy/optimize/_linprog_util.py"
] | [
"\"\"\"\nMethod agnostic utility functions for linear progamming\n\"\"\"\n\nimport numpy as np\nimport scipy.sparse as sps\nfrom warnings import warn\nfrom .optimize import OptimizeWarning\nfrom scipy.optimize._remove_redundancy import (\n _remove_redundancy, _remove_redundancy_sparse, _remove_redundancy_dense\n... | [
[
"numpy.sqrt",
"numpy.linalg.matrix_rank",
"scipy.optimize._remove_redundancy._remove_redundancy_sparse",
"numpy.all",
"numpy.concatenate",
"numpy.any",
"scipy.sparse.vstack",
"scipy.optimize._remove_redundancy._remove_redundancy_dense",
"numpy.hstack",
"scipy.sparse.coo_mat... |
Francis777/agents | [
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719d",
"24e878a697be418307cfbff69724d86be767719... | [
"tf_agents/networks/nest_map_test.py",
"tf_agents/bandits/environments/random_bandit_environment_test.py",
"tf_agents/agents/qtopt/qtopt_agent_test.py",
"tf_agents/policies/py_tf_policy.py",
"tf_agents/bandits/policies/boltzmann_reward_prediction_policy.py",
"tf_agents/replay_buffers/table_test.py",
"tf... | [
"# coding=utf-8\n# Copyright 2020 The TF-Agents 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
[
"tensorflow.compat.v2.nest.map_structure",
"tensorflow.compat.v2.keras.layers.Dense",
"tensorflow.compat.v2.ones",
"tensorflow.compat.v2.keras.layers.LSTM",
"tensorflow.compat.v2.keras.layers.Add",
"tensorflow.compat.v2.nest.flatten",
"tensorflow.compat.v2.TensorShape",
"tensorflow... |
ozen/pytorch-lightning | [
"3b0b402d30fa19e0fef7d150c30ff4bb14a64230",
"3b0b402d30fa19e0fef7d150c30ff4bb14a64230",
"3b0b402d30fa19e0fef7d150c30ff4bb14a64230"
] | [
"pytorch_lightning/accelerators/ddp_spawn_backend.py",
"pytorch_lightning/accelerators/ddp_backend.py",
"pytorch_lightning/accelerators/base_backend.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.cuda.set_device",
"torch.multiprocessing.spawn",
"torch.distributed.is_initialized",
"torch.cuda.empty_cache",
"torch.distributed.barrier",
"torch.cuda.amp.autocast",
"torch.multiprocessing.get_context",
"torch.distributed.all_reduce"
],
[
"torch.cuda.set_device",
... |
xta0/Python-Playground | [
"513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc",
"513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc",
"513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc"
] | [
"dl/pytorch/rnn/char-lstm.py",
"dl/pytorch/torchscript/intro.py",
"trade/hello_world/dataframe.py"
] | [
"import numpy as np\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\n# open text file and read in data as `text`\nwith open('data/anna.txt', 'r') as f:\n text = f.read()\n\n# print(text[:100])\n\n# encode the text and map each character to an integer and vice versa\n\n# we create two dicti... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.Dropout",
"torch.nn.functional.softmax",
"numpy.multiply",
"torch.load",
"numpy.arange",
"torch.from_numpy",
"numpy.zeros_like",
"numpy.mean",
"torch.cuda.is_available",
"numpy.array",
"torch.save"
],
[
"torch.jit.scrip... |
diana-hep/shredtypes | [
"bb7c17eea849f8934c449c3fa260af54b3532736"
] | [
"oamap/schema.py"
] | [
"#!/usr/bin/env python\n\n# Copyright (c) 2017, DIANA-HEP\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 met:\n# \n# * Redistributions of source code must retain the above copyright notice, t... | [
[
"numpy.iinfo",
"numpy.dtype"
]
] |
domoritz/solas | [
"23878fed9efbf14781791dafec26705c6762cfd1"
] | [
"tests/test_maintainence.py"
] | [
"# Copyright 2019-2020 The Solas 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 applica... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] |
yetyetanotherusername/zarr-python | [
"e3cdd1a50e1047304be2c91a017da6362f8df533",
"e3cdd1a50e1047304be2c91a017da6362f8df533"
] | [
"zarr/core.py",
"zarr/tests/test_core.py"
] | [
"import binascii\nimport hashlib\nimport itertools\nimport math\nimport operator\nimport re\nfrom functools import reduce\n\nimport numpy as np\nfrom numcodecs.compat import ensure_bytes, ensure_ndarray\n\nfrom zarr.attrs import Attributes\nfrom zarr.codecs import AsType, get_codec\nfrom zarr.errors import ArrayNot... | [
[
"numpy.squeeze",
"numpy.dtype",
"numpy.asanyarray",
"numpy.copyto",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.product",
"numpy.take",
"numpy.linspace",
"numpy.dtype",
"numpy.all",
"numpy.zeros_like",
"numpy.mean",
"numpy.iinfo",
"numpy.random.randint"... |
san99tiago/ML_BASICS | [
"ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f",
"ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f"
] | [
"00_LIBRARIES/00_NUMPY/03_numpy_manipulations.py",
"00_LIBRARIES/01_PANDAS/03_pandas_missing_data.py"
] | [
"# NUMPY MANIPULATIONS OF ARRAYS\n# Santiago Garcia Arango\n# -------------------------------------------------------------------------\nimport numpy as np\n\nmy_array = np.arange(1, 11) # [1,2,..,8,9,10]\nprint(\"my_array=\\n\", my_array, \"\\n\")\n\n\n# -----------------CHECKING CONDITIONS IN ARRAY ITEMS--------... | [
[
"numpy.arange",
"numpy.ones"
],
[
"pandas.DataFrame"
]
] |
onyalcin/PyMO | [
"1d49620096b7f81b6db0cd4ed427cd7496bd5f99"
] | [
"pymo/viz_tools.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport IPython\nimport os\n\ndef save_fig(fig_id, tight_layout=True):\n if tight_layout:\n plt.tight_layout()\n plt.savefig(fig_id + '.png', format='png', dpi=300)\n \n \ndef draw_stickfigure(mocap_track, frame, data=None,... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.subplot2grid",
"matplotlib.pyplot.figure"
]
] |
SunLoveSheep/Sem-LSD | [
"8c085217c372588fbb9ca37c5aef32d66270560f"
] | [
"src/_analyze_semantic_line.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport _init_paths\n# /workspace/tangyang.sy/pytorch_CV/pytorch_CenterNet/src\n\ntry:\n from utils_ctdet.lineNMS import do_nms_line, do_acl_line, do_acl_line_v1\nexcept ImportError:\n from utils.... | [
[
"numpy.abs",
"numpy.exp",
"numpy.sqrt",
"numpy.arctan"
]
] |
jidebingfeng/segmatch | [
"c662324d23b9e049fbb49b52cda7895d1a4d2798"
] | [
"segmatch/python/display_matched_segments.py"
] | [
"from __future__ import print_function\n\nimport numpy as np\n\n## LOAD DATA ##\n###############\nprint(\"Loading segments.\")\nfrom import_export import load_segments\nsegments, ids = load_segments(folder=\"/tmp/segment_matcher/\")\nfrom import_export import load_matches\nmatches = load_matches(folder=\"/tmp/segme... | [
[
"matplotlib.pyplot.cla",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
]
] |
TingquanGao/Paddle | [
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"f249a5f05f0f5832279244d88c8cb4eaaad1fbd4",
"9b1015d90b4d498ab58df7cff2c3ed27863ce970",
"f249a5f05f0f5832279244d88c8cb4eaaad1fbd4",
"9b1015d90b4d498ab58df7cff2c3ed27863ce970",
"f249a5f05f0f5832279244d88c8cb4eaaad1fbd4"
] | [
"python/paddle/dataset/movielens.py",
"python/paddle/fluid/contrib/slim/tests/test_quantization_pass.py",
"python/paddle/fluid/contrib/slim/quantization/quantization_pass.py",
"python/paddle/fluid/tests/unittests/mkldnn/test_elementwise_mul_mkldnn_op.py",
"python/paddle/fluid/tests/unittests/test_optimizer.... | [
"# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless req... | [
[
"numpy.random.random",
"numpy.random.seed"
],
[
"numpy.sum",
"numpy.random.seed"
],
[
"numpy.resize",
"numpy.ones",
"numpy.round",
"numpy.array",
"numpy.zeros"
],
[
"numpy.amax",
"numpy.random.random",
"numpy.multiply",
"numpy.round",
"numpy.rand... |
mcvenkat/Python-Programs | [
"2ff66bbd5b07c8e093b11360e1dcac06740a5024"
] | [
"ARIMA1- Air Passengers.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Mar 29 11:20:51 2020\r\n\r\n@author: 766810\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom matplotlib import pyplot as plt\r\nfrom statsmodels.tsa.stattools import adfuller\r\nfrom statsmodels.tsa.seasonal import seasonal_decompose\r\nfrom sta... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"pandas.read_csv",
"pandas.Series",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"pandas.plotting.register_matplotlib_converters",
"numpy.exp",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylab... |
amongstar/https-github.com-tflearn-tflearn | [
"af57b1759c0d251313c5bcde8cbb7274bf4b08c3",
"8af77b5aebcb8aba0f1b855201aed732906c6de8"
] | [
"examples/nlp/cnn_sentence_classification.py",
"examples/extending_tensorflow/summaries.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nSimple example using convolutional neural network to classify IMDB\nsentiment dataset.\n\nReferences:\n - Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng,\n and Christopher Potts. (2011). Learning Word Vectors for Sentiment\n Analysis. The 49th Annu... | [
[
"tensorflow.expand_dims"
],
[
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.Graph",
"tensorflow.constant",
"tensorflow.matmul",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.name_scope",
"tensorflo... |
Vivoe/DeepSM | [
"bc35f2bfc3758199466079ec54de1d5297374921"
] | [
"bin/evaluate_step_placement.py"
] | [
"import os\nimport argparse\n\nimport numpy as np\nfrom sklearn import metrics\n\nimport matplotlib.pyplot as plt\n\nimport torch\nimport torch.utils.data as datautils\n\nfrom deepSM import StepPlacement\nfrom deepSM import SMDUtils\nfrom deepSM import post_processing\nfrom deepSM import utils\n\n\nparser = argpars... | [
[
"sklearn.metrics.roc_auc_score",
"torch.load",
"torch.utils.data.DataLoader",
"sklearn.metrics.precision_recall_curve",
"numpy.std",
"torch.save",
"sklearn.metrics.auc",
"sklearn.metrics.f1_score",
"sklearn.metrics.accuracy_score"
]
] |
craiggua/NaturalLanguageGen | [
"de7c83ed08eded17528f8e55c07a969e0f409e8a"
] | [
"code/LanguageGenChars_Predict.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nPurpose: Character level Natural Language Generation (NLG). This file loads a\r\n previously trained character NLG model from LanguageGenChars_train.py, \r\n and predicts subsequent chars.\r\n\r\nTo run: \r\n 1) Set constants below to be the same as the languag... | [
[
"tensorflow.train.latest_checkpoint",
"numpy.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.LSTM",
"numpy.argmax",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.utils.to_categorical"
]
] |
stylekilla/syncmrt | [
"816bb57d80d6595719b8b9d7f027f4f17d0a6c0a"
] | [
"QsWidgets/QsMpl/tools.py"
] | [
"from matplotlib.backend_tools import ToolBase, ToolToggleBase, Cursors\nfrom PyQt5.QtCore import QObject, pyqtSignal\nimport logging\n\n\nclass ToolPickPoint(ToolToggleBase,QObject):\n\t\"\"\" Marker selection tool. \"\"\"\n\t# Tool options for matplotlib.\n\tdescription = 'Pick a point on the image'\n\timage = 'p... | [
[
"matplotlib.backend_tools.ToolToggleBase.trigger",
"matplotlib.backend_tools.ToolToggleBase.__init__"
]
] |
zhangjq933/HowtoSim_Script | [
"90fb8cca87d47d2c45b8ff5d07a35e8a6c846685"
] | [
"aggregate_CDF.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Oct 19 19:24:49 2019\r\n@author: mlin\r\n\r\n\"\"\"\r\nimport matplotlib.pyplot as plt\r\nfrom collections import OrderedDict\r\nimport numpy as np\r\nimport copy\r\n\r\nclass ffd(): \r\n def __init__(self, ffd_file, incident_Power_W=1):\r\n self.inc... | [
[
"matplotlib.pyplot.legend",
"numpy.amax",
"matplotlib.pyplot.imshow",
"numpy.radians",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.where",
"numpy.copy",
"numpy.column_stack",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title"... |
akac0297/PETLAB | [
"950cc153ce230d12d752ad0d11111e7fc22d9e7d",
"950cc153ce230d12d752ad0d11111e7fc22d9e7d",
"950cc153ce230d12d752ad0d11111e7fc22d9e7d",
"950cc153ce230d12d752ad0d11111e7fc22d9e7d",
"950cc153ce230d12d752ad0d11111e7fc22d9e7d",
"950cc153ce230d12d752ad0d11111e7fc22d9e7d"
] | [
"Radiomics/Radiomics MPE images.py",
"PET tumour segmentation code/PET_Segmentation-Copy1.py",
"PET tumour segmentation code/PET_tumour_seg_test.py",
"PET tumour segmentation code/PET_segmentation_WES_006_2.py",
"MRI segmentation/Sphere generation WES_003_2.py",
"PET tumour segmentation code/PET_segmentat... | [
"#!/usr/bin/env python\n# coding: utf-8\n\nimport SimpleITK as sitk\nimport pandas as pd\nimport numpy as np\nimport radiomics\n\ndef radiomics_analysis(image_filepath, mask_filepath,img_label):\n img = sitk.ReadImage(image_filepath)\n mask = sitk.ReadImage(mask_filepath)\n \n #Z-score normalisation for... | [
[
"pandas.read_csv",
"numpy.min",
"pandas.DataFrame",
"numpy.max",
"numpy.std",
"numpy.mean"
],
[
"numpy.linspace",
"numpy.unique",
"numpy.rint",
"matplotlib.pyplot.subplots",
"numpy.percentile",
"numpy.max",
"scipy.stats.mode",
"numpy.array"
],
[
... |
uri-granta/GPflow | [
"94b432847cb82c7627a57987f5c5ddd7fc400414"
] | [
"tests/gpflow/posteriors/test_bo_integration.py"
] | [
"# Copyright 2022 The GPflow Contributors. 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.testing.assert_equal",
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.function",
"numpy.testing.assert_allclose",
"numpy.random.default_rng"
]
] |
tirkarthi/odin-ai | [
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd06",
"7900bef82ad8801d0c73880330d5b24d9ff7cd0... | [
"odin/ml/plda.py",
"odin/fuel/_image_cifar.py",
"odin/preprocessing/audio/audio.py",
"odin/networks/skip_connection.py",
"examples/logistic_regression.py",
"odin/bay/distributions/combined.py",
"odin/backend/metrics.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\"\nauthor: 'Omid Sadjadi, Timothee Kheyrkhah'\nemail: 'omid.sadjadi@nist.gov'\n\"\"\"\nimport time\nimport warnings\nfrom numbers import Number\n\nimport numpy as np\nfrom scipy.linalg import cholesky, eigh, inv, solve, svd\nfrom six import string_types\n\nfrom odin.backend import c... | [
[
"numpy.diag",
"numpy.dot",
"numpy.log",
"scipy.linalg.svd",
"numpy.unique",
"numpy.asarray",
"numpy.eye",
"numpy.dtype",
"numpy.flatnonzero",
"scipy.linalg.solve",
"scipy.linalg.cholesky",
"numpy.cov",
"numpy.bincount",
"scipy.linalg.inv",
"numpy.random.... |
ryorda/tensorflow-viennacl | [
"d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f",
"054b515feec0a3fca4cfb1f29adbf423c9027c3a",
"054b515feec0a3fca4cfb1f29adbf423c9027c3a",
"054b515feec0a3fca4cfb1f29adbf423c9027c3a",
"054b515feec0a3fca4cfb1f29adbf423c9027c3a",
"054b515feec0a3fca4cfb1f29adbf423c9027c3a",
"054b515feec0a3fca4cfb1f29adbf423c9027c3... | [
"tensorflow/python/ops/nn_grad_test.py",
"tensorflow/contrib/boosted_trees/estimator_batch/trainer_hooks.py",
"tensorflow/python/kernel_tests/bincount_op_test.py",
"tensorflow/contrib/receptive_field/python/util/examples/write_inception_resnet_v2_graph.py",
"tensorflow/contrib/boosted_trees/python/kernel_te... | [
"# 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.ops.nn_ops.relu6",
"tensorflow.python.platform.test.main",
"numpy.array",
"tensorflow.python.ops.gradients_impl.gradients",
"tensorflow.python.framework.constant_op.constant"
],
[
"tensorflow.python.training.summary_io.SummaryWriterCache.get",
"tensorflow.contrib... |
arminnh/deep-q-learning | [
"e6ec12cfa2468b86f60a6cb2635f5feb12dcd7a6",
"e6ec12cfa2468b86f60a6cb2635f5feb12dcd7a6"
] | [
"src/universe-driving/drive.py",
"src/reinforcement-learning-test.py"
] | [
"#https://github.com/openai/universe-starter-agent/blob/master/envs.py\n\nimport gym\nimport universe\nimport socketio\nimport eventlet.wsgi\nfrom PIL import Image\nfrom flask import Flask\nfrom io import BytesIO\nfrom TORCH_DQN import DQN\nfrom enum import Enum\nimport torchvision.transforms as T\nimport ast\nimpo... | [
[
"torch.zeros"
],
[
"numpy.max",
"numpy.argmax",
"numpy.zeros"
]
] |
selfemergence/NEAT-multiprocessing | [
"3dc57c6ec18658253398ae0b361b72f78e3fd0c9"
] | [
"experiments/mario/gym-nes-mario-bros-master/src/run-mario.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# By Lilian Besson (Naereen)\n# https://github.com/Naereen/gym-nes-mario-bros\n# MIT License https://lbesson.mit-license.org/\n#\nfrom __future__ import division, print_function # Python 2 compatibility\n\nimport os\nimport sys\nfrom collections import deque\nfrom t... | [
[
"numpy.array"
]
] |
susanwe/world-models | [
"0f246a430683e6ab741726df0a97f35830044356",
"0f246a430683e6ab741726df0a97f35830044356"
] | [
"models/vae.py",
"data/carracing.py"
] | [
"\n\"\"\"\nVariational encoder model, used as a visual model\nfor our model of the world.\n\"\"\"\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Decoder(nn.Module):\n \"\"\" VAE decoder \"\"\"\n def __init__(self, img_channels, latent_size):\n super(Decoder, self).__init... | [
[
"torch.randn_like",
"torch.nn.Linear",
"torch.nn.Conv2d",
"torch.nn.ConvTranspose2d"
],
[
"numpy.array"
]
] |
tidepool-org/data-science-models | [
"cd06e9aad95a0bc6cc2a81871e567c88159b86d3"
] | [
"tidepool_data_science_models/models/icgm_sensor_generator.py"
] | [
"\"\"\"\nCreates iCGM Sensors given a trueBG trace\n\nThe Dexcom G6 Specifications in this file are publicly available from:\n “EVALUATION OF AUTOMATIC CLASS III DESIGNATION FOR\n Dexcom G6 Continuous Glucose Monitoring System.” n.d.\n https://www.accessdata.fda.gov/cdrh_docs/reviews/DEN170088.pdf.\n\n\"\"... | [
[
"scipy.optimize.brute",
"numpy.random.seed"
]
] |
tomroesch/iqplot | [
"e13f9ac888d75093da05353ba80786804ec99418"
] | [
"iqplot/dist.py"
] | [
"\"\"\"Visualization of how data are distributed, split or colored by a\ncategorical variable.\"\"\"\n\nimport copy\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\nimport colorcet\n\nimport bokeh.models\nimport bokeh.plotting\n\nfrom . import utils\n\n\ndef ecdf(\n data=None,\n q=None,\n cat... | [
[
"numpy.unique",
"numpy.sort",
"numpy.percentile",
"numpy.concatenate",
"numpy.round",
"numpy.array",
"numpy.histogram"
]
] |
ccacNMorris/dat129_ccac | [
"587e35f7886d1e883ad988cbe2ec027eb9cf3043"
] | [
"icon.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Feb 2 18:34:05 2020\n\n@author: leemshari\n\"\"\"\n# I wanted to create an n cubed icon\n#My goal was to get this to get this to print with & or @ signs but I was unable to \n#get this array to look decent with anything but integers.\n#I chan... | [
[
"numpy.resize",
"numpy.flipud",
"numpy.zeros",
"numpy.roll"
]
] |
KaijuML/data2text-macro-plan-py | [
"17cebc5db507723d601d21a075adea59b0bd9ffb"
] | [
"onmt/translate/translation.py"
] | [
"\"\"\" Translation main class \"\"\"\nfrom __future__ import unicode_literals, print_function\n\nimport torch\nfrom onmt.inputters.text_dataset import TextMultiField\n\n\nclass TranslationBuilder(object):\n \"\"\"\n Build a word-based translation from the batch output\n of translator and the underlying di... | [
[
"torch.sort"
]
] |
jonathansick/skyoffset | [
"369f54d8a237f48cd56f550e80bf1d39b355bfcd"
] | [
"skyoffset/diffplot.py"
] | [
"#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nPlot distributions of difference pixels.\n\"\"\"\n\nimport os\n\nimport numpy as np\nimport astropy.io.fits\nfrom matplotlib.figure import Figure\nfrom matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas\nimport matplotlib.gridspec as gridspec\n\... | [
[
"matplotlib.backends.backend_agg.FigureCanvasAgg",
"matplotlib.gridspec.GridSpec",
"numpy.isfinite",
"matplotlib.figure.Figure"
]
] |
Alenichel/CodiglioniNichelini_recsys-polimi-2019 | [
"ca97e71da7612644833c20155a0d4d3a57850527",
"ca97e71da7612644833c20155a0d4d3a57850527"
] | [
"src/run_utils.py",
"src/Base/Evaluation/metrics.py"
] | [
"#!/usr/bin/env python3\n\nimport os\nfrom enum import Enum\nimport numpy as np\nimport scipy.sparse as sps\nfrom sklearn.preprocessing import LabelEncoder\nfrom tqdm import tqdm, trange\nfrom cython_modules.leave_one_out import train_test_loo_split as __train_test_loo_split_cython\nfrom csv_utils import load_csv, ... | [
[
"numpy.logical_not",
"scipy.sparse.coo_matrix",
"numpy.random.seed",
"numpy.random.choice",
"numpy.ediff1d",
"scipy.sparse.csr_matrix",
"numpy.mean",
"numpy.argsort",
"scipy.sparse.hstack",
"sklearn.preprocessing.LabelEncoder",
"numpy.where",
"numpy.isin",
"scip... |
PatternRecognition/OpenBMI | [
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05c",
"75daf901b2dbe215852cbff243606dcfcd10f05... | [
"PR_BCI_team/Team_StarLab/DKHan/examples/Deep_Learning_Models/OpenBMI_dataset/Preprocessing/convert_gigamne_to_smt.py",
"PR_BCI_team/Team_StarLab/DKHan/examples/basic_CNN/giga_csp_lda_100hz.py",
"PR_BCI_team/Team_StarLab/DKHan/examples/CSDG/get_common.py",
"PR_BCI_team/Team_StarLab/DKHan/examples/bcic_dg/plot... | [
"import scipy.io as sio\nimport numpy as np\nimport os\nimport mne\nimport gigadata\n\nimport matplotlib.pyplot as plt\n\nfrom sklearn.discriminant_analysis import LinearDiscriminantAnalysis\nfrom sklearn.model_selection import ShuffleSplit, cross_val_score\n\nfrom pyriemann.estimation import Covariances\n\nfrom mn... | [
[
"numpy.hstack",
"numpy.append",
"numpy.save"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.axvline",
"matplotlib.pyplot.axhline",
"sklearn.model_selection.ShuffleSplit",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"numpy.mean",
"... |
FanWangEcon/pyfan | [
"126e91c0c6d930f1c335a07396d1d2145b247cea"
] | [
"pyfan/amto/array/geomspace.py"
] | [
"'''\nCreated on May 24, 2018\n\n@author: fan\n\nTo have a better grid denser at the beginning\n'''\n\nimport time as time\nimport numpy as np\n\nfrom numba import jit\n\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\n# @vectorize([float64(float64, float64, float64, float64, float64, float64, float64, ... | [
[
"numpy.log",
"numpy.linspace",
"numpy.min",
"numpy.arange",
"numpy.set_printoptions",
"numpy.geomspace"
]
] |
amh28/NIF | [
"92a2f447738224fb10b83fa60c78a35e0c25ac34",
"92a2f447738224fb10b83fa60c78a35e0c25ac34"
] | [
"niftynet/layer/discrete_label_normalisation.py",
"niftynet/layer/activation.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, division\n\nimport os\n\nimport numpy as np\nimport tensorflow as tf\n\nimport niftynet.utilities.histogram_standardisation as hs\nfrom niftynet.layer.base_layer import DataDependentLayer\nfrom niftynet.layer.base_layer import Inverti... | [
[
"numpy.asarray",
"numpy.zeros_like",
"tensorflow.logging.fatal"
],
[
"tensorflow.constant_initializer",
"tensorflow.nn.relu",
"tensorflow.nn.elu",
"tensorflow.abs"
]
] |
manopapad/legate.numpy | [
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca96936",
"896f4fd9b32db445da6cdabf7b78d523fca9693... | [
"tests/universal_functions_tests/true_divide_tests/broadcast.py",
"tests/universal_functions_tests/sqrt_tests/normal.py",
"tests/known_failures/random_creation.py",
"tests/universal_functions_tests/log_tests/inplace_normal.py",
"tests/reduction_axis.py",
"tests/universal_functions_tests/multiply_tests/nor... | [
"# Copyright 2021 NVIDIA Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or ... | [
[
"numpy.true_divide",
"numpy.random.randn"
],
[
"numpy.array",
"numpy.sqrt"
],
[
"numpy.random.randn",
"numpy.allclose",
"numpy.random.seed"
],
[
"numpy.log",
"numpy.array"
],
[
"numpy.sum",
"numpy.array_equal",
"numpy.linspace"
],
[
"numpy.ra... |
Azmal16/Covid_Symptoms_Predict_with_Machine_Learning | [
"d1e1fde73aa307bdbcfeac27088f49e4c1cb4555"
] | [
"app.py"
] | [
"import numpy as np\nfrom flask import Flask, request, jsonify, render_template\nimport pickle\n\napp = Flask(__name__)\nmodel = pickle.load(open('model.pkl', 'rb'))\n\n\n@app.route('/')\ndef home():\n return render_template('index.html')\n\n\n@app.route('/predict', methods=['GET', 'POST'])\ndef predict():\n ... | [
[
"numpy.array"
]
] |
yongsheng268/tfx | [
"6283fffb3ac81e2f213b4895fbe19623dfa9c4f5"
] | [
"tfx/utils/channel.py"
] | [
"# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.python.util.deprecation.deprecated"
]
] |
everestocean/Algorithm | [
"a7e2ce796daf50488420290176dc8c1ccccb109f"
] | [
"machine_learning/deep_learning/deep_learning/tweet_sentiment.py"
] | [
"# -*- coding=utf-8 -*-\n\nimport keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout\nfrom keras.layers.convolutional import Conv1D\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing.sequence import pad_sequences\nimport pandas as pd\nimport numpy ... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"pandas.get_dummies"
]
] |
xnone/CS224n-Natural-Language-Processing-with-Deep-Learning | [
"0ec63dcd6b8671712c0206cc64b3e4c2fc6f97a3"
] | [
"Assignments/assignment1/q3_sgd.py"
] | [
"#!/usr/bin/env python\n\n# Save parameters every a few SGD iterations as fail-safe\nSAVE_PARAMS_EVERY = 5000\n\nimport glob\nimport random\nimport numpy as np\nimport os.path as op\nimport pickle\n\n\ndef load_saved_params():\n \"\"\"\n A helper function that loads previously saved parameters and resets\n ... | [
[
"numpy.sum"
]
] |
rcsmit/COVIDcases | [
"8952931ee8316644dee55aad3f94c98f510e2f14",
"8952931ee8316644dee55aad3f94c98f510e2f14"
] | [
"not_active_on_streamlit/prepare_casuslandelijk.py",
"input/prepare_google_mob_data.py"
] | [
"# PREPARE A CSV-FILE TO ENABLE AN STACKED PLOT FOR POSITIVE TESTS, HOSPITALIZATIONS AND DECEASED\n# Hospitalizations and deceased are not lagged in time, the date of the result of the \"desease onset\", positieve test or notification is leading\n# https://data.rivm.nl/geonetwork/srv/dut/catalog.search#/metadata/2c... | [
[
"pandas.merge",
"pandas.read_csv",
"pandas.to_datetime",
"pandas.Grouper",
"pandas.Timedelta",
"pandas.pivot_table"
],
[
"pandas.read_csv"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.