repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
rijobro/CCPi-Framework | [
"ff08216d4e6fef84659b43155c5c52484b1dc543",
"ff08216d4e6fef84659b43155c5c52484b1dc543"
] | [
"Wrappers/Python/test/test_TranslateFunction.py",
"Wrappers/Python/ccpi/optimisation/functions/Rosenbrock.py"
] | [
"# -*- coding: utf-8 -*-\n# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).\n\n# Copyright 2017 UKRI-STFC\n# Copyright 2017 University of Manchester\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# ... | [
[
"numpy.testing.assert_array_equal",
"numpy.testing.assert_array_almost_equal"
],
[
"numpy.empty_like"
]
] |
pingrunhuang/mars | [
"cde691285d921add5460944764c7278e7ddec8ff"
] | [
"mars/scheduler/tests/test_graph.py"
] | [
"# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"numpy.random.random"
]
] |
EEdwardsA/Twitoff | [
"e1c2613c233e81c5aa50fecb89e90c75b9bbdd01"
] | [
"twitoff/predict.py"
] | [
"\"\"\"Prediction of Users based on tweet embeddings\"\"\"\n\nimport numpy as np\nfrom sklearn.linear_model import LogisticRegression\nfrom .models import User\nfrom .twitter import vectorize_tweet\n\ndef predict_user(user0_name, user1_name, hypo_tweet_text):\n \"\"\"\n Determine and return which user is more... | [
[
"numpy.array",
"sklearn.linear_model.LogisticRegression",
"numpy.vstack"
]
] |
darrelrobinson/rdd | [
"54b9c328087ae22ac38073aab2ee930459b2364a"
] | [
"build/lib/rdd/test.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport functions as rdd\n\n'''\nTo Do:\n - Put testing functions in another folder\n - test different input types, combos of bad items, etc\n'''\n\n# Set seed\nnp.random.seed(42)\n\n# Simulate data\nN = 10000\n# x = np.random.unifo... | [
[
"numpy.round",
"numpy.random.normal",
"numpy.random.seed",
"pandas.DataFrame"
]
] |
georgegunter/flow | [
"15848ec9bafd250364a51fa162786037645b19bf"
] | [
"examples/Old Code/run_follower_stopper_ring.py"
] | [
"from flow.controllers import FollowerStopper, IDMController, ContinuousRouter, OVMController\nfrom flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams\nfrom flow.core.params import VehicleParams\nfrom flow.envs.ring.accel import AccelEnv, ADDITIONAL_ENV_PARAMS\nfrom flow.networks.ring import Ri... | [
[
"pandas.read_csv",
"numpy.linspace",
"numpy.std",
"numpy.mean",
"numpy.savetxt",
"numpy.array"
]
] |
pdatlab/rpy2_utils | [
"8d563592550272604cf6453c6d4dd121f3da49b6"
] | [
"rpy2_utils/robjects.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n\n\"\"\"\nimport rpy2\nimport pandas as pd\n\n\nclass DataFrame():\n \n def __init__(self,r_df):\n \"\"\"\n import rpy2_utils as ru\n dfh = ru.robjects.DataFrame(r_df)\n \"\"\"\n \n #TODO: Verify data type\n self.r = r_df\n ... | [
[
"pandas.concat",
"pandas.DataFrame"
]
] |
TKone7/python-docs-samples | [
"ef3dd032d6fde6a47b944604788bb674e8e51b66"
] | [
"data-science-onramp/ai-platform/modules/trainer/tfkeras_model/task.py"
] | [
"# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https: // www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to ... | [
[
"tensorflow.keras.callbacks.LearningRateScheduler",
"tensorflow.compat.v1.logging.set_verbosity"
]
] |
austereantelope/pymc | [
"657eb2a7e46fa30e61d3c1b12a8ce15020794a2c"
] | [
"pymc/bart/pgbart.py"
] | [
"# Copyright 2020 The PyMC Developers\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 appli... | [
[
"numpy.log",
"numpy.random.random",
"numpy.unique",
"numpy.isnan",
"numpy.random.choice",
"numpy.arange",
"numpy.ones",
"numpy.all",
"numpy.full_like",
"numpy.random.normal",
"numpy.array",
"numpy.exp",
"numpy.zeros"
]
] |
uwmisl/poretitioner | [
"0ff9f67a3b25fdcb460b11c970b2ed366da07da7"
] | [
"src/poretitioner/hdf5/hdf5.py"
] | [
"\"\"\"\n===================\nhdf5.py\n===================\n\nThe Hierarchical Data Format version 5 (HDF5) defines a\na file format for storing and organzing massive amounts of\nhiearchical data.\n\nThis module attempts to encapsulate the rich features of HDF5\nalongside your favorite python3.7+ constructs\n(e.g d... | [
[
"numpy.copy",
"numpy.empty"
]
] |
elerac/codepattern | [
"8ee7d04870b1d9b64045a15c488792b0f0f9aef3"
] | [
"examples/capture_x.py"
] | [
"\"\"\"\nCapture projection pattern and decode x-coorde.\n\"\"\"\nimport cv2\nimport numpy as np\nimport structuredlight as sl\n\ndef imshowAndCapture(cap, img_pattern, delay=250):\n cv2.imshow(\"\", img_pattern)\n cv2.waitKey(delay)\n ret, img_frame = cap.read()\n img_gray = cv2.cvtColor(img_frame, cv2... | [
[
"numpy.clip"
]
] |
hdkai/Plasma | [
"1942d7fe5f6b41c9a16c8e2d1b6c7cf263307c39"
] | [
"torchplasma/filters/gaussian.py"
] | [
"# \n# Plasma\n# Copyright (c) 2021 Yusuf Olokoba.\n#\n\nfrom torch import arange, exp, tensor, Tensor\nfrom torch.nn.functional import conv2d, conv3d, pad\nfrom typing import Tuple\n\ndef gaussian_kernel (kernel_size: int, sigma: float = -1.) -> Tensor:\n \"\"\"\n Normalized 1D Gaussian kernel.\n This... | [
[
"torch.nn.functional.conv2d",
"torch.nn.functional.conv3d",
"torch.arange"
]
] |
iheb-brini/fitness-lab | [
"2d82d7a2ecba27f535cda880865e6d9ed446eac5",
"2d82d7a2ecba27f535cda880865e6d9ed446eac5"
] | [
"Modules/nn/architectures/DenseNet/classes.py",
"Modules/nn/applications/GAN/WGAN/classes.py"
] | [
"from torch import nn, cat\n\nfrom .constants import NUM_CONVS_IN_DENSE_BLOCKS\n\n\ndef conv_block(in_channels, out_channels):\n blk = nn.Sequential(\n nn.BatchNorm2d(in_channels), nn.ReLU(),\n nn.Conv2d(in_channels, out_channels,\n kernel_size=3, padding=1)\n )\n\n return bl... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.Flatten",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"torch.nn.ConvTranspose2d",
"torch.randn",
"t... |
gabinsane/myGym | [
"a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a",
"a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a"
] | [
"myGym/envs/base_env.py",
"myGym/stable_baselines_mygym/common/runners.py"
] | [
"import pybullet_data\nimport glob\nimport pybullet\nimport pybullet_utils.bullet_client as bc\nimport time\nimport numpy as np\nfrom gym.utils import seeding\nimport gym\nimport os\nimport inspect\nfrom myGym.envs.camera import Camera\nimport pkg_resources\ncurrentdir = pkg_resources.resource_filename(\"myGym\", \... | [
[
"numpy.arange",
"numpy.array"
],
[
"numpy.zeros",
"numpy.clip"
]
] |
dsilvalo28/AIVA-DAIA | [
"55b1f547aaf850df1ea3ddd9a2f6b5a2af410889"
] | [
"src/TreeDetector.py"
] | [
"import cv2\nimport numpy as np\nfrom src.Detector import Detector\n\n\n# Tree detector class #\nclass TreeDetector(Detector):\n def __init__(self, image_path=None):\n self.__image_path = image_path\n self.image = None\n if image_path is not None:\n self.read(self.__image_path)\n\... | [
[
"numpy.array",
"numpy.mean",
"numpy.dstack"
]
] |
aholinch/Keplers-Goat-Herd | [
"18cc49465353eb6ce6ce9e9e84d81fca9f5d3c59"
] | [
"util/kgh.py"
] | [
"import numpy as np, time\n\ndef mToE(m, e):\n if e <= 0.5:\n return mToE(m,e,10)\n\n if e <= 0.9:\n return mToE(m,e,25)\n\n if e <= 0.95:\n return mToE(m,e,50)\n\n if e <= 0.99:\n return mToE(m,e,128)\n\n return mToE(m,e,256)\n\n\ndef mToE(m, eccentricity, N_it):\n \"\... | [
[
"numpy.cosh",
"numpy.abs",
"numpy.arange",
"numpy.cos",
"numpy.sinh",
"numpy.sin",
"numpy.sum"
]
] |
liuky74/detr | [
"e2b59573dcb86720562dfbdb02977ef996857025"
] | [
"models/backbone.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nBackbone modules.\n\"\"\"\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn.functional as F\nimport torchvision\nfrom torch import nn\nfrom torchvision.models._utils import IntermediateLayerGetter\nfrom typing impor... | [
[
"torch.ones",
"torch.zeros"
]
] |
garciadias/k-means_on_apogee | [
"7c3315a0d305f255c121a015607e22e5a46bba82"
] | [
"src/create_dataset.py"
] | [
"\"\"\"Create csv with spectral data\"\"\"\nfrom os import getcwd\nfrom pathlib import Path\n\nfrom astropy.io import fits\nimport pandas as pd\n\nPROJECT_PATH = getcwd()\nSPECTRA = {}\nfor spectrum_path in Path('%s/data/fits/' % PROJECT_PATH).glob('*fits'):\n spectrum_fits = fits.open(spectrum_path)\n spectr... | [
[
"pandas.DataFrame"
]
] |
Vishal-V/federated | [
"2575ac3c571004ba554bd0c0d11c2e307ff22d57"
] | [
"tensorflow_federated/python/core/impl/executors/execution_context_test.py"
] | [
"# Lint as: python3\n# Copyright 2019, The TensorFlow Federated 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# ... | [
[
"tensorflow.compat.v1.enable_v2_behavior",
"tensorflow.constant",
"tensorflow.greater",
"numpy.int32",
"tensorflow.cast",
"tensorflow.add",
"numpy.float32",
"tensorflow.data.Dataset.range"
]
] |
ronghanghu/cmn | [
"85644ad56f8f62d04a5e8636ad3efe9ef7b34705",
"85644ad56f8f62d04a5e8636ad3efe9ef7b34705"
] | [
"util/im_processing.py",
"models/visual7w_attention_model.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport skimage.transform\nimport numpy as np\n\ndef rectify_bboxes(bboxes, height, width):\n bboxes = np.maximum(bboxes, 0)\n bboxes[:, 2:4] = np.maximum(bboxes[:, 0:2], bboxes[:, 2:4])\n bboxes[:, 0] = np.minimum(bboxes[:, 0], width-1)\n... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.nonzero",
"numpy.min",
"numpy.round",
"numpy.max",
"numpy.floor",
"numpy.array",
"numpy.zeros"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.reduce_max",
"tensorflow.shape",
"tensorflow.reshape",
"tensorflow.ad... |
PrathikShirolkar/AutomaticImageColization | [
"981a011cbd32f741668738cafc1dd9ed44965402"
] | [
"viewFile.py"
] | [
"from tensorflow.python import pywrap_tensorflow\ncheckpoint_path = 'tmodel.ckpt-100'\n#checkpoint_path = \"deeplab_resnet_init.ckpt\"\nreader = pywrap_tensorflow.NewCheckpointReader(checkpoint_path)\nvar_to_shape_map = reader.get_variable_to_shape_map()\nfor key in var_to_shape_map:\n print(\"tensor_name: \", k... | [
[
"tensorflow.python.pywrap_tensorflow.NewCheckpointReader"
]
] |
skn123/FAST | [
"d66522260bf65c5ab74d75050131d5a353cbf602"
] | [
"source/FAST/Examples/Python/convert_video_to_image_frames.py"
] | [
"## @example convert_video_to_image_frames.py\n# This example loads a video and converts to a stream of image frames and display the\n# individual frames with matplotlib.\n#\n# Note that additional dependencies are required to stream videos in FAST:\n# Linux: sudo apt install ubuntu-restricted-extras libgstreamer1.... | [
[
"numpy.asarray",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
shankharaj29/tensor2tensor | [
"5a867d031bd493eeb7d2776e1118d1594ff0a623",
"5a867d031bd493eeb7d2776e1118d1594ff0a623",
"5a867d031bd493eeb7d2776e1118d1594ff0a623"
] | [
"tensor2tensor/models/video/savp.py",
"tensor2tensor/bin/t2t_attack.py",
"tensor2tensor/data_generators/algorithmic.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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 requir... | [
[
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.pad",
"tensorflow.summary.scalar",
"tensorflow.squeeze",
"tensorflow.layers.dense",
"tensorflow.stop_gradient",
"tensorflow.truncated_normal_initializer",
"tensorflow.logical_not",
"tensorflow.layers.conv2d",
"tensorf... |
ealopez/pycroscopy | [
"9f7c0543b67eaa0668296295fc5f492360c130a0",
"9f7c0543b67eaa0668296295fc5f492360c130a0"
] | [
"pycroscopy/analysis/fitter.py",
"pycroscopy/core/io/write_utils.py"
] | [
"\"\"\"\nCreated on 7/17/16 10:08 AM\n@author: Numan Laanait, Suhas Somnath, Chris Smith\n\"\"\"\n\nfrom __future__ import division, print_function, absolute_import, unicode_literals\n\nimport numpy as np\nimport psutil\nimport scipy\nimport h5py\nimport time as tm\nfrom .guess_methods import GuessMethods\nfrom .fi... | [
[
"numpy.isin",
"numpy.array",
"scipy.optimize.__dict__.keys",
"numpy.floor"
],
[
"numpy.ones_like",
"numpy.asarray",
"numpy.arange",
"numpy.all",
"numpy.argmax",
"numpy.zeros_like",
"numpy.prod",
"numpy.savetxt",
"numpy.argsort",
"numpy.repeat",
"nump... |
Maxew42/Trashedy | [
"e7e43f172ef4a039e134cac26980f59fede24423"
] | [
"web-site/server/helpers/coco_eval.py"
] | [
"import json\nimport tempfile\n\nimport numpy as np\nimport copy\nimport time\nimport torch\nimport torch._six\n\nfrom pycocotools.cocoeval import COCOeval\nfrom pycocotools.coco import COCO\nimport pycocotools.mask as mask_util\n\nfrom collections import defaultdict\n\nimport helpers.utils as utils\n\n\nclass Coco... | [
[
"numpy.unique",
"numpy.asarray",
"numpy.min",
"numpy.concatenate",
"numpy.max",
"torch.stack",
"numpy.array"
]
] |
Sinovel/QUANTAXIS | [
"97f1ea2140f58c92ff5c84b851886d9eda1f9ac3",
"97f1ea2140f58c92ff5c84b851886d9eda1f9ac3",
"97f1ea2140f58c92ff5c84b851886d9eda1f9ac3"
] | [
"QUANTAXIS/QAUtil/QATransform.py",
"QUANTAXIS/QAARP/QAUser.py",
"QUANTAXIS/QAFetch/QATdx_adv.py"
] | [
"# coding:utf-8\n#\n# The MIT License (MIT)\n#\n# Copyright (c) 2016-2019 yutiansut/QUANTAXIS\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 withou... | [
[
"numpy.asarray",
"pandas.DataFrame"
],
[
"pandas.Timestamp",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
]
] |
google/parallel_accel | [
"b58fda1c3a22f2aaa9a97337d602cd72c49ee8be"
] | [
"parallel_accel/Analysis/benchmarks/gralt/gralt_benchmarks.py"
] | [
"# Copyright 2021 The ParallelAccel 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... | [
[
"tensorflow.constant",
"tensorflow.GradientTape"
]
] |
ChuanTianML/mxnet_word_lm | [
"231b67370712a5dccae9433858dd66800005a00f"
] | [
"data.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.zeros"
]
] |
JosephRynkiewicz/CIFAR100 | [
"2eeef95480fdc8454296cbe2f90011aef660c6a8"
] | [
"utils.py"
] | [
"'''Some helper functions for PyTorch, including:\n - get_mean_and_std: calculate the mean and std value of dataset.\n - msr_init: net parameter initialization.\n - progress_bar: progress bar mimic xlua.progress.\n'''\nimport os\nimport sys\nimport time\nimport math\nimport torch\nimport torch.nn as nn\nim... | [
[
"torch.utils.data.DataLoader",
"torch.zeros"
]
] |
dmitry-vorobiev/kaggle-deepfake-detection-challenge | [
"d8b545e1944342ba25209f1f62d9ca70314ab73a"
] | [
"src/model/loss.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch import FloatTensor, LongTensor, Tensor\nfrom typing import Dict, Tuple\n\nfrom . import ModelOut\nfrom .ops import act, ones, zeros, reshape_as\nfrom torch import nn\n\nBatch = Tuple[FloatTensor, LongTensor]\n\n\ndef activation_loss(x: Tensor, y: LongTensor... | [
[
"torch.nn.functional.log_softmax",
"torch.nn.functional.nll_loss",
"torch.nn.functional.l1_loss",
"torch.cat"
]
] |
srisharaan/tensorflow | [
"c787e6cdbbf57434599a42bbdc5e4d4df98ed045"
] | [
"tensorflow/python/compat/compat.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.tf_export.tf_export"
]
] |
tkipf/gym-gridworld | [
"807c88373023dc4240e8688e2744ea3dccd560bc"
] | [
"utils.py"
] | [
"\"\"\"Utility functions.\"\"\"\n\nimport h5py\nimport numpy as np\n\nfrom torch.utils import data\n\n\ndef save_dict_h5py(data, fname):\n \"\"\"Save dictionary containing numpy arrays to h5py file.\"\"\"\n with h5py.File(fname, 'w') as hf:\n for key in data.keys():\n hf.create_dataset(key, ... | [
[
"numpy.array"
]
] |
sanidhya-singh/ktrain | [
"f91f703e3ecd189c035a532590e6c6ec26a733a3"
] | [
"ktrain/tests/test_chinese_text.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nTests of ktrain text classification flows\n\"\"\"\nimport sys\nimport os\nos.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\";\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\"\nsys.path.insert(0,'../..')\nimport IPython\nfrom unittest import TestCase, main, skip\nimport numpy as np\nimport ... | [
[
"numpy.argmax"
]
] |
SueSu-Wish/incubator-airflow | [
"5813c0c8e1e9832d403e5a8f5783d0cb77f2748c"
] | [
"airflow/www/views.py"
] | [
"# -*- coding: utf-8 -*-\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 to in wri... | [
[
"pandas.set_option",
"pandas.to_datetime"
]
] |
emanuele-albini/emutils | [
"d5e3939da8a14b629879f06d87d4bd371e7117ab",
"d5e3939da8a14b629879f06d87d4bd371e7117ab",
"d5e3939da8a14b629879f06d87d4bd371e7117ab"
] | [
"src/emutils/tf/math.py",
"src/emutils/dsutils/utils.py",
"snippets/reduction.py"
] | [
"import tensorflow as tf\n\n\ndef cov(x):\n mean_x = tf.reduce_mean(x, axis=0, keepdims=True)\n mx = tf.matmul(tf.transpose(mean_x), mean_x)\n vx = tf.matmul(tf.transpose(x), x) / tf.cast(tf.shape(x)[0], tf.float64)\n cov_xx = vx - mx\n return cov_xx\n\n\ndef inv_cov(x):\n return tf.linalg.inv(cov... | [
[
"tensorflow.transpose",
"tensorflow.shape",
"tensorflow.reduce_mean"
],
[
"pandas.concat",
"numpy.array",
"pandas.DataFrame",
"numpy.meshgrid"
],
[
"sklearn.random_projection.GaussianRandomProjection",
"sklearn.manifold.LocallyLinearEmbedding",
"pandas.DataFrame",
... |
lite-david/polymath | [
"cf1addc75e203fa606ebc6d32bc552fb3975ea99"
] | [
"polymath/srdfg/base.py"
] | [
"\nfrom polymath import UNSET_SHAPE, DEFAULT_SHAPES\nimport builtins\nimport operator\nfrom collections import OrderedDict, Mapping, Sequence, deque\nimport functools\nfrom numbers import Integral, Rational, Real\nimport contextlib\nimport traceback\nimport uuid\nimport numpy as np\nimport importlib\nfrom .graph im... | [
[
"numpy.product",
"numpy.expand_dims",
"numpy.asarray",
"numpy.squeeze",
"numpy.int",
"numpy.prod",
"numpy.ravel_multi_index"
]
] |
luanagbmartins/cavia | [
"91f093af9d6f463ee651db533f6c2acc637c7e9f"
] | [
"rl/envs/mujoco/ant.py"
] | [
"import numpy as np\r\nfrom gym.envs.mujoco import AntEnv as AntEnv_\r\n\r\n\r\nclass AntEnv(AntEnv_):\r\n @property\r\n def action_scaling(self):\r\n if (not hasattr(self, 'action_space')) or (self.action_space is None):\r\n return 1.0\r\n if self._action_scaling is None:\r\n ... | [
[
"numpy.square",
"numpy.abs",
"numpy.isfinite",
"numpy.clip",
"numpy.zeros"
]
] |
leniel/DataMining | [
"f249f636ede67a29de986b8f34c9cbe75b680f47",
"f249f636ede67a29de986b8f34c9cbe75b680f47",
"f249f636ede67a29de986b8f34c9cbe75b680f47"
] | [
"Classification/Work 2/NaiveBayes/naivebayes_crossvalidation.py",
"Classification/Work 2/NeuralNetwork/neuralnet.py",
"Classification/Work 2/SVM/svm_crossvalidation.py"
] | [
"'''\n\b Created on Sat Nov 05 2016\n\b\n\b Copyright (c) 2016 Leniel Macaferi's Consulting\n'''\n\nimport os\nimport pandas as pd\nfrom sklearn.naive_bayes import GaussianNB\nfrom sklearn.model_selection import cross_val_score\n\npath = os.path.realpath('..')\n\n# Loading the data used to train\ntrainingSet = pd.r... | [
[
"sklearn.naive_bayes.GaussianNB",
"sklearn.model_selection.cross_val_score"
],
[
"sklearn.neural_network.MLPClassifier"
],
[
"sklearn.model_selection.cross_val_score",
"sklearn.svm.SVC"
]
] |
hieuhoang/parSentExtract | [
"9e7aa4c0f0f93934d7f6986d655195bf5bd8e03d"
] | [
"train.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport time\n\nfrom six.moves import xrange\n\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"1\"\n\nimport numpy as np\nimport tensorflow as tf\n\nimport utils\nfrom model import Config, BiRNN\n\... | [
[
"tensorflow.flags.DEFINE_boolean",
"tensorflow.local_variables_initializer",
"tensorflow.flags.DEFINE_string",
"numpy.ceil",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.flags.DEFINE_float",
"tensorflow.flags.DEFINE_integer",
"tensorflow.app.run"... |
jamesrosstwo/idr-dif | [
"e900af5f440b943a7a46134a5afe7a81dd888a05",
"e900af5f440b943a7a46134a5afe7a81dd888a05",
"e900af5f440b943a7a46134a5afe7a81dd888a05"
] | [
"code/utils/general.py",
"code/utils/plots.py",
"code/training/exp_storage.py"
] | [
"import os\nfrom glob import glob\nfrom pathlib import Path\n\nimport torch\n\n\n_root_dir = os.path.dirname(os.path.abspath(__file__))\nROOT_PATH = Path(_root_dir).parent.parent\n\ndef mkdir_ifnotexists(directory):\n if not os.path.exists(directory):\n os.mkdir(directory)\n\ndef get_class(kls):\n part... | [
[
"torch.index_select",
"torch.arange"
],
[
"torch.ones",
"torch.max",
"numpy.linspace",
"torch.cat",
"torch.randperm",
"torch.det",
"numpy.arange",
"numpy.min",
"torch.min",
"torch.from_numpy",
"torch.tensor",
"numpy.concatenate",
"numpy.max",
"nu... |
usimarit/selfattention-segan | [
"563a86e825f1e4067ec1fd3bed36e89e11434388"
] | [
"sasegan/datasets/test_dataset.py"
] | [
"# Copyright 2020 Huy Le Nguyen (@usimarit)\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 ... | [
[
"tensorflow.TensorShape"
]
] |
mwussow/pytorch_geometric | [
"01c68f9b58c94d9efd1f6e39b9c85177aae521bb",
"01c68f9b58c94d9efd1f6e39b9c85177aae521bb"
] | [
"test/nn/conv/test_sg_conv.py",
"test/nn/glob/test_sort.py"
] | [
"import torch\nfrom torch_geometric.nn import SGConv\n\n\ndef test_sg_conv():\n in_channels, out_channels = (16, 32)\n edge_index = torch.tensor([[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]])\n num_nodes = edge_index.max().item() + 1\n x = torch.randn((num_nodes, in_channels))\n\n conv = SGConv(in_channel... | [
[
"torch.randn",
"torch.tensor"
],
[
"torch.randn",
"torch.arange"
]
] |
Hung-Jia-Jun/yolo_keras_camera_realtime | [
"d74ea9a95ed625337765f4fea9e6f8881ee0a9cf"
] | [
"test_yolo_2.py"
] | [
"#! /usr/bin/env python\n\"\"\"Run a YOLO_v2 style detection model on test images.\"\"\"\nimport argparse\nimport colorsys\nimport imghdr\nimport os\nimport random\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom PIL import Image, ImageDraw, ImageFont\n\nfrom yad2k.mo... | [
[
"numpy.array",
"numpy.expand_dims",
"numpy.floor"
]
] |
leonmkim/gym-kuka-mujoco | [
"ed45ae74d10e69f4e51439de2d1d0c0811623b6b",
"a8a40bb08a1a1a269a2386ca0d102d62d8384206"
] | [
"gym_kuka_mujoco/controllers/impedance_controller_v2.py",
"examples/attic/sweep_learning.py"
] | [
"import os\n\nimport numpy as np\nfrom gym import spaces\nimport mujoco_py\n\nfrom gym_kuka_mujoco.envs.assets import kuka_asset_dir\nfrom gym_kuka_mujoco.utils.quaternion import identity_quat, subQuat, quatAdd, mat2Quat\nfrom gym_kuka_mujoco.utils.kinematics import forwardKinSite, forwardKinJacobianSite\nfrom .bas... | [
[
"numpy.sqrt",
"numpy.eye",
"numpy.ones",
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.logspace"
]
] |
surisdi/DPC | [
"ce6fe25938c1bebb7f654d0c8f8479bf92ab4054",
"ce6fe25938c1bebb7f654d0c8f8479bf92ab4054"
] | [
"utils/utils.py",
"utils/pairwise_hyp_cone.py"
] | [
"import torch\nimport numpy as np\nimport os\nfrom datetime import datetime\nimport glob\nimport matplotlib.pyplot as plt\nplt.switch_backend('agg')\nfrom collections import deque\nfrom torchvision import transforms\n\n\ndef save_checkpoint(state, is_best=0, gap=1, filename='models/checkpoint.pth.tar', keep_all=Fal... | [
[
"matplotlib.pyplot.tight_layout",
"torch.max",
"matplotlib.pyplot.switch_backend",
"numpy.squeeze",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.clf",
"numpy.mean",
"numpy.shape",
... |
JunweiPan3013/featuretools | [
"b0c8478f9bf8f46217726e3a32de51e083d98351"
] | [
"featuretools/computational_backends/pandas_backend.py"
] | [
"import cProfile\nimport logging\nimport os\nimport pstats\nimport sys\nimport warnings\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\nimport pandas.api.types as pdtypes\nfrom future import standard_library\n\nfrom .base_backend import ComputationalBackend\nfrom .feature_tree import Feat... | [
[
"pandas.api.types.is_categorical_dtype",
"pandas.merge",
"pandas.concat",
"pandas.api.types.CategoricalDtype",
"pandas.Series",
"pandas.DataFrame"
]
] |
wdzhong/ASTGCN-PyTorch | [
"4f76d2302b6fd4227c4846e06ff11560d8a8237b"
] | [
"lib/utils.py"
] | [
"# -*- coding:utf-8 -*-\n# pylint: disable=no-member\n\nimport csv\nimport numpy as np\nfrom scipy.sparse.linalg import eigs\n\nfrom .metrics import mean_absolute_error, mean_squared_error, masked_mape_np\n\n\ndef search_data(sequence_length, num_of_batches, label_start_idx,\n num_for_predict, units,... | [
[
"numpy.concatenate",
"numpy.identity",
"numpy.sum",
"scipy.sparse.linalg.eigs"
]
] |
JacopoBugini/SpotMask | [
"0be6c35283b89d5bbddcdb2b65a67a59fac4d264"
] | [
"utils/utils.py"
] | [
"import numpy as np\nimport cv2\nimport tensorflow.keras as keras\nfrom tensorflow.keras.preprocessing import image\nimport numpy as np\n\n# -------------------------------------------------------------------\n# Load models\n# -------------------------------------------------------------------\n\n# Load the trained... | [
[
"tensorflow.keras.models.load_model",
"numpy.amax",
"numpy.argmax",
"tensorflow.keras.preprocessing.image.img_to_array"
]
] |
visatish/ray | [
"dc76e51a60652b3210c93f81df6dafcf461d4431",
"dc76e51a60652b3210c93f81df6dafcf461d4431",
"dc76e51a60652b3210c93f81df6dafcf461d4431"
] | [
"python/ray/tune/logger.py",
"python/ray/rllib/utils/tf_run_builder.py",
"python/ray/rllib/tuned_examples/regression_tests/regression_test.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport csv\nimport json\nimport logging\nimport numpy as np\nimport os\nimport yaml\n\nfrom ray.tune.log_sync import get_syncer\nfrom ray.tune.result import NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S, \... | [
[
"numpy.isnan",
"tensorflow.Summary",
"numpy.issubdtype",
"tensorflow.summary.FileWriter"
],
[
"tensorflow.RunOptions",
"tensorflow.python.client.timeline.Timeline",
"tensorflow.RunMetadata"
],
[
"numpy.median"
]
] |
h-mayorquin/time_series_basic | [
"654fb67ef6258b3f200c15a2b8068ab9300401d7"
] | [
"hdf5_loading_three_bumps.py"
] | [
"import h5py\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\n\nfrom signals.aux_functions import gaussian_bump\nimport nexa.loading as load\nfrom visualization.sensors import visualize_SLM_hdf5\nfrom visualization.sensors import visualize_STDM_hdf5\nfrom visualization.s... | [
[
"numpy.arange",
"matplotlib.gridspec.GridSpec",
"matplotlib.pyplot.close",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
sun-yitao/GrabAIChallenge | [
"05946339e5a478216d7a9234e29e9bd7af5b3492"
] | [
"ws-dan/utils.py"
] | [
"import numpy as np\n\n\ndef accuracy(output, target, topk=(1,)):\n \"\"\"Computes the accuracy@k for the specified values of k\"\"\"\n maxk = max(topk)\n batch_size = target.size(0)\n\n _, pred = output.topk(maxk, 1, True, True)\n pred = pred.t()\n correct = pred.eq(target.view(1, -1).expand_as(p... | [
[
"numpy.array"
]
] |
cinmoy98/neural-network-visualizer | [
"bbb8a5237fe60ee552e3f343ab03707d381895dc"
] | [
"app.py"
] | [
"\nimport streamlit as st\nimport json\nimport requests\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nURI = 'http://neural-net-viz-flask.herokuapp.com'\n\nst.title('Nural Network Visualizer')\nst.sidebar.markdown('## Input Image')\n\nif st.button('Get Random Prediction'):\n response = requests.post(URI... | [
[
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.tight_layout",
"numpy.reshape",
"numpy.ones",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xticks",
"numpy.array",
"matplotlib.pyplot.figure"
]
] |
stanford-oval/word-language-model | [
"3be3f65a198b518b66e22a910f28f83324db3825"
] | [
"data.py"
] | [
"import os\nimport torch\n\nclass Dictionary(object):\n \"\"\"Build word2idx and idx2word from Corpus(train/val/test)\"\"\"\n def __init__(self):\n self.word2idx = {} # word: index\n self.idx2word = [] # position(index): word\n\n def add_word(self, word):\n \"\"\"Create/Update word2idx... | [
[
"torch.LongTensor"
]
] |
KexianShen/acados | [
"2981d29dc6ecdaabdb39cd6c0d784724704afe4a",
"2981d29dc6ecdaabdb39cd6c0d784724704afe4a"
] | [
"interfaces/acados_template/acados_template/acados_sim.py",
"examples/acados_python/getting_started/mhe/minimal_example_mhe.py"
] | [
"# -*- coding: future_fstrings -*-\n#\n# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,\n# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,\n# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,\n# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf,... | [
[
"numpy.array"
],
[
"numpy.diag",
"numpy.linspace",
"numpy.random.standard_normal",
"numpy.eye",
"numpy.ndarray",
"numpy.linalg.norm",
"numpy.array",
"numpy.zeros"
]
] |
dmytrov/gaussianprocess | [
"7044bd2d66f44e10656fee17e94fdee0c24c70bb"
] | [
"code/utils/numerical/ssyrk.py"
] | [
"import os\nimport sys\nimport time\nimport numpy\nfrom numpy import zeros\nfrom numpy.random import randn\nfrom scipy.linalg import blas\n\n\ndef run_ssyrk(N, l):\n\n A = randn(N, N).astype('float32', order='F')\n C = zeros((N, N), dtype='float32', order='F')\n\n start = time.time()\n for i in range(0,... | [
[
"scipy.linalg.blas.ssyrk",
"numpy.zeros",
"numpy.random.randn"
]
] |
nadaved1/hailo_model_zoo | [
"42b716f337dde4ec602022a34d6a07a1bbd45539",
"42b716f337dde4ec602022a34d6a07a1bbd45539"
] | [
"hailo_model_zoo/utils/data.py",
"hailo_model_zoo/core/postprocessing/detection/efficientdet.py"
] | [
"from builtins import object\nimport os\nimport cv2\nimport numpy as np\nimport tensorflow as tf\n\nfrom hailo_model_zoo.core.datasets import dataset_factory\nfrom hailo_model_zoo.utils.video_utils import VideoCapture\n\n\ndef _open_image_file(img_path):\n image = tf.io.read_file(img_path)\n image = tf.cast(t... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.data.experimental.unbatch",
"tensorflow.compat.v1.string_split",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.cast",
"tensorflow.compat.v1.py_func",
"tensorflow.compat.v1.data.make_initializable_iterator",
"tensorflow.image.r... |
xenron/coco | [
"e318d534127b769612716c05d40e3d5b090eb5a3"
] | [
"package/ml/regression/logistic.py"
] | [
"from sklearn import linear_model\nfrom ml.regression.base import Regression\n\n\nclass LogisticRegression(Regression):\n\n def __init__(self):\n Regression.__init__(self)\n self._name = \"Logistic\"\n self._model = linear_model.LogisticRegression(C=1e5)\n\n def predict_proba(self, data):... | [
[
"sklearn.linear_model.LogisticRegression"
]
] |
POSTECH-CVLab/Geometric-Primitives | [
"e4b16d8930f4a9d1c906d06255988d02f54a6deb"
] | [
"geometric_primitives/rules/rules_mixed_22_12.py"
] | [
"import numpy as np\n\n\nPROBS_CONTACTS = np.array([4.0, 2.0, 4.0, 2.0])\nPROBS_CONTACTS /= np.sum(PROBS_CONTACTS)\n\nRULE_CONTACTS = [\n # [0.5, 1.0] -> 4\n {\n 'num_contacts': 1,\n 'translations': [[0.5, 1.0], [-0.5, 1.0], [0.5, -1.0], [-0.5, -1.0]],\n 'direction': 0\n },\n # [0.5... | [
[
"numpy.array",
"numpy.sum"
]
] |
wakky927/Computational-Engineering-B | [
"3720d96668a32dc73f38ed0bc8afe4705452de9e"
] | [
"src/lecture9/solver.py"
] | [
"import numpy as np\n\nimport condition\n\n\ndef solve_matrix(p, Ap, Ae, Aw, An, As, bb, m, n):\n md = 101\n nd = 101\n\n p_old = np.zeros((md, nd))\n\n ''' SOR algorithm '''\n iter_max = 300 # SOR max iteration steps\n relax_factor = 1.8 # SOR relaxation factor\n\n for iter_i in range(1, ite... | [
[
"numpy.zeros",
"numpy.abs"
]
] |
tigerwlin/vel | [
"00e4fbb7b612e888e2cbb5d8455146664638cd0b",
"00e4fbb7b612e888e2cbb5d8455146664638cd0b",
"00e4fbb7b612e888e2cbb5d8455146664638cd0b",
"00e4fbb7b612e888e2cbb5d8455146664638cd0b",
"00e4fbb7b612e888e2cbb5d8455146664638cd0b",
"00e4fbb7b612e888e2cbb5d8455146664638cd0b"
] | [
"vel/openai/baselines/common/vec_env/dummy_vec_env.py",
"vel/rl/models/backbone/nature_cnn_two_tower.py",
"vel/models/rnn/multilayer_sequence_classification_gru.py",
"vel/rl/algo/policy_gradient/trpo.py",
"vel/rl/modules/deterministic_action_head.py",
"vel/api/base/source.py"
] | [
"import numpy as np\n# from gym import spaces\nfrom bc_gym_planning_env.envs.base import spaces\nfrom collections import OrderedDict\nfrom . import VecEnv\n\nclass DummyVecEnv(VecEnv):\n def __init__(self, env_fns):\n self.envs = [fn() for fn in env_fns]\n env = self.envs[0]\n VecEnv.__init_... | [
[
"numpy.copy",
"numpy.zeros"
],
[
"numpy.sqrt",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.Linear"
],
[
"torch.nn.Dropout",
"torch.nn.LogSoftmax",
"torch.nn.functional.nll_loss",
"torch.cat",
"torch.nn.GRU",
"torch.nn.Linear",
... |
Smithsonian/Mass-Georeferencing | [
"bb7d81cd82684900003d3049764cd2d243325248"
] | [
"old/shiny/match_localities/match_SI_GBIF.py"
] | [
"#!/usr/bin/env python3\n#\n# Match SI GBIF records without coordinates to other GBIF records for the species/genus\n#\nimport psycopg2, os, logging, sys, locale, psycopg2.extras\nimport pandas as pd\nfrom time import localtime, strftime\nfrom fuzzywuzzy import fuzz\nimport pycountry\n\n\n#Import settings\nimport s... | [
[
"pandas.concat"
]
] |
OliviaNabbosa89/Disaster_Responses | [
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc9400570",
"1e66d77c303cec685dfc2ca94f4fca4cc940057... | [
"venv/Lib/site-packages/pandas/tests/series/test_analytics.py",
"venv/Lib/site-packages/sklearn/decomposition/_nmf.py",
"venv/Lib/site-packages/sklearn/utils/tests/test_testing.py",
"venv/Lib/site-packages/pandas/tests/base/test_factorize.py",
"venv/Lib/site-packages/sklearn/utils/metaestimators.py",
"ven... | [
"import operator\r\n\r\nimport numpy as np\r\nimport pytest\r\n\r\nimport pandas.util._test_decorators as td\r\n\r\nimport pandas as pd\r\nfrom pandas import DataFrame, Series\r\nimport pandas._testing as tm\r\n\r\n\r\nclass TestSeriesAnalytics:\r\n def test_prod_numpy16_bug(self):\r\n s = Series([1.0, 1.... | [
[
"pandas._testing.assert_almost_equal",
"numpy.dot",
"pandas.util._test_decorators.skip_if_np_lt",
"pandas.Series",
"numpy.allclose",
"numpy.arange",
"numpy.repeat",
"numpy.ptp",
"pandas.Timedelta",
"numpy.random.randn",
"pandas.date_range",
"pandas._testing.assert_s... |
dkdanielkost/Theano-Style-Transfer | [
"70438d3de51d059ea2129119a8cfcc86d2b403a9"
] | [
"src/vgg19/theano_model/vgg19_model.py"
] | [
"import numpy\nimport os\nimport numpy as np\nimport logging\nfrom theano.tensor.signal import pool\nfrom theano.tensor.nnet.abstract_conv import bilinear_upsampling\nimport joblib\nfrom theano.tensor.nnet import conv2d\nfrom theano.tensor.nnet import relu,softmax\nimport theano\nimport theano.tensor as T\n\nfrom t... | [
[
"numpy.array",
"numpy.random.RandomState"
]
] |
jayantabh/haxball-imitation-learning | [
"fb02203dee6859443ac2bd4334144aacc9f16f89"
] | [
"bots/BasicBot.py"
] | [
"import replay\nimport torch\nimport os\n\nfrom bots import interactive\nfrom models.BasicModel import BasicModel\n\nclass BasicBot(interactive.Interactive):\n\n def __init__(self, channel_id, name):\n super().__init__(channel_id)\n\n # Load pre-trained model and set-up the bot\n self.model = BasicModel()... | [
[
"torch.device",
"torch.tensor"
]
] |
hjmjohnson/MONAI | [
"dc7cd0ec25d4b27f321a31f13e707769922c66b3",
"7cd65614da81eeff261a14abdf18bd07a20abfcc"
] | [
"tests/test_squeezedimd.py",
"monai/transforms/utils.py"
] | [
"# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to i... | [
[
"numpy.random.rand",
"numpy.random.randint"
],
[
"numpy.diag",
"numpy.asarray",
"numpy.max",
"numpy.any",
"numpy.iinfo",
"numpy.where",
"numpy.ones_like",
"numpy.eye",
"numpy.subtract",
"numpy.full",
"numpy.sin",
"numpy.ceil",
"numpy.unravel_index",
... |
massimo-nocentini/cagd | [
"baec0824951ebc17e23e16e71339dd8fd79b11c2"
] | [
"surfaces/trianglesDrawing.py"
] | [
"\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\nimport trianglesCore as tc\n\ndef draw(*surfaces, figure_size_tuple=(15,15)):\n\n sizex, sizey = figure_size_tuple\n matplotlib.rcParams['figure.figsize'] = [sizex, sizey]\n\n # necessary a... | [
[
"numpy.logspace",
"numpy.ceil",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
mingewang/pytorch_deep_learning_by_example | [
"83c9e12364a359b9ef77f0645ca7815e9e817f58"
] | [
"basic/basic_example1.py"
] | [
"# -*- coding: utf-8 -*-\nimport torch\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nN, D_in, H, D_out = 64, 1000, 100, 10\n\n# Create random Tensors to hold inputs and outputs\nx = torch.randn(N, D_in)\ny = torch.randn(N, D_out)\n\n# Use the nn package to defi... | [
[
"torch.nn.Linear",
"torch.randn",
"torch.nn.ReLU",
"torch.nn.MSELoss"
]
] |
lambertsbennett/scikit-multiflow | [
"bc714fd5ee4f0a486adc00ec6ae39eafa64f81cc",
"bc714fd5ee4f0a486adc00ec6ae39eafa64f81cc"
] | [
"src/skmultiflow/trees/stacked_single_target_hoeffding_tree_regressor.py",
"src/skmultiflow/drift_detection/kswin.py"
] | [
"from operator import attrgetter\n\nimport numpy as np\n\nfrom skmultiflow.core import MultiOutputMixin\nfrom skmultiflow.trees import iSOUPTreeRegressor\nfrom skmultiflow.utils import get_dimensions\nfrom skmultiflow.trees.split_criterion import IntraClusterVarianceReductionSplitCriterion\n\nfrom skmultiflow.trees... | [
[
"numpy.matmul",
"numpy.full",
"numpy.append",
"numpy.zeros_like",
"numpy.argmin",
"numpy.zeros"
],
[
"scipy.stats.ks_2samp",
"numpy.random.choice",
"numpy.concatenate",
"numpy.delete",
"numpy.array"
]
] |
mrocklin/pygdf | [
"2de9407427da9497ebdf8951a12857be0fab31bb",
"2de9407427da9497ebdf8951a12857be0fab31bb"
] | [
"pygdf/buffer.py",
"pygdf/tests/test_multi.py"
] | [
"\nimport numpy as np\nfrom numba import cuda\n\nfrom . import cudautils, utils\nfrom .serialize import register_distributed_serializer\n\n\nclass Buffer(object):\n \"\"\"A 1D gpu buffer.\n \"\"\"\n _cached_ipch = None\n\n @classmethod\n def from_empty(cls, mem):\n \"\"\"From empty device arra... | [
[
"numpy.asarray"
],
[
"pandas.util.testing.assert_frame_equal",
"pandas.concat",
"pandas.util.testing.assert_index_equal",
"pandas.util.testing.assert_series_equal"
]
] |
GuanlinLee/FPD-for-Adversarial-Robustness | [
"76b06cb8a68469f8ed4ed6bb5479ee86719175fb",
"76b06cb8a68469f8ed4ed6bb5479ee86719175fb"
] | [
"ResNet-50/SVHN/train.py",
"ResNet-101/CALTECH-101/whitebox_and_black.py"
] | [
"import torchvision\nimport torchvision.transforms as transforms\nimport torch\nimport torch.utils.data\nimport resnet\nfrom torch.autograd import Variable\nfrom torch import nn\n\nimport early_stop\nfrom tqdm import tqdm\n\nimport os,sys\nimport numpy as np\n\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"2\"\ntrain_gl... | [
[
"torch.nn.CrossEntropyLoss",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.max",
"torch.load",
"torch.utils.data.DataLoader",
"torch.cuda.empty_cache",
"torch.mul",
"torch.no_grad",
"torch.clamp",
"torch.nn.MSELoss",
"torch.save"
],
[
"torch.nn.CrossEntro... |
hirowgit/2B3_python_owl_logic_database_course | [
"81096b287c32a067aa11a9a37ae5a4c6a0d1301e"
] | [
"lec1_step3.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\n## Python basics for novice data scientists, supported by Wagatsuma Lab@Kyutech \n#\n# The MIT License (MIT): Copyright (c) 2020 Hiroaki Wagatsuma and Wagatsuma Lab@Kyutech\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy of... | [
[
"matplotlib.pyplot.plot",
"numpy.arange",
"pandas.Series",
"numpy.sin"
]
] |
nagasudhirpulla/wrldc_scada_mumbai_dashboard | [
"bc107ef47568781b588316f0c5c0c0d2a08adac8"
] | [
"src/services/scadaApiFetcher.py"
] | [
"import requests\nimport json\nimport datetime as dt\nfrom typing import Dict, Union, List, Optional\nfrom src.typeDefs.scadaApiDataSample import IScadaApiDataSample\nimport pandas as pd\nimport random\n\n\nclass ScadaApiFetcher():\n apiHost: str = ''\n apiPort: int = 80\n isDummyFetch: bool = False\n\n ... | [
[
"pandas.isna"
]
] |
ksluck/Coadaptation | [
"aa16f277cd31c324a62c832ef2cef94e28d598b8"
] | [
"RL/soft_actor.py"
] | [
"from rlkit.torch.sac.policies import TanhGaussianPolicy\n# from rlkit.torch.sac.sac import SoftActorCritic\nfrom rlkit.torch.networks import FlattenMlp\nimport numpy as np\nfrom .rl_algorithm import RL_algorithm\nfrom rlkit.torch.sac.sac import SACTrainer as SoftActorCritic_rlkit\nimport rlkit.torch.pytorch_util a... | [
[
"torch.clamp",
"numpy.prod"
]
] |
MatKie/SGTPy | [
"8e98d92fedd2b07d834e547e5154ec8f70d80728",
"8e98d92fedd2b07d834e547e5154ec8f70d80728",
"8e98d92fedd2b07d834e547e5154ec8f70d80728"
] | [
"sgtpy/vrmie_mixtures/density_solver.py",
"sgtpy/vrmie_pure/a2m_monomer.py",
"sgtpy/vrmie_pure/ideal.py"
] | [
"from __future__ import division, print_function, absolute_import\nimport numpy as np\nfrom scipy.optimize import minimize_scalar, brentq\nfrom ..constants import Na\n\n\ndef dPsaft_fun(rho, x, temp_aux, saft):\n rhomolecular = Na * rho\n global Xass\n da, Xass = saft.d2afcn_drho_aux(x, rhomolecular, temp_... | [
[
"numpy.dot",
"scipy.optimize.brentq",
"scipy.optimize.minimize_scalar",
"numpy.abs"
],
[
"numpy.hstack"
],
[
"numpy.hstack",
"numpy.log",
"numpy.sqrt"
]
] |
ml-jku/align-rudder | [
"26cf4b62a713e180063cefc2921981484ebb9165",
"26cf4b62a713e180063cefc2921981484ebb9165",
"26cf4b62a713e180063cefc2921981484ebb9165"
] | [
"align_rudder/run_eight_alignrudder.py",
"align_rudder/run_four_bc.py",
"align_rudder/run_eight_dqfd.py"
] | [
"import ray\nfrom ray import tune\nimport gym\nfrom align_rudder.learning.q_learning import Qlearning\nimport numpy as np\nimport random\nimport os\nimport pkg_resources\nimport shutil\n\nconfig = {\n 'env_id': 'align_rudder:EightRooms-v0', # environment for the experiment\n 'exp_name': 'align-rudder', # na... | [
[
"numpy.random.seed"
],
[
"numpy.random.seed"
],
[
"numpy.random.seed"
]
] |
lisadunlap/explainable-nbdt | [
"e045bfd0b55b21fd87c9a233b73a0ca77672efff"
] | [
"nbdt/utils.py"
] | [
"'''Some helper functions for PyTorch, including:\n - get_mean_and_std: calculate the mean and std value of dataset.\n - msr_init: net parameter initialization.\n - progress_bar: progress bar mimic xlua.progress.\n'''\nimport os\nimport sys\nimport time\nimport math\nimport numpy as np\nfrom numpy import l... | [
[
"torch.max",
"torch.zeros",
"numpy.asarray",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.sum",
"numpy.mean",
"torch.no_grad",
"torch.where",
"numpy.matmul",
"torch.from_numpy",
"numpy.load",
"torch.nn.init.constant",
"torch.dot",
"torch.nn.init.ka... |
antoineMoPa/glumpy | [
"901df7eb37cd728c2fe7e54920392b700b46c0ac",
"901df7eb37cd728c2fe7e54920392b700b46c0ac"
] | [
"examples/gloo-arrows.py",
"glumpy/app/console.py"
] | [
"# -----------------------------------------------------------------------------\n# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.\n# Distributed under the (new) BSD License.\n# -----------------------------------------------------------------------------\nimport numpy as np\nfrom glumpy import ap... | [
[
"numpy.cos",
"numpy.zeros",
"numpy.sqrt",
"numpy.sin"
],
[
"numpy.arange",
"numpy.array",
"numpy.zeros"
]
] |
fdeugenio/photutils | [
"33c8b15cbbda85dc11c86a73217422dcb61398b7",
"33c8b15cbbda85dc11c86a73217422dcb61398b7",
"33c8b15cbbda85dc11c86a73217422dcb61398b7"
] | [
"photutils/aperture/mask.py",
"photutils/psf/tests/test_photometry.py",
"photutils/psf/tests/test_epsf.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nimport numpy as np\nimport astropy.units as u\n\n\n__all__ = ['ApertureMask']\n\n\nclass ApertureMask:\n \"\"\"\n Class for an aperture mask.\n\n Parameters\n ----------\n data : array_like\n A 2D array representing the fracti... | [
[
"numpy.asanyarray",
"numpy.zeros"
],
[
"numpy.testing.assert_equal",
"numpy.sqrt",
"numpy.all",
"numpy.testing.assert_array_equal",
"numpy.mean",
"numpy.testing.assert_allclose",
"numpy.zeros"
],
[
"numpy.min",
"numpy.transpose",
"numpy.testing.assert_allclo... |
Jarred-Sumner/im2smpl | [
"cb3a09ee99815939e9f7d55479920a32703be9ce"
] | [
"main.py"
] | [
"# Software License Agreement (BSD License)\n#\n# Copyright (c) 2019, Zerong Zheng (zzr18@mails.tsinghua.edu.cn)\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# * Redistributions of sou... | [
[
"numpy.zeros",
"numpy.random.randint"
]
] |
mostafa-mahmoud/HyPRec | [
"f18318f179dd9f9af7cf01a11f13f0aefb42b3bb"
] | [
"tests/collaborative_tests.py"
] | [
"#!/usr/bin/env python\nimport numpy\nimport unittest\nfrom lib.abstract_recommender import AbstractRecommender\nfrom lib.collaborative_filtering import CollaborativeFiltering\nfrom lib.evaluator import Evaluator\nfrom util.data_parser import DataParser\nfrom util.model_initializer import ModelInitializer\n\n\nclas... | [
[
"numpy.amin",
"numpy.amax",
"numpy.random.random"
]
] |
dcronbach/pandapipes | [
"312fef81ddd0fb3eb23ec1c5bbc2848d568faa52",
"312fef81ddd0fb3eb23ec1c5bbc2848d568faa52"
] | [
"pandapipes/test/io/test_file_io.py",
"pandapipes/test/openmodelica_comparison/test_water_openmodelica.py"
] | [
"# Copyright (c) 2020 by Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.\n\nimport os\n\nimport pandapipes\nimport pytest\nfrom pandapower.test.toolbox i... | [
[
"pandas.testing.assert_frame_equal"
],
[
"numpy.all"
]
] |
LiuHaolan/models | [
"1639b3039237c3997c51ff87f0b6113bb2e8d236",
"1639b3039237c3997c51ff87f0b6113bb2e8d236"
] | [
"scripts/compare_speed_with_pytorch.py",
"Vision/classification/image/poseNet/train_oneflow.py"
] | [
"import numpy as np\n\nimport time\nimport tempfile\nimport os\nimport importlib.util\nimport argparse\nfrom typing import Sequence\nimport subprocess\nimport re\n\n\nimport oneflow as flow\nimport oneflow._oneflow_internal as oneflow_internal\n\n\nDEFAULT_TIMES = 20\ngpu_memory_used_by_oneflow = 0\n\n\ndef import_... | [
[
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"numpy.ones",
"torch.no_grad",
"torch.distributed.destroy_process_group",
"torch.nn.parallel.DistributedDataParallel"
],
[
"numpy.argmax"
]
] |
ksasi/DICTOL_python | [
"d2ea3f2a2fdb07c76e63d75e11edf9c8b11d9e69"
] | [
"dictol/base.py"
] | [
"from __future__ import print_function\nimport numpy as np\n\n\nclass BaseModel(object):\n \"\"\"\n base dictionary learning model for classification\n \"\"\"\n # def __init__(self)\n def predict(self, data):\n raise NotImplementedError\n\n\n def evaluate(self, data, label):\n pred =... | [
[
"numpy.sum"
]
] |
sebastianbernasek/growth | [
"6d1cace75b19ad8b6130d0940584c24dd26bbe91"
] | [
"growth/cells/cells.py"
] | [
"from os.path import join\nimport numpy as np\nfrom functools import reduce\nfrom operator import add\n\n\nclass Cell:\n\n def __init__(self, xy=None, chromosomes=None, lineage=''):\n\n # set generation\n self.lineage = lineage\n\n # set chromosomes\n if chromosomes is None:\n ... | [
[
"numpy.random.random",
"numpy.sqrt",
"numpy.tile",
"numpy.random.normal",
"numpy.array",
"numpy.zeros"
]
] |
Guaguago/CommonGen | [
"0a81b4edb8cd111571eba817eb994420f1070c48"
] | [
"evaluation/Traditional/eval_metrics/rouge/rouge.py"
] | [
"#!/usr/bin/env python\n# \n# File Name : rouge.py\n#\n# Description : Computes ROUGE-L metric as described by Lin and Hovey (2004)\n#\n# Creation Date : 2015-01-07 06:03\n# Author : Ramakrishna Vedantam <vrama91@vt.edu>\n\nimport numpy as np\nimport pdb\n\ndef my_lcs(string, sub):\n \"\"\"\n Calculates longe... | [
[
"numpy.array"
]
] |
dnandha/grraspn | [
"0a660d3f73487ea2f8caabf791809de283e8b806",
"0a660d3f73487ea2f8caabf791809de283e8b806"
] | [
"detectron2/modeling/proposal_generator/rrpn.py",
"detectron2/evaluation/evaluator.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport logging\nfrom typing import Dict\nimport torch\n\nfrom detectron2.layers import ShapeSpec\n\nfrom ..box_regression import Box2BoxTransformRotated\nfrom .build import PROPOSAL_GENERATOR_REGISTRY\nfrom .rpn import RPN\nfrom .rrpn_outputs ... | [
[
"torch.no_grad"
],
[
"torch.cuda.synchronize",
"torch.distributed.is_initialized",
"torch.no_grad",
"torch.cuda.is_available",
"torch.distributed.get_world_size"
]
] |
data-centric-ai/dcbench | [
"831ab2359d686739d0b0c7a589974ce08448e58d"
] | [
"dcbench/common/modeling.py"
] | [
"from abc import abstractmethod\n\nimport PIL\nimport pytorch_lightning as pl\nimport torch\nimport torch.nn as nn\nimport torchvision.transforms as transforms\nfrom torch.hub import load_state_dict_from_url\nfrom torchvision.models import DenseNet as _DenseNet\nfrom torchvision.models import ResNet as _ResNet\nfro... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.functional.cross_entropy",
"torch.hub.load_state_dict_from_url"
]
] |
johnnycakes79/SpiceyPy | [
"7b63a1555df0adb7926cf5a6cfff14746a9dc4c1"
] | [
"SpiceyPy/support_types.py"
] | [
"# Collection of supporting functions for wrapper functions\n__author__ = 'AndrewAnnex'\nfrom ctypes import c_char_p, c_bool, c_int, c_double, c_char, c_void_p, sizeof, \\\n POINTER, pointer, Array, create_string_buffer, create_unicode_buffer, cast, Structure, \\\n CFUNCTYPE, string_at\n\nimport numpy\nfrom n... | [
[
"numpy.ctypeslib.as_array",
"numpy.ctypeslib.as_ctypes"
]
] |
matthiaskoenig/memote | [
"7c14cd304523dda83eaf4835ee007243e8673f85"
] | [
"memote/experimental/growth.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2018 Novo Nordisk Foundation Center for Biosustainability,\n# Technical University of Denmark.\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 a... | [
[
"pandas.DataFrame"
]
] |
DaoDaoer/PaddleSeg | [
"7fe2e41de0f192494b8f2088ee500bb55d17708e",
"7fe2e41de0f192494b8f2088ee500bb55d17708e",
"7fe2e41de0f192494b8f2088ee500bb55d17708e"
] | [
"contrib/DomainAdaptation/train.py",
"paddleseg/transforms/transforms.py",
"contrib/DomainAdaptation/utils/utils.py"
] | [
"# Copyright (c) 2021 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.seed"
],
[
"numpy.abs",
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"numpy.uint8",
"numpy.random.shuffle",
"numpy.random.normal",
"numpy.transpose",
"numpy.random.uniform",
"numpy.array",
"numpy.random.randint"
],
[
"numpy.squeeze"
]... |
fumiyanll23/AtCoder | [
"362ca9fcacb5415c1458bc8dee5326ba2cc70b65"
] | [
"ABC/186/b_ans.py"
] | [
"import numpy as np\n\ndef main():\n # input\n H, W = map(int, input().split())\n Ass = [[*map(int, input().split())] for _ in range(H)]\n\n # compute\n Ass = np.array(Ass)\n\n # output\n print(np.sum(Ass - np.min(Ass)))\n\n\nif __name__ == '__main__':\n main()\n"
] | [
[
"numpy.array",
"numpy.min"
]
] |
frozenburst/download_audioset | [
"a4ce2fbdeaf23c155717800bd17a986b5c1f51ad"
] | [
"as_download.py"
] | [
"'''\n================================================\n DOWNLOAD_AUDIOSET REPOSITORY\n================================================\nOriginal:\n repository name: download_audioset\n repository version: 1.0\n repository link: https://github.com/jim-schwoebel/download_audioset\n author: Jim S... | [
[
"pandas.read_excel"
]
] |
wuwuwuyuanhang/python | [
"eb5ac23cb46c4beeab1638fda963dd154b9db1b7",
"eb5ac23cb46c4beeab1638fda963dd154b9db1b7",
"eb5ac23cb46c4beeab1638fda963dd154b9db1b7"
] | [
"opencv/q23.py",
"tf2.0/Chapter5/5_8.py",
"opencv/q11.py"
] | [
"# @Auther : wuwuwu \n# @Time : 2020/4/15 \n# @File : q23.py\n# @Description : 直方图均衡化\n\nimport cv2 as cv\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\ndef histogramEqualization(img, Zmax=255):\n \"\"\"\n 直方图均衡化\n :param img:\n :param Zmax: 像素的最大取值\n :return:\n \"\"\"\n H, W, C =... | [
[
"matplotlib.pyplot.title",
"numpy.clip",
"matplotlib.pyplot.show",
"numpy.where",
"matplotlib.pyplot.figure"
],
[
"tensorflow.nn.relu",
"tensorflow.zeros",
"tensorflow.reduce_mean",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.cast",
"tensorflow.reshape... |
voodoohop/Creative-Adversarial-Networks | [
"7d8632b7bfe12a698f61c442aa9c1a07d68d21c9"
] | [
"utils.py"
] | [
"\"\"\"\nSome codes from https://github.com/Newmu/dcgan_code\n\"\"\"\nfrom __future__ import division\nimport math\nimport json\nimport random\nimport pprint\nimport scipy.misc\nimport numpy as np\nfrom time import gmtime, strftime\nfrom six.moves import xrange\nfrom glob import glob\nimport cv2\nimport imageio\n\n... | [
[
"numpy.sqrt",
"numpy.random.choice",
"numpy.arange",
"numpy.linalg.norm",
"numpy.tile",
"numpy.random.normal",
"tensorflow.trainable_variables",
"numpy.random.uniform",
"numpy.array",
"tensorflow.contrib.slim.model_analyzer.analyze_vars",
"numpy.zeros"
]
] |
Vaden4d/logo-classifier | [
"18c397e52352da8e79868158123c13bf0417130f"
] | [
"train.py"
] | [
"import os\nimport argparse\nimport pandas as pd\nfrom tqdm import tqdm\n\nimport torch\nimport torch.nn as nn\nimport pytorch_lightning as pl\nfrom pytorch_lightning.callbacks import ModelCheckpoint \n\nfrom utils.models import EfficientNetModel, EfficientNetSSL\nfrom utils.transforms import get_transforms\nfrom u... | [
[
"torch.nn.Softmax",
"pandas.read_csv",
"torch.Tensor",
"sklearn.model_selection.train_test_split",
"torch.cuda.is_available"
]
] |
rudranshsharma123/jina | [
"cdc66eb44fe1ae5c84ba6ddfe0a6173476f773bb"
] | [
"tests/unit/types/document/test_converters.py"
] | [
"import os\n\nimport numpy as np\nimport pytest\n\nfrom jina import Document, __windows__\n\ncur_dir = os.path.dirname(os.path.abspath(__file__))\n\n\ndef test_uri_to_blob():\n doc = Document(uri=os.path.join(cur_dir, 'test.png'))\n doc.convert_image_uri_to_blob()\n assert isinstance(doc.blob, np.ndarray)\... | [
[
"numpy.random.RandomState",
"numpy.random.random",
"numpy.random.randint"
]
] |
evgeniya-egupova/mmsegmentation | [
"3857f19321ad6af41c8a6af364898ee050225f4c"
] | [
"mmseg/models/scalar_schedulers/step.py"
] | [
"import numpy as np\n\nfrom ..builder import SCALAR_SCHEDULERS\nfrom .base import BaseScalarScheduler\n\n\n@SCALAR_SCHEDULERS.register_module()\nclass StepScalarScheduler(BaseScalarScheduler):\n def __init__(self, scales, num_iters, by_epoch=False):\n super(StepScalarScheduler, self).__init__()\n\n ... | [
[
"numpy.iinfo"
]
] |
Raeyi/multipooling-AdaPECT | [
"9632b98ff1612344de798321298f6488f1c303b0"
] | [
"ArbitraryCS_main.py"
] | [
"# coding:utf8\n\nimport torch as t\nimport torchvision as tv\nimport torchnet as tnt\n\nfrom torch.utils import data\nfrom transformer_net import TransformerNet\nimport utils\nfrom PackedVGG import Vgg16\nfrom torch.nn import functional as F\nimport tqdm\nimport os\nimport ipdb\n# from WCT2_train import WCT2\n# im... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
]
] |
ypxie/keras-1 | [
"f1ed8d63faa26ce6180faa685839aa32217211c6"
] | [
"keras/backend/common.py"
] | [
"import numpy as np\n\nfrom collections import defaultdict\n\n# the type of float to use throughout the session.\n_FLOATX = 'float32'\n_EPSILON = 10e-8\n_UID_PREFIXES = defaultdict(int)\n_IMAGE_DIM_ORDERING = 'tf'\n_LEGACY_WEIGHT_ORDERING = False\n\n\ndef epsilon():\n '''Returns the value of the fuzz\n factor... | [
[
"numpy.asarray"
]
] |
hrichstein/phys_50733 | [
"a333bfa4dd5b0ca464bd861336bc2f32d8e72a2b"
] | [
"rh_project/rk4_two_body.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n# from scipy.constants import G\n\n# Setting plotting parameters\nfrom matplotlib import rc,rcParams\nrc('text', usetex=True)\nrc('axes', linewidth=2)\nrc('font', weight='bold')\nrc('font', **{'family': 'serif', 'serif':['Computer Modern']})\n\ndef find_vel_init... | [
[
"numpy.sqrt",
"numpy.arange",
"matplotlib.rc",
"matplotlib.pyplot.plot",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
xsun28/CloudMerge | [
"c4211bac841b103c77d6f9c4af633102742298ac"
] | [
"cloudmerge-hpc/mpi_merge.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Dec 27 16:54:42 2017\n\n@author: Xiaobo\n\"\"\"\nimport numpy as np\nfrom mpi4py import MPI\nimport commands\nimport os\nimport sys\npath = os.path.dirname(os.path.realpath(__file__))\nsys.path.append(path)\n#sys.path.append('/Users/Xiaobo/git... | [
[
"numpy.zeros",
"numpy.linspace",
"numpy.power"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.