repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
msadang/blazingsql | [
"5fe3e418dbee4a3961998b0e25ec81100a1a1490"
] | [
"tests/BlazingSQLTest/Runner/runTest.py"
] | [
"# Cast column to f64 before convert it to pandas\n# This is a hack, use the assert_equal comparator when nulls is\n# fully supported on cudf.sort_values\nimport json\nimport logging\nimport os\nimport re\nimport time\n\nimport blazingsql\nfrom blazingsql import DataType\n\n# import git\nimport numpy as np\nimport ... | [
[
"numpy.allclose",
"numpy.issubdtype",
"pandas.DataFrame",
"numpy.dtype",
"numpy.datetime64",
"pandas.read_parquet",
"numpy.all",
"numpy.warnings.filterwarnings",
"pandas.set_option",
"pandas.to_numeric"
]
] |
andyj10224/psi4numpy | [
"cbef6ddcb32ccfbf773befea6dc4aaae2b428776",
"cbef6ddcb32ccfbf773befea6dc4aaae2b428776"
] | [
"Moller-Plesset/MP3.py",
"Self-Consistent-Field/SOUHF_iterative.py"
] | [
"\"\"\"\nReference implementation for the correlation energy of MP3 with an RHF reference.\n\nReferences:\n- Equations from [Szabo:1996]\n\"\"\"\n\n__authors__ = \"Daniel G. A. Smith\"\n__credits__ = [\"Daniel G. A. Smith\", \"Dominic A. Sirianni\"]\n\n__copyright__ = \"(c) 2014-2018, The Psi4NumPy Developers\... | [
[
"numpy.set_printoptions",
"numpy.einsum"
],
[
"numpy.diag",
"numpy.dot",
"numpy.abs",
"numpy.einsum",
"numpy.asarray",
"numpy.set_printoptions",
"numpy.linalg.norm",
"numpy.linalg.eigh",
"numpy.mean",
"numpy.vdot"
]
] |
KoconJan/BERT-NER-CLI | [
"6f1323bf6294bc05ee3ee9a58e5b932a68bb85c0"
] | [
"bert_ner.py"
] | [
"#! usr/bin/env python3\r\n# -*- coding:utf-8 -*-\r\n\"\"\"\r\nCopyright 2018 The Google AI Language Team Authors.\r\nBASED ON Google_BERT.\r\n@Author:zhoukaiyin\r\n\"\"\"\r\nfrom __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\n\r\nimport collections\... | [
[
"tensorflow.contrib.cluster_resolver.TPUClusterResolver",
"tensorflow.FixedLenFeature",
"tensorflow.nn.log_softmax",
"tensorflow.reduce_sum",
"tensorflow.train.init_from_checkpoint",
"tensorflow.to_int32",
"tensorflow.contrib.tpu.TPUEstimatorSpec",
"tensorflow.contrib.tpu.TPUEstima... |
NSLS-II/bluesky | [
"b7d666e65cf4ef556fb46b744c33264c8e3f7507"
] | [
"bluesky/simulators.py"
] | [
"from warnings import warn\nfrom bluesky.utils import maybe_await\nfrom bluesky.preprocessors import print_summary_wrapper\nfrom bluesky.run_engine import call_in_bluesky_event_loop, in_bluesky_event_loop\nfrom .protocols import Checkable\n\n\ndef plot_raster_path(plan, x_motor, y_motor, ax=None, probe_size=None, l... | [
[
"matplotlib.collections.PatchCollection",
"matplotlib.patches.Circle",
"matplotlib.pyplot.subplots"
]
] |
bglick13/multi-agent-emergence-environments | [
"e02d66f0734d95470d15a4508ff369a75fa093a4"
] | [
"ma_planning/ma_policy.py"
] | [
"import numpy as np\n\nfrom collections import deque\nfrom typing import Union\nfrom torch import nn, FloatTensor, LongTensor\nfrom torch.functional import F\nfrom torch.optim import Adam\nfrom torch.nn import CrossEntropyLoss\n\nfrom mae_envs.envs import DraftState\nfrom mcts import SearchNode, SearchProblem\n\n\n... | [
[
"torch.FloatTensor",
"numpy.random.choice"
]
] |
evamariaa/Eureka | [
"a3e739a528fbe85ec588bca996188765649b7778"
] | [
"eureka/S3_data_reduction/nirspec.py"
] | [
"# NIRSpec specific rountines go here\nimport os\nimport numpy as np\nfrom astropy.io import fits\nfrom . import sigrej, background, nircam\nfrom . import bright2flux as b2f\n\ndef read(filename, data, meta):\n '''Reads single FITS file from JWST's NIRCam instrument.\n\n Parameters\n ----------\n filena... | [
[
"numpy.isnan",
"numpy.linspace"
]
] |
lvwj19/PPR-Net- | [
"e5d305b39a1fa453fb3f58ed51468008e7bfa5a3"
] | [
"pprnet/utils/visualize_util.py"
] | [
"import os\nimport numpy as np\nimport random\nimport h5py\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nROOT_DIR = BASE_DIR\nsys.path.append(BASE_DIR)\nsys.path.append(os.path.join(ROOT_DIR, '..'))\nimport show3d_balls \n\ndef show_points(point_array, color_array=None, radius=3):\n assert ... | [
[
"numpy.dot",
"numpy.reshape",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
]
] |
vgutta/AMPL | [
"46759aa84fd6acfc14facad0e14cb05a43d2e309"
] | [
"atomsci/ddm/pipeline/model_wrapper.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nContains class ModelWrapper and its subclasses, which are wrappers for DeepChem and scikit-learn model classes.\n\"\"\"\n\nimport logging\nimport os\nimport shutil\nimport joblib\nimport pdb\n\nimport deepchem as dc\nimport numpy as np\nimport tensorflow as tf\nif dc.__version__.st... | [
[
"sklearn.ensemble.RandomForestRegressor",
"numpy.sqrt",
"torch.load",
"torch.sum",
"torch.utils.data.DataLoader",
"numpy.nan_to_num",
"numpy.concatenate",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"torch.save",
"tensorflow.Graph",
"torch.nn.Dro... |
tblaschke/reinvent-multi-target | [
"a555431da0de038b7e643c508a7d2501e83c087f"
] | [
"reinvent/unittest_reinvent/scoring_tests/physchem/test_hbd_lipinski.py"
] | [
"import unittest\n\nimport numpy as np\nimport numpy.testing as npt\n\nfrom scoring.component_parameters import ComponentParameters\nfrom scoring.function import CustomSum\nfrom utils.enums.component_specific_parameters_enum import ComponentSpecificParametersEnum\nfrom utils.enums.scoring_function_component_enum im... | [
[
"numpy.testing.assert_array_equal",
"numpy.array"
]
] |
yongleex/SBCC | [
"40f8e67e446fc14fc82ea87f82ee841d62520c71"
] | [
"utils/outlier.py"
] | [
"import numpy as np\nimport cv2\n\n\ndef NMT(u,v, eps=0.2, thr=5.0, smooth_flag=True):\n \"\"\" \n Normalised Median Test, from 'Universal outlier detection for PIV data'\n \"\"\"\n u, v = np.float32(u), np.float32(v)\n criterion = 0\n \n for c in [u,v]:\n c_median = cv2.medianBlur(c, 5)... | [
[
"numpy.abs",
"numpy.sqrt",
"numpy.float32",
"numpy.power"
]
] |
eglrp/ConvPoint_Keras | [
"66c94479ff8dc8ad174ed4da8e6bb1d641a8a8c0"
] | [
"ConvPoint.py"
] | [
"from dataTool import ReadLabels, ReadXYZ, VisualizePointCloudClassesAsync, modelPath, DataTool\nfrom imports import *\nimport math\nimport numpy as np\nfrom time import time \n\n\nimport tensorflow as tf\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.utils import Sequence\nfrom tensorflow.ker... | [
[
"tensorflow.keras.models.load_model",
"numpy.dot",
"tensorflow.linalg.diag_part",
"tensorflow.concat",
"numpy.expand_dims",
"numpy.amax",
"tensorflow.zeros",
"tensorflow.keras.losses.CategoricalCrossentropy",
"tensorflow.reduce_sum",
"numpy.squeeze",
"tensorflow.cast",
... |
neblar/numpynn | [
"b33c5f671c8e835b55ed775ababa358e14c987bc"
] | [
"test/test_conv1dt_6.py"
] | [
"import torch\nimport numpy as np\nimport torch.nn.functional as F\nfrom ..src.Conv1DT_6 import Conv1DT as NumpyConv1DT\n\n\nclass Tester:\n conv1dt_numpy = NumpyConv1DT()\n\n def y_torch(self, x, weight, bias, stride, padding):\n x = torch.tensor(x)\n weight = torch.tensor(weight)\n bias... | [
[
"numpy.allclose",
"torch.nn.functional.conv_transpose1d",
"torch.tensor",
"numpy.random.randn",
"numpy.random.randint"
]
] |
wangby511/Extreme-Dark-Video-Enhancement | [
"e0de50428d74a7cec2ee87b63e9fce9860dfd590"
] | [
"state-of-the-art/bmvc18/psnr_ssim_mabd.py"
] | [
"import os, glob, time\n\nimport tensorflow as tf\nimport numpy as np\nfrom skvideo.io import vread, vwrite\n\n\ndirectory = 'test_set_results/'\n\nTEST_RESULT_DIR = './result_MBLLVEN_raw_he2he/test/'\n\nMAX_VAL = 255\n\nsess = tf.Session()\nt_vid1 = tf.placeholder(tf.uint8, [None, None, None, None])\nt_vid2 = tf.p... | [
[
"numpy.load",
"tensorflow.placeholder",
"numpy.diff",
"tensorflow.Session",
"tensorflow.image.ssim",
"tensorflow.image.psnr"
]
] |
huyhoang17/DB_text_minimal | [
"0d1466889b21cb74a0571a0fb3856902739ea523"
] | [
"src/data_loaders.py"
] | [
"import os\nimport glob\nimport math\n\nimport hydra\nimport cv2\nimport numpy as np\nfrom shapely.geometry import Polygon\nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nimport imgaug.augmenters as iaa\nimport pyclipper\n\nimport db_transforms\nfrom utils import dict_to_device, minmax_scaler_img\n... | [
[
"matplotlib.pyplot.imshow",
"numpy.power",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy.int",
"numpy.transpose",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] |
ghmole/akshare | [
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6",
"eeeec96f90c6738bcd9ce92fcfa6b9c9176928a... | [
"akshare/option/option_commodity.py",
"akshare/wdbank/api.py",
"akshare/utils/token_process.py",
"akshare/stock_fundamental/stock_hold.py",
"akshare/futures/futures_sgx_daily.py",
"akshare/index/index_google.py",
"akshare/stock_feature/stock_board_ths.py",
"akshare/bond/bond_china_money.py"
] | [
"# -*- coding:utf-8 -*-\n# /usr/bin/env python\n\"\"\"\nDate: 2021/1/14 20:50\nDesc: 商品期权数据\n说明:\n(1) 价格:自2019年12月02日起,纤维板报价单位由元/张改为元/立方米\n(2) 价格:元/吨,鸡蛋为元/500千克,纤维板为元/立方米,胶合板为元/张\n(3) 成交量、持仓量:手(按双边计算)\n(4) 成交额:万元(按双边计算)\n(5) 涨跌=收盘价-前结算价\n(6) 涨跌1=今结算价-前结算价\n(7) 合约系列:具有相同月份标的期货合约的所有期权合约的统称\n(8) 隐含波动率:根据期权市场价格,利用期权定价模... | [
[
"pandas.read_table",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.DataFrame",
"pandas.read_html"
],
[
"pandas.DataFrame"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.show"
],
[
"pandas.... |
xinjianlv/pycorrector | [
"697fc09032d129b2777cf686bb05663f2fc3c04f"
] | [
"pycorrector/transformers/models/bert_generation/modeling_bert_generation.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Google AI Language Team Authors and The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/... | [
[
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.zeros",
"torch.arange",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.global_variables_initializer",
"torch.nn.Linear",
"numpy.transpose",
"tens... |
Ankur3107/zenml | [
"5dc05a833b50ac9cc49e851b9d91255da6016dfd"
] | [
"examples/functional_api/chapter_4.py"
] | [
"# Copyright (c) ZenML GmbH 2021. 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless req... | [
[
"sklearn.linear_model.LogisticRegression",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.datasets.mnist.load_data",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.layers.Flatten"
]
] |
ersilia-os/osm-series4-candidates-2 | [
"a0b7f55d79c65182dcc4c102791d2ababbfb176e"
] | [
"scripts/4_similarity.py"
] | [
"from __init__ import OUTPUT\n\nfrom tqdm import tqdm\nimport pandas as pd\nimport numpy as np\nfrom rdkit import Chem\nfrom rdkit.Chem import AllChem\nfrom rdkit.DataStructs import BulkTanimotoSimilarity\nimport os, sys\n\nprint(\"SIMILARITY SCORES\")\n\ndef mols_to_fingerprints(molecules, radius=3, useCounts=Fals... | [
[
"numpy.max"
]
] |
OpenSourceEconomics/grmpy | [
"3ff5ec9cd108582c23cb61e6b8d87f4db6ceaee1"
] | [
"grmpy/read/read_auxiliary.py"
] | [
"\"\"\"This module provides auxiliary functions for the import process of the init file.\"\"\"\nimport numpy as np\n\n\ndef create_attr_dict_est(init_dict, semipar=False, include_constant=False):\n \"\"\"This function processes the imported initialization file so that it fulfills the\n requirements for the su... | [
[
"numpy.all",
"numpy.array"
]
] |
mwizasimbeye11/hub | [
"d743b0f14ee538e8bb50006895779b048d0f4db1"
] | [
"tensorflow_hub/feature_column_test.py"
] | [
"# Copyright 2018 The TensorFlow Hub 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 ... | [
[
"tensorflow.Graph",
"tensorflow.constant",
"tensorflow.zeros",
"tensorflow.compat.v2.keras.layers.DenseFeatures",
"tensorflow.reduce_sum",
"tensorflow.python.ops.lookup_ops.HashTable",
"tensorflow.test.main",
"tensorflow.SparseTensor",
"tensorflow.gather",
"tensorflow.featu... |
Laurans/procgen_adventure | [
"5f88f3f647f7854c8fb2ae516f3490d89845eefa"
] | [
"procgen_adventure/utils/torch_utils.py"
] | [
"import numpy as np\nimport torch\nimport torch.distributed as dist\n\n\ndef tensor(x, device):\n if isinstance(x, torch.Tensor):\n return x.to(device)\n\n x = np.asarray(x, dtype=np.float)\n x = torch.tensor(x, device=device, dtype=torch.float32)\n return x\n\n\ndef input_preprocessing(x, device... | [
[
"torch.distributed.broadcast",
"numpy.random.seed",
"torch.load",
"numpy.asarray",
"torch.zeros",
"torch.arange",
"torch.tensor",
"torch.distributed.reduce",
"torch.distributed.destroy_process_group",
"torch.distributed.all_reduce",
"numpy.zeros"
]
] |
vgliner/Chlng_20_Sub | [
"169d098e5315510df83ad988c7e2067317cef4cf"
] | [
"ECG_Dataloader_Brazilian_records.py"
] | [
"from torch.utils.data import Dataset\nimport os\nimport scipy.io as sio\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport h5py\nimport pandas as pd\nimport random\nfrom scipy.io import loadmat\nimport Utils\nfrom scipy import interpolate\nfrom scipy import signal\nimport csv\nfrom scipy.signal import bu... | [
[
"pandas.read_csv",
"numpy.min",
"matplotlib.pyplot.subplots",
"numpy.stack",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.transpose",
"numpy.array2string",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]
] |
f0nzie/rTorch | [
"40292ecd8a9ac1af6a03247cbb5f7a3227d60e2f"
] | [
"inst/python/torchtools/data_util.py"
] | [
"import gzip\nimport os\nfrom os import path\nimport numpy as np\n\nimport sys\nif sys.version_info.major < 3:\n import urllib\nelse:\n import urllib.request as request\n\n\nDATASET_DIR = 'datasets/'\n\nMNIST_FILES = [\"train-images-idx3-ubyte.gz\", \"train-labels-idx1-ubyte.gz\",\n \"t10k-image... | [
[
"numpy.asarray",
"numpy.frombuffer",
"numpy.array",
"numpy.all"
]
] |
sunher/game | [
"84b01b2c69b5cdecbc301fb0e56380ff06bfe353"
] | [
"snakeai/gameplayAttackAndHideRandom/environmentattackandhiderandom.py"
] | [
"import pprint\nimport random\nimport time\n\nimport numpy as np\nimport pandas as pd\n\nfrom .entities import Snake, Field, CellType, SnakeAction, ALL_SNAKE_ACTIONS, SnakeDirection, Point\n\n\nclass EnvironmentAttackAndHideRandom(object):\n \"\"\"\n Represents the RL environment for the Snake game that imple... | [
[
"numpy.random.random",
"numpy.random.seed",
"numpy.copy",
"numpy.random.uniform",
"numpy.random.randint"
]
] |
KennyKangMPC/chebpy | [
"5ad603b15f90a0f36093f1705e3e08d090330cef",
"5ad603b15f90a0f36093f1705e3e08d090330cef"
] | [
"tests/test_bndfun.py",
"chebpy/core/settings.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"Unit-tests for pyfun/core/bndfun.py\"\"\"\n\nfrom __future__ import division\n\nimport itertools\nimport operator\nimport unittest\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom chebpy.core.bndfun import Bndfun\nfrom chebpy.core.chebtech import Chebtech2\nfrom chebpy.... | [
[
"matplotlib.pyplot.subplots",
"numpy.array",
"numpy.random.rand",
"numpy.linspace"
],
[
"numpy.array",
"numpy.finfo"
]
] |
solderneer/opencv-adventures | [
"20abea930f44296367217145fab73866ea654084"
] | [
"blur.py"
] | [
"#!/usr/bin/env python\n\nimport cv2\nimport numpy as np\n\nimage = cv2.imread('../images/input.jpg')\n\nblur = cv2.blur(image, (3,3))\ngaussian_blur = cv2.GaussianBlur(image, (3,3), 0)\nmedian = cv2.medianBlur(image, 5)\n\ncv2.imshow(\"boxblux\", blur)\ncv2.waitKey()\ncv2.imshow(\"gaussian\", gaussian_blur)\ncv2.w... | [
[
"numpy.array"
]
] |
liuzuxin/RL-Safety-Algorithms | [
"2575225b1ea8ce12e1e13f7a81f8dda7b4189708"
] | [
"tests/test_mean_std.py"
] | [
"import unittest\nimport numpy as np\nimport torch\nfrom rl_safety_algorithms.common.online_mean_std import OnlineMeanStd\nimport rl_safety_algorithms.common.mpi_tools as mpi_tools\n\n\nclass TestOnlineMeanStd(unittest.TestCase):\n \"\"\" Testing the non-MPI version.\n \"\"\"\n\n @staticmethod\n def per... | [
[
"numpy.allclose",
"numpy.random.seed",
"numpy.std",
"numpy.random.normal",
"numpy.mean",
"numpy.vstack"
]
] |
abdelsamea/DeTraC | [
"ab03719b49a1a048f74f08600a6670f6757bbe60"
] | [
"src/frameworks/detrac_torch/feature_composer.py"
] | [
"import tensorflow as tf\nfrom sklearn.metrics import confusion_matrix\nimport numpy as np\n\nfrom tools.preprocessing import preprocess_images, preprocess_single_image\nfrom tools.kfold import KFold_cross_validation_split\nfrom tools.extraction_and_metrics import extract_features, compute_confusion_matrix\n\nfrom ... | [
[
"torch.load"
]
] |
rangsimanketkaew/learning-to-smell | [
"17021a82f7fcdda00536a906dd8dc64cb5663261"
] | [
"metric.py"
] | [
"import tensorflow as tf\n# from tensorflow.python.framework.ops import disable_eager_execution\n# disable_eager_execution()\nfrom tensorflow.keras import backend as K\n\n\ndef jaccard_tensorflow(y_true, y_pred):\n \"\"\"Jaccard score of Tensor in tensorflow for graph mode.\n \"\"\"\n intersection = tf.set... | [
[
"tensorflow.sets.union",
"tensorflow.sets.intersection",
"tensorflow.keras.backend.abs",
"tensorflow.sparse.to_dense"
]
] |
faver2014/InertialNav_Learn | [
"58a0b6db95918e037ed6d08e5d2c8ba2ce388554"
] | [
"code/plot_wind.py"
] | [
"#!/bin/python\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.cbook as cbook\nimport numpy as np\nimport math\n\n\t# State vector:\n\t# 0-3: quaternions (q0, q1, q2, q3)\n\t# 4-6: Velocity - m/sec (North, East, Down)\n\t# 7-9: Position - m (North, East, Down)\n\t# 10-12: Delta Angle... | [
[
"matplotlib.pyplot.show",
"numpy.genfromtxt",
"matplotlib.pyplot.figure"
]
] |
zimo-geek/mindspore | [
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff"
] | [
"mindspore/python/mindspore/train/callback/_loss_monitor.py"
] | [
"# Copyright 2020 Huawei Technologies Co., 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 applicable l... | [
[
"numpy.isnan",
"numpy.isinf"
]
] |
How-Wang/onnx | [
"c940fa3fea84948e46603cab2f86467291443beb",
"c940fa3fea84948e46603cab2f86467291443beb",
"c940fa3fea84948e46603cab2f86467291443beb",
"c940fa3fea84948e46603cab2f86467291443beb"
] | [
"onnx/backend/test/case/node/reducemin.py",
"onnx/backend/test/case/node/cumsum.py",
"onnx/backend/test/case/node/acos.py",
"onnx/backend/test/case/node/squeeze.py"
] | [
"# SPDX-License-Identifier: Apache-2.0\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np # type: ignore\n\nimport onnx\nfrom ..base import Base\nfrom . import expect\n\n\nclass ReduceMin(B... | [
[
"numpy.random.uniform",
"numpy.minimum.reduce",
"numpy.array",
"numpy.random.seed"
],
[
"numpy.array",
"numpy.int32"
],
[
"numpy.random.rand",
"numpy.array",
"numpy.arccos"
],
[
"numpy.squeeze",
"numpy.array",
"numpy.random.randn"
]
] |
kritika-srivastava/The-Conurbation-Algorithm | [
"d5d39d701b1e09c975dceca5445c4398fd5fd93b",
"d5d39d701b1e09c975dceca5445c4398fd5fd93b",
"d5d39d701b1e09c975dceca5445c4398fd5fd93b"
] | [
"src/procedural_city_generation/polygons/getBlock.py",
"src/procedural_city_generation/additional_stuff/readimages.py",
"src/procedural_city_generation/building_generation/cuts.py"
] | [
"from __future__ import division\n\nimport numpy as np\n\nfrom procedural_city_generation.additional_stuff.Singleton import Singleton\nfrom procedural_city_generation.polygons.Polygon2D import Polygon2D\n\nsingleton = Singleton(\"polygons\")\n\n\ndef p_in_poly(poly, point):\n x, y = point\n n = len(poly)\n ... | [
[
"numpy.array",
"matplotlib.pyplot.show",
"numpy.linalg.norm"
],
[
"matplotlib.pyplot.imsave",
"numpy.ndarray",
"matplotlib.image.imread",
"matplotlib.pyplot.subplot",
"numpy.argmax",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figu... |
ryan-dd/autonomous-systems | [
"39fa1394e6b9577600e52d9b7ecd9184a1c90ce1"
] | [
"extended_kalman_filter/extended_kalman_filter.py"
] | [
"from math import cos, sin, atan2, exp\n\nimport numpy as np\n\nfrom heading_range_robot.parameters import *\n\n\nclass EKF:\n def __init__(self, sample_period):\n self._change_t = sample_period\n self.mean_belief = np.vstack((INITIAL_X, INITIAL_Y, INITIAL_THETA))\n self.covariance_belief = ... | [
[
"numpy.sqrt",
"numpy.linalg.inv",
"numpy.eye",
"numpy.arctan2",
"numpy.random.normal",
"numpy.array",
"numpy.vstack"
]
] |
stoman/CompetitiveProgramming | [
"0000b64369b50e31c6f48939e837bdf6cece8ce4"
] | [
"problems/predictingofficespaceprice/submissions/accepted/stefan2.py"
] | [
"#!/usr/bin/env python2\n\n#Author: Stefan Toman\n\nimport itertools\nimport numpy as np\nfrom operator import mul\nfrom sklearn.linear_model import LinearRegression\n\nif __name__ == '__main__':\n #read input\n f, n = map(int, raw_input().split())\n X = []\n y = []\n for _ in range(n):\n line... | [
[
"numpy.array",
"sklearn.linear_model.LinearRegression"
]
] |
JoseLuisRojasAranda/tfmodels | [
"56dce0236f0cc03dd7031aecf305d470c9fb97a9",
"56dce0236f0cc03dd7031aecf305d470c9fb97a9"
] | [
"src/datasets/Fruits360/f360_dataset.py",
"src/datasets/coco/coco_to_tfrecord.py"
] | [
"import tensorflow as tf\nimport cv2\nfrom glob import glob\nimport sys\nimport os\nfrom os import path\nimport json\nimport random\n\nfrom datasets.datasets_features import bytes_feature\n\n# Metodo que regresa el dataset de f360 ya procesado a tfrecord\n# Los data set tiene el formato:\n# x: tensor con la image... | [
[
"tensorflow.io.TFRecordWriter",
"tensorflow.convert_to_tensor",
"tensorflow.data.TFRecordDataset",
"tensorflow.io.parse_single_example",
"tensorflow.reshape",
"tensorflow.io.FixedLenFeature",
"tensorflow.io.serialize_tensor",
"tensorflow.io.parse_tensor",
"tensorflow.image.resi... |
tomasstolker/AMICAL | [
"c9bbf8e4a468313efff3b349fffea7648c411a51"
] | [
"amical/_cli/commands/clean.py"
] | [
"import os\nfrom datetime import datetime\nfrom glob import glob\nfrom pathlib import Path\n\nfrom astropy.io import fits\nfrom matplotlib import pyplot as plt\nfrom tabulate import tabulate\nfrom termcolor import cprint\nfrom tqdm import tqdm\n\nimport amical\n\n\ndef _select_data_file(args, process):\n \"\"\"S... | [
[
"matplotlib.pyplot.show"
]
] |
kristianwiklund/AOC2019 | [
"a98affaccd53ca4ea2d3a8c3fa125680f1e8cc08"
] | [
"2018/7/7.py"
] | [
"import networkx as nx\nimport matplotlib.pyplot as plt\n\nG = nx.DiGraph()\n\n#with open (\"shortinput.txt\") as fd:\nwith open (\"input.txt\") as fd:\n\n for line in fd:\n x = line.split(\" \")\n before = x[1]\n after = x[7]\n G.add_edge(before, after, weight=ord(after)-64)\n\nnx.d... | [
[
"matplotlib.pyplot.savefig"
]
] |
WadhwaniAI/ESTRNN | [
"4af8d53b0ebb1655c40aaf4f6950904580a34aa2"
] | [
"data/anthro.py"
] | [
"import os\nimport random\nfrom os.path import join, basename, dirname\n\nimport cv2\nimport numpy as np\nimport torch\nfrom glob import glob\nimport ipdb\nfrom torch.utils.data import Dataset, DataLoader\nfrom torchvision import transforms\n\nfrom utils import normalize, Crop, Flip, ToTensor\n\n\nclass AnthroDeblu... | [
[
"numpy.ceil",
"torch.utils.data.DataLoader",
"torch.utils.data.distributed.DistributedSampler",
"torch.cat"
]
] |
nagomiso/komono | [
"3158dc14ebaee724defe63d54c214d40065558d7"
] | [
"tests/test_reduce_memory.py"
] | [
"import pandas as pd\nimport pytest\nfrom pandas.testing import assert_frame_equal, assert_series_equal\n\nimport komono.pandas._reduce_memory as rd\n\n\n@pytest.fixture\ndef base_data():\n return {\n \"int8\": [-128, 127],\n \"int16\": [-129, 127],\n \"Int8\": [None, 127],\n \"Str\":... | [
[
"pandas.testing.assert_frame_equal",
"pandas.testing.assert_series_equal",
"pandas.Series",
"pandas.DataFrame.from_dict"
]
] |
swyang50066/sun-jupiter-earth-orbit | [
"c50012ff1a187485b717d86a24c25cfe6edd78a1"
] | [
"source/force.py"
] | [
"import numpy as np\n\nfrom allvar import *\n\n\ndef _distance(r1, r2):\n \"\"\"Return Euclidean _distance between positions\"\"\"\n return np.sqrt(np.sum((r1 - r2)**2.))\n\n\ndef drdt(r, v):\n \"\"\"Return position derivative\n\n :param r: shape: (x_earth, y_earth, x_jupiter, y_jupiter))\n :param v:... | [
[
"numpy.hstack",
"numpy.abs",
"numpy.cos",
"numpy.sin",
"numpy.sign",
"numpy.sum"
]
] |
haojiepan1/CrossWOZ | [
"6d7b4c4cfb73a528b76074764687906abecc90b6",
"6d7b4c4cfb73a528b76074764687906abecc90b6",
"6d7b4c4cfb73a528b76074764687906abecc90b6"
] | [
"tests/test_end2end.py",
"convlab2/nlg/template/multiwoz/evaluate.py",
"convlab2/policy/vhus/camrest/vhus.py"
] | [
"from convlab2.nlu.svm.multiwoz import SVMNLU\nfrom convlab2.nlu.jointBERT.multiwoz import BERTNLU\nfrom convlab2.nlu.milu.multiwoz import MILU\nfrom convlab2.dst.rule.multiwoz import RuleDST\nfrom convlab2.policy.rule.multiwoz import RulePolicy\nfrom convlab2.nlg.template.multiwoz import TemplateNLG\nfrom convlab2... | [
[
"torch.manual_seed",
"numpy.random.seed"
],
[
"torch.manual_seed",
"numpy.random.seed"
],
[
"torch.cuda.is_available"
]
] |
HenryJia/lightning-baselines3 | [
"10d1a0eed6136978204323250e37d49915a12e14"
] | [
"tests/on_policy_models/test_on_policy_model.py"
] | [
"from collections import OrderedDict\n\nimport pytest\n\nimport gym\nfrom gym import spaces\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torch import distributions\n\nimport pytorch_lightning as pl\n\nfrom lightning_baselines3.on_policy_models.on_policy_model import OnPolicyModel\n\n... | [
[
"torch.nn.functional.softmax",
"torch.ones",
"torch.max",
"torch.distributions.Normal",
"torch.chunk",
"torch.ones_like"
]
] |
golunovas/onnx-tensorflow | [
"b6340b3e66aa08af1ea4382e98257c2098177371"
] | [
"test/backend/test_node.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport math\nimport unittest\nimport numpy as np\nimport tensorflow as tf\nfrom onnx_tf.backend import run_node\nfrom onnx_tf.common import supports_device\nfro... | [
[
"numpy.dot",
"numpy.arctanh",
"numpy.sqrt",
"numpy.minimum",
"numpy.squeeze",
"numpy.cumsum",
"numpy.isneginf",
"numpy.round",
"numpy.max",
"numpy.concatenate",
"numpy.mean",
"numpy.argmin",
"numpy.random.randn",
"numpy.negative",
"numpy.exp",
"numpy... |
Martin36/tapas | [
"2987658c3b65c5ab6e698d6c57823dc30d3d0f96"
] | [
"tapas/models/tapas_classifier_model_utils.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Google AI Language Team 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# Unl... | [
[
"tensorflow.compat.v1.not_equal",
"tensorflow.compat.v1.truncated_normal_initializer",
"tensorflow.compat.v1.equal",
"tensorflow.compat.v1.einsum",
"tensorflow.compat.v1.zeros_initializer",
"tensorflow.compat.v1.cast",
"tensorflow.compat.v1.squeeze"
]
] |
suhongkim/SSD-Vehicle-Detector | [
"8337d237f4c7923e55d02747ec37a60681e5beff"
] | [
"vehicle_detection.py"
] | [
"import os\r\nimport torch\r\nfrom torch.utils.data import DataLoader\r\nfrom cityscape_dataset import CityScapeDataset\r\nfrom ssd_util import load_dataset_list, load_dataset_list_original, show_loss, show_log\r\nfrom ssd_net import SSD\r\nfrom ssd_train import train_net\r\nfrom ssd_test import test_net\r\n\r\n\r\... | [
[
"torch.multiprocessing.set_start_method",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.set_default_tensor_type"
]
] |
DavidLesnjak/CMSIS_5 | [
"e0848410d137758a3356a5ee94ca4501cea708a8",
"e0848410d137758a3356a5ee94ca4501cea708a8",
"e0848410d137758a3356a5ee94ca4501cea708a8"
] | [
"CMSIS/DSP/Examples/ARM/arm_bayes_example/train.py",
"CMSIS/DSP/Testing/PatternGeneration/Stats.py",
"CMSIS/DSP/Testing/addToRegDB.py"
] | [
"from sklearn.naive_bayes import GaussianNB\nimport random\nimport numpy as np\nimport math\n\nfrom pylab import scatter,figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy\nimport matplotlib.pyplot as plt\nfrom matplotlib.font_manager import FontProperties\n\n# Generation of d... | [
[
"sklearn.naive_bayes.GaussianNB",
"matplotlib.font_manager.FontProperties",
"numpy.ones",
"numpy.concatenate",
"numpy.size",
"numpy.random.randn",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.text",
"numpy.zeros",
"matplotlib.pyplot.figure"
],
[
"numpy.dot",
"nu... |
allen050883/Project | [
"22a9f1e466e595d8808e59fc58801881f3399df4"
] | [
"kaggle_SIIM-ACR_Pneumothorax_Segmentation/utils/loss.py"
] | [
"import torch\nimport torch.nn.functional as F\n\ndef dice_score(inputs, targets, smooth=1):\n # Flatten label and prediction tensors\n inputs = inputs.view(-1)\n targets = targets.view(-1)\n\n intersection = (inputs * targets).sum() \n dice_score = (2.*intersection + smoot... | [
[
"torch.exp",
"torch.nn.functional.binary_cross_entropy",
"torch.log"
]
] |
mrsiegfried/read-ICESat-2 | [
"1406b92691d284616ca6c9d72646eca4592d1f1d"
] | [
"scripts/interp_sea_level_ICESat2_ATL07.py"
] | [
"#!/usr/bin/env python\nu\"\"\"\ninterp_sea_level_ICESat2_ATL07.py\nWritten by Tyler Sutterley (05/2021)\nInterpolates sea level anomalies (sla), absolute dynamic topography (adt) and\n mean dynamic topography (mdt) to times and locations of ICESat-2 ATL07 data\n\nhttps://www.aviso.altimetry.fr/en/data/products/... | [
[
"numpy.logical_not",
"numpy.nonzero",
"numpy.isnan",
"numpy.copy",
"numpy.zeros_like",
"numpy.broadcast_to",
"numpy.floor",
"numpy.ma.zeros",
"numpy.shape",
"numpy.array",
"numpy.meshgrid",
"numpy.sum"
]
] |
FDU-VTS/Person-Search | [
"36a1eab8d8fdf149e32dece030edff02dbc8a915"
] | [
"models/reid.py"
] | [
"# encoding: utf-8\n\"\"\"\n@author: liaoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport math\n\nimport torch\nfrom torch import nn\nfrom torch.utils import model_zoo\n\nfrom models.context_block import *\n\nmodel_urls = {\n 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',\n... | [
[
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.cat",
"torch.load",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.InstanceNorm2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.split",
"torch.nn.ReLU",
"torch.utils.mo... |
MaximeSorgenfrei/cat_dog_cnn | [
"bc1301fb683de2111db2c25b9da22608ede8e070"
] | [
"webcam_animal_classifier.py"
] | [
"import cv2\nimport keras\nfrom keras.models import Sequential, Model\nfrom keras.callbacks import EarlyStopping\nfrom keras.optimizers import Adam\nimport json\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport pandas as pd\nfrom random import shuffle\n# import tensorflow as tf\nimport time\n\... | [
[
"numpy.reshape",
"numpy.ones_like",
"pandas.DataFrame"
]
] |
534ttl3/ctsutils | [
"b070bf349d4a112df576404a3948e0de60f24927",
"b070bf349d4a112df576404a3948e0de60f24927"
] | [
"ctsutils/test.py",
"ctsutils/mpl_slider.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nfrom ctsutils.cparameterspace import CParam, CParameterSpace\n\n\ndef foo(X, Y, Y2):\n \"\"\" \"\"\"\n return (1 - X / 2 + X ** 5 + (Y + Y2 ) ** 3) * np.exp(-X ** 2 - (Y + Y2 ) ** 2) # calcul du tableau des valeurs de Z\n\n\ndef foo(X, Y, Y2, Y3):\n ... | [
[
"numpy.exp",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"numpy.linspace"
],
[
"matplotlib.widgets.Button",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.sin",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.axes",
"matplotlib.widgets.Slider",
"m... |
sereini/SpeechSeparationModel | [
"ea44c845762112f3bc2e5e54c5530e6fd429464f"
] | [
"preprocessing/embedding/export_FaceEmbedding.py"
] | [
"\"\"\"\nExports the embeddings of a directory of images as numpy arrays.\nFollowing structure:\n D:\\images:\n folder1:\n img_0\n ...\n img_74\n folder2:\n img_0\n ...\n img_74\n \nOutput:\nembeddings.npy -- Embeddings as... | [
[
"scipy.misc.imresize",
"tensorflow.Graph",
"numpy.stack",
"numpy.save",
"tensorflow.ConfigProto",
"tensorflow.GPUOptions",
"tensorflow.Session",
"tensorflow.get_default_graph",
"numpy.zeros"
]
] |
yoshitomo-matsubara/vision | [
"03d11338f3faf94a0749549912593ddb8b70be17",
"03d11338f3faf94a0749549912593ddb8b70be17"
] | [
"references/detection/utils.py",
"torchvision/models/googlenet.py"
] | [
"import datetime\nimport errno\nimport os\nimport time\nfrom collections import defaultdict, deque\n\nimport torch\nimport torch.distributed as dist\n\n\nclass SmoothedValue:\n \"\"\"Track a series of values and provide access to smoothed values over a\n window or the global series average.\n \"\"\"\n\n ... | [
[
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"torch.cuda.device_count",
"torch.distributed.all_gather_object",
"torch.distributed.is_initialized",
"torch.inference_mode",
"torch.distributed.barrier",
"torch.tensor",
"torch.cuda.max_memory_allocated",
"to... |
UBC-MDS/world-energy-visualization | [
"6f8dd756a8c158a332fd94ca1f025fc16bcd77b3"
] | [
"src/tab1_mapview.py"
] | [
"from dash import Input, Output, callback, html, dcc, State\nimport dash_bootstrap_components as dbc\n\nimport pandas as pd\nimport numpy as np\nimport plotly.express as px\nimport plotly.io as pio\nimport plotly.graph_objects as go\n\nfrom urllib.request import urlopen\nimport json\n\ndf_all = pd.read_csv(\n \"... | [
[
"pandas.read_csv"
]
] |
Belvenix/IdleonCogOptimizer | [
"6b80b9f11bf0478e2e3522cb07b93b2c8834840b"
] | [
"src/python/board.py"
] | [
"from typing import Tuple\nfrom .cogs import Cog, EmptyCog, Player\nfrom .special_cogs import BoostedCog\nimport numpy as np\n\nclass Board:\n def __init__(self, height: int = 8, width: int = 12, locked: bool = True) -> None:\n self._visualization_board = ''\n self.board = np.array([[EmptyCog() for... | [
[
"numpy.ones_like",
"numpy.zeros_like"
]
] |
anbhimi/Niffler | [
"81bf6c05132a58d05c7934f66edd0969c3bc9bf5"
] | [
"modules/png-extraction/ImageExtractor.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport os\nimport glob \nfrom shutil import copyfile\nimport hashlib\nimport json\nimport sys\nimport subprocess\nimport logging\nfrom multiprocessing import Pool\nimport pdb\nimport time\nimport pickle\nimport argparse\nimport numpy as np\nimport pandas as pd\nimpo... | [
[
"pandas.concat",
"pandas.read_csv",
"numpy.maximum",
"numpy.asarray",
"numpy.uint8",
"pandas.DataFrame",
"numpy.uint16",
"numpy.array_split"
]
] |
PuneethaPai/transformers | [
"a34a9896ac2a4a33ff9cd805c76eed914c8d8965",
"a34a9896ac2a4a33ff9cd805c76eed914c8d8965"
] | [
"examples/text-classification/run_glue.py",
"src/transformers/convert_pytorch_checkpoint_to_tf2.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"numpy.squeeze",
"numpy.argmax"
],
[
"torch.no_grad",
"numpy.abs",
"torch.load"
]
] |
voidrank/Geo-CNN | [
"4e8a7d5cc0d14ffa2a1b8bef854f294ae4e25f8b"
] | [
"train/test.py"
] | [
"''' Evaluating Frustum PointNets.\nWrite evaluation results to KITTI format labels.\nand [optionally] write results to pickle files.\n\nAuthor: Charles R. Qi\nDate: September 2017\n'''\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport argparse\nimport importlib\nimport numpy as np\nimport ten... | [
[
"numpy.log",
"tensorflow.Graph",
"tensorflow.placeholder",
"tensorflow.ConfigProto",
"numpy.argmax",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.zeros",
"numpy.sum"
]
] |
rubind/wfc3_psf | [
"68e0d4b88e4a614939ae0c8771e37f315574ab82"
] | [
"wfc3_psf.py"
] | [
"import numpy as np\nfrom astropy.io import fits\nfrom scipy.interpolate import RectBivariateSpline\n\ndef index_PSF(PSF, x, y):\n return PSF[x+y*3]\n\ndef get_native_PSF(filt, x, y, the_path):\n x = float(np.clip(x, 0, 1014))\n y = float(np.clip(y, 0, 1014))\n\n f = fits.open(\"%sPSFSTD_WFC3IR_%s.fits\... | [
[
"numpy.median",
"scipy.interpolate.RectBivariateSpline",
"numpy.clip"
]
] |
CUrW-SL/DSS-Framework | [
"43a39b322ffb0eb92dd116e77cf9a8479357a121"
] | [
"accuracy_unit/wrf/wrf_accuracy.py"
] | [
"import math\nfrom datetime import datetime, timedelta\nimport sys\nfrom airflow.models import Variable\nimport pandas as pd\nimport numpy as np\n\nsys.path.insert(0, '/home/curw/git/DSS-Framework/db_util')\n# sys.path.insert(0, '/home/hasitha/PycharmProjects/DSS-Framework/db_util')\nfrom gen_db import CurwFcstAdap... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"numpy.power"
]
] |
zzzace2000/cairl_nodegam | [
"90d0d56a0e7be3d1cbba6179cbfc36d626456770",
"90d0d56a0e7be3d1cbba6179cbfc36d626456770",
"90d0d56a0e7be3d1cbba6179cbfc36d626456770"
] | [
"lib/mma.py",
"lib/lightning/airl/sepsis.py",
"mimic_preproc/extract-scripts/get_cohort_baseline_info.py"
] | [
"import logging\n\nimport cvxpy as cvx\nimport numpy as np\nfrom numpy.linalg import norm\nfrom tqdm import tqdm\n\n\nclass MaxMarginAbbeel(object):\n \"\"\"\n implementation of (Abbeel & Ng 2004)\n\n two versions: available\n\n 1. max-margin (stable, computationally more heavy)\n 2. projection (simp... | [
[
"numpy.abs",
"numpy.min",
"numpy.linalg.norm",
"numpy.array",
"numpy.sum"
],
[
"torch.utils.data.DataLoader"
],
[
"numpy.array",
"pandas.to_datetime"
]
] |
HackaGeo2021UFF/well-tie-challenge | [
"63af3d9b4cc63e78f9ec31ee3d0e2b231e65b195"
] | [
"src/wellTie.py"
] | [
"import json\nimport welly\nfrom welly import Well\nimport pandas as pd\nimport lasio\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\n\nfrom src.waveletChoice import *\nfrom src.seismicManipulation import *\n\ndef read_inputs(jpath):\n \"\"\"\n read_inputs reads the input json file and stores... | [
[
"numpy.convolve",
"numpy.nan_to_num",
"pandas.DataFrame",
"numpy.cumsum",
"numpy.max",
"numpy.insert",
"numpy.interp",
"numpy.array",
"numpy.roll"
]
] |
Aniruddha-Tapas/seq2seq | [
"1592b842b652ae648b96c164bead38eb089ce08e",
"1592b842b652ae648b96c164bead38eb089ce08e"
] | [
"seq2seq/contrib/seq2seq/helper.py",
"seq2seq/encoders/rnn_encoder.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.math_ops.reduce_all",
"tensorflow.contrib.distributions.python.ops.categorical.Categorical",
"tensorflow.python.ops.array_ops.tile",
"tensorflow.python.ops.control_flow_ops.cond",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.math_ops.argmax",
"... |
starcatch1/book | [
"3d4477c2e624e291b2081b944c9589b976211dcf",
"3d4477c2e624e291b2081b944c9589b976211dcf"
] | [
"ch19/day06/07.py",
"ch15/12.py"
] | [
"import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\ndef get_financial_statements(code):\n url = \"http://companyinfo.stock.naver.com/v1/company/ajax/cF1001.aspx?cmp_cd=%s&fin_typ=0&freq_typ=Y\" % (code)\n html = requests.get(url).text\n\n html = html.replace('<th class=\"bg r01c02 endLi... | [
[
"pandas.read_html"
],
[
"matplotlib.finance.candlestick2_ohlc",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
rpindale/pytorch | [
"6a085648d81ce88ff59d6d1438fdb3707a0d6fb7",
"6a085648d81ce88ff59d6d1438fdb3707a0d6fb7"
] | [
"test/quantization/core/test_workflow_module.py",
"test/distributed/elastic/multiprocessing/errors/api_test.py"
] | [
"# Torch\nimport torch\nfrom torch.quantization import (\n MinMaxObserver,\n PerChannelMinMaxObserver,\n MovingAverageMinMaxObserver,\n MovingAveragePerChannelMinMaxObserver,\n HistogramObserver,\n RecordingObserver,\n PlaceholderObserver,\n NoopObserver,\n FakeQuantize,\n FixedQParams... | [
[
"torch.quantization.MinMaxObserver",
"torch.jit.load",
"torch.quantization.get_observer_state_dict",
"torch.rand_like",
"torch.load",
"torch.zeros",
"torch.iinfo",
"torch.quantization.MovingAverageMinMaxObserver.with_args",
"torch.nn.SyncBatchNorm.convert_sync_batchnorm",
"... |
karthiksekaran/mlprojects | [
"a16a4adb20e559b54a78f4e6fd26da520b5ea851"
] | [
"Decision Tree - Churn.py"
] | [
"#import modules\r\nimport pandas # for dataframes\r\nimport matplotlib.pyplot as plt # for plotting graphs\r\nimport seaborn as sns # for plotting graphs\r\n\r\ndata=pandas.read_csv('HR_comma_sep.csv')\r\n\r\n# Import LabelEncoder\r\nfrom sklearn import preprocessing\r\n#creating labelEncoder\r\nle = preprocessin... | [
[
"pandas.read_csv",
"sklearn.metrics.precision_score",
"sklearn.model_selection.train_test_split",
"sklearn.ensemble.GradientBoostingClassifier",
"sklearn.preprocessing.LabelEncoder",
"sklearn.metrics.recall_score",
"sklearn.metrics.accuracy_score"
]
] |
i-ivanova/Explorify | [
"54d14eedb121bb8cb972f86c807c7fe4ae174ac1"
] | [
"pipeline/jonatan_pipeline.py"
] | [
"import json\nimport pandas as pd\nimport numpy as np\nimport pprint\n\nfrom sklearn.preprocessing import StandardScaler\n\nfrom jonatan_settings import data_path, write_final_df, write_dr_results, audio_features\nfrom jonatan_scrape import get_track_data, get_artist_data, get_audio_feature_data\nfrom jonatan_dr im... | [
[
"sklearn.preprocessing.StandardScaler",
"pandas.merge",
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
toandaominh1997/understanding_cloud_organization | [
"7da991ff3da557c18f4585c1b956ed799c104c7c"
] | [
"utils/metric.py"
] | [
"import torch \nimport numpy as np \n\n\nclass AverageMetric(object):\n def __init__(self, threshold=0.5):\n self.dice_scores = []\n self.threshold = threshold\n def update(self, outputs, labels):\n with torch.no_grad():\n probs = torch.sigmoid(outputs)\n dice_score ... | [
[
"torch.sigmoid",
"torch.cat",
"torch.no_grad",
"numpy.mean",
"torch.nonzero"
]
] |
n3urovirtual/EyeTracking_Experiment_Children | [
"56c08a1202a686ac8f05d3c4e53766537895fe4f"
] | [
"Learning Scripts/Learn_PT.py"
] | [
"\"\"\"APPLY PYTHAGOREAN THEOREM IN LEARNING DATA + SMOOTH VELOCITIES\"\"\"\n\nimport os\nimport itertools\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.signal import savgol_filter\nfrom helper import img_id, sub_id, TRIALS_PATH\n\n# Apply PT into smoothed learning data to fi... | [
[
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.ylim",
"numpy.nan_to_num",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.where",
"scipy.signal.savgol_filter",
"matplotlib.p... |
the-timoye/spark-examples | [
"d8784653a862e09e1c755ed2055d37a5516d2c3f"
] | [
"data_lakes.py"
] | [
"import pandas as pd\nimport pyspark.sql.functions as F\nfrom pyspark.sql import SparkSession\n\nimport sparknlp\nsparknlp.start()\nfrom sparknlp.pretrained import PretrainedPipeline\n\npd.set_option('max_colwidth', 800)\nspark = SparkSession.builder.config(\"spark.jars.packages\", \"com.johnsnowlabs.nlp:spark-nlp_... | [
[
"pandas.set_option"
]
] |
jjaramillo34/pyimagesearchuniversity_course | [
"0a4a26c29a6f8122f6a03d3393ac01ebbc14a391",
"0a4a26c29a6f8122f6a03d3393ac01ebbc14a391"
] | [
"Aumented Reality 101/Fiducials and Markers/opencv-generate-aruco/opencv_generate_aruco.py",
"OpenCV 102/Basic Image Processing Operations/auto-canny/auto_canny_practice.py"
] | [
"# USAGE\n# python opencv_generate_aruco.py --id 24 --type DICT_5X5_100 --output tags/DICT_5X5_100_id24.png\n\n# import the necessary packages\nimport numpy as np\nimport argparse\nimport cv2\nimport sys\n\n# construct the argument parser and parse the arguments\nap = argparse.ArgumentParser()\nap.add_argument(\"-o... | [
[
"numpy.zeros"
],
[
"numpy.hstack",
"numpy.median"
]
] |
lnmdlong/mmdetection | [
"87768a5d0a0188d46c50b575b417e9ec2fb5c06c"
] | [
"mmdet/models/roi_heads/mask_heads/fcn_mask_head.py"
] | [
"import os\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import ConvModule, build_conv_layer, build_upsample_layer\nfrom mmcv.ops.carafe import CARAFEPack\nfrom mmcv.runner import BaseModule, ModuleList, auto_fp16, force_fp32\nfrom torch.nn.modules.utils ... | [
[
"torch.isinf",
"torch.zeros",
"torch.split",
"torch.nn.init.constant_",
"torch.zeros_like",
"torch.arange",
"numpy.round",
"numpy.ceil",
"torch.jit.is_tracing",
"torch.nn.modules.utils._pair",
"torch.stack",
"torch.nn.ReLU",
"torch.onnx.is_in_onnx_export",
"... |
symphonylyh/transformers | [
"03e5d5196ca76008b60da9bb6d604e6bdbcba0db",
"03e5d5196ca76008b60da9bb6d604e6bdbcba0db"
] | [
"tests/t5/test_modeling_tf_t5.py",
"src/transformers/models/deberta_v2/modeling_deberta_v2_original.py"
] | [
"# coding=utf-8\n# Copyright 2018 Google T5 Authors and HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n... | [
[
"tensorflow.device",
"tensorflow.concat",
"tensorflow.range",
"tensorflow.zeros",
"tensorflow.keras.metrics.sparse_categorical_crossentropy",
"tensorflow.ones",
"tensorflow.expand_dims",
"tensorflow.debugging.assert_near",
"tensorflow.function",
"tensorflow.math.reduce_sum"... |
SantiagoJN/spatialaudiogen | [
"5092b8988731f9704914beb44c5688a819508ade"
] | [
"pyutils/iolib/audio.py"
] | [
"import os\nimport scipy.signal\nimport numpy as np\nfrom soundfile import SoundFile\nfrom pyutils.iolib.video import getFFprobeMeta\nfrom pyutils.cmd import runSystemCMD\n# from scikits.audiolab import Sndfile, Format\nimport tempfile\nimport resampy\n# import librosa\n\n\ndef load_wav(fname, rate=None):\n # fp... | [
[
"numpy.dot",
"numpy.asarray",
"numpy.cos",
"numpy.sin",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
]
] |
mruffalo/epiScanpy | [
"bcb86347d2b8451c384f97162625c8d5efb27ffc"
] | [
"episcanpy/preprocessing/_readimpute.py"
] | [
"import numpy as np\nimport anndata as ad\nimport pandas as pd\n\ndef load_met_noimput(matrix_file, path='', save=False):\n \"\"\"\n read the raw count matrix and convert it into an AnnData object.\n write down the matrix as .h5ad (AnnData object) if save = True.\n Return AnnData object\n \"\"\"\n ... | [
[
"numpy.matrix",
"numpy.isnan",
"numpy.nan_to_num",
"pandas.DataFrame",
"numpy.nansum",
"numpy.array"
]
] |
yourwanghao/Ultrasound_Nerve_Segmentation | [
"9a73cdb9a97b27c375a1023f4426d7e5a89b6a4d"
] | [
"training_curves.py"
] | [
"#!/usr/bin/env python\n\n## based on https://github.com/dmlc/mxnet/issues/1302\n## Parses the model fit log file and generates a train/val vs epoch plot\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport re\nimport argparse\n\ndef log_train_metric(period, auto_reset=False):\n \"\"\"Callback to log the... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylim",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
rxbtz/tensorflow | [
"499f7ed810928e29986453c83778f71e2b351eb5"
] | [
"tensorflow/python/keras/_impl/keras/layers/embeddings.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.keras._impl.keras.constraints.serialize",
"tensorflow.python.keras._impl.keras.backend.floatx",
"tensorflow.python.keras._impl.keras.regularizers.serialize",
"tensorflow.python.keras._impl.keras.initializers.get",
"tensorflow.python.util.tf_export.tf_export",
"tensorflow... |
martinRenou/chaco | [
"1888da3ecee89f9b2d11900cda9333b32fc5e89a",
"1888da3ecee89f9b2d11900cda9333b32fc5e89a",
"1888da3ecee89f9b2d11900cda9333b32fc5e89a"
] | [
"chaco/tests/test_grid_data_source.py",
"chaco/contour_line_plot.py",
"chaco/candle_plot.py"
] | [
"\"\"\"\nTests of GridDataSource behavior.\n\"\"\"\n\nimport unittest\n\nfrom numpy import array\nfrom numpy.testing import assert_array_equal\n\nfrom chaco.api import GridDataSource\nfrom traits.testing.unittest_tools import UnittestTools\n\n\nclass GridDataSourceTestCase(UnittestTools, unittest.TestCase):\n\n ... | [
[
"numpy.array"
],
[
"numpy.meshgrid",
"numpy.isfinite",
"numpy.transpose"
],
[
"numpy.concatenate",
"numpy.array",
"numpy.compress",
"numpy.searchsorted"
]
] |
dewyman/TALON-paper-2019 | [
"8644b34573d6a5924e8d84a234fd0fcbf010c233"
] | [
"pipeline/table_figure_scripts/rename_abundance_file_datasets.py"
] | [
"import pandas as pd \nfrom collections import defaultdict\nimport argparse\n\nparser = argparse.ArgumentParser(description=\\\n\t'Renames PacBio and ONT datasets with more\\\n\t intelligent names')\nparser.add_argument('--f', help='file to swap dataset col names in')\nargs = parser.parse_args()\nf = args.f\n\n# re... | [
[
"pandas.read_csv"
]
] |
gmwang18/pyscf | [
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7ac",
"fcd6877751661c8a9743c1c872a4a2b65f6dd7a... | [
"scf/_vhf.py",
"fci/cistring.py",
"tools/cubegen.py",
"pbc/df/test/test_aft.py",
"symm/addons.py",
"pbc/scf/x2c.py",
"scf/test/test_rhf.py"
] | [
"#!/usr/bin/env python\n\nimport sys\nimport ctypes\nimport _ctypes\nimport numpy\nimport pyscf.lib\nfrom pyscf import gto\nfrom pyscf.gto.moleintor import make_cintopt\n\nlibcvhf = pyscf.lib.load_library('libcvhf')\ndef _fpointer(name):\n return ctypes.c_void_p(_ctypes.dlsym(libcvhf._handle, name))\n\nclass VHF... | [
[
"numpy.ascontiguousarray",
"numpy.arange",
"numpy.asarray",
"numpy.iscomplexobj",
"numpy.empty"
],
[
"numpy.asarray",
"numpy.array",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.min",
"numpy.asarray",
"numpy.arange",
"numpy.max",
"numpy.empty"
],
[
... |
mrzhuzhe/yunru | [
"faa7380a5363f654f1dc8f5d53b077d9f33bff6f"
] | [
"yolov5/models/common.py"
] | [
"# YOLOv5 common modules\n\nimport math\nfrom copy import copy\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport requests\nimport torch\nimport torch.nn as nn\nfrom PIL import Image\nfrom torch.cuda import amp\n\nfrom utils.datasets import letterbox\nfrom utils.general import non_max_supp... | [
[
"torch.cat",
"numpy.asarray",
"pandas.DataFrame",
"torch.cuda.amp.autocast",
"torch.no_grad",
"torch.nn.MultiheadAttention",
"torch.from_numpy",
"numpy.stack",
"torch.tensor",
"numpy.ascontiguousarray",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.LeakyReLU",... |
nadavyayon/cell2location | [
"54141fb85d4b0d64825dfdb6d1bf147b025c856b",
"54141fb85d4b0d64825dfdb6d1bf147b025c856b"
] | [
"cell2location/plt/plot_factor_spatial.py",
"cell2location/models/pymc3/simplified/LocationModelHierarchicalW.py"
] | [
"#!pip install plotnine\nimport numpy as np\nimport pandas as pd\nimport plotnine\n\n\ndef plot_factor_spatial(\n adata,\n fact,\n cluster_names,\n fact_ind=[0],\n trans=\"log\",\n sample_name=None,\n samples_col=\"sample\",\n obs_x=\"imagecol\",\n obs_y=\"imagerow\",\n n_columns=6,\n ... | [
[
"pandas.concat",
"pandas.Categorical",
"pandas.DataFrame",
"numpy.repeat",
"pandas.to_numeric",
"numpy.isin"
],
[
"numpy.dot",
"numpy.array",
"numpy.sqrt"
]
] |
NCAR/GeoCAT-examples | [
"5ed9a1d68b69a921d0f1fee1160e109853926ed9",
"5ed9a1d68b69a921d0f1fee1160e109853926ed9",
"5ed9a1d68b69a921d0f1fee1160e109853926ed9"
] | [
"Plots/Scatter/NCL_scatter_5.py",
"Plots/Panels/NCL_panel_13.py",
"Plots/Shapefiles/NCL_shapefiles_1.py"
] | [
"\"\"\"\nNCL_scatter_5.py\n================\nThis script illustrates the following concepts:\n - Drawing a scatter plot with markers of different colors\n - Generating dummy data using \"random.normal\"\n - Manually creating a legend using markers and text\n - Customizing the label locations in a legend\n ... | [
[
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.axes",
"numpy.errstate",
"matplotlib.pyplot.show",
"numpy.where",
"numpy.random.default_rng",
"matplotlib.pyplot.figure"
],
[
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"numpy.arange",
"matplotlib.patches... |
Nick-AhSen/iGibson | [
"c6854f11eec5d935fa3ef3d6d4852c6571beab4b"
] | [
"igibson/examples/demo/generate_data_semseg_lidar.py"
] | [
"import os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\n\nimport igibson\nfrom igibson.envs.igibson_env import iGibsonEnv\n\n\ndef get_lidar_sampling_pattern():\n lidar_vertical_low = -15 / 180.0 * np.pi\n lidar_vertical_high = 15 / 180.0 * np.pi\n lidar_... | [
[
"numpy.meshgrid",
"numpy.arange",
"numpy.eye",
"numpy.linalg.norm",
"numpy.cos",
"numpy.sin",
"numpy.concatenate",
"numpy.tan",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
Spain-AI/dark_helper | [
"c2a5d774b455b2a374d6ca5e2715f7a560f5fe5b"
] | [
"face_lib/sort.py"
] | [
"\"\"\"\n SORT: A Simple, Online and Realtime Tracker\n Copyright (C) 2016-2020 Alex Bewley alex@bewley.ai\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 o... | [
[
"numpy.maximum",
"numpy.sqrt",
"numpy.minimum",
"numpy.random.seed",
"numpy.isnan",
"numpy.concatenate",
"numpy.ma.masked_invalid",
"scipy.optimize.linear_sum_assignment",
"numpy.array",
"numpy.where",
"numpy.empty"
]
] |
ashishgaurav13/cl_safer_classifiers | [
"a3df87a4bc863377485fa58a8a475991a4fc9800",
"a3df87a4bc863377485fa58a8a475991a4fc9800"
] | [
"utils/data_iterators/cifar100.py",
"utils/networks/network_si_pathint.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport os\nfrom tensorflow.keras.models import load_model\nfrom tensorflow.keras.backend import clear_session\nfrom keras.utils import to_categorical\nimport tensorflow.keras as keras\nfrom .common import save_pickle, load_pickle\nfrom tqdm import tqdm\n\n# util... | [
[
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.imshow",
"numpy.random.choice",
"numpy.reshape",
"numpy.unique",
"numpy.squeeze",
"matplotlib.pyplot.savefig",
"tensorflow.keras.Model",
"numpy.copy",
"numpy.random.permutation",
"numpy.mean",
"tensorflow.kera... |
pranavgo/gennav | [
"fc57707912c6f1c6af208a30b2ab0ad78c2cc798"
] | [
"gennav/envs/binaryOccupancyGrid2D_env.py"
] | [
"import numpy as np\nfrom gennav.envs.base import Environment\nfrom gennav.utils.common import RobotState\nfrom gennav.utils.geometry import Point\nfrom matplotlib import pyplot as plt\n\n\nclass BinaryOccupancyGrid2DEnv(Environment):\n \"\"\"Base class for a Binary Occupancy Grid 2D envrionment.\n\n Argument... | [
[
"numpy.dot",
"matplotlib.pyplot.imshow",
"numpy.abs",
"numpy.linalg.inv",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.empty"
]
] |
elena-kolomeets/lowfat | [
"f7647f5cd12519f722e41808157a96cc3e37b6ce"
] | [
"lowfat/management/commands/load2019applications.py"
] | [
"import pandas as pd\n\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import BaseUserManager\nfrom django.core.management.base import BaseCommand\nfrom django.db import IntegrityError\n\nfrom lowfat.models import Claimant\n\nclass Command(BaseCommand):\n help = \"Import CSV with... | [
[
"pandas.notnull",
"pandas.read_csv"
]
] |
meracan/s3-netcdf-api | [
"920d09ef7b1a205230ea2c76eabcb4853616992c"
] | [
"test/other/dataTest.old.py"
] | [
"import numpy as np\nfrom datetime import datetime\n\nnpe=3\nnelem=20\nnnode=10\nnstation=27\nnsnode=3\nntime=8760\nnfreq=3\nndir=5\n\nelem=np.arange(nelem*npe,dtype=\"i4\").reshape((nelem,npe))\ntime=np.datetime64(datetime(2000,1,1))+np.arange((ntime))*np.timedelta64(1, 'h')\nlat=np.arange((nnode),dtype=\"f8\")\nl... | [
[
"numpy.timedelta64",
"numpy.arange",
"numpy.array",
"numpy.column_stack"
]
] |
cafe-com-analytics/stock_market_index_daily_direction | [
"e05eced04d3f0ae3134315de0163bfdf140c1e4a"
] | [
"src/features/build_features.py"
] | [
"import numpy as np\nimport pandas as pd\nimport yfinance as yf\n\n\ndef downloading_stocks_data(dct, start_date: str = \"2021-01-01\", end_date: str = \"2021-07-01\") -> pd.DataFrame:\n \"\"\"\n Download the stocks daily information from tickers listed as keys of a dictionary, gets only \"Close\" price from\... | [
[
"numpy.log",
"numpy.where",
"numpy.select"
]
] |
clear-nus/BOIRL | [
"cc872111fda3c7b8118e1a864831013c30f63948",
"cc872111fda3c7b8118e1a864831013c30f63948",
"cc872111fda3c7b8118e1a864831013c30f63948"
] | [
"bayesian_irl/src/utils/prob_dists.py",
"inverse_rl/algos/irl_batch_polopt.py",
"gym-sweden/gym_sweden/envs/swedenworld_env.py"
] | [
"import scipy.stats\nimport numpy as np\nfrom scipy.stats import multivariate_normal as MVG\n\nclass UniformDist:\n def __init__(self, xmax=1., xmin=None):\n self.xmax = xmax\n self.xmin = - xmax if xmin is None else xmin\n self.prob = 1 / (self.xmax - self.xmin)\n\n def __call__(self, *a... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.savefig",
"scipy.stats.multivariate_normal",
"numpy.array",
"matplotlib.pyplot.hist"
],
[
"tensorflow.get_default_session",
"numpy.min",
"numpy.max",
"tensorflow.global_variables_initializer",
"n... |
edesz/electricity-consumption-forecast | [
"9bc49523d9c2ed6d827ce690916980cf7e818fed"
] | [
"src/data_prep_helpers.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\nimport pandas as pd\n\n\ndef add_corona_dates(df, index_name, strategy=[\"during_corona\", \"no_corona\"]):\n \"\"\"\n Inputs\n ------\n strategy : List\n division of datetimes based on stages of corona; acceptable strategies\n are one ... | [
[
"pandas.to_datetime",
"pandas.DataFrame.from_dict"
]
] |
barcawy/OpenNE | [
"88018ed9bf34d09020464a430e09afb704b1f322"
] | [
"src/openne/Z_0709.py"
] | [
"from __future__ import print_function\nimport time\nimport math\nimport random\nimport numpy as np\nimport pickle as pkl\nimport networkx as nx\nfrom gensim.models import Word2Vec\nfrom fastdtw import fastdtw\nfrom collections import Counter\nfrom collections import defaultdict\nimport os\n\nclass Z(object):\n\n ... | [
[
"numpy.exp",
"numpy.random.rand",
"numpy.sort",
"numpy.random.choice"
]
] |
strawberrypie/jina-hub | [
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c4",
"8b2356d58687694d817881c840745214f12e94c... | [
"crafters/image/ImageNormalizer/__init__.py",
"crafters/image/ImageReader/tests/test_imagereader.py",
"crafters/image/ImageResizer/__init__.py",
"encoders/numeric/IncrementalPCAEncoder/__init__.py",
"crafters/image/ImageCropper/__init__.py",
"segmenters/image/SlidingWindowImageCropper/__init__.py",
"seg... | [
"__copyright__ = \"Copyright (c) 2021 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nfrom typing import Tuple, Dict, Union, Iterable\n\nimport numpy as np\n\nfrom jina.executors.decorators import single\nfrom jina.executors.crafters import BaseCrafter\n\nfrom .helper import _load_image, _m... | [
[
"numpy.array"
],
[
"numpy.array",
"numpy.stack"
],
[
"numpy.asarray"
],
[
"sklearn.decomposition.IncrementalPCA"
],
[
"numpy.asarray"
],
[
"numpy.copy",
"numpy.pad"
],
[
"numpy.random.randn",
"numpy.stack"
]
] |
qiguming/mmdetection | [
"68532eb6f4643ddf0179a4384c8c9e004a2c1d07",
"84fbb2c6ee7346ea722cea3a4fa16d73e11fcafd",
"84fbb2c6ee7346ea722cea3a4fa16d73e11fcafd"
] | [
"mmdet/ops/point_sample.py",
"mmdet/models/roi_heads/dynamic_roi_head.py",
"mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py"
] | [
"# Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend # noqa\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.utils import _pair\n\n\ndef normalize(grid):\n \"\"\"Normalize input grid from [-1, 1] to [0, 1]\n\n Args:\n ... | [
[
"torch.Size",
"torch.cat",
"torch.tensor",
"torch.no_grad",
"torch.nn.modules.utils._pair"
],
[
"torch.topk",
"numpy.median",
"numpy.mean",
"torch.kthvalue"
],
[
"torch.sqrt",
"torch.log2"
]
] |
dylanhross/dmccs | [
"8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3",
"8b403a90b6cb7edd9d7abc172462e9d9b62b5dd3"
] | [
"prediction/bimod/qglc/cactus_ccs_comp.py",
"prediction/bimod/BACs_and_TERF/C06_featurize.py"
] | [
"#!/Library/Frameworks/Python.framework/Versions/3.8/bin/python3\n\"\"\"\n\"\"\"\n\n\nfrom matplotlib import pyplot as plt\nimport numpy as np\n\n\n# set up plot fonts\nfrom matplotlib import rcParams\nrcParams['font.family'] = 'sans-serif'\nrcParams['font.sans-serif'] = ['Helvetica', 'Arial']\nrcParams['font.size'... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.savefig",
"numpy.loadtxt",
"matplotlib.pyplot.figure"
],
[
"numpy.savetxt"
]
] |
Xudewang/scarlet | [
"1d2a1806038cda8ac96e4c766a5cfa0b8ae5c1b7"
] | [
"scarlet/display.py"
] | [
"import numpy as np\nfrom astropy.visualization.lupton_rgb import LinearMapping, AsinhMapping\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import Rectangle, Polygon\nfrom matplotlib.ticker import MaxNLocator\nfrom .bbox import Box\nfrom .component import Component\n\n\ndef channels_to_rgb(channels):\n ... | [
[
"matplotlib.patches.Polygon",
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.subplots",
"numpy.dstack",
"numpy.percentile",
"numpy.all",
"numpy.sinh",
"numpy.ceil",
"matplotlib.ticker.MaxNLocator",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"matplotlib.pyplo... |
jfrancis71/TensorFlowApps | [
"a9c61e2d5146c02715748221f51c656143b51b02"
] | [
"DownloadVGG_Faces.py"
] | [
"import os\nfrom PIL import Image\nimport urllib.request as ur\nimport urllib.request\nfrom io import BytesIO\nimport requests\nimport csv\nimport h5py\nimport numpy as np\nimport argparse\n\ndef retrieve_patch( rec ):\n response = requests.get( rec[1], timeout=10 )\n file = BytesIO( response.content )\n i... | [
[
"numpy.asarray"
]
] |
zaradana/Fast_BERT | [
"7ee96e99ba95468c29fe3542fe8071e0402ec0f6"
] | [
"0_fast_bert/prediction.py"
] | [
"import os\nimport torch\nfrom .data_cls import BertDataBunch\nfrom .data_ner import BertNERDataBunch\nfrom .learner_cls import BertLearner\nfrom .learner_ner import BertNERLearner\nimport time\n\nfrom transformers import AutoTokenizer\n\nimport warnings\n\nwarnings.filterwarnings(\"ignore\", message=\"numpy.dtype ... | [
[
"torch.device",
"torch.cuda.is_available"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.