repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
IgorQueiroz32/curso_meigaron_pyhton_ao_ds | [
"91e7b8336065dc841f620847997156bad6fed35e"
] | [
"House Rocket Company/teste_multiselect.py"
] | [
"\r\n# ----------------------------------------\r\n# Libraries\r\n# ---------------------------------------\r\n\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom geopy.geocoders import Nominatim\r\nimport ipywidgets as widgets\r\nfrom ipywidgets import fixed\r\nfrom matplotlib import gridspec\r\nfrom matplotlib ... | [
[
"pandas.to_datetime",
"pandas.read_csv"
]
] |
DSMI314/SuperMotor | [
"65870c0956b4f13558684fda94e9241b6380c63d"
] | [
"pic_data/0830/TOP4/lib.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom collections import deque\nimport statistics\nimport sys\nimport pandas as pd\nimport seaborn as sns\nimport bisect\n\nfrom sklearn.svm import SVC\nfrom sklearn import decomposition\n\n\nclass Parser(object):\n \"\... | [
[
"numpy.array",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.subplots",
"numpy.mean",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"sklearn.decomposition.... |
ianrgraham/hoomd-blue | [
"a2f63502adc467f3ff555616d0e27bb25d5ca9fa"
] | [
"hoomd/md/pytest/test_bond.py"
] | [
"# Copyright (c) 2009-2022 The Regents of the University of Michigan.\n# Part of HOOMD-blue, released under the BSD 3-Clause License.\n\nimport hoomd\nfrom hoomd import md\nfrom hoomd.conftest import expected_loggable_params\nfrom hoomd.conftest import logging_check, pickling_check\nimport pytest\nimport numpy as n... | [
[
"numpy.testing.assert_allclose"
]
] |
softDi/tensorflow | [
"3daa07aa2dde379388beb2a557a78bc5dd1b86ba"
] | [
"tensorflow/python/framework/function.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.eager.context.graph_mode",
"tensorflow.python.ops.variable_scope.variable_scope",
"tensorflow.python.framework.graph_to_function_def._get_op_def",
"tensorflow.python.eager.context.context",
"tensorflow.python.framework.ops.get_default_graph",
"tensorflow.python.pywrap_te... |
titu1994/progressive-neural-architecture-search | [
"b180b63fe0c79a65400c3f64888257845889ee8f"
] | [
"manager.py"
] | [
"import numpy as np\nimport shutil\nimport os\nimport tqdm\n\nimport tensorflow as tf\nfrom tensorflow.contrib.eager.python import tfe\nfrom tensorflow.python.keras.models import Model\nfrom tensorflow.python.keras.callbacks import ModelCheckpoint\n\n\nif not os.path.exists('temp_weights/'):\n os.makedirs('temp_... | [
[
"tensorflow.keras.backend.reset_uids",
"tensorflow.train.AdamOptimizer",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.train.latest_checkpoint",
"tensorflow.GradientTape",
"tensorflow.data.experimental.prefetch_to_device",
"tensorflow.test.is_gpu_available",
"tensorflow... |
pbourke/graspologic | [
"1f8eeec5cc97e2715fb092dde7260d2cb2dbbbdb"
] | [
"tests/layouts/test_auto.py"
] | [
"# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport unittest\n\nimport networkx as nx\nimport numpy\n\nfrom graspologic.layouts.auto import _get_bounds, layout_umap\n\n\nclass TestAuto(unittest.TestCase):\n def test_get_bounds(self):\n y = numpy.array([(1,... | [
[
"numpy.array",
"numpy.random.randint"
]
] |
alexandru-dinu/3D-face-reconstruction | [
"bec912c581ad0698d13d76efbe70ac12116d2fe0"
] | [
"src/data_transform.py"
] | [
"from __future__ import division\n\nimport warnings\n\nimport cv2\nimport numpy as np\n\nimport data_loader\nfrom utils import get_args\n\nwarnings.filterwarnings(\"ignore\")\n\n\ndef rotate(img, alpha):\n \"\"\"\n img.shape must be H,W,C\n alpha is in degrees\n \"\"\"\n h, w = img.shape[:-1]\n M ... | [
[
"numpy.float32",
"numpy.zeros"
]
] |
tim-tran/pandas | [
"343ac2a4179fdd1cb24633e9b95cbec33371c14d"
] | [
"pandas/core/groupby/groupby.py"
] | [
"\"\"\"\nProvide the groupby split-apply-combine paradigm. Define the GroupBy\nclass providing the base-class of operations.\n\nThe SeriesGroupBy and DataFrameGroupBy sub-class\n(defined in pandas.core.groupby.generic)\nexpose these user-facing objects to provide specific functionality.\n\"\"\"\nfrom __future__ imp... | [
[
"pandas.core.groupby.grouper.get_grouper",
"pandas.core.groupby.numba_.generate_numba_agg_func",
"pandas.core.indexes.api.MultiIndex.from_product",
"pandas.core.sample.sample",
"pandas.core.common.temp_setattr",
"pandas.core.common.not_none",
"pandas.core.groupby.numba_.generate_numba_... |
yashkaps/4-in-a-row-game | [
"10c5843f0f17602031dbe27484d22c92ba21f827"
] | [
"main.py"
] | [
"\nimport numpy as np\nimport pygame\nimport sys\n\nROW_COUNT = 6\nCOL_COUNT = 7\n\nRED = (255,0,0)\nYELLOW = (255,255,0)\nBLUE = (0,0,255)\nBLACK = (0,0,0)\ncolors = [BLACK, RED, YELLOW]\n\n\ndef create_board():\n return np.zeros((6, 7))\n\n\ndef drop_piece(board, row, col, piece):\n board[row][col] = piece\... | [
[
"numpy.any",
"numpy.zeros",
"numpy.diagonal"
]
] |
higucheese/chainer | [
"c9efac4ca512ab7d022bde80587ea6b53f4d93cf"
] | [
"chainer/links/normalization/batch_normalization.py"
] | [
"import numpy\n\nfrom chainer.backends import cuda\nfrom chainer import configuration\nfrom chainer import functions\nfrom chainer import initializers\nfrom chainer import link\nfrom chainer.utils import argument\nfrom chainer import variable\n\n\nclass BatchNormalization(link.Link):\n\n \"\"\"Batch normalizatio... | [
[
"numpy.zeros"
]
] |
helgridly/yfinance | [
"61a30df74ff6c7aa9629bda7e6487d07f00090cb"
] | [
"yfinance/utils.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Yahoo! Finance market data downloader (+fix for Pandas Datareader)\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in comp... | [
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
mbrown-amc/Clustering-NFL-Teams-From-2002-to-2020 | [
"951c88cdb3662c2063fafbc56f79f59db8ee3ab1"
] | [
"Notebooks/utils.py"
] | [
"import os\nimport pandas as pd\n\ndef get_data():\n \"\"\"\n Loads the data for the project.\n \n \"\"\"\n \n import os\n import pandas as pd\n \n pardir = os.path.abspath(os.path.join(os.getcwd(), os.pardir))\n datadir = pardir + \"\\\\Data\"\n datadir\n \n offense = []\n ... | [
[
"sklearn.preprocessing.StandardScaler",
"pandas.DataFrame",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.legend",
"pandas.read_excel",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"pandas.concat",
"numpy.c... |
huanglianghua/cortex | [
"14d21a756fa117b19f10cb7b4b6405c5b78e63b2"
] | [
"tests/ops/test_distributed.py"
] | [
"import unittest\nimport os\nimport torch\nimport torch.distributed as dist\n\nimport cortex.ops as ops\n\n\ndef _single_process():\n data = [ops.get_rank()] * (ops.get_rank() + 1)\n gathered_data = ops.gather(data, dst=0)\n dict_data = {'avg_rank': torch.Tensor([ops.get_rank()]).cuda()}\n reduced_data ... | [
[
"torch.cuda.device_count",
"torch.distributed.destroy_process_group"
]
] |
Sait0Yuuki/ArknightsAutoHelper | [
"5ecec0d120482c930181346cfdb8542090e169c1"
] | [
"imgreco/before_operation.py"
] | [
"import sys\nfrom functools import lru_cache\n\nimport numpy as np\nfrom PIL import Image\n\nfrom util.richlog import get_logger\nfrom . import imgops\nfrom . import minireco\nfrom . import resources\nfrom . import util\n\nlogger = get_logger(__name__)\n\n@lru_cache(1)\ndef load_data():\n reco = minireco.MiniRec... | [
[
"numpy.asarray"
]
] |
misft/Anlosia-Backend | [
"0153030e5ea5f8e43b1e5bfdacf73e87b8ce5f5d"
] | [
"public/pelatihan.py"
] | [
"import numpy as np\nimport os\nimport cv2\n\npengenalwajah = cv2.face.LBPHFaceRecognizer_create()\ndetektor = cv2.CascadeClassifier(\"haarcascade/haarcascade_frontalface_default.xml\")\n\ndef perolehCitradanLabel(lintasan):\n daftarFolderCitra = [os.path.join(lintasan, f)\\\n for f in os.listdir(lintasan... | [
[
"numpy.array"
]
] |
roddtalebi/ezCGP | [
"a93df7ae91fd5905df368661b86ae653c3d08869"
] | [
"misc/population_growth_analysis.py"
] | [
"'''\nroot/misc/population_growth_analysis.py\nResponse to Issue #242\nMating and Mutating params in ezCGP has been BARLEY looked into,\nand I don't want to accidentally blow up my population size each generation.\nThis script should run several evolutions and build a histogram so we know\nabout how big of a popula... | [
[
"numpy.array",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.show"
]
] |
joshanderson99/jax | [
"b2d6ce175a0193ba0a7cb6a851f4f9910a1e1dc0"
] | [
"jax/api.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.result_type",
"numpy.size",
"numpy.shape"
]
] |
yeungyh/pickle | [
"90e467aef3b8cdfd1dac009b88a4d38f35622c6f"
] | [
"ckli/ckliest_h1reg.py"
] | [
"from time import perf_counter\nimport numpy as np\nimport scipy.linalg as spl\n#from joblib import Parallel, delayed\n\ndef gpr(ymean, Cy, yobs, iobs):\n Cytest = Cy[iobs]\n L = spl.cholesky(Cy[np.ix_(iobs, iobs)] + np.sqrt(np.finfo(float).eps) * np.eye(iobs.size), lower=True)\n a = spl.solve_triangular(L... | [
[
"numpy.cov",
"numpy.zeros",
"scipy.linalg.eigh",
"numpy.mean",
"numpy.eye",
"numpy.ix_",
"numpy.finfo",
"numpy.sqrt",
"numpy.abs",
"numpy.size",
"scipy.linalg.solve_triangular"
]
] |
neilgautam/PowerForecasting | [
"691bab9c32d63d14a0f54f0b0663fb1fa09bc301"
] | [
"Models/ARIMA.py"
] | [
"import joblib\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport argparse\nfrom statsmodels.tsa.arima_model import ARIMA\nfrom sklearn.metrics import mean_squared_error,mean_absolute_error\n\ndef parser(x):\n return datetime.strptime('190'+x, '%Y-%m')\n\ndef run_ARIMA(eq_num, src_dir, tar_path, num_pr... | [
[
"numpy.array",
"matplotlib.pyplot.plot",
"numpy.sqrt"
]
] |
MLK97/numpy | [
"15d6ed2b07ed42ecafb4c13dfabb2d20e61481d5"
] | [
"numpy/distutils/log.py"
] | [
"# Colored log, requires Python 2.3 or up.\nimport sys\nfrom distutils.log import *\nfrom distutils.log import Log as old_Log\nfrom distutils.log import _global_log\n\nfrom numpy.distutils.misc_util import (red_text, default_text, cyan_text,\n green_text, is_sequence, is_string)\n\n\ndef _fix_args(args,flag=... | [
[
"numpy.distutils.misc_util.is_string",
"numpy.distutils.misc_util.green_text",
"numpy.distutils.misc_util.is_sequence"
]
] |
face3d0725/weak_UV | [
"8ce5259644fd153113ca2f0ae306e5b7bae1b6b5"
] | [
"utils/simple_renderer.py"
] | [
"from pytorch3d.structures import Meshes\nfrom pytorch3d.renderer import rasterize_meshes, PointsRenderer\nfrom pytorch3d.ops import interpolate_face_attributes\nimport torch\nimport torch.nn.functional as F\nimport torch.nn as nn\nimport cv2\nimport numpy as np\nimport math as m\nfrom abc import ABC\nfrom .light_p... | [
[
"torch.reshape",
"torch.device",
"torch.nn.functional.normalize",
"torch.round",
"torch.stack",
"torch.arange",
"torch.no_grad",
"torch.bmm",
"torch.clamp",
"torch.pow",
"torch.ones",
"torch.tensor",
"torch.cross",
"torch.zeros_like",
"torch.nn.functiona... |
majacQ/ludwig | [
"237d832b85d224ef6d1ea53eface5479449caba3"
] | [
"ludwig/models/trainer.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | [
[
"tensorflow.debugging.experimental.enable_dump_debug_info",
"tensorflow.train.latest_checkpoint",
"tensorflow.train.CheckpointManager",
"tensorflow.summary.scalar",
"tensorflow.config.experimental_run_functions_eagerly",
"tensorflow.train.Checkpoint"
]
] |
KonScanner/transitionMatrix | [
"55d7e84de1510a3dbc54b1dc8de727194b8d36e2"
] | [
"tests/test_cohort_estimator.py"
] | [
"# encoding: utf-8\n\n# (c) 2017-2021 Open Risk, all rights reserved\n#\n# TransitionMatrix is licensed under the Apache 2.0 license a copy of which is included\n# in the source distribution of TransitionMatrix. This is notwithstanding any licenses of\n# third-party software included in this distribution. You may n... | [
[
"pandas.read_csv"
]
] |
Manojbhat09/Sane-annotation-shape-complete | [
"03b298b2c0a187be979ff31ad2a39238b72a6d78"
] | [
"app/rl_gan/models_rl/AE_RSnet.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nfrom torch.nn.init import kaiming_normal\r\nimport math\r\n#import torch.autograd.Variable\r\n\r\n#from models.slice_pool_layer.slice_pool_layer import *\r\n#from models.slice_unpool_layer.slice_unpool_layer import *\r\n\r\n\r\n\r\n__all__= ['ae_rsnet']\r\n\r\n\r\n\r\n\r\n\... | [
[
"torch.nn.Dropout",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.squeeze"
]
] |
ttaoREtw/semi-tts | [
"46750fc68d1547e82bda9341f5029595ded984c8"
] | [
"src/data.py"
] | [
"import torch\nimport random\nimport numpy as np\nfrom functools import partial\nfrom src.text import load_text_encoder\nfrom src.audio import load_audio_transform\nfrom torch.utils.data import DataLoader\nfrom torch.nn.utils.rnn import pad_sequence\n\n\nSPEC_PAD_VALUE = 0 # Spectrogram was in log-scale\n\ndef load... | [
[
"numpy.random.seed",
"torch.nn.utils.rnn.pad_sequence",
"torch.LongTensor"
]
] |
George0112/tornado | [
"d5e0c866baceab1bd5fabfb53cc20902b840bdf8"
] | [
"regression/expo.py"
] | [
"import matplotlib.pyplot as plt\nfrom scipy.optimize import curve_fit\nimport numpy as np\nimport operator\nfrom collections import OrderedDict\n\nfrom dictionary.tornado_dictionary import TornadoDic\nfrom regression.regression import SuperRegression\nfrom sklearn import svm\nfrom sklearn.metrics import r2_score\n... | [
[
"numpy.array",
"numpy.dot",
"scipy.optimize.curve_fit",
"numpy.sum",
"numpy.exp",
"numpy.mean",
"sklearn.svm.SVR"
]
] |
re-xyr/taichi | [
"e181abbc5e0efdf83d3651c64002a02d70373ad8"
] | [
"python/taichi/lang/kernel_impl.py"
] | [
"import ast\nimport functools\nimport inspect\nimport re\nimport sys\nimport textwrap\n\nimport numpy as np\nimport taichi.lang\nfrom taichi._lib import core as _ti_core\nfrom taichi.lang import impl, runtime_ops, util\nfrom taichi.lang.ast import (ASTTransformerContext, KernelSimplicityASTChecker,\n ... | [
[
"numpy.ascontiguousarray"
]
] |
mihaelasmilova/duck | [
"ff0a4fdd6ab2f789ab56f8753f3e3cb03d8cccf0"
] | [
"duck/utils/vmd_template.py"
] | [
"import numpy as np\nimport MDAnalysis as mda\n\ndef get_chunk_residue(original_pdb, chunk_pdb, target_residue_name, target_residue_number):\n pdb_univ = mda.Universe(original_pdb, format='PDB')\n chunk_univ = mda.Universe(chunk_pdb, format='PDB')\n\n # Get the calpha atom of the pdb target residue:\n t... | [
[
"numpy.argmin"
]
] |
ethanabrooks/stable-baselines3 | [
"8f033b03f49eb3354158f8753441acb8ce99bc4b"
] | [
"stable_baselines3/common/vec_env/subproc_vec_env.py"
] | [
"import multiprocessing as mp\nfrom collections import OrderedDict\nfrom typing import Any, Callable, List, Optional, Sequence, Tuple, Type, Union\n\nimport gym\nimport numpy as np\n\nfrom stable_baselines3.common.vec_env.base_vec_env import (\n CloudpickleWrapper,\n VecEnv,\n VecEnvIndices,\n VecEnvObs... | [
[
"numpy.stack"
]
] |
fox91/pysteps | [
"dce3b8e7acffeffedcdddb7dd3cfaa497f758446"
] | [
"pysteps/nowcasts/sseps.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\npysteps.nowcasts.sseps\n======================\n\nImplementation of the Short-space ensemble prediction system (SSEPS) method.\nEssentially, SSEPS is a localized version of STEPS.\n\nFor localization we intend the use of a subset of the observations\nin order to estima... | [
[
"numpy.min",
"numpy.mean",
"numpy.cos",
"numpy.outer",
"numpy.max",
"numpy.empty",
"numpy.arange",
"numpy.isfinite",
"numpy.int",
"numpy.array",
"numpy.zeros",
"numpy.std",
"numpy.stack",
"numpy.isscalar",
"numpy.ceil",
"numpy.isnan",
"numpy.rand... |
lijian10086/quantized_distillation | [
"bb500b7ae48a3f6751d6434126de9845b58d2d65"
] | [
"openNMT_integ_dataset.py"
] | [
"import os\nimport torch\nimport datasets\nimport translation_models.model as tmm\nimport translation_models.help_fun as transl_hf\nimport onmt\nimport model_manager\nimport quantization\nimport copy\nimport pickle\nimport functools\nimport quantization.help_functions as qhf\nimport helpers.functions as mhf\n\ncuda... | [
[
"torch.cuda.is_available"
]
] |
wsjlovecode/mindspore | [
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff"
] | [
"mindspore/python/mindspore/parallel/nn/layers.py"
] | [
"# Copyright 2021 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.repeat",
"numpy.ones",
"numpy.transpose",
"numpy.tril"
]
] |
tochikuji/Hierarchical-PPCA | [
"b10bb432b479adc993806434300155628679e5e4"
] | [
"examples/hppca.py"
] | [
"\"\"\"\nAn example of Hierarchical Probabilistic Principal Component Analysis (HPPCA),\nproposed in [1].\n\n[1] Aiga Suzuki, Hayaru Shouno, \"Generative Model of Textures Using Hierarchical Probabilistic Principal Component Analysis\",\n Proc. of the 2017 Intl. Conference on Parallel and Distributed Processing ... | [
[
"numpy.hstack",
"numpy.diag",
"numpy.zeros"
]
] |
Wendy0601/PPGN-Physics-Preserved-Graph-Networks | [
"e778d96a99c848ba95f32ff28dc374534a3b12c3"
] | [
"PPGN/util_final.py"
] | [
"import sys\nimport os\nimport torch\nimport random\nimport math\nimport time \n\nfrom sklearn.utils import shuffle\nfrom sklearn.metrics import f1_score\n\nimport torch.nn as nn\nimport numpy as np\n\nimport torch.nn.functional as F\n\ndef evaluate( nodes_layers_dic, dataCenter, ds, GraphSage, Outlayer, device, ma... | [
[
"torch.cat",
"torch.nn.functional.one_hot",
"torch.max",
"sklearn.utils.shuffle",
"torch.sum",
"torch.reshape"
]
] |
HarshithBachimanchi/DeepTrack-2.0 | [
"5983f5224b75aef4ce3932662bd15723f13841a0"
] | [
"deeptrack/__init__.py"
] | [
"# flake8: noqa\nfrom pint import UnitRegistry, Context\nfrom .backend.pint_definition import pint_definitions\n\nunits = UnitRegistry(pint_definitions.split(\"\\n\"))\nunits.enable_contexts(\"dt\")\n\nimport tensorflow as tf\n\nphysical_devices = tf.config.list_physical_devices(\"GPU\")\ntry:\n tf.config.experi... | [
[
"tensorflow.config.list_physical_devices",
"tensorflow.config.experimental.set_memory_growth"
]
] |
HakamShams/Semantic-Mesh-Segmentation | [
"7209a4dc6dd1476a2dd43bd8e0330a4ed10f0cf9"
] | [
"LiDAR.py"
] | [
"'''\n\nUtility mesh function for LiDAR-Mesh association\n\nAuthor: Hakam Shams\nDate: Novemebr 2019\n\nInput: LiDAR_file : LiDAR tile, first three column are XYZ, supported format [h5, txt]\n obj_file : obj file\n face_file : COG file of the labeled face, first three column are XYZ\n ... | [
[
"numpy.array",
"scipy.spatial.cKDTree",
"numpy.nan_to_num",
"numpy.savetxt",
"numpy.zeros",
"numpy.dot",
"numpy.median",
"numpy.set_printoptions",
"numpy.tile",
"sklearn.neighbors.BallTree",
"numpy.take",
"numpy.logical_and",
"numpy.where",
"numpy.loadtxt",
... |
amarildolikmeta/alphazero_singleplayer | [
"06f62c82f428dbe82afab16c1955b82aeedd8737",
"06f62c82f428dbe82afab16c1955b82aeedd8737",
"06f62c82f428dbe82afab16c1955b82aeedd8737"
] | [
"envs/race_strategy.py",
"run_multiple_alpha_experiment.py",
"particle_filtering/pf_mcts_edo.py"
] | [
"import gym\nfrom copy import copy\nimport numpy as np\nfrom gym import spaces\nfrom gym.utils import seeding\nfrom gym import register\n\n\ndef generate_race(**game_params):\n if game_params is None:\n game_params = {}\n return Race(**game_params)\n\n\nclass Race(gym.Env):\n\n def __init__(self, ga... | [
[
"numpy.array",
"numpy.random.uniform",
"numpy.clip"
],
[
"pandas.DataFrame",
"matplotlib.pyplot.style.use"
],
[
"numpy.isinf",
"numpy.array",
"numpy.random.choice",
"numpy.log",
"numpy.sum",
"numpy.arange",
"numpy.sqrt"
]
] |
youansheng/PyTorch-Encoding | [
"dc501d28d478dbf668186f721c8600387c32859c",
"dc501d28d478dbf668186f721c8600387c32859c"
] | [
"encoding/models/base.py",
"encoding/lib/cpu/setup.py"
] | [
"###########################################################################\n# Created by: Hang Zhang \n# Email: zhang.hang@rutgers.edu \n# Copyright (c) 2017\n###########################################################################\n\nimport math\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimpo... | [
[
"numpy.array",
"torch.nn.functional.upsample",
"torch.cuda.device_of",
"torch.nn.parallel.scatter_gather.scatter",
"torch.nn.functional.pad"
],
[
"torch.utils.cpp_extension.CppExtension"
]
] |
psj1997/SemiBin | [
"dd255cb336a7ff1d586ec57764ba96811a0042be"
] | [
"test/test_utils.py"
] | [
"from SemiBin.utils import get_must_link_threshold\nfrom hypothesis import given, strategies as st\n\ndef slow_get_must_link_threshold(contig_len):\n \"\"\"\n calculate the threshold length for must link breaking up\n \"\"\"\n import numpy as np\n basepair_sum = 0\n threshold = 0\n whole_len = ... | [
[
"numpy.sum",
"numpy.clip"
]
] |
daniel-trejobanos/tf-ds-321 | [
"1465d97b2e8b2a030f5df7872e8390b90dba8926"
] | [
"tensorflow_datasets/image_classification/imagenette.py"
] | [
"# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets 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 ... | [
[
"tensorflow.compat.v2.io.gfile.listdir"
]
] |
salma-shaik/research-projects-new | [
"3bc0efb58e18d13bb614ec48f139dfbac46e5904"
] | [
"US_Crime_Analytics/utilities/merge_test.py"
] | [
"import pandas as pd\n\ncrime_90_15 = pd.read_csv(\n '/Users/salma/Studies/Research/Criminal_Justice/research_projects/main_census_merge/data/crime_data/Crime_1990_2015_Req_Vars_Unique_Crosswalk_Merged_Arngd.csv')\n\ncrime_90_15_req_vars = crime_90_15[['ORI', 'AGENCY', 'Govt_level', 'place_fips', 'STATEFP']]\ncr... | [
[
"pandas.read_csv",
"pandas.read_excel"
]
] |
hzyhhzy/NNforGo | [
"4212a3dd076f561476e636f97db3577d0cd0d123"
] | [
"resnet/train_sgd.py"
] | [
"\nfrom dataset import trainset\nfrom model import ModelDic\n\n\nimport argparse\nimport glob\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom torch.utils.data import Dataset, DataLoader\nimport torch.functional as F\nimport torch.optim as optim\nimport torch.nn as nn\nimport torch\nimport os\... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.log_softmax",
"torch.sum"
]
] |
lianglizxc/RLhomework | [
"ff3de39af68f2ab5e0521ee491fe0ab95f756196"
] | [
"hw5/exp/train_ac_exploration_f18.py"
] | [
"\"\"\"\nOriginal code from John Schulman for CS294 Deep Reinforcement Learning Spring 2017\nAdapted for CS294-112 Fall 2017 by Abhishek Gupta and Joshua Achiam\nAdapted for CS294-112 Fall 2018 by Soroush Nasiriany, Sid Reddy, and Greg Kahn\nAdapted for CS294-112 Fall 2018 with <3 by Michael Chang, some experiments... | [
[
"tensorflow.exp",
"tensorflow.multinomial",
"numpy.min",
"numpy.mean",
"tensorflow.losses.mean_squared_error",
"tensorflow.global_variables_initializer",
"tensorflow.set_random_seed",
"numpy.concatenate",
"numpy.max",
"tensorflow.shape",
"tensorflow.ConfigProto",
"t... |
feedstock/h5py | [
"596748d52c351258c851bb56c8df1c25d3673110"
] | [
"h5py/_hl/dataset.py"
] | [
"# This file is part of h5py, a Python interface to the HDF5 library.\n#\n# http://www.h5py.org\n#\n# Copyright 2008-2013 Andrew Collette and contributors\n#\n# License: Standard 3-clause BSD; see \"license.txt\" for full license terms\n# and contributor agreement.\n\n\"\"\"\n Implements support for h... | [
[
"numpy.product",
"numpy.array",
"numpy.empty",
"numpy.asarray",
"numpy.ndarray",
"numpy.prod",
"numpy.dtype"
]
] |
ccan1995/asteroid | [
"782e95be17b6c16ed2b292d11b9063bf274ca346"
] | [
"egs/kinect-wsj/ConvTasNet/train.py"
] | [
"import os\nimport argparse\nimport json\n\nimport torch\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\nimport pytorch_lightning as pl\nfrom pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping\n\nfrom asteroid.models import ConvTasNet\nfrom asteroid.engine.optimizers import make_optimizer\nf... | [
[
"torch.cuda.is_available",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.load"
]
] |
sappachok/django-anaconda | [
"1ffd33ded759f622b6db23a3550a898b62350403"
] | [
"app/test/util_interactive.py"
] | [
"import matplotlib\nimport io\nimport urllib, base64\n\ndef printfigs(name=\"fig\", size=None, ending=\".png\"):\n images = []\n \n if len(matplotlib.pyplot.get_fignums()) == 1:\n num = matplotlib.pyplot.get_fignums()[0]\n fig = matplotlib.pyplot.figure(num)\n buf = io.BytesIO()\n ... | [
[
"matplotlib.pyplot.get_fignums",
"matplotlib.pyplot.figure"
]
] |
niektuytel/Machine_Learning | [
"0cd5656ca8076c383fd81c5e32a49969a20ad042"
] | [
"deep_learning/artificial_neural_networks/deep_feed_forward/sample_pytorch.py"
] | [
"import torch\nimport torch.nn as nn\nimport torchvision.transforms as transforms\nimport torchvision.datasets as dsets\n\n# datasets\ntrain_dataset = dsets.MNIST(root='../../../_data', train=True, transform=transforms.ToTensor(), download=True)\ntest_dataset = dsets.MNIST(root='../../../_data', train=False, transf... | [
[
"torch.nn.Linear",
"torch.max",
"torch.nn.Tanh",
"torch.utils.data.DataLoader",
"torch.nn.CrossEntropyLoss"
]
] |
mdorier/Supervisor | [
"14a73ad19b10cebab0d7d2d48e52692485957ad2"
] | [
"workflows/pbt/python/test/pbt_tests.py"
] | [
"from __future__ import print_function\nimport unittest\nimport tc1_pbt\nimport pbt_utils\nimport numpy as np\nimport keras\n\nfrom keras.optimizers import Adam\nfrom keras import backend as K\n\nclass TestPBT(unittest.TestCase):\n\n def testTruncate(self):\n data = []\n for i in range(0, 11):\n ... | [
[
"numpy.random.randint",
"numpy.random.rand"
]
] |
roxyboy/xgcm | [
"6ec73e1ddfe08c8c2828ff6ffd39464300f7ed89"
] | [
"xgcm/test/test_autogenerate.py"
] | [
"from __future__ import print_function\nfrom future.utils import iteritems\nimport pytest\nimport xarray as xr\nimport numpy as np\nfrom xarray.testing import assert_allclose, assert_equal\n\n\nfrom xgcm.autogenerate import generate_axis, generate_grid_ds, \\\n _parse_boundary_params, _parse_position, \\\n _p... | [
[
"numpy.meshgrid",
"numpy.array",
"numpy.arange"
]
] |
niujinshuchong/stochastic_processes | [
"ea2538d2f09c39bec1834df5addd37e0699a88bf"
] | [
"hw1/zipf_distribution.py"
] | [
"import numpy as np\nimport random\nimport matplotlib.pyplot as plt\n\nM = 6\na = 0.5\n\ndef get_p(k):\n return 1. / (k ** a)\n\nps = np.zeros(1+M)\nfor i in range(1, M+1):\n ps[i] = get_p(i)\n\nn = 1000000\nsim_list = np.zeros(n, dtype=np.int32)\nsim_list[0] = 2\n\nfor i in range(1, n):\n if sim_list[i-1]... | [
[
"numpy.max",
"numpy.histogram",
"numpy.array",
"numpy.random.choice",
"numpy.zeros",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
"numpy.abs",
... |
caio-davi/PSO-PINN | [
"f26e8125ee8dcce434cfd917c42baad27bb110f4"
] | [
"src/swarm/optimizers/fss.py"
] | [
"import tensorflow as tf\nfrom swarm import utils\n\nimport sys\n\n\nclass fss:\n def __init__(\n self,\n loss_op,\n layer_sizes,\n iter=2000,\n pop_size=30,\n w_scale=100,\n stepInd=0.01,\n stepVol=0.01,\n x_min=-1,\n x_max=1,\n xavier... | [
[
"tensorflow.multiply",
"tensorflow.zeros",
"tensorflow.reduce_min",
"tensorflow.where",
"tensorflow.Variable",
"tensorflow.random.uniform",
"tensorflow.vectorized_map",
"tensorflow.reshape",
"tensorflow.reduce_max",
"tensorflow.clip_by_value",
"tensorflow.reduce_sum",
... |
mikofski/thw-berkeley | [
"e853c9096096fc883cf4b0f8a0bcb44e0515db43"
] | [
"code_examples/cython_spring16/setup_c.py"
] | [
"#!/usr/bin/env python\nfrom distutils.core import setup, Extension\nimport numpy\n\nsetup(ext_modules=[Extension('geometry_c', ['geometry_c.c'])],\n include_dirs=[numpy.get_include()])\n\n# hack to copy build extension into this directory so we can use it without\n# setting paths.\nimport glob\nimport shutil\... | [
[
"numpy.get_include"
]
] |
JonathanLehner/nnabla-examples | [
"2971b987484945e12fb171594181908789485a0f"
] | [
"NAS/ENAS/micro_search.py"
] | [
"# Copyright (c) 2017 Sony Corporation. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir... | [
[
"numpy.max",
"numpy.random.normal",
"numpy.array",
"numpy.reshape",
"numpy.sum",
"numpy.argmax",
"numpy.random.multinomial"
]
] |
AlissonRaphael/algorithm_and_data_structures | [
"d970299c40ce779e6826d36ca28ebfb1ec6f8a88"
] | [
"17_insertion_sort.py"
] | [
"import numpy as np\n\ndef insertion_sort(vetor):\n n = len(vetor)\n\n for i in range(1,n):\n selecionado = vetor[i]\n\n j = i - 1\n while j >= 0 and selecionado < vetor[j]:\n vetor[j+1] = vetor[j]\n j -= 1\n \n vetor[j+1] = selecionado\n\n return vetor\n\n\nordenado = insertion_sort(np.... | [
[
"numpy.array"
]
] |
JullyZ/PytorchSSD | [
"2a6f79e405837e189fb8804dbc3b22a73ee35de5"
] | [
"demo/live.py"
] | [
"from __future__ import print_function\nimport os\nimport argparse\nimport torch\nimport torch.backends.cudnn as cudnn\nimport numpy as np\nfrom torch.autograd import Variable\nfrom data import BaseTransform, VOC_300,VOC_512,COCO_300,COCO_512, COCO_mobile_300\nfrom data import VOC_CLASSES as labelmap\n\nfrom layers... | [
[
"numpy.zeros",
"numpy.minimum",
"numpy.where",
"numpy.sort",
"torch.load",
"numpy.hstack",
"torch.Tensor",
"numpy.maximum"
]
] |
avilaton/quantipy | [
"6ce4e5bfb22c6520164d8884fe6f83240e9baa21"
] | [
"quantipy/core/tools/dp/spss/writer.py"
] | [
"\nimport numpy as np\nimport pandas as pd\nimport quantipy as qp\nfrom quantipy.core.helpers.functions import emulate_meta\nimport savReaderWriter as srw\nimport copy\nimport json\n\ndef write_sav(path_sav, data, **kwargs):\n \"\"\"\n Write the given records to a SAV file at path_sav.\n\n Using the variou... | [
[
"pandas.DataFrame",
"pandas.Series"
]
] |
robdmc/easier | [
"27210dfc48a40416d1a0ab098b6a62fe9b17013a"
] | [
"easier/fit.py"
] | [
"from textwrap import dedent\n\n\nclass examples():\n \"\"\"\n A descriptor whose only purpose is to print help text\n \"\"\"\n def __get__(self, *args, **kwargs):\n print(\n dedent(\"\"\"\n from easier import Fit\n\n #=============================================... | [
[
"numpy.max",
"numpy.array",
"numpy.sum",
"pandas.DataFrame",
"numpy.min"
]
] |
eyp/federated-learning-simulation | [
"d6023cb511d8af5b485b36a3d06a93102f2e5f7b"
] | [
"src/simulation.py"
] | [
"import tensorflow as tf\nimport tensorflow_federated as tff\nimport nest_asyncio\nfrom federated_simulator import FederatedSimulator\nfrom federated_external_model import batch_format, create_keras_model\n\nnest_asyncio.apply()\nemnist_train, emnist_test = tff.simulation.datasets.emnist.load_data()\n\nfederated_si... | [
[
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.optimizers.SGD",
"tensorflow.GradientTape",
"tensorflow.keras.metrics.SparseCategoricalAccuracy"
]
] |
trondkr/okokyst_toolbox | [
"3d5484458e4f346d593beb5b268378c70d391abd",
"3d5484458e4f346d593beb5b268378c70d391abd"
] | [
"ferrybox_processing.py",
"okokyst_station_mapping.py"
] | [
"import os\nimport sys\nfrom datetime import datetime\nfrom netCDF4 import date2num\nfrom pyniva import Vessel, TimeSeries, token2header\nimport pandas as pd\nfrom ferrybox import ferryBoxStationClass as fb\nimport csv\n\n__author__ = 'Trond Kristiansen'\n__email__ = 'trond.kristiansen@niva.no'\n__created__ = datet... | [
[
"pandas.to_datetime",
"pandas.read_excel",
"pandas.read_csv"
],
[
"pandas.to_datetime",
"numpy.array",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"numpy.min",
"matplotlib.pyplot.figure",
"numpy.where",
"matplotlib.pyplot.st... |
trongthuan205/CDeRSNet | [
"6141837a7aefac0b7abeb2790d9f68e4a3d263a4"
] | [
"mmdet/models/dense_heads/rpn_head.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import normal_init, bias_init_with_prob\nfrom mmcv.ops import batched_nms\n\n\nfrom ..builder import HEADS\nfrom .anchor_head import AnchorHead\nfrom .rpn_test_mixin import RPNTestMixin\nimport pdb\n\n@HEADS.register_module()\nclas... | [
[
"torch.nn.functional.relu",
"torch.nn.Conv2d",
"torch.cat",
"torch.nonzero"
]
] |
kevinsung/ReCirq | [
"e3031c3b9327d884f7a5b18b265d54db16ed9296"
] | [
"recirq/toric_code/toric_code_state_prep_test.py"
] | [
"# Copyright 2022 Google\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 i... | [
[
"numpy.allclose",
"numpy.nonzero"
]
] |
ABRG-Models/MammalBot | [
"0b153232b94197c7a65156c1c3451ab2b9f725ae"
] | [
"models/python/hypothalamus/dynamical/enviroment.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n# --------------------------------------------------------------------\n# Enviroment: Manages enviroment drawing and signals\n# --------------------------------------------------------------------\nclass Environment:\n\tdef __init__( self, xmin, xmax ):\n\t\tsel... | [
[
"numpy.array",
"numpy.exp"
]
] |
SaOgaz/ccdproc | [
"0eac0e2ba4cc54e5bb7f129f5ef19a7fbb5b95c7"
] | [
"ccdproc/core.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# This module implements the base CCDPROC functions\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport numbers\n\nimport numpy as np\nimport math\nfrom astropy.extern import six\nf... | [
[
"numpy.isnan",
"numpy.asarray",
"numpy.reshape",
"numpy.ma.sum",
"numpy.median",
"scipy.ndimage.percentile_filter",
"numpy.mean",
"scipy.ndimage.median_filter",
"numpy.ma.MaskedArray",
"numpy.isfinite",
"scipy.ndimage.generic_filter",
"numpy.ma.masked_array",
"n... |
kazeki/incubator-superset | [
"bf8d442cf1bf3effd011a3b28cf4c0994b8a6b27"
] | [
"superset/db_engine_specs.py"
] | [
"# pylint: disable=C,R,W\n\"\"\"Compatibility layer for different database engines\n\nThis modules stores logic specific to different database engines. Things\nlike time-related functions that are similar but not identical, or\ninformation as to expose certain features or not and how to expose them.\n\nFor instance... | [
[
"pandas.DataFrame",
"pandas.read_csv",
"pandas.concat"
]
] |
AlexanderDavid/Powerlaw-Highway-Env | [
"e3e3b6277e0a75e4dcbc7988a9cb144137328d22"
] | [
"highway_env/road/graphics.py"
] | [
"from typing import List, Tuple, Union, TYPE_CHECKING\n\nimport numpy as np\nimport pygame\n\nfrom highway_env.road.lane import LineType, AbstractLane\nfrom highway_env.road.road import Road\nfrom highway_env.vehicle.graphics import VehicleGraphics\nfrom highway_env.road.objects import Obstacle, Landmark\n\nif TYPE... | [
[
"numpy.array",
"numpy.rad2deg",
"numpy.arange",
"numpy.clip"
]
] |
KinematicLensing/kl-tools | [
"4e69b90dd9a45ce79e48ce48d630ff7ef4264a56"
] | [
"kl_tools/numba_transformation.py"
] | [
"import numpy as np\nfrom numba import njit\nfrom numba import types\nfrom numba.typed import Dict\n\nimport pudb\n\n'''\nThis file contains transformation functions. These\nare all static functions so that numba can be used\nefficiently.\n\nDefinition of each plane:\n\n disk: Face-on view of the galactic disk, ... | [
[
"numpy.array",
"numpy.sin",
"numpy.empty",
"numpy.dot",
"numpy.zeros",
"numpy.arcsin",
"numpy.random.randn",
"numpy.shape",
"numpy.arctan",
"numpy.arctan2",
"numpy.sqrt",
"numpy.cos",
"numpy.linalg.inv"
]
] |
Seb-Good/physionet-challenge-2020 | [
"c6f1648a148335babc0a26d8a589120616327548"
] | [
"kardioml/segmentation/teijeiro/knowledge/observables/Segmentation.py"
] | [
"# -*- coding: utf-8 -*-\n# pylint: disable-msg=\n\"\"\"\nCreated on Fri Jun 1 11:55:41 2012\n\nThis module contains the definition of all the domain observables related with\nthe segmentation of the ECG signal in components.\n\n@author: T. Teijeiro\n\"\"\"\n\nfrom kardioml.segmentation.teijeiro.model import Obser... | [
[
"numpy.all",
"numpy.array"
]
] |
barizraihan/belajarpython | [
"57df4c939600dd34a519599d6c78178bfb55063b"
] | [
"kelas_2b/hanif.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Dec 18 23:29:40 2019\n\n@author: Hanif Amrullah\n\"\"\"\n\nimport pandas as pnd\n\nclass HanifAmrullah () :\n whs = pnd.read_csv('kelas_2b/hanif.csv')\n print (whs)"
] | [
[
"pandas.read_csv"
]
] |
ulf1/numpy-linreg | [
"3b1bdf47e80024a98b09718e1a50cd25a6e2477b"
] | [
"numpy_linreg/metrics.py"
] | [
"import numpy as np\nimport numba\n\n\n@numba.jit(nopython=True)\ndef ssr(y, X, beta):\n return np.sum((y - np.dot(X, beta))**2)\n\n\n@numba.jit(nopython=True)\ndef mse(y, X, beta):\n return np.mean((y - np.dot(X, beta))**2)\n\n\n@numba.jit(nopython=True)\ndef rmse(y, X, beta):\n return np.sqrt(np.mean((y ... | [
[
"numpy.dot"
]
] |
psbsgic/rabbitai | [
"769e120ba605d56ac076f810a549c38dac410c8e"
] | [
"tests/fixtures/energy_dashboard.py"
] | [
"import random\nimport textwrap\nfrom typing import Dict, Set\n\nimport pandas as pd\nimport pytest\nfrom pandas import DataFrame\nfrom sqlalchemy import column, Float, String\n\nfrom rabbitai import db\nfrom rabbitai.connectors.sqla.models import SqlaTable, SqlMetric\nfrom rabbitai.models.dashboard import Dashboar... | [
[
"pandas.DataFrame.from_dict"
]
] |
Harold0/hmp | [
"1a4f4093cd296f07348f4db4c7503aca6e1fb05c"
] | [
"ALGORITHM/iagent_trim_debug/trajectory.py"
] | [
"# cython: language_level=3\nfrom config import GlobalConfig\nimport numpy as np\nfrom numpy.core.numeric import indices\nfrom .foundation import AlgorithmConfig\nfrom ..commom.traj import TRAJ_BASE\nimport copy\nfrom UTILS.colorful import *\nfrom UTILS.tensor_ops import __hash__, my_view, np_one_hot, np_repeat_at,... | [
[
"numpy.expand_dims",
"numpy.zeros_like",
"numpy.zeros",
"numpy.clip"
]
] |
PGijsbers/xarray | [
"1597e3a91eaf96626725987d23bbda2a80d2bae7"
] | [
"xarray/coding/cftime_offsets.py"
] | [
"\"\"\"Time offset classes for use with cftime.datetime objects\"\"\"\n# The offset classes and mechanisms for generating time ranges defined in\n# this module were copied/adapted from those defined in pandas. See in\n# particular the objects and methods defined in pandas.tseries.offsets\n# and pandas.core.indexes... | [
[
"numpy.linspace"
]
] |
yuachen/CausalDA | [
"5e376d209b6632b4920482db4bbe2727086ce133"
] | [
"sim/sim_linearSCM_var_shift_exp9_scat_run.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\nimport numpy as np\nimport pandas as pd\nimport sys\nimport argparse\n\nimport torch\n\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\n\n# local packages\nimport sys\nsys.path.append('../')\nimport semiclass\nimport semitorchclass\nimp... | [
[
"torch.cuda.is_available",
"numpy.exp",
"numpy.save"
]
] |
mingwandroid/cudf | [
"6a406ba8ca9918ef0757ac25c0a6acd383edc905",
"6a406ba8ca9918ef0757ac25c0a6acd383edc905"
] | [
"python/cudf/cudf/core/frame.py",
"python/dask_cudf/dask_cudf/backends.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION.\nimport functools\nimport warnings\nfrom collections import OrderedDict\n\nimport cupy\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_dtype_equal\n\nimport cudf\nfrom cudf import _lib as libcudf\nfrom cudf._lib.nvtx import annotate\nfrom cudf.cor... | [
[
"numpy.full",
"numpy.isnan",
"numpy.find_common_type",
"numpy.iterable",
"pandas.DataFrame",
"pandas.api.types.is_numeric_dtype",
"numpy.isscalar",
"pandas.api.types.is_dtype_equal",
"pandas.api.types.is_dict_like",
"pandas.api.types.is_integer_dtype"
],
[
"numpy.ar... |
transentis/bptk_intro | [
"88d0a0cc0338ed6b381dfabafcb9f6a029ac526d"
] | [
"simulation_models/customer_acquisition_xmile.py"
] | [
"\n# _ _ _\n# _____| |__ ___ _ __ _ __(_| |___ _ _\n# (_-/ _` / _/ _ | ' \\| '_ | | / -_| '_|\n# /__\\__,_\\__\\___|_|_|_| .__|_|_\\___|_|\n# |_|\n# Copyright (c) 2013-2020 transentis management & consulting. All rights reserved.\n#\n \nimport numpy as np\nfrom scip... | [
[
"numpy.random.weibull",
"numpy.array",
"scipy.interpolate.interp1d",
"numpy.random.lognormal",
"numpy.random.binomial",
"numpy.random.negative_binomial",
"numpy.random.gamma",
"numpy.random.poisson",
"numpy.random.exponential",
"numpy.random.triangular",
"numpy.random.b... |
nextBillyonair/BigSister | [
"5ee2480ab6cea6d44a0e55bbd9c908a09f3cf018"
] | [
"src/Rectangle.py"
] | [
"import cv2\nimport numpy as np\n\n\"\"\"\nModule with methods designed to manipulate Rectangular tuples (x, y, w, h).\n\"\"\"\n\n\ndef draw_rectangles(frame, rect, thickness = 1):\n\t\"\"\"\n\tDraws rectangles onto frame.\n\t\"\"\"\n\tif rect is None: return frame\n\ttmp = frame.copy()\n\tfor r in rect:\n\t\tif r ... | [
[
"numpy.random.randint"
]
] |
limunan/stanford-tensorflow-tutorials | [
"b16899102bf07964a15494452a2e91c1b9f88e46"
] | [
"2017/assignments/chatbot/chatbot.py"
] | [
"\"\"\" A neural chatbot using sequence to sequence model with\nattentional decoder. \n\nThis is based on Google Translate Tensorflow model \nhttps://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/\n\nSequence to sequence model by Cho et al.(2014)\n\nCreated by Chip Huyen as the starter code for a... | [
[
"numpy.zeros",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.argmax",
"tensorflow.compat.as_str",
"tensorflow.global_variables_initializer"
]
] |
alessiamarcolini/hangar-py | [
"9084381cdc6bd2f01cf8701f5c799d8fadf72828"
] | [
"tests/test_column.py"
] | [
"import pytest\nimport numpy as np\nfrom conftest import fixed_shape_backend_params, variable_shape_backend_params\nfrom itertools import permutations\n\n\ndef assert_equal(arr, arr2):\n assert np.array_equal(arr, arr2)\n assert arr.dtype == arr2.dtype\n\n\nclass TestColumn(object):\n\n @pytest.mark.parame... | [
[
"numpy.zeros_like",
"numpy.array",
"numpy.array_equal",
"numpy.zeros",
"numpy.ones",
"numpy.asfortranarray",
"numpy.random.randn",
"numpy.random.random_sample",
"numpy.allclose",
"numpy.arange",
"numpy.random.random"
]
] |
DeepLearnXMU/ABDNMT-RNMT | [
"c3b20e4afdbfee5741e95a42bbd31329bb9bb93d"
] | [
"thseq/criterions/adaptive_loss.py"
] | [
"# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\n\nimport torch.nn.func... | [
[
"torch.nn.functional.cross_entropy"
]
] |
GeorgeWeb/SYCL-DNN | [
"50fe1357f5302d188d85512c58de1ae7ed8a0912"
] | [
"test/gen/generate_transpose_tests.py"
] | [
"#!python\n#\n# Copyright 2019 Codeplay Software Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use these files 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... | [
[
"numpy.set_printoptions",
"tensorflow.Graph",
"tensorflow.Session",
"tensorflow.transpose",
"tensorflow.constant",
"numpy.prod",
"tensorflow.global_variables_initializer"
]
] |
godomainz/PokeGAN | [
"253c267a89e7545524bcd0db3859fdfa801e303e"
] | [
"aegan.py"
] | [
"import os\nimport json\nimport sys\nimport time\n\nimport torch\nfrom torch import nn\nfrom torch import optim\nimport torchvision as tv\nfrom torchvision.datasets import ImageFolder\nfrom torch.utils.data import DataLoader\nfrom PIL import Image\nimport numpy as np\n\nEPS = 1e-6\nALPHA_RECONSTRUCT_IMAGE = 1\nALPH... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.LeakyReLU",
"torch.nn.BatchNorm2d",
"torch.ones",
"torch.sum",
"torch.nn.Softmax",
"torch.nn.functional.pixel_shuffle",
"torch.nn.BCELoss",
"torch.zeros",
"torch.nn.Tanh",
"torch.nn.Conv2d",
"t... |
mkozturk/rapt | [
"cb293ac98d2d7707baf822b4e0efe18b2355f35c"
] | [
"rapt/fields.py"
] | [
"import numpy as np\nfrom rapt import Re, B0\nfrom scipy.interpolate import RegularGridInterpolator\n\nclass _Field:\n \"\"\"\n The superclass for fields. Not used directly, but subclassed. All field-\n related data and methods are defined in field objects.\n \n Attributes\n ----------\n gradie... | [
[
"numpy.array",
"numpy.dot",
"numpy.sin",
"numpy.zeros",
"numpy.sign",
"scipy.interpolate.RegularGridInterpolator"
]
] |
ondfa/coref-multiling | [
"ac4ccf4ddb3187939525c5e7076057e7fdce55a4"
] | [
"tensorize.py"
] | [
"import util\nimport numpy as np\nimport random\nfrom transformers import BertTokenizer, AutoTokenizer\nimport os\nfrom os.path import join\nimport json\nimport pickle\nimport logging\nimport torch\nimport itertools\n\nlogger = logging.getLogger(__name__)\n\n\nclass CorefDataProcessor:\n def __init__(self, confi... | [
[
"numpy.sum",
"numpy.array",
"torch.tensor"
]
] |
sdrees/panel | [
"4a7cfc74d42379edc14b5897be60ea403a5cab17"
] | [
"panel/util.py"
] | [
"\"\"\"\nVarious general utilities used in the panel codebase.\n\"\"\"\nimport ast\nimport base64\nimport datetime as dt\nimport inspect\nimport json\nimport numbers\nimport os\nimport re\nimport sys\nimport urllib.parse as urlparse\n\nfrom collections.abc import MutableSequence, MutableMapping\nfrom collections im... | [
[
"numpy.array_equal"
]
] |
nerrma/lassonet | [
"2d256b8c1d4022d7321ed39b2a7eb5146c9a2456"
] | [
"lassonet/r.py"
] | [
"from dataclasses import asdict\nimport torch\nfrom .interfaces import (\n lassonet_path as _lassonet_path,\n LassoNetClassifier,\n LassoNetRegressor,\n)\nimport numpy as np\n\n\ndef make_writable(x):\n if isinstance(x, np.ndarray):\n x = x.copy()\n return x\n\n\ndef lassonet_path(X, y, task, ... | [
[
"torch.tensor"
]
] |
calper-ql/NGEN | [
"c0d052c559db5cb02e63c4ba6f07433e093d683f"
] | [
"graph_builder.py"
] | [
"from PyQt5 import QtCore, QtGui\nfrom PyQt5.QtWidgets import QApplication, QPushButton, QWidget, QLabel, QFrame, QMenuBar, QMainWindow, QMenu\nfrom PyQt5.QtCore import Qt, QRect, QSize, QPoint, QRectF\nfrom PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QListWidget, QGridLayout, QSlider, QSpinBox, QRadioButton, ... | [
[
"numpy.interp"
]
] |
r-barnes/pandas | [
"a40cc8c24c1286355bbb1ed70f45628c4f3bd368"
] | [
"pandas/core/arrays/base.py"
] | [
"\"\"\"\nAn interface for extending pandas with custom arrays.\n\n.. warning::\n\n This is an experimental API and subject to breaking changes\n without warning.\n\"\"\"\nimport operator\nfrom typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union\n\nimport numpy as np\n\nfrom pandas._libs import l... | [
[
"pandas.util._decorators.Substitution",
"pandas.core.dtypes.missing.isna",
"pandas.errors.AbstractMethodError",
"numpy.array",
"numpy.asarray",
"pandas.core.sorting.nargsort",
"pandas.core.dtypes.common.is_array_like",
"pandas.compat.numpy.function.validate_argsort_with_ascending",... |
Vulcan-YJX/Vulcan-ROS | [
"ea5e436c3cde7a4b6a6b8c2704b7e7427b470926"
] | [
"face_recognition_srv/script/faceIDfaster.py"
] | [
"#!/usr/bin/env python3\n#-*-coding:UTF-8-*-\nfrom __future__ import print_function\n \nimport sys\nimport rospy\nimport cv2\nimport face_recognition\nimport numpy as np\nfrom std_msgs.msg import Int32\nfrom std_msgs.msg import String\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge, CvBridgeError... | [
[
"numpy.argmin"
]
] |
mkaur7999/TOPSIS-Manpreet-101803562 | [
"0fdb72fb2cb65a824f5a3746c88530b02ed48af8"
] | [
"TOPSIS_Manpreet_101803562/topsis.py"
] | [
"#101803562_Manpreet Kaur_COE26_Assignment6\r\nimport sys, os.path, copy, time, math\r\nimport pandas as pd\r\nfrom os import path\r\nimport numpy as np\r\n\r\n\r\ndef check_source(source):\r\n if not (path.exists(source)): # check file exists or not\r\n print(\"No such file exists\")\r\n exit(0)\... | [
[
"pandas.read_csv",
"pandas.Series"
]
] |
Tom-Achache/QAEs | [
"65daf57c9896eec688aadc133bc9cc6ebb2ddce5"
] | [
"Stack_QAE.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jan 25 11:05:28 2021\n\n@author: tomachache\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom qiskit import *\nfrom qiskit.quantum_info.states.measures import state_fidelity\nfrom qiskit.quantum_info import partial_trace\n... | [
[
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"numpy.load",
"numpy.mean",
"matplotlib.pyplot.rc",
"numpy.std",
"matplotlib.pyplot.ylabel"
]
] |
SLYpma/GalapagosAnalysis | [
"a628cab2290527cbf9e89df886c33f2ba705784e"
] | [
"documentation/20.06_DrifterRelease/drifterrun_fwd_MITgcm4km.py"
] | [
"from datetime import timedelta as delta\nfrom os import path\nfrom glob import glob\nimport numpy as np\nimport dask\nimport math\nimport xarray as xr\nfrom netCDF4 import Dataset\nimport warnings\nimport matplotlib.pyplot as plt\nwarnings.simplefilter('ignore', category=xr.SerializationWarning)\n\nfrom parcels im... | [
[
"numpy.where",
"numpy.array",
"numpy.meshgrid"
]
] |
andrewdchen/torchani | [
"d1a63639f9f9091a5b05f23962e8638c3e421384",
"81ee5a5bb9b016156bcb924a91e7cace9bd677f2"
] | [
"tools/aev-benchmark-size.py",
"examples/smile_energies.py"
] | [
"import time\nimport torch\nimport torchani\nimport pynvml\nimport gc\nimport os\nfrom ase.io import read\nimport argparse\n\nsummary = '\\n'\nruncounter = 0\nN = 200\nlast_py_speed = None\n\n\ndef checkgpu(device=None):\n i = device if device else torch.cuda.current_device()\n t = torch.cuda.get_device_prope... | [
[
"torch.cuda.nvtx.range_pop",
"torch.device",
"torch.cuda.synchronize",
"torch.cuda.profiler.stop",
"torch.cuda.get_device_properties",
"torch.cuda.current_device",
"torch.cuda.profiler.start",
"torch.abs",
"torch.cuda.empty_cache",
"torch.cuda.memory_reserved",
"torch.c... |
mithunpaul08/transformers | [
"55d5e0a1d88f0922dc2af3be140e077850c66fee"
] | [
"src/transformers/modeling_student_teacher.py"
] | [
"import torch\nfrom torch import nn\nfrom transformers.modeling_auto import AutoModel\nfrom torch.nn import CrossEntropyLoss\nimport sys,os\nimport logging\nlogger = logging.getLogger(__name__)\nWEIGHTS_NAME_STUB = \"pytorch_model\"\nimport git\n\nclass OneTeacherOneStudent(nn.Module):\n def __init__(self,config... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss"
]
] |
akolishchak/doom-net-pytorch | [
"96bad5b15c9c5267d494cd5791481801cd6d2107"
] | [
"src/doom_instance_bt.py"
] | [
"#\n# doom_instance_bt.py, doom-net\n#\n# Created by Andrey Kolishchak on 01/21/17.\n#\nimport os\nimport glob\nfrom vizdoom import *\nfrom doom_instance import DoomInstance\nfrom doom_object import DoomObject\nimport numpy as np\nimport math\nimport itertools\nfrom wad import Wad\n\n\nclass DoomInstanceBt(DoomInst... | [
[
"numpy.delete",
"numpy.zeros",
"numpy.argmin",
"numpy.where",
"numpy.ndarray",
"numpy.around"
]
] |
ZhuofanXie/SDMetrics | [
"a89fa4177b9ff2aa1ee6dfaef0b908581109fe55"
] | [
"tests/integration/single_table/test_single_table.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pytest\n\nfrom sdmetrics import compute_metrics\nfrom sdmetrics.demos import load_single_table_demo\nfrom sdmetrics.single_table.base import SingleTableMetric\nfrom sdmetrics.single_table.bayesian_network import BNLikelihood, BNLogLikelihood\nfrom sdmetrics.single_ta... | [
[
"pandas.DataFrame",
"numpy.random.normal",
"numpy.random.randint"
]
] |
cloud322/proj | [
"5477eee97af388a91dc292288a1beeb72d232aa7"
] | [
"DLstock.py"
] | [
"import sys\nimport tensorflow as tf\nimport pandas as pd\nimport numpy as np\nimport os\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport random\nimport tensorflow as tf\nimport tensorflow.contrib.learn as tflearn\nimport tensorflow.contrib.layers as tflayers\nfrom tensorflow.contrib.learn import learn_r... | [
[
"tensorflow.train.AdamOptimizer",
"numpy.asarray",
"matplotlib.pyplot.xlabel",
"tensorflow.reset_default_graph",
"matplotlib.pyplot.title",
"tensorflow.layers.dense",
"tensorflow.reshape",
"matplotlib.pyplot.legend",
"tensorflow.Session",
"tensorflow.placeholder",
"nump... |
minyee/TAGO | [
"9fea77cc39aa035796ab3ca52e95ebb66ffe0e7f"
] | [
"adaptive_routing.py"
] | [
"import numpy as np\nfrom gurobipy import *\nfrom collections import deque\nimport copy\nimport sys, math\n\nclass AdaptiveRouting(object):\n\tdef __init__(self, tolerance_fairness, max_intrablock_distance=2):\n\t\t## records the maximum number of hops we permit packets to traverse within a block\n\t\tself.max_tole... | [
[
"numpy.zeros"
]
] |
Bobholamovic/SimpleCV | [
"f4edacf088d0155725a469e227de847820bdfa53"
] | [
"simplecv/module/hrnet.py"
] | [
"import torch.nn as nn\nfrom simplecv.interface import ConfigurableMixin\nfrom simplecv.module._hrnet import hrnetv2_w18\nfrom simplecv.module._hrnet import hrnetv2_w32\nfrom simplecv.module._hrnet import hrnetv2_w40\nfrom simplecv.module._hrnet import hrnetv2_w48\nfrom simplecv.module import context_block\nfrom si... | [
[
"torch.utils.checkpoint.checkpoint"
]
] |
hengwei-chan/standard_smiles | [
"38e0e6ee716723bb3ed4175f326db05294d76427"
] | [
"mol_view.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nUtilities for viewing DataFrames with molecules.\n\"\"\"\n# import os.path as op\n\nimport base64\nimport time\nfrom itertools import chain\nfrom io import BytesIO as IO\n\n\nimport pandas as pd\nimport numpy as np\n\npd.set_option(\"display.max_colwidth\", ... | [
[
"numpy.zeros",
"pandas.set_option"
]
] |
Vaidic/Udacity-Deep-Reinforcement-Learning-Nanodegree | [
"b29df71920255b631cf24d26ab70e4a7c45a7146"
] | [
"coursework/lab-taxi/monitor.py"
] | [
"from collections import deque\nimport sys\nimport math\nimport numpy as np\n\ndef interact(env, agent, num_episodes=20000, window=100):\n \"\"\" Monitor agent's performance.\n \n Params\n ======\n - env: instance of OpenAI Gym's Taxi-v1 environment\n - agent: instance of class Agent (see Agent.py... | [
[
"numpy.mean"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.