repo_name
stringlengths
8
130
hexsha
list
file_path
list
code
list
apis
list
kmshin1397/kowalski
[ "2aaa4ed7a3b7b400e95227b63c976ce18f7e18eb" ]
[ "kowalski/alert_broker_ztf.py" ]
[ "import argparse\nfrom ast import literal_eval\nfrom astropy.io import fits\nfrom astropy.visualization import (\n AsymmetricPercentileInterval,\n LinearStretch,\n LogStretch,\n ImageNormalize,\n)\nimport base64\nfrom bson.json_util import loads\nimport confluent_kafka\nfrom copy import deepcopy\nimport...
[ [ "numpy.log", "numpy.nan_to_num", "numpy.float64", "numpy.isfinite", "matplotlib.pyplot.figure", "tensorflow.config.optimizer.set_jit", "matplotlib.pyplot.savefig", "numpy.abs", "numpy.expand_dims", "numpy.isnan", "numpy.zeros", "numpy.float32", "pandas.concat", ...
eliaskousk/FATE
[ "242e47d6ae439a3b69ecb1610cb370b29b024413" ]
[ "python/federatedml/ensemble/test/gh_packing_compressing_test.py" ]
[ "#\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.random.random", "numpy.random.randint", "numpy.random.seed", "numpy.zeros" ] ]
center3d/MLW
[ "192cc991df61bd8991a51702a53df6a09448d4f7" ]
[ "zmk/nyokaserver/nyokaUtilities.py" ]
[ "# nyokaUtilities.py\nimport numpy as np\nfrom random import choice\nfrom string import ascii_uppercase\nimport copy,json\nimport ast,pathlib\nimport traceback\nfrom nyoka import PMML43Ext as ny\nglobal MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS\n\nsettingFilePath='./settingFiles/'\nsavedModels='./SavedModels/'\nMEM...
[ [ "numpy.prod" ] ]
h8907283/dm_control
[ "4e1a35595124742015ae0c7a829e099a5aa100f5" ]
[ "dm_control/suite/quadruped.py" ]
[ "# Copyright 2019 The dm_control Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "numpy.vstack", "numpy.arcsinh", "numpy.in1d", "numpy.asarray", "numpy.cos", "numpy.hstack", "numpy.nonzero", "numpy.sqrt", "numpy.sin", "numpy.linalg.norm", "numpy.tanh", "numpy.deg2rad" ] ]
ProSeCo-Planning/ros_proseco_planning
[ "484beedb01e5faafa7e03e95bc88b1e4f969285e" ]
[ "python/proseco/evaluator/head.py" ]
[ "import os\nimport copy\nimport ray\nimport argparse\nimport tqdm\nimport logging\nimport pandas as pd\nfrom pathlib import Path\nfrom datetime import datetime\nimport shutil\nimport uuid as uu_id\nfrom typing import ClassVar, Dict, Generator, Tuple, List, Any\n\nfrom proseco.evaluator.remote import run\nfrom prose...
[ [ "pandas.concat" ] ]
tzhhhh123/Stark
[ "ba59f9596b06bc687d726f991e1e7fce8af6b5a5" ]
[ "external/AR/pytracking/analysis/plot_results.py" ]
[ "import tikzplotlib\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport os\nimport torch\nimport pickle\nimport json\nfrom pytracking.evaluation.environment import env_settings\nfrom pytracking.analysis.extract_results import extract_results\n\n\ndef get_plot_draw_styles():\n plot_draw_style = [{'color':...
[ [ "torch.stack", "matplotlib.pyplot.draw", "torch.tensor", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "matplotlib.rcParams.update", "torch.arange" ] ]
alex9954/CenterNet-better
[ "41f2c402ecb089f563fae7201143227492f64cc6" ]
[ "dl_lib/network/generator/centernet_gt.py" ]
[ "#!/usr/bin/python3\n# -*- coding:utf-8 -*-\n# author: wangfeng19950315@163.com\n\nimport numpy as np\nimport torch\n\n\nclass CenterNetGT(object):\n\n @staticmethod\n def generate(config, batched_input):\n box_scale = 1 / config.MODEL.CENTERNET.DOWN_SCALE\n num_classes = config.MODEL.CENTERNET....
[ [ "torch.min", "torch.stack", "torch.sort", "torch.zeros_like", "torch.sqrt", "numpy.exp", "torch.from_numpy", "torch.max", "torch.zeros", "numpy.finfo", "torch.clamp_min", "torch.Tensor" ] ]
ToucanToco/toucan-connectors
[ "ca7e551f728bb5350d550eb099cab569c9238550" ]
[ "tests/mysql/test_mysql.py" ]
[ "import collections\n\nimport numpy as np\nimport pandas as pd\nimport pymysql\nimport pytest\nfrom pydantic import ValidationError\nfrom pytest_mock import MockerFixture\n\nfrom toucan_connectors.common import ConnectorStatus\nfrom toucan_connectors.mysql.mysql_connector import MySQLConnector, MySQLDataSource, han...
[ [ "pandas.DataFrame", "pandas.Timestamp", "numpy.isnan" ] ]
xiaollz/PytorchSSD
[ "8286027b3216a53ae336b0d243d9352572de5350" ]
[ "ssds_train.py" ]
[ "from __future__ import print_function\nimport numpy as np\nimport os\nimport sys\nimport cv2\nimport random\nimport pickle\n\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom torch.autograd import Variable\nimport torch.optim as optim\nfrom torch.optim import lr_scheduler\nimport torch.utils.data as data\n...
[ [ "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.optim.lr_scheduler.ExponentialLR", "torch.optim.SGD", "torch.load", "numpy.empty", "torch.no_grad", "torch.cuda.device_count", "torch.optim.Adam", "numpy.hstack", "torch.cuda.is_available", "torch.optim.lr_scheduler.M...
ktaebum/npex_tvm
[ "b7c0f12bbc3779f9041ff129019134a055b2dcd4" ]
[ "topi/tests/python/test_topi_transform.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.take", "numpy.asarray", "numpy.size", "numpy.stack", "numpy.transpose", "numpy.reshape", "numpy.expand_dims", "numpy.where", "numpy.random.uniform", "numpy.tile", "numpy.zeros", "numpy.repeat", "numpy.arange", "numpy.prod", "numpy.array", "num...
algchyhao/WNTR
[ "dd4db188a8641a4da16cf80a1557c908fa48c17d" ]
[ "wntr/scenario/earthquake.py" ]
[ "\"\"\"\nThe wntr.scenario.earthquake module includes methods to\ndefine an earthquake location, magnitude and depth, and\ncompute PGA, PGV, and repair rate.\n\"\"\"\nfrom __future__ import print_function\nimport wntr\nimport numpy as np\nimport pandas as pd\nfrom scipy.spatial import distance\n\nclass Earthquake(o...
[ [ "pandas.Series", "scipy.spatial.distance.euclidean", "numpy.exp", "numpy.log", "numpy.power", "numpy.log10" ] ]
reiserm/Xana
[ "056f2bf2da67ba0dade49bb4b56ea2afd42b36bd" ]
[ "Xana/SaxsAna/phicorr.py" ]
[ "import numpy as np\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom scipy import fftpack as fp\n\n\ndef cross_correlation(q):\n ind = np.argmin(np.abs(q - 0.6))\n inten = I2d[:, ind]\n print(\"Found %d angles\" % len(inten))\n phi = chi.copy()\n\n N = len(inten)\n lags = np.arange(...
[ [ "matplotlib.pyplot.grid", "scipy.fftpack.fft", "matplotlib.pyplot.figure", "numpy.abs", "numpy.correlate", "numpy.arange", "scipy.fftpack.fftfreq", "scipy.fftpack.fftshift", "numpy.absolute", "matplotlib.pyplot.plot", "numpy.linspace" ] ]
KougatCylinder5/CAPT
[ "3a4ad2ef73529ae0ce85937070aa15ffc9a3ac8a" ]
[ "old/MoCap V0.1.0.py" ]
[ "#Cory Mavis\n\nimport cv2\nimport numpy\nimport sys\nimport subprocess\nimport os\nimport statistics\ncv2.namedWindow(\"LiveFeed\")\n\ndef callback (event,x,y,flags,params):\n global blueMark #update the position of the blue point\n global greenMark #update the position of the green point\n global redMark...
[ [ "numpy.ones", "numpy.arccos", "numpy.array", "numpy.dot", "numpy.linalg.norm" ] ]
Code-Papers/MAIPO
[ "2e5b911c7009ac9ad09e7129c7ef0992f2690d04" ]
[ "happo/trainer/happo.py" ]
[ "import numpy as np\nimport random\nfrom numpy.core.fromnumeric import clip\nfrom numpy.lib.shape_base import vsplit\nimport tensorflow as tf\nfrom tensorflow.python.ops.gen_linalg_ops import self_adjoint_eig_eager_fallback\nimport common.tf_util as U\n\nfrom common.distributions import make_pdtype\nimport tensorfl...
[ [ "tensorflow.placeholder", "tensorflow.train.AdamOptimizer", "tensorflow.variable_scope", "tensorflow.exp", "tensorflow.square", "tensorflow.concat", "tensorflow.clip_by_value", "numpy.array", "tensorflow.maximum", "numpy.minimum" ] ]
holyYodu/mmpose
[ "c10225e61da2700b3cd309a6a6234c6280248a0b" ]
[ "tools/pytorch2onnx.py" ]
[ "import argparse\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.runner import load_checkpoint\n\nfrom mmpose.models import build_posenet\n\ntry:\n import onnx\n import onnxruntime as rt\nexcept ImportError as e:\n raise ImportError(f'Please install onnx and onnxruntime first. {e}')\n\ntry:\n ...
[ [ "torch.randn", "numpy.allclose", "torch.onnx.export", "torch.nn.BatchNorm3d" ] ]
ludomitch/ml-agents
[ "481e2af4a96377c257a6aa5559d8b7230c432bad" ]
[ "ml-agents/mlagents/trainers/tests/test_policy.py" ]
[ "from mlagents.trainers.policy.tf_policy import TFPolicy\nfrom mlagents_envs.base_env import BatchedStepResult, AgentGroupSpec\nfrom mlagents.trainers.action_info import ActionInfo\nfrom unittest.mock import MagicMock\nimport numpy as np\n\n\ndef basic_mock_brain():\n mock_brain = MagicMock()\n mock_brain.vec...
[ [ "numpy.array" ] ]
rasimuvaikas/stanza
[ "21793519a531b0e9d7151e42d180d97785c9a5b8" ]
[ "stanza/models/lemmatizer.py" ]
[ "\"\"\"\nEntry point for training and evaluating a lemmatizer.\n\nThis lemmatizer combines a neural sequence-to-sequence architecture with an `edit` classifier \nand two dictionaries to produce robust lemmas from word forms.\nFor details please refer to paper: https://nlp.stanford.edu/pubs/qi2018universal.pdf.\n\"\...
[ [ "torch.cuda.manual_seed", "torch.manual_seed", "numpy.random.seed", "numpy.argmax", "torch.cuda.is_available" ] ]
sherrardTr4129/RealSense-BNO055-Pose-Estimation
[ "ca48f11ae53549b2782a7848ee5091e1ce8d30ff" ]
[ "kinect_vision_target_cap/src/find_obj_xyz.py" ]
[ "#!/usr/bin/env python\n\n# Author: Trevor Sherrard\n# Course: Directed Research\n# Since: 02/06/2021\n# Description: This script extracts synced RGB and Depth frames from \n# the kinect and attempts to locate a given vision target.\n# if the vision target is located, the XYZ coordinates a...
[ [ "numpy.ones" ] ]
BXuan694/basemodel-pytorch
[ "a36c96904580be902e323db17eebbe2ea1f54176" ]
[ "resnet.py" ]
[ "'''ResNet in PyTorch.\n\nFor Pre-activation ResNet, see 'preact_resnet.py'.\n\nReference:\n[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n Deep Residual Learning for Image Recognition. arXiv:1512.03385\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass BasicBlock(nn.Mo...
[ [ "torch.nn.BatchNorm2d", "torch.nn.Linear", "torch.nn.functional.avg_pool2d", "torch.nn.functional.relu", "torch.nn.Conv2d", "torch.nn.Sequential" ] ]
charlesCXK/PixelSSL
[ "2e85e12c1db5b24206bfbbf2d7f6348ae82b2105" ]
[ "task/sseg/criterion.py" ]
[ "import time\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\n\nimport pixelssl\n\n\ndef add_parser_arguments(parser):\n pixelssl.criterion_template.add_parser_arguments(parser)\n\n\ndef deeplab_criterion():\n return DeepLabCriterion\n\n\nclass DeepLabCriterion(pixelssl.criterion_template.TaskCrite...
[ [ "torch.mean", "torch.nn.CrossEntropyLoss" ] ]
Balaras-Group/flowX
[ "29c1d6209abbfab553997b557794e4d7b06a09a8" ]
[ "flowx/io/_interface/_plot_vector.py" ]
[ "\"\"\"Module with I/O functions.\"\"\"\n\nimport numpy\nfrom matplotlib import pyplot\n\n\ndef plot_vector(gridx, gridy, ivar):\n \"\"\"Plot the vector for given x, y data.\n\n Arguments\n ---------\n gridx : Grid object\n Grid containing the data on x-face.\n gridy : Grid object\n Gri...
[ [ "matplotlib.pyplot.quiver", "matplotlib.pyplot.rc", "matplotlib.pyplot.figure", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.ylim", "numpy.meshgrid", "matplotlib.pyplot.xlabel" ] ]
iolloj/jax
[ "1b80feea6acf758fd9dc3e616e8efcb8db831ce9" ]
[ "benchmarks/api_benchmark.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.ones" ] ]
Puneet-G/Impersonator-NNProject
[ "980cfc260feebbc873b4150326791340f6526c42" ]
[ "thirdparty/his_evaluators/tests/metric_test.py" ]
[ "import torch\nimport numpy as np\nimport unittest\n\n\nfrom his_evaluators.metrics import register_metrics\n\n\nDEVICE = torch.device(\"cuda:0\")\n\n\nclass MetricTestCase(unittest.TestCase):\n\n @classmethod\n def setUpClass(cls) -> None:\n cls.paired_metric_dict = register_metrics(types=(\"ssim\", \...
[ [ "torch.device", "numpy.random.rand", "numpy.copy" ] ]
elcolie/sklearn-onnx
[ "004fa39cb995ada0cde232ae8e30341018f450ac", "004fa39cb995ada0cde232ae8e30341018f450ac" ]
[ "docs/examples/plot_custom_model.py", "tests/test_sklearn_double_tensor_type_reg.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"\n.. _l-custom-model:\n\nWrite your own converter for your own model\n===========================================\n\nIt might happen that you implemented your own model\nand there is obviously no existing conver...
[ [ "matplotlib.pyplot.imread", "sklearn.base.BaseEstimator.__init__", "numpy.sum", "sklearn.base.clone", "sklearn.metrics.mean_squared_error", "sklearn.neighbors.KNeighborsRegressor", "matplotlib.offsetbox.OffsetImage", "matplotlib.pyplot.subplots", "sklearn.manifold.TSNE", "m...
c-hydro/door
[ "de6ebcbe69289425ae13d85286dcd8da270e787e" ]
[ "gefs/door_downloader_nwp_gefs_nomads.py" ]
[ "#!/usr/bin/python3\n\n\"\"\"\nHyDE Downloading Tool - NWP GEFS 0.25\n\n__date__ = '20210914'\n__version__ = '1.0.0'\n__author__ =\n 'Andrea Libertino (andrea.libertino@cimafoundation.org',\n 'Fabio Delogu (fabio.delogu@cimafoundation.org',\n__library__ = 'HyDE'\n\nGeneral command line:\npython3 hyde_...
[ [ "pandas.DatetimeIndex", "numpy.unique", "pandas.date_range", "numpy.diff", "pandas.Timestamp.today", "numpy.asarray", "pandas.Timedelta", "numpy.arange", "numpy.sqrt", "numpy.concatenate", "pandas.Timestamp", "numpy.percentile" ] ]
YibinXie/Pose_Estimation
[ "5849140bf842bf3aeaad75827f5e7b7f2999c9ee" ]
[ "lib/models/cpm.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nimport torch\n\n\nclass CPM(nn.Module):\n def __init__(self, k):\n super(CPM, self).__init__()\n self.k = k\n self.pool_center = nn.AvgPool2d(kernel_size=9, stride=8, padding=1)\n self.conv1_stage1 = nn.Conv2d(3, 128, kernel_siz...
[ [ "torch.nn.MaxPool2d", "torch.nn.Conv2d", "torch.cat", "torch.nn.AvgPool2d" ] ]
AntixK/Neural-Blocks
[ "018a44bbb703fc848234b95a3e604576bd9df88f" ]
[ "blocks/convnormpool.py" ]
[ "import torch.nn as nn\nfrom NeuralBlocks.blocks.convnorm import ConvNorm\n\nclass ConvNormPool(nn.Module):\n \"\"\"\n A simply block consisting of a convolution layer,\n a normalization layer and a pooling\n layer. For example, this is the first block in the\n ResNet architecture.\n \"\"\"\n\n ...
[ [ "torch.nn.MaxPool2d", "torch.nn.AvgPool2d" ] ]
seikurou/LearningByCheating
[ "5e61f8624d79204b367479fab790b23d3af08b57" ]
[ "bird_view/utils/map_utils.py" ]
[ "# Source: https://github.com/carla-simulator/carla\n\n\nimport os\nimport datetime\nimport weakref\nimport math\n\nimport numpy as np\n\nimport carla\n\nfrom carla import TrafficLightState as tls\n\nimport pygame\n\nfrom pygame.locals import KMOD_CTRL\nfrom pygame.locals import KMOD_SHIFT\nfrom pygame.locals impor...
[ [ "numpy.float32", "numpy.uint8" ] ]
stjordanis/datar
[ "1218a549e2f0547c7b5a824ca6d9adf1bf96ba46" ]
[ "datar/base/trig_hb.py" ]
[ "\"\"\"Trigonometric and Hyperbolic Functions\"\"\"\n\nfrom typing import Callable\n\nimport numpy\nfrom pipda import register_func\n\nfrom ..core.contexts import Context\nfrom ..core.types import FloatOrIter\nfrom .constants import pi\n\n\ndef _register_trig_hb_func(name: str, np_name: str, doc: str) -> Callable:\...
[ [ "numpy.arctan2" ] ]
Skywalker-official/Salary-vs-Experience-Prediction-SLR-
[ "e55167f29e91111f716bab2b6f7f23e6efb50827" ]
[ "simple_linear_regression_template.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Dec 28 04:56:05 2018\n\n@author: skywalker\n\"\"\"\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Salary_Data.csv')\nX = dataset.iloc[:,...
[ [ "pandas.read_csv", "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.scatter" ] ]
maximecharpentierdata/link-prediction
[ "0c68ba7047b233c193541125711bdbf75b639907" ]
[ "src/metadata/features.py" ]
[ "from typing import List, Tuple\n\nimport networkx as nx\nimport numpy as np\nimport pandas as pd\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom tqdm import tqdm\n\n\n# Metadata based features\ndef metadata_features_extractor(\n graph: nx.Graph, samples: List[Tuple[str, str]], path: str\n) ->...
[ [ "numpy.sum", "numpy.multiply", "pandas.read_csv", "sklearn.feature_extraction.text.TfidfVectorizer", "numpy.array" ] ]
ytirahc/mobile-dev-trek
[ "336602fbc6f91776b6a3e8b845dc2c87d5f4e592" ]
[ "posts/032016/BatchProcessingOpenCV.py" ]
[ "#!/usr/bin/env python\r\n#\r\n# -------------------------------------------------------------------------------------\r\n#\r\n# Copyright (c) 2016, ytirahc, www.mobiledevtrek.com\r\n# All rights reserved. Copyright holder cannot be held liable for any damages. \r\n# \r\n# Distributed under the Apache License (ASL)...
[ [ "numpy.sqrt", "numpy.asarray", "numpy.zeros" ] ]
TU-Berlin-DIMA/ARTC
[ "07f945d1cf976e948c9f2687a8f1a68f79e66c0c" ]
[ "src/udsf/rtta.py" ]
[ "# Contains read interval (diameter) suggestion algorithms\n\nfrom util.PID import PID\nfrom util.pewma import Pewma\n\nfrom math import *\nimport numpy as np\n\n\nclass IntervalSuggestion:\n def __init__(self):\n pass\n\n def next(self, time, value, t_d):\n raise NotImplementedError(\"next(...)...
[ [ "numpy.linalg.norm", "numpy.isnan" ] ]
Brandon-HY-Lin/deep-reinforcement-learning
[ "d809851b6f98d1089379392d4687e2acaf1c0c79" ]
[ "p3_collab-compet/MADDPG/networks/maddpg_critic_version_1.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom networks.network_utils import hidden_init\n\nclass MADDPGCriticVersion1(nn.Module):\n def __init__(self, num_agents, state_size, action_size, fcs1_units, fc2_units, seed=0):\n \"\"\"Initialize parameters and build model.\n ...
[ [ "torch.manual_seed", "torch.nn.Linear", "torch.cat" ] ]
shahrukhx01/nnti_hindi_bengali_sentiment_analysis
[ "94cd0c335e5ff592a2b09f95adc183dac2b54d9f" ]
[ "src/task3/1_hindi_bengali_bilstm_sa_jdil/bengali_data.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom bengali_preprocess import Preprocess\nimport logging\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.sampler import SubsetRandomSampler\nfrom bengali_dataset import BengaliDataset\nlogging.basicConfig(level=logging.INFO)\n\n\"\"\"\nFor loa...
[ [ "torch.utils.data.DataLoader", "numpy.random.shuffle", "pandas.read_csv", "numpy.floor", "numpy.random.seed", "torch.utils.data.sampler.SubsetRandomSampler", "torch.LongTensor" ] ]
YangYunjia/cst-modeling3d
[ "4d997015afd12b9b049f21c4b6c3c350e9f6a91c" ]
[ "cst_modeling/foil.py" ]
[ "'''\r\nThis is a module containing functions to construct an airfoil\r\n'''\r\nimport copy\r\n\r\nimport numpy as np\r\nfrom numpy.linalg import lstsq\r\nfrom scipy import spatial\r\nfrom scipy.interpolate import interp1d\r\nfrom scipy.special import factorial\r\n\r\nfrom .naca import naca\r\n\r\nimport matplotlib...
[ [ "scipy.special.factorial", "scipy.interpolate.interp1d", "scipy.spatial.KDTree", "numpy.ones_like", "numpy.log", "numpy.abs", "numpy.cos", "numpy.zeros", "numpy.argmax", "numpy.max", "numpy.power", "numpy.min", "numpy.array", "numpy.linalg.norm", "numpy....
breno-aberle/rl-pong-project
[ "9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d" ]
[ "training_ac.py" ]
[ "import torch\nimport gym\nimport numpy as np\nimport argparse\nimport cv2\nimport matplotlib.pyplot as plt\nfrom agent_ac import Agent, Policy\nfrom wimblepong import Wimblepong # import wimblepong-environment\nimport pandas as pd\nfrom PIL import Image\nfrom collections import deque\nimport os\nfrom torch.utils....
[ [ "matplotlib.pyplot.legend", "torch.load", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "torch.utils.tensorboard.SummaryWriter", "matplotlib.pyplot.plot", "numpy.array", "numpy.mean" ] ]
zhaotingchen/halomod
[ "0da45ac482f7d11cf3f6382bf19021e0344ecb7f" ]
[ "tests/test_integrate_corr.py" ]
[ "\"\"\"\nSimple tests for the integration scheme for ProjectedCF (thus far). Doesn't work\nas yet, since it tries to import the libraries from *this* folder, rather than\ninstallation (which doesn't work because the fortran code isn't installed.)\n\"\"\"\nimport inspect\nimport os\n\n#LOCATION = \"/\".join(os.path....
[ [ "numpy.logspace" ] ]
martius-lab/SMORL
[ "d23eda9d6a72baa3ab1f4d729b2e4f742e4dd9db" ]
[ "rlkit/rlkit/torch/sac/policies.py" ]
[ "import numpy as np\nimport torch\nfrom torch import nn\n\nfrom rlkit.policies.base import ExplorationPolicy, Policy\nfrom rlkit.torch.core import eval_np\nfrom rlkit.torch.distributions import TanhNormal\nfrom rlkit.torch.networks import Mlp\nfrom rlkit.torch.modules import Attention, preprocess_attention_input\n\...
[ [ "torch.nn.Linear", "torch.no_grad", "torch.exp", "numpy.log", "torch.tanh", "torch.nn.init.zeros_", "torch.nn.ReLU", "torch.clamp" ] ]
LeonardoESousa/xcharge
[ "89342cd6ad00d7a767ed8e058a3ee8037af5e52f" ]
[ "kmc/rates.py" ]
[ "\nimport numpy as np\nimport random\nfrom kmc.particles import *\n\nepsilon_vaccum = 8.854187e-12 #Permitivity in C/Vm\ne = -1.60217662e-19 #Electron charge \nkb = 8.617e-5 #Boltzmann constant\nhbar = 6.582e-16 #Reduced Planck's constant\n\n\n\n###RATES########...
[ [ "numpy.sum", "numpy.empty", "numpy.exp", "numpy.copy", "numpy.array", "numpy.inner" ] ]
nvzhou/DeepRec-1
[ "d69d6a4c27434dbec8c295b98aefcd7912908d4b" ]
[ "modelzoo/DIEN/train.py" ]
[ "import time\nimport argparse\nimport tensorflow as tf\nimport os\nimport sys\nimport math\nimport collections\nfrom tensorflow.python.client import timeline\nimport json\n\nfrom tensorflow.python.ops import partitioned_variables\n\nfrom tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear\nfrom tensorflo...
[ [ "tensorflow.data.TextLineDataset", "tensorflow.summary.scalar", "tensorflow.contrib.rnn.python.ops.core_rnn_cell._Linear", "tensorflow.reshape", "tensorflow.sparse.slice", "tensorflow.logging.set_verbosity", "tensorflow.sigmoid", "tensorflow.clip_by_norm", "tensorflow.round", ...
aliayub7/CBCL_RGBD
[ "f80c23c5f4521eceef554ae765a06e329dfcd93d" ]
[ "depth_training.py" ]
[ "import numpy as np\nimport sys\nimport os\nimport time\nimport pickle\nfrom PIL import Image\nfrom copy import deepcopy\nimport cv2\nimport json\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision\nimport torchvision.transforms as transforms\nfrom torch.autograd import Variable\...
[ [ "torch.utils.data.DataLoader", "torch.nn.Linear", "torch.manual_seed", "numpy.random.seed", "torch.nn.CrossEntropyLoss", "torch.optim.lr_scheduler.MultiStepLR" ] ]
DdeGeus/single-network-panoptic-segmentation
[ "891f13b8bca0f41e298900fe1c73bc3035caef5d" ]
[ "components/anchor_generator.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom utils import box_utils\n\ndef generate(base_size,\n stride,\n scales,\n ratios,\n features_height,\n features_width,\n offset=None):\n \"\"\"\n\n Args:\n base_size: (height, width)\n st...
[ [ "tensorflow.stack", "tensorflow.reshape", "tensorflow.global_variables_initializer", "tensorflow.meshgrid", "tensorflow.range", "tensorflow.sqrt", "tensorflow.variable_scope", "tensorflow.cast", "tensorflow.convert_to_tensor", "tensorflow.concat", "tensorflow.ConfigProt...
hanranCode/models
[ "9b7fef7bc5df0e0c76f6e579f2efce7752ab8fdf" ]
[ "research/object_detection/builders/post_processing_builder.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.divide" ] ]
Aditibansal2603/fake-news-predictor
[ "9d4ba2ed95799ca63d0fa7f3f5ad0e6f09b9b215" ]
[ "app.py" ]
[ "import re\nimport pickle\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom string import punctuation\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.tokenize import sent_tokenize, word_tokenize \nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom flask import Flask, render_template, r...
[ [ "pandas.DataFrame", "torch.Tensor", "torch.max" ] ]
maciek3000/GnuCash-Expenses-Vis
[ "ab0849f49b9b50f81798fc4c769b0aee6ae03b1e" ]
[ "flask_app/bkapp/bk_settings.py" ]
[ "import pandas as pd\nfrom datetime import datetime\n\nfrom bokeh.models.widgets import RadioGroup, CheckboxGroup, DateRangeSlider\nfrom bokeh.layouts import column\n\nfrom ..observer import Observer\nfrom .pandas_functions import create_combinations_of_sep_values\n\n\nclass Settings(object):\n \"\"\"Settings Ob...
[ [ "pandas.date_range" ] ]
mikgroup/subtle_data_crimes
[ "210025d9cb8f92583f5f983be15af06b57cfea36" ]
[ "subtle_data_crimes/functions/zpad_funcs.py" ]
[ "\"\"\"\nThis module includes functions for experiments with the zero-padding preprocessing pipeline (subtle inverse crime I).\n\nEfrat Shimron (UC Berkeley, 2021).\n\"\"\"\n\nimport numpy as np\nfrom subtle_data_crimes.functions.utils import merge_multicoil_data, calc_pad_half\n\n##################################...
[ [ "numpy.sort", "numpy.pad" ] ]
SVAI/teamSTIR
[ "9f59f6e655a86bad4f917eb64ebd066401efc428" ]
[ "nf_dataset.py" ]
[ "# by @eickenberg\n\nimport torch\nimport numpy as np\n\nfrom patch_dataset import PatchDataset\nfrom torch.utils.data import ConcatDataset\n\nimport glob\nimport os\nimport nibabel\n\nclass ZipDataset(torch.utils.data.Dataset):\n\n def __init__(self, *datasets):\n self.datasets = datasets\n\n def __le...
[ [ "torch.utils.data.DataLoader", "numpy.zeros", "torch.utils.data.ConcatDataset", "torch.utils.data.sampler.SubsetRandomSampler", "numpy.stack", "numpy.concatenate" ] ]
ireneferfo/VanGoghColorz
[ "e41bd6a08cef6b2954c0e60613dd9ddd0fbc7045" ]
[ "get_colors.py" ]
[ "from collections import Counter\nfrom sklearn.cluster import KMeans\nimport cv2\n\nsizeX = 600\nsizeY = 400\n\ndef preprocess(raw):\n image = cv2.resize(raw, (sizeX, sizeY), interpolation = cv2.INTER_AREA) \n image = image.reshape(image.shape[0]*image.shape[1], 3)\n ...
[ [ "sklearn.cluster.KMeans" ] ]
DaJansenGit/TEASER
[ "25edb5be547a750e3ad35c02a97949d2b45bce32" ]
[ "teaser/examples/e9_building_data_import_from_excel.py" ]
[ "# -*- coding: utf-8 -*-\n# @Author: Martin Raetz\n# @Date: 2019-02-19 18:41:56\n# @Last Modified by: Martin Rätz\n# @Last Modified time: 29.11.2019\n\n\"\"\"\nThis script demonstrates how a building can be generated by importing building\ndata from excel.\nAn appropriate example file with some building data is i...
[ [ "pandas.DataFrame", "pandas.read_excel", "numpy.array", "numpy.where", "pandas.isna" ] ]
RDoerfel/mne-python
[ "46197d4926f4654dc1df2e0cabbfb26642fd884d" ]
[ "mne/io/write.py" ]
[ "# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>\n#\n# License: BSD (3-clause)\n\nfrom gzip import GzipFile\nimport os.path as op\nimport re\nimport time\nimport uuid\n\nimport numpy as np\nfrom scipy import linalg, sparse\n\nfrom .constants import ...
[ [ "numpy.array", "numpy.empty", "numpy.frombuffer", "scipy.linalg.inv" ] ]
rahmani15/dimod
[ "4e5918dbf35ad02d4ddcc022c8c94b47d91978bd" ]
[ "dimod/generators/constraints.py" ]
[ "# Copyright 2019 D-Wave Systems Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ [ "numpy.ones", "numpy.fill_diagonal" ] ]
kakainet/TexSet
[ "95c09724893a275b46a12d7b5ef2ae211203a2aa" ]
[ "dataset/bbox_gen.py" ]
[ "import cv2\nimport numpy as np\nimport argparse\nimport os\nimport json\n\n\ndef iswhite(p):\n return p[0] > 180 and p[1] > 180 and p[2] > 180\n\n\ndef convert(o):\n if isinstance(o, np.int64):\n return int(o)\n else:\n return o\n\n\ndef avgcolor(img):\n total = [0, 0, 0]\n ctr = 0\n ...
[ [ "numpy.zeros", "numpy.random.random", "numpy.max", "numpy.min", "numpy.array", "numpy.where" ] ]
zzx9636/cross-view
[ "9a7e874be607eefa7bd34934e274cc376e99f65f" ]
[ "train_argo.py" ]
[ "import os\nimport random\nimport time\nimport numpy as np\nimport torch\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom crossView import PVA_model, Argoverse\nfrom opt import get_args\nimport tqdm\nfrom datetime import datetime\n\n\nfrom utils import mean_IU, mean_precision\nimport wand...
[ [ "torch.utils.data.DataLoader", "torch.cuda.manual_seed_all", "torch.load", "torch.cuda.manual_seed", "torch.manual_seed", "torch.no_grad", "numpy.random.seed", "torch.save", "torch.optim.Adam", "torch.cuda.is_available", "numpy.array" ] ]
elielhojman/tensorflow
[ "89e06304aad35bfb019a8c10f39fc1ead83e0f99" ]
[ "tensorflow/python/training/optimizer.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.python.ops.variable_scope.variable", "tensorflow.python.framework.ops.colocate_with", "tensorflow.python.framework.ops.convert_to_tensor_or_indexed_slices", "tensorflow.python.training.checkpointable.base.CheckpointableReference", "tensorflow.python.util.nest.flatten", "tensorf...
sayandipdutta/sphereface_pytorch
[ "762c458f9258a8d85210a92c2ae0548942e4e062" ]
[ "train.py" ]
[ "from __future__ import print_function\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\ntorch.backends.cudnn.bencmark = True\n\nimport os,sys,cv2,random,datetime\nimport argparse\nimport numpy as np\n\nfrom dataset import Imag...
[ [ "numpy.zeros", "torch.save", "torch.autograd.Variable", "torch.cuda.is_available", "torch.from_numpy", "torch.max", "numpy.array" ] ]
toolkmit/algotrading
[ "693f84b67d1b5bf07450f37295053f32550ac9cf" ]
[ "training/gpu_util_sampler.py" ]
[ "import gpustat\nimport numpy as np\nfrom keras.callbacks import Callback\n\n\nclass GPUUtilizationSampler(Callback):\n \"\"\"\n Measure GPU utilization at the end of 1% of all batches.\n (The more frequent the measuring, the slower and less accurate this callback becomes.)\n If GPU is not present, repo...
[ [ "numpy.random.rand" ] ]
zczllw5/wclient
[ "d03943b7060150662123b8a7d3918f08fcfac25d" ]
[ "data_process/data_process_txt_to_csv.py" ]
[ "import csv\nimport pandas as pd\n\nwith open(\"1_3_connected.txt\") as fin, open(\"1_3_connected.csv\", 'w') as fout:\n o=csv.writer(fout)\n for line in fin:\n o.writerow(line.split())\n\ndf = pd.read_csv('1_3_connected.csv')\ndf1 = df.T\ndf1.to_csv('1_3_connected_output.csv')" ]
[ [ "pandas.read_csv" ] ]
rlagywjd802/gym-sawyer
[ "385bbeafcccb61afb9099554f6a99b16f1f1a7c5" ]
[ "sawyer/garage/misc/logger.py" ]
[ "import base64\nfrom contextlib import contextmanager\nimport csv\nimport datetime\nfrom enum import Enum\nimport json\nimport os\nimport os.path as osp\nimport pickle\nimport sys\nimport types\n\nimport dateutil.tz\nimport joblib\nimport numpy as np\n\nfrom sawyer.garage.misc.autoargs import get_all_parameters\nfr...
[ [ "numpy.median", "numpy.max", "numpy.min", "numpy.std", "numpy.average" ] ]
Seny-l/metaMIC
[ "eef5f151c49b1a306d143e3c524ea4bb90ad2efb" ]
[ "metaMIC/metaMIC.py" ]
[ "#!/usr/bin/env python\n\nimport pandas as pd\nimport numpy as np\nimport multiprocessing\nfrom optparse import OptionParser\nimport argparse\nimport operator\nimport os\nimport random\nimport sys\nimport time\nimport random\nimport subprocess\nimport pysam\nimport collections\nimport re\nimport math\nfrom Bio impo...
[ [ "numpy.zeros", "numpy.argsort", "scipy.stats.scoreatpercentile", "numpy.percentile", "pandas.merge", "pandas.concat", "numpy.array", "sklearn.ensemble.IsolationForest", "numpy.unique" ] ]
kaanberke/AI-pipelines
[ "a60c6bbe0bc0bd441f6486fcc0d513acece7fed4" ]
[ "image_classification_pipeline/dataset_builder.py" ]
[ "# %% LIBRARIES\nimport glob\nimport os\nimport random\nfrom pathlib import Path\nfrom typing import Union\n\nimport cv2\nimport pandas as pd\nimport tensorflow as tf\nfrom matplotlib import pyplot as plt\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.utils import class_weight\nfrom tensorflow....
[ [ "tensorflow.image.random_flip_up_down", "tensorflow.image.rot90", "tensorflow.image.random_flip_left_right", "tensorflow.image.resize", "matplotlib.pyplot.tight_layout", "pandas.DataFrame", "tensorflow.strings.to_number", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", ...
ddlee-cn/SemIA
[ "46114d37b09df3675d4a8285bf9d3de5242758b6" ]
[ "test.py" ]
[ "import os\nfrom collections import OrderedDict\nimport torch\n\nfrom options.test_options import TestOptions\nfrom semia.model import SemIAModel\nfrom semia.dataset import TestImgDataset\nfrom util.visualizer import Visualizer\nfrom util.util import read_image, pil2tensor, pil2np, np2tensor\n\n\nif __name__ == \"_...
[ [ "torch.utils.data.DataLoader" ] ]
Saoge123/ccgnet
[ "9359c642bd1faa4c15cae829615385761ebd8d92" ]
[ "BayesOpt/BayesOpt-GraphCNN.py" ]
[ "import sys\nimport os\nsys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))\nfrom ccgnet import experiment as exp\nfrom ccgnet import layers\nimport tensorflow as tf\nimport numpy as np\nimport time\nfrom sklearn.metrics import balanced_accuracy_score\nfrom ccgnet.Dataset import Dataset, D...
[ [ "tensorflow.compat.v1.layers.dropout", "tensorflow.reset_default_graph", "tensorflow.reshape" ] ]
locuslab/e2e-model-learning
[ "2bf43848ac26e25321fea7bfeddf2a24135aa192" ]
[ "battery_storage/main.py" ]
[ "#!/usr/bin/env python3\n\nimport argparse\nimport setproctitle\n\nimport scipy.io as sio\nimport numpy as np\n\nimport torch\n\nimport importlib\ntry: import setGPU\nexcept ImportError: pass\n\nimport os\n\nimport model_classes, nets, calc_stats\nfrom constants import *\n\nfrom torch.utils.data import DataLoader, ...
[ [ "pandas.tseries.holiday.USFederalHolidayCalendar", "numpy.save", "pandas.read_csv", "pandas.to_numeric", "pandas.DataFrame", "numpy.hstack", "numpy.log", "numpy.mean", "numpy.std", "torch.utils.data.TensorDataset", "torch.Tensor" ] ]
EStorm21/kornia
[ "b2bba7950d748ba0b8ce0cc68035a248799a1044" ]
[ "kornia/geometry/bbox.py" ]
[ "from typing import Tuple\n\nimport torch\n\nimport kornia\n\n\n@torch.jit.ignore\ndef validate_bbox(boxes: torch.Tensor) -> bool:\n \"\"\"Validate if a 2D bounding box usable or not. This function checks if the boxes are rectangular or not.\n\n Args:\n boxes: a tensor containing the coordinates of the...
[ [ "torch.ones_like", "torch.stack", "torch.Size", "torch.tensor", "torch.cat", "torch.allclose" ] ]
kshitijsriv/Computer-Vision-Spring-19
[ "7e84726d51d30ecf8a22e890aced5a48e3b5b7e5" ]
[ "Assignments/Assignment-4/Code/Question_4/panorama.py" ]
[ "# ref: https://pylessons.com/OpenCV-image-stiching-continue/\n\nimport cv2\nimport numpy as np\n\nimg_ = cv2.imread('1a.jpg')\n# img_ = cv2.resize(img_, (0,0), fx=1, fy=1)\nimg1 = cv2.cvtColor(img_, cv2.COLOR_BGR2GRAY)\n\nimg = cv2.imread('1b.jpg')\n# img = cv2.resize(img, (0,0), fx=1, fy=1)\nimg2 = cv2.cvtColor(i...
[ [ "numpy.int32", "numpy.float32" ] ]
bayartsogt-ya/TransformerTTS
[ "2f3a1b580515a8b33a624bcdf163e549916065d6" ]
[ "create_dataset.py" ]
[ "import argparse\nimport os\nfrom pathlib import Path\n\nimport librosa\nimport numpy as np\nimport tqdm\nimport ruamel.yaml\n\nfrom preprocessing.text_processing import Phonemizer, TextCleaner\nfrom utils.audio import melspectrogram\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--config', dest='CONFI...
[ [ "numpy.load", "numpy.save", "numpy.random.shuffle", "numpy.random.seed", "numpy.expand_dims", "numpy.array" ] ]
jnduli/edx_anaconda_machine_learning
[ "5eb1d967c0bbff545baf86860a6bd4074840747f" ]
[ "scatterplot.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Sep 8 12:40:35 2016\n\n@author: rookie\n\"\"\"\n\nimport pandas as pd\nimport matplotlib as mpl\n\nmpl.style.use('ggplot')\n\nstudent_dataset = pd.read_csv(\"students.data\",index_col=0)\nstudent_dataset.plot.scatter(x='G1', y='G3')\n" ]
[ [ "pandas.read_csv", "matplotlib.style.use" ] ]
ivmfnal/python_model
[ "37be0df7d58b5ad25df8d4d4cabe77129d405b05" ]
[ "python_model.py" ]
[ "import numpy as np\nimport json\n\ndef softmax(x):\n x = x - np.max(x, axis=-1, keepdims=True)\n expx = np.exp(x)\n return expx/np.sum(expx, axis=-1, keepdims=True)\n\ndef sigmoid(x):\n return 1.0/(1.0 + np.exp(-x))\n \ndef tanh(x):\n return sigmoid(2*x)*2-1\n \ndef relu(x):\n return (x+np....
[ [ "numpy.sum", "numpy.load", "numpy.empty", "numpy.zeros", "numpy.abs", "numpy.exp", "numpy.max", "numpy.dot", "numpy.tanh" ] ]
TARTRL/RankingCost
[ "4ac7faebf006d1143b98a6eada651bcab6ec5063" ]
[ "gridworld/algorithms/ranking_cost/show_weight.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 2021 The TARTRL 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/LICEN...
[ [ "numpy.maximum", "matplotlib.pyplot.savefig", "numpy.arange", "matplotlib.pyplot.subplots" ] ]
dkllrjr/PyKeller
[ "6788876a0ab273c19e1643d7bce637f6e700eb99" ]
[ "build/lib/atmos_sci/mplnet.py" ]
[ "#NASA MPLNET functions\n\nimport numpy as np\nimport os\nos.chdir('..')\nos.chdir('..')\nimport PyKeller.signal_processing.pycuda_wavelets as py_wv\nimport PyKeller.signal_processing.wavelets as wv\nimport PyKeller.signal_processing.signal_analysis as sa\nimport PyKeller.atmos_sci.met_analysis as ma\nimport matplo...
[ [ "matplotlib.pyplot.style.use", "matplotlib.pyplot.pcolormesh", "numpy.nanmax", "numpy.mean", "matplotlib.pyplot.xticks", "numpy.arange", "scipy.signal.find_peaks", "matplotlib.pyplot.show", "numpy.isnan", "numpy.array", "matplotlib.pyplot.scatter" ] ]
aadityasinha-dotcom/autoai
[ "600934c172f3c7f8bf8aa17fcc5b877d6bd628e3" ]
[ "blobcity/utils/AutoFeatureSelection.py" ]
[ "# Copyright 2021 BlobCity, Inc\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed...
[ [ "numpy.ones", "sklearn.preprocessing.MinMaxScaler", "pandas.DataFrame", "pandas.concat", "sklearn.feature_selection.SelectKBest", "sklearn.feature_selection.VarianceThreshold", "numpy.array" ] ]
shantanu-garg/Data_Science_Projects
[ "2c4287dff9e624644ce4c8dc520b83c74a6555ee" ]
[ "Gender_Classifier.py" ]
[ "from sklearn import tree\nfrom sklearn import ensemble\nfrom sklearn import neighbors\nfrom sklearn import neural_network\n\n\n#X = [height, weight, shoe size]\n\nX = [[190,80,10],[132,45,6],[189,67,9],[202,100,13],[145,67,6],[154,45,8],[148,89,9],[159,90,7],[188,78,12],[163,80,8]]\nY =['Female','Male','Male','Mal...
[ [ "sklearn.tree.DecisionTreeClassifier", "sklearn.neighbors.KNeighborsClassifier", "sklearn.neural_network.MLPClassifier", "sklearn.ensemble.RandomForestClassifier" ] ]
io8ex/Stone-Soup
[ "071abc8f6004296ab35094db04c7ec410103c419" ]
[ "stonesoup/smoother/kalman.py" ]
[ "# -*- coding: utf-8 -*-\nimport copy\nfrom functools import partial\n\nimport numpy as np\n\nfrom .base import Smoother\nfrom ..base import Property\nfrom ..types.multihypothesis import MultipleHypothesis\nfrom ..types.prediction import Prediction, GaussianStatePrediction\nfrom ..types.update import Update, Gaussi...
[ [ "numpy.linalg.inv" ] ]
neherlab/HIVEVO_recombination
[ "3160d4396069c1a403a0a122d30e6c2f0522df5f" ]
[ "scripts/activity.py" ]
[ "from trajectory import Trajectory, create_trajectory_list, filter, create_all_patient_trajectories\nfrom hivevo.patients import Patient\nimport filenames\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef get_activity(patient, region, normalize=False, remove_one_point_traj=False, min_freq=0.2):\n tim...
[ [ "numpy.sum", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.grid", "numpy.ones_like", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "numpy.array", "matplotlib.pyplot.plot", "numpy.linspace", "matplotlib....
amsks/SMARTS
[ "341ab5974bb77c90953536349e478d9b79994a64", "341ab5974bb77c90953536349e478d9b79994a64" ]
[ "smarts/core/utils/math.py", "scenarios/straight/agent_prefabs.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.arctan2", "numpy.eye", "numpy.matmul", "numpy.cos", "numpy.asarray", "numpy.clip", "numpy.array", "numpy.sin", "numpy.dot", "numpy.linalg.norm" ], [ "numpy.array", "numpy.linalg.norm" ] ]
maximiliankc/photo-fun
[ "460f0b00d58c31ff2ed0283c6c4a07b9c481c9f0" ]
[ "dsp/dsp.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\n# W = J/sample\n\n## Filtering\n\ndef sinc_kernel(cutoff, halflength): # cutoff should be between 0 and 1, TODO window function, low-pass/highpass\n n = np.arange(-halflength, halflength + 1)\n # get the sinc function:\n out = np.sinc(cutoff*n)\n #...
[ [ "numpy.sum", "numpy.fft.fft", "numpy.roll", "numpy.zeros", "numpy.conj", "numpy.abs", "numpy.arange", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "numpy.angle", "numpy.sinc", "numpy.random.normal", "matplotlib.pyplot.pl...
Phaeton-lang/baselines
[ "472c248047fbb55b5fa0e620758047b7f0a1d041" ]
[ "tensorflow-large-model-support/tflms-v2/test/manual/kerasload/ktk_resnet50_train_saveweights_h5.py" ]
[ "# Copyright 2018, 2019. IBM All Rights Reserved.\n# 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...
[ [ "numpy.zeros", "numpy.random.random", "numpy.random.normal", "numpy.random.randint", "numpy.array" ] ]
Shiguang-Guo/fairseq
[ "c9d3df5679d0829cda8fc3c818b6cab52b78dc37" ]
[ "examples/MMPT/scripts/video_feature_extractor/shard_feature.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nimport numpy as np\nimport os\nimport pickle\n\nfrom mmpt.utils import ShardedTensor\n\n\nclass Shard(object):\n def __init__(\n ...
[ [ "numpy.load" ] ]
georgetown-analytics/Labor-Violations
[ "ce4a8fcd7b396f46a262636ef200b398b3d3e614" ]
[ "src/pipeline/text_pipeline_basic.py" ]
[ "# Built from the SKLearn basic text processing pipeine\n# https://scikit-learn.org/stable/auto_examples/model_selection/grid_search_text_feature_extraction.html\n\n\"\"\"\n==========================================================\nSample pipeline for text feature extraction and evaluation\n=======================...
[ [ "sklearn.feature_extraction.text.CountVectorizer", "sklearn.linear_model.SGDClassifier", "sklearn.feature_extraction.text.TfidfTransformer", "sklearn.model_selection.GridSearchCV", "sklearn.datasets.fetch_20newsgroups" ] ]
laljarus/Programming_Self_Driving_Car
[ "b866f9cb176158badfa15d26b0a5c45e0aaf72bf" ]
[ "ros/src/tl_detector/tl_detector.py" ]
[ "#!/usr/bin/env python\nimport rospy\nfrom std_msgs.msg import Int32\nfrom geometry_msgs.msg import PoseStamped, Pose\nfrom styx_msgs.msg import TrafficLightArray, TrafficLight\nfrom styx_msgs.msg import Lane\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge\nfrom light_classification.tl_classifier...
[ [ "numpy.array", "numpy.dot", "scipy.spatial.KDTree" ] ]
shibaji7/ISWAT_CV
[ "6239f021b597b66bca213cbc28ad7185f566c0f9" ]
[ "core/contours.py" ]
[ "\"\"\"contours.py: Module is used to implement edge detection tecqniues using CV2 and apply Kernel estimations on the regions\"\"\"\n\n__author__ = \"Chakraborty, S.\"\n__copyright__ = \"\"\n__credits__ = []\n__license__ = \"MIT\"\n__version__ = \"1.0.\"\n__maintainer__ = \"Chakraborty, S.\"\n__email__ = \"shibaji...
[ [ "numpy.sum", "numpy.diff", "pandas.DataFrame", "numpy.random.seed", "numpy.copy", "matplotlib.pyplot.subplots", "numpy.exp", "numpy.log10", "matplotlib.pyplot.close", "numpy.isnan", "matplotlib.use", "numpy.linspace", "matplotlib.pyplot.style.context" ] ]
gogasca/tpu
[ "e8801a42e2e2217c464d6a7870e40f19f0ae936b" ]
[ "models/official/mask_rcnn/distributed_executer.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.contrib.tpu.TPUEstimator", "tensorflow.distribute.experimental.MultiWorkerMirroredStrategy", "tensorflow.estimator.TrainSpec", "tensorflow.contrib.cluster_resolver.TPUClusterResolver", "tensorflow.summary.FileWriter", "tensorflow.contrib.cluster_resolver.TFConfigClusterResolver...
exowanderer/BadPixelDetector
[ "1dd30eaec6f2a1c6edd40322cde395ac2cd06626" ]
[ "scripts/xgboost_simulated_bad_pixel_classifier.py" ]
[ "from itertools import product as iterproduct\n\nfrom pylab import *;ion()\nfrom sklearn.decomposition import PCA\n\nfrom sklearn.externals import joblib\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score, confusion_matrix\nfrom sklearn.preprocessing import StandardSca...
[ [ "sklearn.externals.joblib.load", "sklearn.metrics.confusion_matrix", "sklearn.metrics.accuracy_score", "sklearn.preprocessing.StandardScaler", "sklearn.decomposition.PCA" ] ]
ptype/pandas
[ "672fb498bb4b4897c2caa2e17daad66d1ba60943" ]
[ "pandas/tests/indexes/test_base.py" ]
[ "from collections import defaultdict\nfrom datetime import (\n datetime,\n timedelta,\n)\nfrom io import StringIO\nimport math\nimport re\n\nimport numpy as np\nimport pytest\n\nfrom pandas.compat import (\n IS64,\n np_datetime64_compat,\n)\nfrom pandas.util._test_decorators import async_mark\n\nimport ...
[ [ "pandas._testing.assert_numpy_array_equal", "pandas.timedelta_range", "pandas.Series", "pandas.CategoricalIndex", "pandas.core.indexes.api.ensure_index_from_sequences", "numpy.argsort", "pandas.Float64Index", "pandas._testing.assert_series_equal", "pandas.RangeIndex", "pand...
KH-Kyle/rmp_nav
[ "d598fe70664a4cdc0e9b9dd4b52e84aa3de1b551" ]
[ "topological_nav/tools/build_nav_graph.py" ]
[ "import numpy as np\nimport cv2\nimport os\nfrom topological_nav.reachability.planning import NavGraph, update_nav_graph, NavGraphSPTM\nfrom rmp_nav.simulation.gibson_map import MakeGibsonMap\nfrom rmp_nav.common.utils import get_gibson_asset_dir, pprint_dict\n\n\ndef _make_maps(map_names):\n def load_maps(datad...
[ [ "numpy.array", "numpy.dtype" ] ]
ZLLentz/ophyd
[ "c3ae3dac6f37a9befeed0ce80a7684dd645f4bbc" ]
[ "ophyd/tests/test_sim.py" ]
[ "from ophyd.sim import (SynGauss, Syn2DGauss, SynAxis, make_fake_device,\n FakeEpicsSignal, FakeEpicsSignalRO,\n FakeEpicsSignalWithRBV, clear_fake_device,\n instantiate_fake_device, SynSignalWithRegistry)\nfrom ophyd.device import (Device, Component...
[ [ "numpy.random.RandomState", "numpy.ones" ] ]
JSchapke/bazzan_environment
[ "38c7bba4be47c855f1844758c03a299d5ec94649" ]
[ "ga.py" ]
[ "import os\nimport argparse\nimport datetime\nimport random\nfrom functools import partial\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom lib.pyeasyga import GeneticAlgorithm\nfrom env import Env\n\ndef create_individual(action_space, *args):\n high = action_space.high\n low = action_space.low\n...
[ [ "numpy.zeros", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "matplotlib.pyplot.fill_between", "numpy.mean" ] ]
julramos/sktime
[ "192b5ec5e6e4e4ee2e956b48e1cd5930aa193a84" ]
[ "sktime/tests/_config.py" ]
[ "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__author__ = [\"Markus Löning\"]\n__all__ = [\"ESTIMATOR_TEST_PARAMS\", \"EXCLUDE_ESTIMATORS\", \"EXCLUDED_TESTS\"]\n\nimport numpy as np\n\nfrom hcrystalball.wrappers import HoltSmoothing...
[ [ "sklearn.preprocessing.StandardScaler", "sklearn.linear_model.LinearRegression", "sklearn.preprocessing.FunctionTransformer" ] ]
Jerrypiglet/Total3DUnderstanding
[ "655d00a988c839af3b73f8ab890c3f70c1500147" ]
[ "models/mgnet/modules/network.py" ]
[ "# Mesh Generation Net: model loader\n# author: ynie\n# date: Feb, 2020\n\nfrom models.registers import METHODS, MODULES, LOSSES\nfrom models.network import BaseNetwork\nimport torch\nfrom torch import nn\n\n@METHODS.register_module\nclass MGNet(BaseNetwork):\n\n def __init__(self, cfg):\n '''\n lo...
[ [ "torch.nn.DataParallel" ] ]
loopylangur/allennlp
[ "0fc695b08a0376317e45ae0a45584aa9eb14beb6" ]
[ "allennlp/training/trainer.py" ]
[ "import datetime\nimport logging\nimport math\nimport os\nimport time\nimport traceback\nfrom typing import Dict, Optional, Tuple, Union, Iterable, Any\n\nimport torch\nimport torch.distributed as dist\nimport torch.optim.lr_scheduler\nfrom torch.nn.parallel import DistributedDataParallel\n\nfrom allennlp.common im...
[ [ "torch.isnan", "torch.nn.parallel.DistributedDataParallel", "torch.no_grad", "torch.distributed.barrier" ] ]
PDillis/coiltraine
[ "a682aa62af5f6ecb95a837d33b70d893d3d261f6" ]
[ "network/models/coil_reverse.py" ]
[ "from logger import coil_logger\nimport torch.nn as nn\nimport torch\nimport importlib\n\nfrom configs import g_conf\nfrom coilutils.general import command_number_to_index\n\nfrom .building_blocks import Conv\nfrom .building_blocks import Branching\nfrom .building_blocks import FC\nfrom .building_blocks import Join...
[ [ "torch.nn.init.xavier_uniform_", "torch.nn.Sequential", "torch.nn.init.constant_" ] ]
thundergolfer/text-classify-with-cnn
[ "02fe7b3f85a5408f38f1fbc97382d41e80b78ff8" ]
[ "evaluate.py" ]
[ "# coding: utf-8\n\n\nimport tensorflow as tf\nimport numpy as np\nimport os\nimport time\nimport datetime\nimport manage_data\nfrom text_network import TextNetwork\nfrom tensorflow.contrib import learn\n\n\n# ### Set Params\n\n# Eval Parameters\ntf.flags.DEFINE_integer(\"batch_size\", 64, \"Batch Size (default: 64...
[ [ "tensorflow.flags.DEFINE_integer", "tensorflow.contrib.learn.preprocessing.VocabularyProcessor.restore", "numpy.argmax", "tensorflow.Graph", "tensorflow.train.latest_checkpoint", "tensorflow.flags.DEFINE_boolean", "tensorflow.Session", "tensorflow.flags.DEFINE_string", "numpy.c...
Radiian-Arts-Main/Radiian-Arts-BioSource
[ "51e08da0b3171fe96badc68780fd0f3381d49738" ]
[ "makehuman-master/makehuman/apps/autoskinblender.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\n**Project Name:** MakeHuman\n\n**Product Home Page:** http://www.makehumancommunity.org/\n\n**Github Code Home Page:** https://github.com/makehumancommunity/\n\n**Authors:** Jonas Hauquier\n\n**Copyright(c):** MakeHuman Team 2001-201...
[ [ "numpy.asarray" ] ]
Dynmi/tensorflow
[ "74f953df1b3a3e2f32ffdd0065322a0aa9df53e2" ]
[ "tensorflow/python/keras/losses.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.python.ops.math_ops.equal", "tensorflow.python.ops.math_ops.maximum", "tensorflow.python.keras.backend.categorical_crossentropy", "tensorflow.python.keras.utils.tf_utils.is_tensor_or_variable", "tensorflow.python.ops.math_ops.pow", "tensorflow.python.ops.math_ops.squared_differ...
YongfengGao/CNN-T-DB
[ "11c67eb94b6db36217a837fedd27b393532dd09b" ]
[ "test.py" ]
[ "import os,glob\r\nimport sys\r\nimport argparse\r\nimport numpy as np\r\nfrom scipy.io import savemat,loadmat\r\nimport torch\r\nfrom torch.autograd import Variable\r\nimport struct\r\nfrom shutil import rmtree\r\nfrom matplotlib import pyplot as plt\r\nfrom numpy import *\r\n\r\n\r\ndef testing():\r\n\r\n ...
[ [ "scipy.io.loadmat", "numpy.transpose", "torch.load", "numpy.zeros", "numpy.squeeze", "torch.autograd.Variable", "scipy.io.savemat", "torch.from_numpy", "numpy.array" ] ]
iBobbyTS/OpenVideoEnhance
[ "64d12d7a4c344798e5d60eafd20f8f554f852e84" ]
[ "ove/algorithm/basicvsr/fix_model.py" ]
[ "import torch\nori = torch.load('/Users/ibobby/Dataset/model_weights/BasicVSR/v-bi.pth')\nori = ori['state_dict']\nnew = {}\nfor k in ori.keys():\n new[k.replace('generator.', '')] = ori[k]\n# Rename\nm = list()\nu = list()\n# PixelShufflePack\nm += [\"upsample1.main.0.weight\", \"upsample1.main.0.bias\", \"upsa...
[ [ "torch.load" ] ]
scottma/aws-batch-monte-carlo-workshop
[ "52e14f1e2ee287b91dbc15abdb2fb55c7fef4693" ]
[ "src/simulator.py" ]
[ "'''\nver 0.1, namera@ , initial-release, Oct26'17\nver 0.2, namera@ , included execution id for traceability, Nov3'17\nver 0.3, shawo@ , Corrected typos in variable names, Apr23'18\nver 0.4, angelaw@ , Added S3 upload flag, removed risk calculations, Oct17'18\n\n\nHedge Your Own Funds: Running Monte Carlo Simula...
[ [ "numpy.where", "pandas.DataFrame", "pandas.concat" ] ]
openalgorithmdevelopers/MATSS-Original
[ "76b9cc7a23fd83b0cca0249addcccabd9bb8bf92" ]
[ "generate_OPENSMILE_features_csv.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Sep 28 17:46:55 2021\r\n\r\n@author: bhupendra.singh\r\n\"\"\"\r\n\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom tqdm import tqdm\r\nimport opensmile\r\n\r\n\r\ntotalSubjects = 21\r\ntotalUtterances = 60 #the number of utterances of words in a folde...
[ [ "pandas.DataFrame" ] ]
TobyLing/Comparative-Study-of-Deep-Learning-Models-for-Segmentation-of-Corpus-Callosum
[ "c1840440c29e1bcc6fac3830003b026d7f452513" ]
[ "networks/resnet34.py" ]
[ "import torch\n\nfrom torchvision import models\n\nfrom tensorboardX import SummaryWriter\n\nwriter = SummaryWriter()\n\nresnet = models.resnet34(pretrained=True)\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\nmodel = resnet.to(device)\n\ndummy_input = torch.zeros(8, 3,512,512)\n\nw...
[ [ "torch.zeros", "torch.cuda.is_available" ] ]