repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
kotabrog/K_DeZero
[ "e8145a539874956bc235d4577fa38211c01c30ea" ]
[ "kdezero/datasets/sincurve.py" ]
[ "import numpy as np\nfrom kdezero.datasets import Dataset\n\n\nclass SinCurve(Dataset):\n \"\"\"The data is a sine curve, and the label advances one index by one.\n The number of data is 1000.\n\n Attribute:\n Attribute:\n data (ndarray):\n label (ndarray):\n train (bool):\n ...
[ [ "numpy.linspace", "numpy.random.uniform", "numpy.sin", "numpy.cos" ] ]
XT-Lee/hoomd-blue
[ "0188f56f32c4a3efe0e74a3dc27397d6ec3469b0" ]
[ "hoomd/pytest/test_dcd.py" ]
[ "import hoomd\nfrom hoomd.conftest import operation_pickling_check\nimport pytest\nimport numpy as np\n\n\ndef test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path):\n filename = tmp_path / \"temporary_test_file.dcd\"\n sim = simulation_factory(two_particle_snapshot_factory())\n dcd_dump...
[ [ "numpy.testing.assert_allclose", "numpy.asarray" ] ]
lukeWaninger/DankDefense
[ "969c151a42857f9fa72e6887aed22e8c977740a5" ]
[ "dankypipe/utils.py" ]
[ "import datetime as dt\nimport gc\nimport os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\n\nNO_DETECTIONS = '#706C60'\nDETECTIONS = '#FFAE09'\n\ndp = lambda x: os.path.join('/', 'mnt', 'f', 'DankDefense', x)\n\n\ndef write_feat(name, train, test):\n path = d...
[ [ "pandas.value_counts", "pandas.isnull", "numpy.round", "pandas.DataFrame", "matplotlib.pyplot.grid", "matplotlib.pyplot.title", "pandas.crosstab", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.gcf", "pandas.concat" ] ]
Jessime/word_cloud
[ "36d4e26cf1347a3979ef83d01714a82652685ada" ]
[ "examples/simple.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nMinimal Example\n===============\n\nGenerating a square wordcloud from the US constitution using default arguments.\n\"\"\"\n\nimport os\n\nfrom os import path\nfrom wordcloud import WordCloud\n\n# get data directory (using getcwd() is needed to support running example in generated I...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.figure", "matplotlib.pyplot.axis", "matplotlib.pyplot.imshow" ] ]
paulvinell/2048-python-custom-player
[ "f4bae0a0b220ce1f7bf3d2a76d350bed93816064" ]
[ "game.py" ]
[ "import random\nimport numpy as np\nimport copy\nimport constants as c\n\nclass Game():\n def __init__(self, log_history=False):\n # Fitness variables\n self.move_count = 0\n self.max_tile = 0\n self.score = 0\n\n # Reward variables\n self.score_diff = 0\n self.ti...
[ [ "numpy.array_equal", "numpy.maximum" ] ]
carlosluis/PettingZoo
[ "aec87907777e0e62652d499b3ac96f680acf35ad" ]
[ "tutorials/rllib_pistonball.py" ]
[ "from ray import tune\nfrom ray.rllib.models import ModelCatalog\nfrom ray.tune.registry import register_env\nfrom ray.rllib.env.wrappers.pettingzoo_env import ParallelPettingZooEnv\nfrom pettingzoo.butterfly import pistonball_v5\nimport supersuit as ss\nimport torch\nfrom torch import nn\nfrom ray.rllib.models.tor...
[ [ "torch.nn.Linear", "torch.nn.Module.__init__", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.Flatten" ] ]
JosephDErwin/sportsreference
[ "f026366bec91fdf4bebef48e3a4bfd7c5bfab4bd" ]
[ "tests/integration/boxscore/test_ncaaf_boxscore.py" ]
[ "import mock\nimport os\nimport pandas as pd\nfrom datetime import datetime\nfrom flexmock import flexmock\nfrom sportsreference import utils\nfrom sportsreference.constants import AWAY\nfrom sportsreference.ncaaf.constants import BOXSCORE_URL, BOXSCORES_URL\nfrom sportsreference.ncaaf.boxscore import Boxscore, Box...
[ [ "pandas.DataFrame", "pandas.concat" ] ]
basicv8vc/oneflow
[ "2a0480b3f4ff42a59fcae945a3b3bb2d208e37a3" ]
[ "oneflow/python/test/ops/test_slice_v2.py" ]
[ "\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by ap...
[ [ "numpy.allclose", "numpy.random.rand", "numpy.array_equal", "numpy.zeros" ] ]
russellmendonca/oyster
[ "0bdc46e650e47615a459d7eaad53ead735907c05" ]
[ "envs/cheetah-mod-control.py" ]
[ "import numpy as np\nfrom itertools import combinations\nfrom . import register_env\nfrom .half_cheetah import HalfCheetahEnv\n\n\n@register_env('cheetah-mod-control')\nclass HalfCheetahModControlEnv(HalfCheetahEnv):\n \"\"\"Half-cheetah environment with target velocity, as described in [1]. The\n code is ada...
[ [ "numpy.square", "numpy.ones", "numpy.arange" ] ]
saic-vul/point_based_clothing
[ "1dbb7465ef2b032eb92947f5aa9ccdfaed9f8a39" ]
[ "src/generators/cloth.py" ]
[ "import os\n\nimport segmentation_models_pytorch as smp\nimport torch\nfrom torch import nn\n\nfrom utils.common import to_tanh, to_sigm\n\n\nclass Wrapper:\n @staticmethod\n def get_args(parser):\n parser.add('--gen_in_channels', type=int, default=17)\n parser.add('--backbone', type=str, defaul...
[ [ "torch.cat", "torch.nn.Sigmoid", "torch.nn.Tanh", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
KareemYousrii/2015-DL-TIWafer
[ "5aa7d2ecfcfd3da95811a0a49c855ba1bcb3f034" ]
[ "distanceMetricLearning/load_data_dml.py" ]
[ "\"\"\"\n\"\"\"\nfrom os.path import dirname\nfrom pandas import read_csv\nfrom itertools import combinations\nfrom random import shuffle\nimport pandas as pd\nimport cPickle\nimport numpy as np\nimport lmdb\nimport cPickle\nfrom collections import defaultdict\nimport sys\n\n# Make sure that caffe is on the python ...
[ [ "pandas.DataFrame.from_dict" ] ]
biprodip/multi_omic_vae
[ "e174bfd97f9a47b2b916390fcf46830fccae063b" ]
[ "main.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom MultiOmiVAE import MultiOmiVAE\nfrom MethyOmiVAE import MethyOmiVAE\nfrom ExprOmiVAE import ExprOmiVAE\nfrom plot_sactter import plot_scatter\nfrom classification import classification\n\n\nif __name__ == \"__main__\":\n input_path = 'data/OmiVAE/PANCAN/GDC-PANCAN_'...
[ [ "pandas.read_csv" ] ]
larslorch/namedtensor
[ "8689fdfb8190fe0f31f05a982778c21a85c713b1" ]
[ "namedtensor/distributions/distributions.py" ]
[ "from ..schema import _Schema\nfrom ..torch_helpers import NamedTensor\nimport torch\nimport torch.distributions\n\n\nclass NamedDistribution:\n def __init__(self, dist, batch_names, event_names):\n self._dist = dist\n self._batch_schema = _Schema.build(batch_names, 0)\n self._event_schema =...
[ [ "torch.Size" ] ]
ealopez/flat_punch
[ "3b41865ebd60d22cb0e32a8ef200ec790b578d08" ]
[ "Fig2_Scheme_tapping/Fig_tapping.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Nov 12 09:37:42 2016\n\n@author: Enrique Alejandro\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\namph = np.loadtxt('summary.txt', skiprows=1)\namp = amph[3]*10.0*1.0e-9 #multiplying by free amplitude and then converting to m\nphi = amph[4]*np.pi/1...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "numpy.loadtxt", "matplotlib.pyplot.ylabel", "numpy.size" ] ]
chrbeckm/anfaenger-praktikum
[ "51764ff23901de1bc3d16dc935acfdc66bb2b2b7", "51764ff23901de1bc3d16dc935acfdc66bb2b2b7" ]
[ "us2/python/fehler.py", "v354/linreg.py" ]
[ "import sympy\nimport numpy as np\n\n\ndef error(f, err_vars=None):\n from sympy import Symbol, latex\n s = 0\n latex_names = dict()\n\n if err_vars == None:\n err_vars = f.free_symbols\n\n for v in err_vars:\n err = Symbol('latex_std_' + v.name)\n s += f.diff(v)**2 * err**2\n ...
[ [ "numpy.linspace", "numpy.savetxt" ], [ "numpy.log", "matplotlib.pyplot.savefig", "numpy.genfromtxt", "matplotlib.pyplot.plot", "numpy.mean", "numpy.std", "numpy.sqrt", "matplotlib.pyplot.clf", "numpy.column_stack" ] ]
moranxiachong/PersonReID-VAAL
[ "86948ef70793455487cd61709486653827e51bda" ]
[ "tools/test_init.py" ]
[ "# encoding: utf-8\n\"\"\"\n@author: sherlock\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport argparse\nimport os\nimport sys\nfrom os import mkdir\n\nimport torch\nfrom torch.backends import cudnn\n\nsys.path.append('.')\nfrom config import cfg\nfrom data import make_data_loader\nfrom engine.inference impor...
[ [ "torch.load" ] ]
alexanderarcha95/py2quik
[ "cd2933bc52ac3876dddce32bb17f33323a3eb60f" ]
[ "quik/preprocess.py" ]
[ "import numpy as np\r\nimport pandas as pd\r\nfrom sklearn import preprocessing as prep\r\nfrom sklearn.preprocessing import MinMaxScaler\r\nfrom collections import deque\r\nfrom quik import prices \r\nimport random\r\n\r\n\r\ndef classify(current,future,thres = 100): # Returns 0 when price less than before. \r\n...
[ [ "pandas.DataFrame", "numpy.array", "sklearn.preprocessing.MinMaxScaler" ] ]
kienpham2000/aws-builders-fair-projects
[ "6c4075c0945a6318b217355a6fc663e35ffb9dba" ]
[ "reinvent-2019/rhythm-cloud/lib/ABElectronics_Python_Libraries/ExpanderPi/demos/demo_adcspeed.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\n================================================\n# ABElectronics Expander Pi | ADC Speed Demo\n#\n# Requires python smbus to be installed\n# For Python 2 install with: sudo apt-get install python-smbus\n# For Python 3 install with: sudo apt-get install python3-smbus\n#\n# run with...
[ [ "numpy.zeros" ] ]
RogerZhangzz/CAG_UDA
[ "422f99e2e0a5cb26a40d4f17ee5832f81580f7f0" ]
[ "test.py" ]
[ "import os\nimport sys\nimport yaml\nimport time\nimport shutil\nimport torch\nimport random\nimport argparse\nimport datetime\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n# import torchvision.models as models\n# import torchvision\nimport matplotlib.pyplot as plt\nimpo...
[ [ "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.no_grad", "torch.load" ] ]
kawa-work/deepmind-research
[ "6f8ae40b2626b30f5f80dfc92f5676689eff5599" ]
[ "cs_gan/gan.py" ]
[ "# Copyright 2019 DeepMind Technologies Limited and 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 req...
[ [ "tensorflow.compat.v1.shape" ] ]
ioyy900205/PyTorch_mess-around
[ "90d255e17158699fd7902f7746b35fa18975112e" ]
[ "solving_equations.py" ]
[ "import torch \nfrom torch.autograd import Variable \nx=torch.Tensor([100.]) \n#建立一个张量 tensor([1.], requires_grad=True) \nx=Variable(x,requires_grad=True) \nprint('grad',x.grad,'data',x.data) \nlearning_rate=0.01 \nepochs=5000\n \nfor epoch in range(epochs): \n y = x**2 \n y.backward() \n print(...
[ [ "torch.autograd.Variable", "torch.Tensor" ] ]
adu461386118/PyRate
[ "0428dba9e2b3d4b6807f8c62d55c161c0dd4d75a" ]
[ "pyrate/core/ref_phs_est.py" ]
[ "# This Python module is part of the PyRate software package.\n#\n# Copyright 2020 Geoscience Australia\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://...
[ [ "numpy.isnan", "numpy.reshape", "numpy.zeros", "numpy.load", "numpy.save", "numpy.ravel", "numpy.floor" ] ]
SINTEFMedtek/libromocc
[ "65a10849401cec02fc1c9ac8b1bdebbbfc4ff1c0" ]
[ "source/pyromocc/tests/pyromocc/test_calibration.py" ]
[ "from unittest import TestCase\nimport numpy as np\n\nfrom pyromocc import CalibrationMethods\n\n\nclass TestCalibration(TestCase):\n def setUp(self) -> None:\n pass\n\n def test_calibration_shah(self):\n poses_a = np.random.random((100, 4, 4))\n poses_b = poses_a\n\n calib_matrice...
[ [ "numpy.random.random", "numpy.eye" ] ]
rajarshd/Multi-Step-Reasoning
[ "3218d626839f7217554f38d82e00e4f460b508e4" ]
[ "paragraph_encoder/multi_corpus.py" ]
[ "import numpy as np\nimport os\nimport pickle\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.metrics import pairwise_distances\nfrom tqdm import tqdm\nfrom pathlib import Path\nimport argparse\nimport time\n\nclass MultiCorpus:\n class Paragraph:\n def __init__(self, args, pid,...
[ [ "sklearn.metrics.pairwise_distances", "numpy.lexsort", "sklearn.feature_extraction.text.TfidfVectorizer", "numpy.argsort" ] ]
alifkurniawan/tesis
[ "6330dba32f5dc12785e956875c94d83344d788a8" ]
[ "training.py" ]
[ "\"\"\"\nThis file is part of the OpenProtein project.\n\nFor license information, please see the LICENSE file in the root directory.\n\"\"\"\n\nimport json\nimport time\nimport numpy as np\nimport requests\nimport torch.optim as optim\nfrom util import set_experiment_id, write_out, write_model_to_disk, write_resul...
[ [ "torch.optim.lr_scheduler.CosineAnnealingWarmRestarts", "numpy.zeros" ] ]
MisterPiggy/ml-agents
[ "c9385d0db79665449af6c7566d9bb4da2434d8ab" ]
[ "ml-agents/mlagents/trainers/tests/test_ppo.py" ]
[ "from unittest import mock\nimport pytest\n\nimport numpy as np\nfrom mlagents.tf_utils import tf\n\nimport yaml\n\nfrom mlagents.trainers.ppo.models import PPOModel\nfrom mlagents.trainers.ppo.trainer import PPOTrainer, discount_rewards\nfrom mlagents.trainers.ppo.policy import PPOPolicy\nfrom mlagents.trainers.mo...
[ [ "numpy.array", "numpy.ones", "numpy.zeros" ] ]
luigivieira/fsdk
[ "3d3b04bcde5f72c95044caa637114368f9818979" ]
[ "fsdk/analysis/emotion/compare.py" ]
[ "#!/usr/bin/env python\n#\n# This file is part of the Fun SDK (fsdk) project. The complete source code is\n# available at https://github.com/luigivieira/fsdk.\n#\n# Copyright (c) 2016-2017, Luiz Carlos Vieira (http://www.luiz.vieira.nom.br)\n#\n# MIT License\n#\n# Permission is hereby granted, free of charge, to an...
[ [ "matplotlib.pyplot.xlim", "matplotlib.pyplot.get_current_fig_manager", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "numpy.genfromtxt", "matplotlib.pyplot.legend", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.yticks", "matplotlib.pyplot.figure", "matplotlib.pyp...
allbits/rtdl
[ "65cf8edc360343d77723b83b07d76fb9f94c2168" ]
[ "bin/ft_transformer.py" ]
[ "# %%\nimport math\nimport typing as ty\nfrom pathlib import Path\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.init as nn_init\nimport zero\nfrom torch import Tensor\n\nimport lib\n\n\n# %%\nclass Tokenizer(nn.Module):\n category_offsets: ty.Optiona...
[ [ "torch.nn.Linear", "torch.zeros", "torch.nn.Dropout", "torch.nn.LayerNorm", "torch.stack", "torch.nn.ModuleList", "torch.no_grad", "torch.nn.functional.dropout", "torch.nn.init.xavier_uniform_", "numpy.save", "torch.cuda.device_count", "torch.tensor", "torch.loa...
chisyliu/RotationDetection
[ "85791a4ec944bb0b14b8721193477eb0f582e981", "4249720ea4dacdd60e696901df8034e5cd0a1843", "85791a4ec944bb0b14b8721193477eb0f582e981", "85791a4ec944bb0b14b8721193477eb0f582e981" ]
[ "configs/FDDB/kl/cfgs_res50_fddb_kl_v5.py", "tools/r3det_dcl/train.py", "configs/DOTA2.0/r3det_kl/cfgs_res50_dota2.0_r3det_kl_v2.py", "configs/ICDAR2015/gwd/cfgs_res50_icdar2015_v1.py" ]
[ "# -*- coding: utf-8 -*-\nfrom __future__ import division, print_function, absolute_import\n\nimport numpy as np\n\nfrom alpharotate.utils.pretrain_zoo import PretrainModelZoo\nfrom configs._base_.models.retinanet_r50_fpn import *\nfrom configs._base_.datasets.dota_detection import *\nfrom configs._base_.schedules....
[ [ "numpy.array" ], [ "tensorflow.constant_initializer", "tensorflow.reshape", "tensorflow.cast", "tensorflow.add_n", "tensorflow.constant", "tensorflow.contrib.slim.learning.clip_gradient_norms", "tensorflow.get_variable_scope", "tensorflow.get_collection", "tensorflow.su...
lbotsch/aiida-quantumespresso
[ "fe75c80cecb61113641366961ced8ed5a03cf896", "fe75c80cecb61113641366961ced8ed5a03cf896" ]
[ "aiida_quantumespresso/parsers/cp.py", "aiida_quantumespresso/utils/resources.py" ]
[ "# -*- coding: utf-8 -*-\nfrom distutils.version import LooseVersion\n\nimport numpy\nfrom aiida.common import NotExistent\nfrom aiida.orm import Dict, TrajectoryData\n\nfrom qe_tools.constants import bohr_to_ang, hartree_to_ev, timeau_to_sec\nfrom aiida_quantumespresso.parsers.parse_raw.cp import parse_cp_raw_outp...
[ [ "numpy.matrix", "numpy.array" ], [ "numpy.prod" ] ]
drezap/tensorflow
[ "0ec3c78e0a34f224ee041b54a24717f77d3246fa" ]
[ "tensorflow/python/eager/benchmarks_test.py" ]
[ "# Copyright 2017 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...
[ [ "numpy.dot", "tensorflow.python.eager.context.context", "tensorflow.python.ops.math_ops.matmul", "tensorflow.python.ops.array_ops.ones", "tensorflow.python.eager.backprop.gradients_function", "tensorflow.python.eager.core._status_to_exception", "tensorflow.python.eager.context.device",...
wpsliu123/AUTOKERAS
[ "172fb3cf705126e4c3d86b41292463e30ecf3c15" ]
[ "autokeras/nn/model_trainer.py" ]
[ "import os\nimport abc\nimport sys\nfrom copy import deepcopy\nfrom functools import reduce\nimport numpy as np\nimport torch\nfrom torchvision import utils as vutils\nfrom tqdm.autonotebook import tqdm\n\nfrom autokeras.constant import Constant\nfrom autokeras.utils import get_device\n\n\nclass ModelTrainerBase(ab...
[ [ "numpy.concatenate", "torch.no_grad", "torch.full", "torch.load", "torch.randn" ] ]
makwakwa/Tensor_flow
[ "47c240d7fb9842f36ef2a51514dfce62bb973b6a" ]
[ "Chapter 06/tic_tac_toe/tic_tac_toe_moves.py" ]
[ "# Learning Optimal Tic-Tac-Toe Moves via a Neural Network\n#---------------------------------------\n#\n# We will build a one-hidden layer neural network\n# to predict tic-tac-toe optimal moves. This will\n# be accomplished by loading a small list of board\n# positions with the optimal play response in a csv\n...
[ [ "numpy.array", "tensorflow.initialize_all_variables", "tensorflow.argmax", "matplotlib.pyplot.xlabel", "tensorflow.Session", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "tensorflow.matmul", "tensorflow.python.framework.ops.reset_default_graph", "tensorflow.placehol...
clauvm/project_map_reduce
[ "a7b4847cad195965fe939698b747bd495f8ea30b" ]
[ "4_MATRIX/i.py" ]
[ "import numpy as np\n\n\nA = np.random.rand(1000,50)\n\nB = np.random.rand(50,2000)\n\nnp.savetxt('A.txt',A)\nnp.savetxt('B.txt',B)\n\nC = np.dot(A,B)\nnp.savetxt('C.txt',C)\n\n\n" ]
[ [ "numpy.dot", "numpy.random.rand", "numpy.savetxt" ] ]
dgriffiths3/mononet3d
[ "4505234025efaee727d4bb4bb3f013fee8dc65b4" ]
[ "utils/helpers.py" ]
[ "import os\n\nimport numpy as np\nimport progressbar\nimport pyvista as pv\nimport toml\nimport tensorflow as tf\nimport colorsys\n\n\nclass EvalProgBar():\n\n\tdef __init__(self):\n\n\t\tself.widgets = [progressbar.FormatLabel('')]\n\t\tself.bar = progressbar.ProgressBar(widgets=self.widgets)\n\t\tself.bar.start(m...
[ [ "numpy.concatenate", "numpy.max", "numpy.array", "numpy.sin", "numpy.zeros", "numpy.minimum", "numpy.sum", "numpy.min", "numpy.mean", "numpy.random.shuffle", "numpy.where", "numpy.einsum", "numpy.arctan2", "numpy.cos", "numpy.argsort", "numpy.arange"...
stbman/reactivegumi
[ "b85edcbbcdc65f2d95ceb7bc490da0ff78c0cf5e" ]
[ "data_processing/dataentities.py" ]
[ "\"\"\"\nTest script to process entities\n\"\"\"\n\nimport pandas\nimport numpy as np\n\nfilename = 'groups_102523307031776_23-05-2018-15-02-44.tsv'\n\ndf = pandas.read_csv(filename, sep='\\t')\ndf['Timestamp String'] = df['Timestamp']\ndf['Timestamp'] = pandas.to_datetime(df['Timestamp'])\ndf['User Content'] = df[...
[ [ "pandas.to_datetime", "pandas.read_csv" ] ]
i2infinity/GamestonkTerminal
[ "abf79a5249930e5a9f5d2a1c4ba64590888ecef5" ]
[ "gamestonk_terminal/mutual_funds/yfinance_view.py" ]
[ "\"\"\"Yahoo Finance Mutual Fund Model\"\"\"\n__docformat__ = \"numpy\"\n\nimport os\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom rich.console import Console\n\nfrom gamestonk_terminal.helper_funcs import (\n rich_table_from_df,\n export_data,\n plot_autoscale,\n)\nfrom gamestonk_terminal....
[ [ "pandas.DataFrame.from_dict", "matplotlib.pyplot.show", "matplotlib.pyplot.ion" ] ]
TaylorChris2/Virtuoso
[ "87a3d59141172d5daff0ae4725b843351b52fe63" ]
[ "all code (not organized)/Database Load one hot semantic of sorts.py" ]
[ "import sounddevice as sd \r\nfrom scipy.signal import istft\r\nfrom scipy.signal import stft\r\nimport librosa\r\nimport librosa.display\r\nimport midi\r\nimport skimage.transform\r\nimport numpy as np\r\nimport os\r\nimport h5py\r\nimport time\r\nimport matplotlib.pyplot as plt\r\nstart_time = time.time()\r\n\r\n...
[ [ "numpy.max", "numpy.array", "numpy.zeros", "scipy.signal.istft", "numpy.round", "numpy.real", "numpy.min", "numpy.hamming", "numpy.stack", "numpy.transpose", "numpy.argmax", "numpy.cos", "scipy.signal.stft", "numpy.unique" ] ]
kwan3217/kwanmath
[ "c43f8209324cdb0c673b969b41b06d49c9d46e71" ]
[ "kwanmath/geodesy.py" ]
[ "\"\"\"\nGeodesy and gravity calculations\n\"\"\"\nfrom .vector import vdecomp, vlength, vcomp, rv\nimport numpy as np\n\ndef xyz2llr(sv):\n \"\"\"\n Calculate spherical coordinates of state\n :param sv: State vector, can be stack\n :return: tuple of (lon,lat,r). Each will be an array iff sv is a stack\...
[ [ "numpy.arcsin", "numpy.radians", "numpy.arctan2" ] ]
ashkanjalaliQ/Maadanchi
[ "acb2ec9ecdb1e20398454c942cce166f92facda6" ]
[ "Jalase5/main.py" ]
[ "from urllib.request import urlopen\nfrom bs4 import BeautifulSoup\nimport pandas as pd \n\ndef divider_tag(tag):\n tag = tag[tag.find('>') + 1:tag.find('</')]\n if len(tag) == 0:\n tag = '-'\n return tag\n\ndef attach(names):\n result = ''\n if len(names) != 1:\n for i in range(len(na...
[ [ "pandas.DataFrame" ] ]
brenting/SMAC3
[ "f628d8b83f9f1803054d6e39bce7a51ab033dff1" ]
[ "smac/utils/io/input_reader.py" ]
[ "import numpy as np\nfrom smac.configspace import pcs\n\n__author__ = \"Marius Lindauer\"\n__copyright__ = \"Copyright 2015, ML4AAD\"\n__license__ = \"3-clause BSD\"\n__maintainer__ = \"Marius Lindauer\"\n__email__ = \"lindauer@cs.uni-freiburg.de\"\n__version__ = \"0.0.1\"\n\n\nclass InputReader(object):\n\n \"\...
[ [ "numpy.array" ] ]
Thumb-Technologies/TensorFlowASR
[ "130124ccaf23fabe3e7a6f138d9403a7c0946ef3" ]
[ "tensorflow_asr/featurizers/methods/gammatone.py" ]
[ "# Copyright 2020 Huy Le Nguyen (@usimarit) and Huy Phan (@pquochuy)\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# Unles...
[ [ "tensorflow.exp", "tensorflow.abs", "tensorflow.range", "tensorflow.cos", "tensorflow.ones_like", "tensorflow.math.log", "tensorflow.transpose", "tensorflow.constant", "tensorflow.sqrt", "tensorflow.math.conj", "tensorflow.stack", "tensorflow.sin", "tensorflow.c...
qwerlarlgus/Object_tracking
[ "1ef0eded171d2d432cfdcfbeb5b794a6546bf116" ]
[ "labeling.py" ]
[ "import sys\r\nimport random\r\nimport numpy as np\r\nimport cv2\r\n\r\n\r\nsrc = cv2.imread('crop0.jpg', cv2.IMREAD_GRAYSCALE)\r\n\r\nif src is None:\r\n print('Image load failed!')\r\n sys.exit()\r\n\r\nh, w = src.shape[:2]\r\ndst1 = np.zeros((h, w, 3), np.uint8)\r\ndst2 = np.zeros((h, w, 3), np.uint8)\r\n\...
[ [ "numpy.zeros" ] ]
sakurakhadag/escp2-client
[ "f8d58bdaedc4f7ca811769538586b759c37eb355" ]
[ "scripts/p600/main_p600_low_res.py" ]
[ "import sys\nimport os\nsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),\n '..', '..')))\nimport binascii\nimport math\nfrom hex_functions import *\nfrom esc_functions import *\nfrom characters import *\nimport numpy as np\n\n# cd to project b...
[ [ "numpy.zeros" ] ]
mindspore-ai/mindquantum
[ "785150e6b44bb79b37f2fa4a3d86edc0ab3c83ce" ]
[ "mindquantum/core/parameterresolver/parameterresolver.py" ]
[ "# -*- coding: utf-8 -*-\n# 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...
[ [ "numpy.imag", "numpy.conj", "numpy.real" ] ]
jiaxinying/analytics-zoo
[ "c3669b1736088df911c84b38fde3e90a571f51b7" ]
[ "pyzoo/test/zoo/pipeline/nnframes/test_nn_classifier.py" ]
[ "#\n# Copyright 2018 Analytics Zoo Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "numpy.testing.assert_allclose", "tensorflow.Session", "tensorflow.placeholder", "tensorflow.layers.dense", "tensorflow.global_variables_initializer" ] ]
masling/stock
[ "f7a0add2b7533ff43d1ed1a238ec14f55b39e488" ]
[ "jobs/ztb_data_job.py" ]
[ "#!/usr/local/bin/python\n# -*- coding: utf-8 -*-\n__author__ = 'Masling'\n\n# 每天的涨跌停 数据来源金融界及东方财富网\nimport xlwt\nimport pandas as pd\nimport tushare as ts\nimport datetime\nimport libs.common as common\nimport libs.stock_ztb as ztb\n\nts.set_token('0d60b78ce095601b582c78f71b954e0e87a6e352b738a6a225d71649')\n# c代码 ...
[ [ "pandas.DataFrame.from_dict", "pandas.DataFrame", "pandas.read_sql" ] ]
zhawan/maro
[ "d8c98deea4296cdcb90efd1fb59bc571cec3a2ef" ]
[ "maro/rl/models/torch/mlp_representation.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport torch\nimport torch.nn as nn\n\n\nclass MLPRepresentation(nn.Module):\n \"\"\"\n Deep Q network.\n Choose multi-layer full connection with dropout as the basic network architecture.\n \"\"\"\n\n def __init__(self...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Sequential", "torch.nn.LeakyReLU", "torch.cuda.is_available" ] ]
alkymi-io/faster-rcnn.pytorch
[ "2613b8d643d90ae16f9593a357ab4ba0de7f82a6" ]
[ "lib/datasets/imdb.py" ]
[ "# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick and Xinlei Chen\n# --------------------------------------------------------\nfrom __future__ import absolute_import\nfrom ...
[ [ "numpy.zeros_like", "numpy.zeros", "numpy.where", "numpy.arange", "numpy.sort", "numpy.hstack", "numpy.vstack" ] ]
pandezhao/Paperwork
[ "7a8a82eb2d85949c467b15ea634806269b0f902c" ]
[ "tmp.py" ]
[ "import torch\nfrom torchvision import datasets, transforms\nfrom torch import nn, optim\nfrom torch.nn import init, functional\nfrom torch.nn.utils import clip_grad_norm\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\nimport matplotlib.pyplot as plt\nfrom norm import show_data\nimpor...
[ [ "torch.nn.Linear", "torch.nn.LSTM", "torch.stack", "torch.autograd.Variable", "torch.nn.Tanh", "torch.no_grad", "torch.nn.ReLU", "torch.nn.BatchNorm1d", "torch.utils.data.DataLoader", "torch.Tensor", "torch.nn.CrossEntropyLoss" ] ]
zfgao66/deeplearning-mpo-tensorflow
[ "c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6" ]
[ "VGG-19/vgg-19/tensornet/layers/linear.py" ]
[ "import tensorflow as tf\nfrom .auxx import get_var_wrap\n\ndef linear(inp,\n out_size,\n weights_initializer=tf.contrib.layers.xavier_initializer(uniform=False),\n weights_regularizer=None,\n biases_initializer=tf.zeros_initializer,\n biases_regularizer=None,\n ...
[ [ "tensorflow.contrib.layers.xavier_initializer", "tensorflow.variable_scope", "tensorflow.matmul" ] ]
vulcantron/pytorch
[ "bbbf00a8a83879e687fb7e96e31a619388b6b54e" ]
[ "torch/testing/_internal/jit_utils.py" ]
[ "# Torch\nfrom torch.autograd import Variable\nfrom torch.autograd.function import _nested_map\nfrom torch.jit.annotations import BroadcastingList2, BroadcastingList3 # noqa: F401\n\nfrom torch.onnx import OperatorExportTypes\nimport torch\nimport torch.cuda\nimport torch.jit\nimport torch.jit._logging\nimport tor...
[ [ "torch._C._debug_set_autodiff_subgraph_inlining", "torch.jit.TracerWarning.ignore_lib_warnings", "torch._C._debug_get_fusion_group_inlining", "torch._C._cuda_getCompiledVersion", "torch.testing.FileCheck", "torch._C._jit_clear_class_registry", "torch.cuda.is_available", "torch.jit....
lucyleeow/euroscipy-2019-scikit-learn-tutorial
[ "81ec6483c5529af4655bf64ba0513f3f28cf565e", "81ec6483c5529af4655bf64ba0513f3f28cf565e" ]
[ "python_scripts/02_basic_preprocessing.py", "python_scripts/02_basic_preprocessing_exercise_03_solution.py" ]
[ "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# formats: notebooks//ipynb,python_scripts//py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.2.2\n# kernelspec:\n# display_name: Python 3\n# ...
[ [ "sklearn.ensemble.HistGradientBoostingClassifier", "numpy.zeros", "sklearn.preprocessing.StandardScaler", "pandas.DataFrame", "numpy.random.randn", "matplotlib.pyplot.subplots", "sklearn.model_selection.KFold", "sklearn.linear_model.LogisticRegression", "numpy.arange", "skl...
ywang40/molecool
[ "4ec6af6d894c3152b1cd9d616e44521b3c6a5a46" ]
[ "molecool/tests/test_measure.py" ]
[ "\"\"\"\nTests for the measure module.\n\"\"\"\n\nimport molecool\nimport numpy as np\nimport pytest\n\ndef test_calculate_distance():\n\n r1 = np.array([0, 0, 0])\n r2 = np.array([0, 1, 0])\n\n expected_distance = 1\n\n calculated_diatance = molecool.calculate_distance(r1, r2)\n\n assert expected_di...
[ [ "numpy.array", "numpy.sqrt" ] ]
Dahlia-Chehata/cupy
[ "1005f55075f89aa17e60074aaa6494ff8d033251" ]
[ "examples/cutensor/elementwise_binary.py" ]
[ "#\n# D_{x,y,z} = alpha * A_{z,y,x} + gamma * C_{x,y,z}\n#\nimport numpy\nimport cupy\nfrom cupy import cutensor\nimport cupyx.time\n\n\ndtype = numpy.float32\n\nmode_a = ('z', 'y', 'x')\nmode_c = ('x', 'y', 'z')\n\nextent = {'x': 400, 'y': 200, 'z': 300}\n\na = cupy.random.random([extent[i] for i in mode_a])\nc = ...
[ [ "numpy.array", "numpy.dtype" ] ]
prismformore/SDSEN
[ "815d1afcf8091eed4c3b35e8a3d56b28b7f3979d" ]
[ "config/train.py" ]
[ "import os\nimport sys\nimport cv2\nimport argparse\nimport numpy as np\n\nimport torch\nfrom torch import nn\nfrom torch.nn import MSELoss\nfrom torch.optim import Adam\nfrom torch.optim.lr_scheduler import MultiStepLR\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\nfrom tensorboardX...
[ [ "torch.cuda.manual_seed_all", "torch.nn.MSELoss", "numpy.zeros", "torch.autograd.Variable", "torch.save", "torch.optim.lr_scheduler.MultiStepLR", "torch.manual_seed", "torch.cuda.set_device", "numpy.transpose", "torch.utils.data.DataLoader", "torch.load", "numpy.cli...
davidxia/NVTabular
[ "97b05ac74204d4e21fa31d522d0f84fb37cf94a9" ]
[ "tests/unit/ops/test_ops_schema.py" ]
[ "import numpy as np\nimport pytest\n\nimport nvtabular as nvt\nfrom nvtabular import ColumnSchema, ColumnSelector, Schema, dispatch, ops\n\n\n@pytest.mark.parametrize(\"properties\", [{}, {\"p1\": \"1\"}])\n@pytest.mark.parametrize(\"tags\", [[], [\"TAG1\", \"TAG2\"]])\n@pytest.mark.parametrize(\n \"op\",\n [...
[ [ "numpy.random.randint" ] ]
gift-surg/ITK_NiftyMIC
[ "26415ac2e6197de7b07ffcb0c3f740aa937ba7e9" ]
[ "Wrapping/Generators/Python/Tests/extras.py" ]
[ "#==========================================================================\n#\n# Copyright Insight Software Consortium\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...
[ [ "numpy.array", "numpy.zeros" ] ]
ExoWorldsSpies/hops
[ "a33e434befe17318c064210a289b453c6f91b44f" ]
[ "hops/application_4_alignment.py" ]
[ "\nimport os\nimport time\nimport numpy as np\nimport matplotlib.patches as mpatches\nimport hops.pylightcurve3 as plc\nfrom astropy.io import fits as pf\n\nfrom hops.application_windows import MainWindow\n\n\nclass AlignmentWindow(MainWindow):\n\n def __init__(self, log):\n\n MainWindow.__init__(self, lo...
[ [ "numpy.array", "numpy.arccos", "numpy.sin", "numpy.median", "numpy.sum", "numpy.where", "numpy.arange", "matplotlib.patches.Circle", "numpy.cos", "numpy.append" ] ]
FrostByte266/neupy
[ "4b7127e5e4178b0cce023ba36542f5ad3f1d798c", "4b7127e5e4178b0cce023ba36542f5ad3f1d798c" ]
[ "tests/layers/graph/test_usage.py", "neupy/layers/graph.py" ]
[ "import numpy as np\n\nfrom neupy import layers\nfrom neupy.utils import asfloat\n\nfrom base import BaseTestCase\n\n\nclass UsageTestCase(BaseTestCase):\n def test_network_wrong_number_of_input_values(self):\n network = layers.join(\n layers.Input(2),\n layers.Relu(10),\n ...
[ [ "numpy.testing.assert_array_almost_equal", "numpy.random.random", "numpy.ones" ], [ "numpy.concatenate", "tensorflow.TensorShape" ] ]
JD-AI-Research-NLP/RoR
[ "201a7cc08c8b2911204d0dd966039fe99cce15a4" ]
[ "scripts/cross_f1.py" ]
[ "import json\nimport numpy as np\nimport re\nimport string\nfrom collections import Counter\nimport argparse\n\n\ndef add_arguments(parser):\n parser.add_argument(\"--regional_answer\", help=\"path to regional answer\", required=True)\n parser.add_argument(\"--global_answer\", help=\"path to global answer\", ...
[ [ "numpy.argmax" ] ]
SnowflyLXF/FedDICE
[ "a63a3233037e37ae27d6c130f37ffc4b92190d5e" ]
[ "google/estimators/importance_sampling_ci.py" ]
[ "# Copyright 2020 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.compat.v2.sort", "tensorflow.compat.v2.shape", "tensorflow.compat.v2.cast", "tensorflow.compat.v2.linspace", "tensorflow.compat.v2.reshape", "tensorflow.compat.v2.pow", "tensorflow.compat.v2.greater", "tensorflow.compat.v2.map_fn", "tensorflow.compat.v2.GradientTape...
pdharma01/models
[ "9b7317c0ad881849ce5688aeb1eb368dfb85d39f" ]
[ "research/object_detection/builders/image_resizer_builder.py" ]
[ "# Copyright 2017 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.shape", "tensorflow.concat" ] ]
San-WierPa/ginRex
[ "25af3356e22af033f30b0a8a73139635466e4f44" ]
[ "ginrex/ui/plot_exafs.py" ]
[ "\"\"\"\nThe :mod:`~ginrex.plot_exafs` module gives the following utility functions:\n\n * - :func:`absorption`\n - Returns Matplotlib.pyplot figure.\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom numpy import log\n\n\ndef absorption(filename):\n \"\"\"\n Calculates the absorption ...
[ [ "matplotlib.pyplot.show", "numpy.genfromtxt", "numpy.log", "matplotlib.pyplot.plot" ] ]
mjanddy/CarND-Capstone-master
[ "92827cd8bc28c53c9d778b23ffa84199885d98cb" ]
[ "ros/src/tl_detector/tl_detector.py" ]
[ "#!/usr/bin/env python\nimport rospy\nimport numpy as np\nfrom std_msgs.msg import Int32\nfrom geometry_msgs.msg import PoseStamped, Pose\nfrom styx_msgs.msg import TrafficLightArray, TrafficLight\nfrom styx_msgs.msg import Lane\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge\nfrom light_classifi...
[ [ "scipy.spatial.KDTree", "numpy.array", "numpy.dot" ] ]
dalpengholic/Udacity_Boston-AirBNB-Data
[ "ef918f4ddf8041a9f646e6fe786730f191746c2b" ]
[ "functions_for_AirBnB.py" ]
[ "# The collection of functions for the Boston AirBnB dataset\n\n# import necessary libraries\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom pandas.tseries.holiday import USFederalHolidayCalendar as calendar #To check holidays in the U.S\nimport time\nimport co...
[ [ "numpy.append", "numpy.array", "numpy.select", "numpy.nditer", "pandas.DatetimeIndex", "numpy.log", "pandas.concat", "pandas.DataFrame", "pandas.tseries.holiday.USFederalHolidayCalendar", "pandas.notna", "numpy.where", "pandas.Series", "pandas.read_csv", "pa...
LinMaris/JDD_PigImageClassification
[ "2b84ba524265191ea7fc1ea5dc5ba32588e6b135" ]
[ "data_preprocess.py" ]
[ "import cv2\r\nimport numpy as np\r\nimport os\r\nimport tensorflow as tf\r\n\r\nrootDir = './save/1/'\r\ndef makeData():\r\n train_writer = tf.python_io.TFRecordWriter('train.tfrecords')\r\n valid_writer = tf.python_io.TFRecordWriter('valid.tfrecords')\r\n\r\n # test_writer = tf.python_io.TFRecordWriter('...
[ [ "tensorflow.train.start_queue_runners", "tensorflow.train.BytesList", "tensorflow.decode_raw", "tensorflow.initialize_all_variables", "numpy.zeros", "tensorflow.FixedLenFeature", "tensorflow.Session", "tensorflow.python_io.TFRecordWriter", "tensorflow.reshape", "tensorflow....
e10101/models
[ "5c3e08b7697f0035b8731607277dc4e47e18317c" ]
[ "official/vision/beta/modeling/decoders/aspp.py" ]
[ "# Copyright 2021 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.keras.utils.register_keras_serializable" ] ]
daib13/second.pytorch
[ "31cd538c99e658d44aa97bb51b30d21d8ea8d438" ]
[ "create_data.py" ]
[ "import copy\nimport pathlib\nimport pickle\nimport os \n\nimport fire\nimport numpy as np\nfrom skimage import io as imgio\n\nfrom second.core import box_np_ops\nfrom second.core.point_cloud.point_cloud_ops import bound_points_jit\nfrom second.data import kitti_common as kitti\nfrom second.utils.progress_bar impor...
[ [ "numpy.concatenate", "numpy.full", "numpy.sum", "numpy.ones", "numpy.arange", "numpy.fromfile" ] ]
kartikburmee25/tensorflow-upstream
[ "1aecc51dfb26a61cbf32291cfa47e88bc02e4c04" ]
[ "tensorflow/python/tpu/tpu_test_wrapper_test.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.platform.test.mock.patch.object", "tensorflow.python.tpu.tpu_test_wrapper.import_user_module", "tensorflow.python.tpu.tpu_test_wrapper.maybe_define_flags", "tensorflow.python.tpu.tpu_test_wrapper.calculate_parent_python_path", "tensorflow.python.tpu.tpu_test_wrapper.run_user...
JennieYuanChang/object_detection
[ "289d68d309a6afabc5119600fdb5942509ca9fe8" ]
[ "tutorials/image/imagenet/classify_image.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.GraphDef", "tensorflow.gfile.Exists", "tensorflow.import_graph_def", "tensorflow.Session", "tensorflow.gfile.GFile", "numpy.float64", "tensorflow.gfile.FastGFile", "tensorflow.logging.fatal", "tensorflow.app.run", "numpy.squeeze" ] ]
kimhyoil/KoGPT2_Ai_Eassay
[ "da7d160f6815dc8ec3dfd635495978409c2a897c" ]
[ "model/torch_gpt2.py" ]
[ "# coding=utf-8\n# Copyright 2018 The OpenAI Team Authors and 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 obtain a copy o...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.cat", "torch.nn.LayerNorm", "torch.nn.Softmax", "torch.arange", "tensorflow.train.load_variable", "torch.nn.CrossEntropyLoss", "torch.ones", "torch.from_numpy", "tensorflow.train.list_variables", "torch.matmul", "tor...
liuqk3/BigGAN-PyTorch
[ "9b4491f5d68f34a1fe55bc0e8171fa3d3ad7bb08" ]
[ "utils.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n''' Utilities file\nThis file contains utility functions for bookkeeping, logging, and data loading.\nMethods which directly affect training should either go in layers, the model,\nor train_fns.py.\n'''\n\nfrom __future__ import print_function\nimport sys\nimport o...
[ [ "torch.cat", "torch.cuda.manual_seed", "torch.stack", "torch.randperm", "torch.eye", "torch.nn.parallel.data_parallel", "torch.norm", "torch.manual_seed", "torch.randint", "numpy.random.randint", "torch.utils.data.DataLoader", "torch.tensor", "torch.zeros", ...
RichardScottOZ/stackstac
[ "9e7ba8e76fe0749c3a931adda3e2074dcf8f43d6" ]
[ "stackstac/stack.py" ]
[ "from __future__ import annotations\n\nfrom typing import AbstractSet, List, Literal, Optional, Sequence, Type, Union\n\nimport numpy as np\nimport xarray as xr\nimport dask\nfrom rasterio.enums import Resampling\n\nfrom .prepare import prepare_items, to_attrs, to_coords\nfrom .raster_spec import Bbox, IntFloat, Re...
[ [ "numpy.dtype" ] ]
bmatschke/keras
[ "6c392b5ad96fb47a05019e6dda42d2af1f1ec08e" ]
[ "keras/preprocessing/sequence.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...
[ [ "numpy.max", "numpy.full", "numpy.array", "numpy.asarray", "tensorflow.python.util.tf_export.keras_export", "numpy.log", "numpy.arange", "numpy.random.randint", "numpy.sqrt", "numpy.issubdtype" ] ]
jbrry/allennlp
[ "d906175d953bebcc177567ec0157220c3bd1b9ad" ]
[ "allennlp/training/callbacks/console_logger.py" ]
[ "import logging\nfrom typing import List, Dict, Any, Optional, TYPE_CHECKING\n\nimport torch\n\nfrom allennlp.training.callbacks.callback import TrainerCallback\nfrom allennlp.training.util import get_train_and_validation_metrics\nfrom allennlp.data import TensorDict\n\nif TYPE_CHECKING:\n from allennlp.training...
[ [ "torch.set_printoptions" ] ]
quangduyhcmut/Simple_Image_ProcessinUIg_G
[ "546bf33ee4ad0904594dfe702e7c864472c617bc" ]
[ "src/intensity_func.py" ]
[ "import cv2\nimport numpy as np\n\ndef img_neg(img):\n img_negative = 255 - img\n return img_negative\n\ndef img_thres(img,threshold):\n img[img<threshold] = 0\n img[img>=threshold] =255\n return img\n\ndef img_log(image):\n image = image.astype(np.float)\n c = 255 / np.log(1 + 255)\n log_im...
[ [ "numpy.array", "numpy.vectorize", "numpy.log", "numpy.exp", "numpy.binary_repr" ] ]
jbkalmbach/astropy
[ "88ae8c615533efd1e60de4aded204943f66f881c", "88ae8c615533efd1e60de4aded204943f66f881c", "88ae8c615533efd1e60de4aded204943f66f881c", "88ae8c615533efd1e60de4aded204943f66f881c" ]
[ "astropy/nddata/tests/test_compat.py", "astropy/io/fits/tests/test_fitstime.py", "astropy/coordinates/tests/test_celestial_transformations.py", "astropy/table/tests/test_operations.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# This module contains tests of a class equivalent to pre-1.0 NDData.\n\n\nimport pytest\nimport numpy as np\n\nfrom ..nddata import NDData\nfrom ..compat import NDDataArray\nfrom ..nduncertainty import StdDevUncertainty\nfrom ... import units as u\n...
[ [ "numpy.array", "numpy.zeros_like", "numpy.zeros", "numpy.testing.assert_array_equal", "numpy.ones", "numpy.all", "numpy.dtype" ], [ "numpy.array" ], [ "numpy.zeros_like", "numpy.ones_like", "numpy.array", "numpy.testing.assert_almost_equal", "numpy.abs",...
cem0963/dpdp
[ "86f91a1e425826a3f31bcc175724c26a349fdb96" ]
[ "main_tsp.py" ]
[ "import os\nimport json\nimport argparse\nimport time\n\nimport numpy as np\n\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport torch.nn as nn\n\nfrom sklearn.utils.class_weight import compute_class_weight\n\nfrom tensorboardX import SummaryWriter\nfrom fastprogress import ...
[ [ "numpy.array", "torch.cuda.manual_seed", "torch.no_grad", "torch.FloatTensor", "numpy.mean", "torch.cuda.device_count", "torch.manual_seed", "torch.cuda.is_available", "torch.LongTensor", "torch.nn.functional.softmax", "torch.nn.DataParallel" ] ]
xyz1001/PythonToolkit
[ "b8e348764051c0184643b14f5b85c46223285d98" ]
[ "QTranslatorHelper/qtrer.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Translate Qt ts file\n\nUsage:\n qtrer [--ts_dir=<ts_dir> --excel_dir=<excel_dir> --log_level=<log_level> --patch]\n\nOptions:\n --ts_dir=<ts_dir> Qt翻译文件的目录\n --excel_dir=<excel_dir> Excel翻译文件的路径\n --loglevel=<l...
[ [ "pandas.read_csv" ] ]
kaushal21/FairMOTAssignment
[ "ca1a94a084da41cb3ad2e697e88a1032a7735caa" ]
[ "src/lib/datasets/dataset/jde.py" ]
[ "import glob\nimport math\nimport os\nimport os.path as osp\nimport random\nimport time\nfrom collections import OrderedDict\n\nimport cv2\nimport json\nimport numpy as np\nimport torch\nimport copy\n\nfrom torch.utils.data import Dataset\nfrom torchvision.transforms import transforms as T\nfrom cython_bbox import ...
[ [ "matplotlib.use", "numpy.max", "numpy.array", "numpy.clip", "numpy.concatenate", "numpy.zeros", "numpy.ascontiguousarray", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.ones", "numpy.eye", "matplotlib.pyplot.figure", "numpy.fliplr", "numpy.lo...
hercules261188/rasa
[ "6b0631f1fddf95a044c728e885e2940dd2f8f83e" ]
[ "rasa/nlu/featurizers/sparse_featurizer/_regex_featurizer.py" ]
[ "# flake8: noqa\n# WARNING: This module will be dropped before Rasa Open Source 3.0 is released.\n# This module is a workaround to defer breaking changes due to the architecture\n# revamp in 3.0.\nimport logging\nimport re\nfrom typing import Any, Dict, List, Optional, Text, Type, Tuple\nfrom path...
[ [ "numpy.zeros" ] ]
marta18a/sleep_classifiers
[ "75aaae37dafe752909cf56351911e246a4febb4d" ]
[ "source/preprocessing/heart_rate/heart_rate_service.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom source import utils\nfrom source.constants import Constants\nfrom source.preprocessing.heart_rate.heart_rate_collection import HeartRateCollection\n\n\nclass HeartRateService(object):\n\n @staticmethod\n def load_raw(subject_id):\n raw_hr_path = HeartRat...
[ [ "numpy.savetxt" ] ]
tontonlepatate/retro-gaming
[ "9f9ea2def5047e94520c266e626f87dd7c892cb1" ]
[ "game.py" ]
[ "import inspect\nimport os\n\nimport numpy as np\nimport pygame\nfrom math import sqrt\nfrom pygame import transform\nfrom pygame.draw import rect\nfrom pygame.font import SysFont\nfrom pygame.rect import Rect\nfrom pygame.surface import Surface\nfrom pygame.transform import scale\n\nfrom common import palette, RED...
[ [ "numpy.zeros" ] ]
Dev-Jahn/Fed-Framework
[ "cb6d56f17d54f771cb40c640e30cc7b498daf089" ]
[ "algs/fedavg.py" ]
[ "import logging\r\n\r\nimport wandb\r\nfrom torch import optim\r\nfrom torch.utils.data import DataLoader\r\n\r\nfrom losses import build_loss\r\nfrom metrics.basic import AverageMeter, compute_accuracy\r\nfrom utils import save_model\r\n\r\nlogger = logging.getLogger(__name__)\r\n\r\n\r\ndef train_local(net_id, ne...
[ [ "torch.utils.data.DataLoader" ] ]
mmcenta/helpful-bookworm
[ "dd1dc36ccc732684bd6a3f4fa7a8b4b8c242acf7" ]
[ "competition-docker-files/model/model.py" ]
[ "import pandas as pd\nimport os\nimport gzip\nimport argparse\nimport time\nimport re\nimport jieba\nimport pickle\nimport tensorflow as tf\nimport numpy as np\nimport sys, getopt\nfrom subprocess import check_output\nfrom keras import models\nfrom keras.layers import Dense\nfrom keras.layers import Dropout\nfrom k...
[ [ "numpy.asarray", "numpy.zeros", "tensorflow.Session", "tensorflow.ConfigProto", "tensorflow.keras.callbacks.EarlyStopping" ] ]
Travis-S/pytket
[ "ba1b63b5b22533d9366c431b91d69bf9cf77b0d7" ]
[ "pytket/backends/measurements.py" ]
[ "# Copyright 2019 Cambridge Quantum Computing\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 applicab...
[ [ "numpy.fliplr" ] ]
Chibikuri/Quantum-Othello
[ "ddbb54819181c5c0f4efdb5395fdd482e83ffccd" ]
[ "src/webapp/sample_app/manager/classify.py" ]
[ "# -*- coding: utf-8 -*-\r\nimport warnings\r\n# warnings.filterwarnings('ignore')\r\nimport matplotlib\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport sys\r\nimport os\r\nimport np\r\nimport time\r\nimport datetime\r\nimport random\r\nimport np\r\nimport pandas as pd\r\nimport multiprocessing as...
[ [ "sklearn.datasets.load_digits", "matplotlib.pyplot.contourf", "sklearn.preprocessing.StandardScaler", "scipy.special.expit", "matplotlib.pyplot.figure", "sklearn.model_selection.train_test_split", "matplotlib.colors.ListedColormap" ] ]
matzegoebel/seaborn
[ "b1fee86fdf1c96159ebb01a20be14ba136df3431" ]
[ "seaborn/_core.py" ]
[ "import warnings\nimport itertools\nfrom copy import copy\nfrom functools import partial\nfrom collections.abc import Iterable, Sequence, Mapping\nfrom numbers import Number\nfrom datetime import datetime\nfrom distutils.version import LooseVersion\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mp...
[ [ "pandas.api.types.is_numeric_dtype", "pandas.api.types.is_datetime64_dtype", "numpy.sort", "pandas.api.types.is_categorical_dtype", "pandas.DataFrame", "pandas.unique", "numpy.log10", "matplotlib.markers.MarkerStyle", "pandas.to_numeric", "pandas.isna", "numpy.isnan", ...
adbmd/pytorch_block_sparse
[ "0985083851a5708cfb3adf50da19860f467e51ae" ]
[ "pytorch_block_sparse/tests/test_basic.py" ]
[ "from unittest import TestCase\nimport torch\nfrom torch import tensor\nimport unittest\nfrom pytorch_block_sparse import BlockSparseMatrix\n\nclass TestFun(TestCase):\n def test0(self):\n tests = [dict(size= [128, 64],\n blocks= [(0, 0), (1, 0), (2, 0), (0, 1), ],\n ...
[ [ "torch.tensor" ] ]
Jacktavitt/navigate_building
[ "cfa6aa2fffdf107a619b2627f9a0b0397cd1a8c2" ]
[ "source/ImageGeneration/imageTest.py" ]
[ "import CustomImage as ci\nimport numpy as np\nimport random\nimport cv2\n\n\ngenim1 = ci.GeneratedImage(np.full((512,512,3), (120,120,120),dtype = np.uint8), color=True)\ngenim1.random_lines(num_lines = 13)\n# genim1.show()\n\ngenim2 = ci.GeneratedImage(genim1, copy =True)\ngenim2.random_rectangles(num_recs=4)\n# ...
[ [ "numpy.full" ] ]
jina-ai/finetuner
[ "6b8701c6ca372310364e6791c1c2761700dfc150" ]
[ "tests/unit/tuner/pytorch/test_loss.py" ]
[ "import numpy as np\nimport pytest\nimport torch\nimport torch.nn.functional as F\n\nfrom finetuner.tuner.pytorch.losses import (\n NTXentLoss,\n SiameseLoss,\n TripletLoss,\n get_distance,\n)\n\nN_BATCH = 10\nN_DIM = 128\n\nALL_LOSSES = [SiameseLoss, TripletLoss]\n\n\n@pytest.mark.parametrize('margin',...
[ [ "torch.rand", "numpy.mean", "torch.nn.functional.log_softmax", "torch.ones", "torch.tensor" ] ]
skinnersBoxy/input-filter
[ "6528b6dc094c59ac6d28a24016d0c42de495d313" ]
[ "python/efcamdat/preprocess_efcamdat.py" ]
[ "\"\"\" Processes English L2 parse tree data into (determiner, noun category, count) triplets. \"\"\"\nimport argparse\nimport datetime\nimport gc\nimport xml.etree.ElementTree as ElementTree\n\nimport pandas as pd\n\n\ndef get_flags():\n \"\"\" Parses the flags. \"\"\"\n parser = argparse.ArgumentParser(\n ...
[ [ "pandas.read_csv" ] ]
jmehault/genetic_algorithm_feature_selection
[ "43d250f35be69b32943963201165ea941fb173da" ]
[ "test_ga_scripts/compare_selections.py" ]
[ "import time\nimport numpy as np\nimport pandas as pd\nimport genetic_algorithm_feature_selection.variable_selection as vs\nimport genetic_algorithm_feature_selection.genetic_steps as gs\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.datasets import make_regression\nfrom sklearn.feature_selection ...
[ [ "numpy.array", "sklearn.feature_selection.RFECV", "pandas.Index", "sklearn.linear_model.LinearRegression", "pandas.DataFrame", "numpy.random.randn", "sklearn.datasets.make_regression", "pandas.concat", "pandas.Series" ] ]
NTForked/marvin
[ "a5f242ec7a8ba7ab7af7cb1590eb4932a2b13cda" ]
[ "python/marvin/io.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function, division\nimport numpy as np\nimport struct\n\n\nclass Tensor(object):\n def __init__(self):\n self.name = None\n self.value = None\n \n\nCODE_TO_TYPE = {\n 0: np.float16,\n 1: np.float32,\n 2:...
[ [ "numpy.prod", "numpy.array", "numpy.fromstring", "numpy.dtype" ] ]
LeoPaoli/sankeyview
[ "99f21a7d90888a85bb5aac2f57e9c72bd9de4a8a" ]
[ "test/test_dataset.py" ]
[ "import pytest\n\nimport pandas as pd\n\nfrom sankeyview.dataset import Dataset, eval_selection\nfrom sankeyview.sankey_definition import ProcessGroup, Bundle, Elsewhere\n\n\ndef _dataset():\n dim_process = pd.DataFrame.from_records(\n [\n ('a1', 'a'),\n ('a2', 'a'),\n ('b...
[ [ "pandas.DataFrame", "pandas.DataFrame.from_records" ] ]
mingruimingrui/E2EGraphSage
[ "90de7befd3a8ced514697c073b4c64e96b63bdb0" ]
[ "e2e_graphsage/data/datasets/edge_dataset.py" ]
[ "\"\"\"\n\"\"\"\n\nimport random\nfrom collections import Iterable\n\nimport numpy as np\nimport torch.utils.data\n\n\nclass EdgeDataset(torch.utils.data.Dataset):\n def __init__(self, adjacency_list, src_node_ids=None):\n formatted_adjacency_list = []\n for neighbors in adjacency_list:\n ...
[ [ "numpy.ascontiguousarray", "numpy.array" ] ]
zachlindsey/great_expectations
[ "953e152e35e065b443563ab87e94dd84573bdad1" ]
[ "tests/dataset/test_pandas_dataset.py" ]
[ "import datetime\nimport json\nfrom unittest import mock\n\nimport pandas as pd\nimport pytest\n\nimport great_expectations as ge\nfrom great_expectations import DataContext\nfrom great_expectations.core import ExpectationSuite\nfrom great_expectations.core.expectation_configuration import ExpectationConfiguration\...
[ [ "pandas.DataFrame", "pandas.concat" ] ]
RamsteinWR/Diabetic-Retinopathy-Blindness-Detection
[ "24390aeefd197600255a961189872dd4dfc77092" ]
[ "train_cls.py" ]
[ "from __future__ import absolute_import\n\nimport argparse\nimport collections\nimport json\nimport multiprocessing\nimport os\nfrom datetime import datetime\n\nimport torch\nfrom catalyst.dl import SupervisedRunner, EarlyStoppingCallback\nfrom catalyst.utils import load_checkpoint, unpack_checkpoint\nfrom pytorch_...
[ [ "torch.cuda.empty_cache", "torch.autograd.detect_anomaly" ] ]
spyflying/Referring-Image-Segmentation-via-Cross-Modal-Progressive-Comprehension
[ "094639b8bf00cc169ea7b49cdf9c87fdfc70d963" ]
[ "trainval_model.py" ]
[ "from __future__ import division\n\nimport sys\nimport os\nimport argparse\nimport tensorflow as tf\nimport skimage\nfrom skimage import io as sio\nimport time\n# import matplotlib.pyplot as plt\nfrom get_model import get_segmentation_model\nfrom pydensecrf import densecrf\n\nfrom util import data_reader\nfrom util...
[ [ "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.global_variables", "tensorflow.ConfigProto", "tensorflow.global_variables_initializer" ] ]